/* ============================================================
   FlipFinder landing — Nearo-style sky-blue hero
   Vanilla CSS, mobile-first, no build step.
   ============================================================ */

:root {
  /* FlipFinder green for accents (signup form) */
  --green: #219b3e;
  --green-bright: #34d862;
  --green-dark: #0f5824;

  /* Sky-blue palette (the Nearo hero vibe) */
  --sky-top:    #4ea8e6;
  --sky-mid:    #7ac0ee;
  --sky-bottom: #cfe7f8;

  --ink: #0a0a0a;
  --paper: #ffffff;
  --paper-soft: #f4f6f4;
  --border: #e4e7e4;
  --muted: #6b7570;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

/* ============================================================
   HEADER
   ============================================================ */

.site-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(20px, 5vw, 36px);
  background: transparent;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand-mark {
  height: 32px;
  width: auto;
  border-radius: 0;        /* PNG already has its own shape */
  object-fit: contain;
}
/* Footer is dark — a logo designed for light backgrounds becomes invisible.
   `invert` flips the colour, `brightness` recovers white, and `hue-rotate(180deg)`
   neutralises the colour shift so brand greens stay green. */
.brand-mark-light {
  filter: brightness(0) invert(1);
}

.brand-name {
  font-size: 17px;
  color: white;
}

.header-cta {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 20px;
  border-radius: 999px;
  background: white;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* ============================================================
   HERO
   ============================================================ */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;       /* center hero content vertically */
  padding: 110px clamp(20px, 5vw, 40px) 0;
  /* No `overflow: hidden` — we let the mockup cards peek out the bottom. */
  isolation: isolate;
  background: #052819;          /* fallback so the dark-green tint is consistent */
}

/* Photograph layer — sharp so users can see the building */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    url("assets/david-rodrigo-Fr6zexbmjmc-unsplash.jpg") center/cover no-repeat;
  z-index: -2;
}

/* Top: gentle dark-green tint for headline contrast.
   Middle: tint relaxes so the photo is visible.
   Bottom 35%: fades to opaque white, giving the mockup cards a clean
   surface to sit on instead of an abrupt edge between photo and signup. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg,
      rgba(5, 40, 25, 0.30) 0%,
      rgba(5, 40, 25, 0.20) 30%,
      rgba(5, 40, 25, 0.05) 50%,
      rgba(255, 255, 255, 0.55) 65%,
      rgba(255, 255, 255, 0.92) 80%,
      var(--paper) 100%);
  z-index: -1;
}

.hero-inner {
  width: 100%;
  max-width: 1280px;        /* wider so the long headline fits on one line */
  text-align: center;
  position: relative;
  z-index: 2;
}

.badge {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: white;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.hero-title {
  margin: 22px 0 16px;
  /* Two-line headline: "Find UAE property deals" / "before anyone else." */
  font-size: clamp(36px, 6vw, 76px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: white;
  text-shadow:
    0 2px 24px rgba(0, 0, 0, 0.45),
    0 1px 2px rgba(0, 0, 0, 0.25);
}

.hero-sub {
  margin: 0 auto 32px;
  max-width: 580px;
  font-size: clamp(15px, 1.6vw, 18px);
  font-weight: 500;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.92);
}

.hero-cta {
  margin-bottom: 18px;
}

.hero-perk {
  margin: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.92);
  /* Layered shadow: tight dark drop for legibility + soft glow that
     visually separates the line from the busy photo behind it. */
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.55),
    0 2px 16px rgba(0, 0, 0, 0.45);
}
.hero-perk strong {
  color: var(--green-bright);    /* "1,000 users" + "50% off" pop in brand green */
  font-weight: 700;
  /* Match the shadow but darker, so the green doesn't blend with light areas
     of the photo — gives it a subtle "punched-out" look. */
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.7),
    0 2px 14px rgba(0, 0, 0, 0.5);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: none;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.btn-light {
  background: white;
  color: var(--ink);
  box-shadow: 0 12px 28px rgba(0, 60, 110, 0.22);
}
.btn-light:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(0, 60, 110, 0.28);
}

