/* ==========================================================================
   Humsafar — marketing site
   Design tokens mirror the app's palette 1:1:
     Android app/src/main/java/com/cupid/ui/theme/{Color,Gradients,Type,Shapes}.kt
     iOS      Cupid/Cupid/Utilities/Palette.{swift,xcassets}, CPrimaryGradient.swift
   Keep these values in sync with the apps when the palette changes.
   ========================================================================== */

:root {
  /* Palette — light (LightCupidColors) */
  --fg-primary:   #164032;
  --fg-secondary: #ffffff;
  --fg-tetriary:  #bce5ca;
  --fg-mute:      rgba(22, 64, 50, .8);

  --bg-primary:   #f5f5f5;
  --bg-secondary: #1b4b3a;
  --bg-tetriary:  #fdfcfc;

  --c-beige:  #cebb93;
  --c-red:    #cb1a2b;
  --c-gold:   #d4af37;
  --c-error:  #c80417;
  --accent:   #cebb93;

  /* Primary gradient — CGradientButtonLabel / primaryGradientBackground */
  --grad-start: #164032;
  --grad-end:   #d4af37;
  --gradient: linear-gradient(90deg, var(--grad-start) 0%, var(--grad-start) 71%, var(--grad-end) 100%);

  /* Shapes — CupidShapes */
  --r-button:  22px;
  --r-section: 22px;
  --r-card:    12px;
  --r-field:   12px;
  --r-bubble:  16px;

  --surface: #ffffff;
  --line: rgba(22, 64, 50, .12);
  --shadow-sm: 0 1px 2px rgba(16, 40, 32, .06), 0 4px 12px rgba(16, 40, 32, .05);
  --shadow-lg: 0 24px 60px rgba(11, 33, 26, .18), 0 4px 14px rgba(11, 33, 26, .10);

  --maxw: 1120px;
  --gutter: 24px;

  /* Type — CupidTypography (Arial family, bold headings) */
  --font: Arial, "Helvetica Neue", Helvetica, "Liberation Sans", sans-serif;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fg-primary:   #ffffff;
    --fg-secondary: #ffffff;
    --fg-tetriary:  #4b5563;
    --fg-mute:      rgba(157, 163, 174, .9);

    --bg-primary:   #212936;
    --bg-secondary: #1b4b3a;
    --bg-tetriary:  #394150;

    --accent: #ecef4a;
    --c-error: #ff0018;
    --grad-end: #ecef4a;

    --surface: #2b3442;
    --line: rgba(255, 255, 255, .12);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 12px rgba(0, 0, 0, .3);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, .55), 0 4px 14px rgba(0, 0, 0, .35);
  }
}

/* -------------------------------------------------------------- base ---- */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--fg-primary);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

h1, h2, h3, h4 { font-weight: bold; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.015em; }
h1 { font-size: clamp(2.1rem, 6vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.5rem); }
h3 { font-size: 1.125rem; }
p  { margin: 0 0 1em; }

.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

.section { padding: clamp(56px, 9vw, 104px) 0; }
.section-head { max-width: 62ch; margin-bottom: 40px; }
.eyebrow {
  font-size: .75rem; font-weight: bold; letter-spacing: .14em; text-transform: uppercase;
  color: var(--c-gold); margin: 0 0 12px;
}
.lede { font-size: 1.125rem; color: var(--fg-mute); }

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

:focus-visible { outline: 3px solid var(--c-gold); outline-offset: 2px; border-radius: 4px; }

/* ------------------------------------------------------------ buttons ---- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 26px;
  border: 0; border-radius: var(--r-button);
  font: inherit; font-weight: bold; font-size: .875rem;
  text-decoration: none; cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

/* mirrors CGradientButtonLabel: 44dp tall, radius 22, primary gradient */
.btn-primary { background: var(--gradient); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { box-shadow: 0 8px 22px rgba(22, 64, 50, .28); }

.btn-ghost { background: transparent; color: var(--fg-primary); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--c-gold); }