.btn-primary {
  background: var(--green);
  color: white;
  box-shadow: 0 8px 20px rgba(33, 155, 62, 0.3);
}
.btn-primary:hover {
  background: var(--green-dark);
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(33, 155, 62, 0.35);
}

/* ============================================================
   MOCKUP CARDS — floating preview cards beneath the hero copy
   ============================================================ */

/* Mockup cards sit BELOW the hero in normal flow. They reveal on scroll. */
.mockup-row {
  position: relative;
  width: 100%;
  max-width: 1100px;
  margin: 60px auto 0;          /* no bottom margin — let signup padding handle the gap */
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  z-index: 1;
}

@media (min-width: 720px) {
  .mockup-row {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 80px;
  }
}

.mock-card {
  background: white;
  border-radius: 22px;
  box-shadow: 0 30px 60px rgba(0, 60, 110, 0.18);
  padding: 18px;
  transition: transform 0.4s ease;
}

.mock-card:hover {
  transform: translateY(-4px);
}

@media (min-width: 720px) {
  .mock-card:nth-child(1) { transform: translateY(20px) rotate(-2deg); }
  .mock-card:nth-child(2) { transform: translateY(-10px); }
  .mock-card:nth-child(3) { transform: translateY(40px) rotate(2deg); }
  .mock-card:nth-child(1):hover { transform: translateY(14px) rotate(-2deg); }
  .mock-card:nth-child(2):hover { transform: translateY(-16px); }
  .mock-card:nth-child(3):hover { transform: translateY(34px) rotate(2deg); }
}