.btn-on-dark { background: rgba(255, 255, 255, .12); color: #fff; border: 1.5px solid rgba(255, 255, 255, .3); }
.btn-on-dark:hover { background: rgba(255, 255, 255, .2); }

/* store badges ---------------------------------------------------------- */

/*
 * Official artwork only — both vendors forbid recreating or altering the badge:
 *   Apple  https://developer.apple.com/app-store/marketing/guidelines/
 *   Google https://partnermarketinghub.withgoogle.com/brands/google-play/
 *
 * Sizing rules encoded below:
 *   - Apple: minimum 40px tall onscreen; clear space >= 1/4 the badge height.
 *     The SVG is 119.664 x 40 with no built-in padding, so we add it here.
 *     Rendered at 44px tall (matching the app's own 44dp button) -> 11px clear space.
 *   - Google: minimum 28px tall; clear space >= 1/4 the badge height, which is
 *     already baked into the asset (measured: 646x250 image, 564x168 badge,
 *     41px padding on all four sides = 0.244 of badge height). So the image is
 *     rendered at 66px tall for a 44.35px visible badge and needs no extra padding.
 *   - Google requires its badge to be the same size or larger than other stores'
 *     (44.35 >= 44), and Apple requires the App Store badge first in the lineup.
 *   - No hover transform, filter or animation: "Don't modify, angle, or animate".
 */

.stores { display: flex; flex-wrap: wrap; align-items: center; margin-top: 28px; }

.store { display: inline-flex; text-decoration: none; border-radius: 8px; }
.store img { display: block; width: auto; }

.store--apple { padding: 11px; }
.store--apple img { height: 44px; }

.store--google img { height: 66px; }

/* ------------------------------------------------------------- header ---- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg-primary) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, background .2s ease;
}
.site-header.is-stuck { border-bottom-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 20px; min-height: 68px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: bold; font-size: 1.25rem; }
.brand svg { width: 32px; height: 32px; flex: none; }

.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a {
  padding: 8px 14px; border-radius: 999px; text-decoration: none;
  font-size: .875rem; font-weight: bold; color: var(--fg-mute);
  transition: color .16s ease, background .16s ease;
}
.nav a:hover { color: var(--fg-primary); background: color-mix(in srgb, var(--fg-primary) 7%, transparent); }

/* the CTA is a button, not a nav link — restate what `.nav a` would otherwise win */
.nav a.btn {
  margin-left: 8px; padding: 0 22px;
  border-radius: var(--r-button); color: #fff;
}
.nav a.btn:hover { color: #fff; background: var(--gradient); }

.nav-toggle {
  margin-left: auto; display: none; width: 44px; height: 44px;
  align-items: center; justify-content: center;
  background: none; border: 1.5px solid var(--line); border-radius: 12px;
  color: inherit; cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute; inset: 68px 0 auto; margin: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 12px var(--gutter) 20px;
    background: var(--bg-primary); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
  }
  .nav[hidden] { display: none; }
  .nav a { padding: 12px 8px; }
  .nav .btn { margin: 8px 0 0; }
}

/* --------------------------------------------------------------- hero ---- */

.hero {
  position: relative; overflow: hidden;
  background: var(--bg-secondary);
  color: #fff;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(900px 520px at 82% 18%, rgba(212, 175, 55, .38), transparent 62%),
    radial-gradient(700px 460px at 6% 92%, rgba(188, 229, 202, .16), transparent 60%);
  pointer-events: none;
}
.hero .wrap { position: relative; }

.hero-grid {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center;
  padding: clamp(56px, 8vw, 96px) 0 clamp(64px, 9vw, 104px);
}
.hero h1 { color: #fff; }
.hero h1 em { font-style: normal; color: var(--c-beige); }
.hero-lede { font-size: 1.1875rem; color: rgba(255, 255, 255, .84); max-width: 46ch; }
.hero .eyebrow { color: var(--c-beige); }
.hero-note { font-size: .8125rem; color: rgba(255, 255, 255, .6); margin-top: 18px; }

.hero-phones { position: relative; display: flex; justify-content: center; align-items: flex-start; }
.hero-phones .phone--front { position: relative; z-index: 2; transform: rotate(-3deg); }
.hero-phones .phone--back {
  position: absolute; right: 0; bottom: -6%; z-index: 1;
  width: 56%; max-width: none; transform: rotate(7deg);
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-phones { max-width: 460px; margin-inline: auto; }
}

/* -------------------------------------------------------- phone frame ---- */

/*
 * The screenshot itself sets the frame's height (width:100% + height:auto), so the
 * frame always matches whatever you drop in and nothing is ever cropped. Do not
 * reintroduce a fixed aspect-ratio here with object-fit:cover — a flex or grid
 * parent stretches the box and silently crops the bottom of the screenshot.
 */
.phone {
  position: relative; width: 100%; max-width: 300px; margin-inline: auto;
  background: #0d1512;
  border-radius: 46px;
  padding: 9px;
  box-shadow: var(--shadow-lg), inset 0 0 0 1.5px rgba(255, 255, 255, .14);
}
.phone::after { /* Dynamic Island */
  content: ""; position: absolute; top: 20px; left: 50%; transform: translateX(-50%);
  width: 29%; height: 3.4%; background: #0d1512; border-radius: 999px; z-index: 2;
}
.phone img {
  width: 100%; height: auto;
  border-radius: 38px; background: var(--bg-primary);
}
.phone--sm { max-width: 240px; border-radius: 38px; padding: 7px; }
.phone--sm img { border-radius: 32px; }
.phone--sm::after { top: 16px; height: 3%; }

/* ------------------------------------------------------- trust strip ---- */

.trust {
  border-top: 1px solid rgba(255, 255, 255, .14);
  background: rgba(0, 0, 0, .14);
}
.trust ul {
  list-style: none; margin: 0; padding: 20px 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px 24px;
}
.trust li {
  display: flex; align-items: center; gap: 10px;
  font-size: .875rem; font-weight: bold; color: rgba(255, 255, 255, .9);
}
.trust svg { width: 18px; height: 18px; flex: none; color: var(--c-beige); }
@media (max-width: 860px) { .trust ul { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .trust ul { grid-template-columns: 1fr; } }

/* ----------------------------------------------------------- features ---- */

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .features { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-section);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--c-gold) 45%, var(--line)); }
.card h3 { margin-bottom: 8px; }
.card p { margin: 0; color: var(--fg-mute); font-size: .9375rem; }

.card-icon {
  width: 48px; height: 48px; border-radius: 14px;
  display: grid; place-items: center; margin-bottom: 18px;
  background: var(--gradient); color: #fff;
}
.card-icon svg { width: 24px; height: 24px; }

/* ------------------------------------------------------------ screens ---- */

.screens {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr);
  gap: 28px; overflow-x: auto; padding: 8px 4px 24px;
  scroll-snap-type: x mandatory; scrollbar-width: thin;
}
.screens > figure { margin: 0; scroll-snap-align: center; }
.screens figcaption {
  margin-top: 18px; text-align: center; font-size: .875rem; color: var(--fg-mute);
  max-width: 30ch; margin-inline: auto;
}
.screens figcaption b { display: block; color: var(--fg-primary); font-size: .9375rem; }

/* ------------------------------------------------------------ privacy ---- */

.band {
  background: var(--bg-secondary); color: #fff;
  position: relative; overflow: hidden;
}
.band::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(700px 420px at 88% 8%, rgba(212, 175, 55, .3), transparent 62%);
}
.band .wrap { position: relative; }
.band h2 { color: #fff; }
.band .lede { color: rgba(255, 255, 255, .82); }

.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 40px; } }

.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.checks li { display: grid; grid-template-columns: 26px 1fr; gap: 14px; align-items: start; }
.checks svg { width: 22px; height: 22px; margin-top: 3px; color: var(--c-beige); }
.checks b { display: block; }
.checks span { color: rgba(255, 255, 255, .78); font-size: .9375rem; }

/* ----------------------------------------------------------- download ---- */