/* Card 1: Deal preview */
.mock-deal-image {
  position: relative;
  height: 130px;
  border-radius: 14px;
  margin-bottom: 14px;
  overflow: hidden;
  background: #e6eef4;
}
.mock-deal-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.mock-confidence {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--green-dark);
  font-size: 11px;
  font-weight: 700;
}
.mock-deal-title {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.mock-deal-meta {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.mock-deal-stats {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.mock-deal-stats > div { flex: 1; }
.mock-label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.mock-value {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin-top: 2px;
}
.mock-positive { color: var(--green-dark); }

/* Card 2: Alert */
.mock-alert-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.mock-alert-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(33, 155, 62, 0.12);
  color: var(--green-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mock-alert-text { flex: 1; min-width: 0; }
.mock-alert-title {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.mock-alert-sub {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.mock-alert-time {
  font-size: 11px;
  color: var(--muted);
  flex-shrink: 0;
}
/* Three small property thumbnails representing the new matches */
.mock-alert-thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 14px;
}
.mock-alert-thumbs img {
  width: 100%;
  height: 56px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

.mock-alert-pills {
  display: flex;
  gap: 6px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.mock-pill {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--paper-soft);
  border: 1px solid var(--border);
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
}
.mock-pill-green {
  background: rgba(33, 155, 62, 0.12);
  border-color: transparent;
  color: var(--green-dark);
}

/* Card 3: Stats — header image + numbers grid */
.mock-stats-header {
  position: relative;
  height: 70px;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 12px;
  background: #e6eef4;
}
.mock-stats-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mock-stats-header::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.55));
}
.mock-stats-label {
  position: absolute;
  inset: auto 14px 12px 14px;
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: white;
  margin-bottom: 0;
  z-index: 1;
}
.mock-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.mock-stats-grid > div {
  background: var(--paper-soft);
  border-radius: 12px;
  padding: 12px 10px;
  text-align: center;
}
.mock-stats-num {
  display: block;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-feature-settings: "tnum";
}
.mock-stats-key {
  display: block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-top: 2px;
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */

[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1),
              transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
[data-reveal].in {
  opacity: 1;
  transform: none;
}

/* On larger screens, preserve the rotated mock-card transforms after reveal */
@media (min-width: 720px) {
  .mock-card[data-reveal] { transform: translateY(50px); }
  .mock-card[data-reveal].in:nth-child(1) { transform: translateY(20px) rotate(-2deg); }
  .mock-card[data-reveal].in:nth-child(2) { transform: translateY(-10px); }
  .mock-card[data-reveal].in:nth-child(3) { transform: translateY(40px) rotate(2deg); }
}

/* ============================================================
   SIGNUP
   ============================================================ */

.signup {
  padding: clamp(48px, 7vw, 80px) clamp(20px, 5vw, 40px) clamp(80px, 12vw, 140px);
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper-soft) 100%);
  text-align: center;
}

.signup-inner { max-width: 560px; margin: 0 auto; }

.section-title {
  font-size: clamp(28px, 4.5vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 0 0 14px;
  color: var(--ink);
}

.section-sub {
  font-size: clamp(15px, 1.5vw, 18px);
  color: var(--muted);
  margin: 0 auto 40px;
  max-width: 560px;
  line-height: 1.55;
}

.signup-form {
  display: flex;
  flex-direction: column;
  gap: 16px;                   /* bigger gap so fingers can't accidentally hit both */
  margin-bottom: 20px;
}
@media (min-width: 540px) {
  .signup-form {
    flex-direction: row;
    gap: 12px;                 /* tighter on desktop where they're side-by-side */
  }
}

.signup-form input[type="email"] {
  display: block;
  flex: 1;
  width: 100%;
  min-width: 0;
  /* Padding-driven sizing — no fixed height, so iOS Safari can't squash the
     input. 22px top/bottom + 16px font + line-height gives ~62px tall. */
  padding: 22px 24px;
  min-height: 64px;            /* hard floor for a thumb-friendly tap target */
  line-height: 1.2;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--paper);
  font-size: 16px;             /* 16px prevents iOS zoom-on-focus */
  color: var(--ink);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
  margin: 0;                   /* drop any default UA margin */
}
.signup-form input[type="email"]:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(33, 155, 62, 0.15);
}
.signup-form .btn {
  position: relative;
  min-height: 64px;            /* match the new input height floor */
  padding: 0 32px;
  flex-shrink: 0;
}

.btn-spinner {
  display: none;
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: white;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.signup-form.is-submitting .btn-label { visibility: hidden; }
.signup-form.is-submitting .btn-spinner {
  display: block;
  position: absolute; top: 50%; left: 50%;
  margin-top: -9px; margin-left: -9px;
}

.signup-success, .signup-error {
  margin: 0 0 16px;
  padding: 14px 18px;
  border-radius: 14px;
  font-size: 14px; font-weight: 500;
}
.signup-success { background: rgba(33, 155, 62, 0.1); color: var(--green-dark); }
.signup-error   { background: rgba(220, 38, 38, 0.1); color: #b91c1c; }
.signup-error a { text-decoration: underline; }
.signup-fineprint { font-size: 12px; color: var(--muted); margin: 0; }

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.65);
  padding: 32px clamp(20px, 5vw, 40px);
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  font-size: 13px;
}
@media (min-width: 720px) {
  .footer-inner { flex-direction: row; justify-content: space-between; }
}
.site-footer .brand-name { color: var(--paper); }
.footer-link { color: rgba(255, 255, 255, 0.65); transition: color 0.18s ease; }
.footer-link:hover { color: var(--green-bright); }

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  @media (min-width: 720px) {
    .mock-card[data-reveal].in:nth-child(1) { transform: translateY(20px) rotate(-2deg) !important; }
    .mock-card[data-reveal].in:nth-child(2) { transform: translateY(-10px) !important; }
    .mock-card[data-reveal].in:nth-child(3) { transform: translateY(40px) rotate(2deg) !important; }
  }
}