.download-inner {
  background: var(--gradient); color: #fff;
  border-radius: var(--r-section);
  padding: clamp(36px, 6vw, 64px);
  display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center;
}
.download-inner h2 { color: #fff; margin-bottom: 8px; }
.download-inner p { margin: 0; color: rgba(255, 255, 255, .86); }
@media (max-width: 820px) { .download-inner { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------- form ---- */

.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 56px; align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; gap: 36px; } }

.contact-aside p { color: var(--fg-mute); }
.contact-aside a { color: var(--fg-primary); font-weight: bold; }

.form {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-section); padding: clamp(24px, 4vw, 36px);
  box-shadow: var(--shadow-sm);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

.field { margin-bottom: 18px; }
.field label { display: block; font-size: .8125rem; font-weight: bold; margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; font: inherit; font-size: .9375rem; color: var(--fg-primary);
  background: var(--bg-tetriary);
  border: 1.5px solid var(--line); border-radius: var(--r-field);
  padding: 12px 14px; transition: border-color .16s ease, box-shadow .16s ease;
}
.field textarea { min-height: 148px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--c-gold);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-gold) 26%, transparent);
}
.field .err { display: none; margin-top: 6px; font-size: .8125rem; font-weight: bold; color: var(--c-error); }
.field.has-error input, .field.has-error textarea { border-color: var(--c-error); }
.field.has-error .err { display: block; }

/* honeypot — hidden from people, visible to naive bots */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 4px; }
.form-foot .fineprint { font-size: .75rem; color: var(--fg-mute); margin: 0; flex: 1 1 200px; }

.form-status { margin: 18px 0 0; padding: 14px 16px; border-radius: var(--r-card); font-size: .9375rem; font-weight: bold; }
.form-status[hidden] { display: none; }
.form-status.ok { background: color-mix(in srgb, var(--bg-secondary) 12%, transparent); color: var(--fg-primary); border: 1px solid var(--line); }
.form-status.bad { background: color-mix(in srgb, var(--c-error) 10%, transparent); color: var(--c-error); border: 1px solid color-mix(in srgb, var(--c-error) 35%, transparent); }

.btn[aria-busy="true"] { opacity: .65; pointer-events: none; }

/* ------------------------------------------------------------- footer ---- */

.site-footer { border-top: 1px solid var(--line); padding: 48px 0 40px; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; align-items: flex-start; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.footer-links a { font-size: .875rem; font-weight: bold; text-decoration: none; color: var(--fg-mute); }
.footer-links a:hover { color: var(--fg-primary); }
.footer-legal { font-size: .8125rem; color: var(--fg-mute); margin: 24px 0 0; }

/* ---------------------------------------------------------- doc pages ---- */

.doc { max-width: 760px; }
.doc h1 { margin-bottom: 8px; }
.doc .updated { color: var(--fg-mute); font-size: .875rem; margin-bottom: 32px; }
.doc h2 { font-size: 1.5rem; margin-top: 44px; }
.doc h3 { margin-top: 28px; }
.doc ul, .doc ol { padding-left: 22px; }
.doc li { margin-bottom: 8px; }
.doc a { color: var(--fg-primary); }
.doc table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: .9375rem; }
.doc th, .doc td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc th { font-weight: bold; }
.doc-scroll { overflow-x: auto; }

.notice {
  border: 1.5px dashed color-mix(in srgb, var(--c-gold) 60%, var(--line));
  border-radius: var(--r-card);
  background: color-mix(in srgb, var(--c-beige) 16%, transparent);
  padding: 16px 18px; font-size: .9375rem; margin-bottom: 32px;
}
.notice strong { display: block; margin-bottom: 4px; }

.todo {
  padding: .1em .45em;
  border-radius: 6px;
  background: color-mix(in srgb, var(--c-gold) 22%, transparent);
  color: var(--fg-primary);
  font-weight: 600;
  font-size: .9em;
}

.faq { border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); margin-bottom: 12px; }
.faq summary { cursor: pointer; padding: 16px 18px; font-weight: bold; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; font-size: 1.25rem; line-height: 1; color: var(--c-gold); }
.faq[open] summary::after { content: "\2212"; }
.faq .faq-body { padding: 0 18px 16px; color: var(--fg-mute); font-size: .9375rem; }
.faq .faq-body p:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------- reveal ---- */

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .card:hover { transform: none; }
}
