/* Broker Free — marketing + legal site
   Static, no build step. Brand palette mirrors the iOS app (Brand.swift). */

:root {
  --teal: #0D9488;
  --teal-dark: #0B6B62;
  --teal-bright: #14b8a6;
  --amber: #F59E0B;
  --amber-soft: #FEF3C7;
  --soft: #E6FBF7;

  --ink: #0b1220;
  --body: #334155;
  --muted: #64748b;
  --line: #e6ebf1;
  --surface: #ffffff;
  --surface-2: #f7fafc;
  --shadow: 0 1px 2px rgba(15,23,42,.04), 0 12px 32px rgba(15,23,42,.06);
  --shadow-lg: 0 30px 80px -28px rgba(11,107,98,.45);

  --radius: 20px;
  --radius-sm: 14px;
  --maxw: 1120px;
  --nav-h: 68px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --soft: #0e2a27;
    --ink: #f1f5f9;
    --body: #cbd5e1;
    --muted: #94a3b8;
    --line: #1e293b;
    --surface: #0b1220;
    --surface-2: #0f1729;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 12px 32px rgba(0,0,0,.4);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--body);
  background: var(--surface);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3 { color: var(--ink); letter-spacing: -0.02em; line-height: 1.12; }
a { color: var(--teal); text-decoration: none; transition: color .15s ease, opacity .15s ease; }
a:hover { color: var(--teal-dark); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--teal);
  background: var(--soft); padding: 6px 12px; border-radius: 999px; margin-bottom: 18px;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  height: var(--nav-h); padding: 0 24px; max-width: var(--maxw); margin: 0 auto;
  width: 100%;
}
.nav-wrap {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, background .25s ease;
}
.nav-wrap.scrolled { border-bottom-color: var(--line); }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 19px; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand .dot {
  width: 32px; height: 32px; border-radius: 10px;
  background: linear-gradient(135deg, var(--teal-bright), var(--teal-dark));
  box-shadow: 0 6px 16px -4px rgba(13,148,136,.6);
  display: inline-flex; align-items: center; justify-content: center;
  position: relative;
}
.brand .dot::after {
  content: ""; width: 13px; height: 13px; border: 2.5px solid #fff; border-radius: 4px 4px 4px 0;
  transform: rotate(0deg);
}
.brand .free { color: var(--teal); }
/* Real Broker Free app icon used as the brand mark (nav, footer, comparison). */
.brand-logo {
  width: 34px; height: 34px; border-radius: 10px; object-fit: cover; display: inline-block;
  box-shadow: 0 6px 16px -5px rgba(13,148,136,.55);
}
.brand-logo.sm { width: 24px; height: 24px; border-radius: 7px; box-shadow: none; }
.nav .links { display: flex; align-items: center; gap: 22px; }

/* Language toggle (BG / EN) */
.lang-toggle {
  display: inline-flex; align-items: center; border: 1px solid var(--line);
  border-radius: 999px; overflow: hidden; cursor: pointer; user-select: none;
}
.lang-toggle span {
  font-size: 12.5px; font-weight: 800; letter-spacing: .02em; color: var(--muted);
  padding: 6px 11px; transition: background .15s ease, color .15s ease;
}
.lang-toggle span.on { background: var(--teal); color: #fff; }
@media (max-width: 380px) { .nav .links { gap: 14px; } }
.nav .links a { color: var(--muted); font-size: 14.5px; font-weight: 600; }
.nav .links a:hover { color: var(--ink); }
.nav .links .btn-sm {
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  color: #fff; padding: 9px 16px; border-radius: 11px; box-shadow: 0 6px 16px -6px rgba(13,148,136,.7);
}
.nav .links .btn-sm:hover { color: #fff; opacity: .92; }
@media (max-width: 560px) { .nav .links a.hide-sm { display: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 14px 24px; border-radius: var(--radius-sm); font-weight: 700; font-size: 15.5px;
  border: 1px solid transparent; transition: transform .15s ease, box-shadow .2s ease, opacity .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: linear-gradient(135deg, var(--teal), var(--teal-dark)); color: #fff; box-shadow: 0 14px 30px -10px rgba(13,148,136,.65); }
.btn-primary:hover { color: #fff; }
.btn-light { background: #fff; color: var(--teal-dark); box-shadow: 0 14px 30px -12px rgba(0,0,0,.35); }
.btn-light:hover { color: var(--teal-dark); }
.btn-ghost { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.35); }
.btn-ghost:hover { color: #fff; background: rgba(255,255,255,.22); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-outline:hover { color: var(--ink); border-color: var(--teal); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(56px, 9vw, 110px) 0 clamp(60px, 9vw, 120px);
}
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto -10%; height: 120%;
  background:
    radial-gradient(60% 55% at 18% 12%, rgba(20,184,166,.20), transparent 60%),
    radial-gradient(55% 50% at 85% 8%, rgba(245,158,11,.16), transparent 55%),
    radial-gradient(60% 60% at 60% 95%, rgba(13,148,136,.16), transparent 60%);
  z-index: -1;
}
.hero-grid {
  display: grid; gap: 48px; align-items: center; grid-template-columns: 1fr;
}
@media (min-width: 920px) { .hero-grid { grid-template-columns: 1.05fr .95fr; gap: 32px; } }
.hero h1 { font-size: clamp(38px, 6vw, 62px); font-weight: 850; margin: 0 0 18px; }
.hero h1 .grad {
  background: linear-gradient(120deg, var(--teal), var(--amber));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero p.lead { font-size: clamp(17px, 2.2vw, 21px); color: var(--body); margin: 0 0 30px; max-width: 540px; }
.hero .cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero .trust { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 32px; }
.hero .trust .ti { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 600; color: var(--muted); }
.hero .trust .ti svg { color: var(--teal); flex: none; }

/* Phone mockup */
.phone-stage { display: flex; justify-content: center; position: relative; }
.phone-stage::before {
  content: ""; position: absolute; width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(13,148,136,.22), transparent 65%); filter: blur(8px); z-index: -1;
}
/* iPhone 17 Pro device frame. Screen ratio matches the real screenshot (1206 x 2622). */
.device {
  position: relative;
  width: 300px;
  aspect-ratio: 1209 / 2630;          /* whole device, uniform bezels around a 1206x2622 screen */
  border-radius: 58px;
  padding: 6px;                        /* titanium rim thickness */
  background: linear-gradient(150deg, #6b7280 0%, #2b2f36 18%, #14171c 44%, #2b2f36 72%, #0c0e12 100%);
  box-shadow:
    var(--shadow-lg),
    inset 0 0 0 1.5px rgba(255,255,255,.10),
    inset 0 0 6px 2px rgba(0,0,0,.5);
  transform: rotate(-3deg);
  animation: float 6s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) { .device { animation: none; } }
@keyframes float { 0%,100% { transform: rotate(-3deg) translateY(0); } 50% { transform: rotate(-3deg) translateY(-12px); } }

.device-screen {
  position: relative; width: 100%; height: 100%;
  background: #000;                    /* thin black bezel */
  border-radius: 50px; padding: 3px; overflow: hidden;
}
.device-shot {
  display: block; width: 100%; height: 100%;
  object-fit: cover; object-position: top center;
  border-radius: 47px;
}
.dynamic-island {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  width: 33%; height: 28px; background: #000; border-radius: 999px; z-index: 3;
  box-shadow: 0 0 0 1px rgba(255,255,255,.04);
}

/* Side buttons (titanium nubs sitting on the frame edge). */
.dbtn { position: absolute; background: linear-gradient(180deg, #4b5059, #23262c); border-radius: 3px; z-index: 1; }
.dbtn-action { left: -2px; top: 17%; width: 3px; height: 26px; }
.dbtn-volup  { left: -2px; top: 27%; width: 3px; height: 46px; }
.dbtn-voldn  { left: -2px; top: 38%; width: 3px; height: 46px; }
.dbtn-power  { right: -2px; top: 30%; width: 3px; height: 70px; }

/* ---------- Stats band ---------- */
.stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  background: linear-gradient(135deg, var(--teal), var(--teal-dark)); color: #fff;
  border-radius: 24px; padding: 30px 20px; box-shadow: var(--shadow-lg); margin: 8px 0 0;
}
.stats .s { text-align: center; }
.stats .s b { display: block; font-size: clamp(26px, 4vw, 38px); font-weight: 850; letter-spacing: -.02em; }
.stats .s span { font-size: 13.5px; opacity: .92; }

/* ---------- Sections ---------- */
.section { padding: clamp(60px, 9vw, 104px) 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 52px; }
.section-head h2 { font-size: clamp(28px, 4.2vw, 42px); font-weight: 850; margin: 0 0 14px; }
.section-head p { font-size: 17px; color: var(--muted); margin: 0; }

/* Features */
.features { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .features { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 26px; box-shadow: var(--shadow); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--teal) 35%, var(--line)); }
.card .ic {
  width: 50px; height: 50px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--soft), color-mix(in srgb, var(--teal) 16%, var(--surface)));
  color: var(--teal); margin-bottom: 18px;
}
.card.amber .ic { background: var(--amber-soft); color: #b45309; }
.card h3 { font-size: 18.5px; margin: 0 0 8px; }
.card p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* How it works */
.steps { display: grid; gap: 24px; grid-template-columns: 1fr; counter-reset: step; }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { position: relative; padding: 30px 24px; background: var(--surface-2); border-radius: var(--radius); border: 1px solid var(--line); }
.step .n {
  width: 42px; height: 42px; border-radius: 12px; font-weight: 800; font-size: 18px; color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--teal-dark)); display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.step h3 { font-size: 18px; margin: 0 0 8px; }
.step p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* Comparison */
.compare { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .compare { grid-template-columns: 1fr 1fr; } }
.col { border-radius: var(--radius); padding: 30px 28px; border: 1px solid var(--line); }
.col.bad { background: var(--surface-2); }
.col.good { background: linear-gradient(160deg, color-mix(in srgb, var(--teal) 12%, var(--surface)), var(--surface)); border-color: color-mix(in srgb, var(--teal) 40%, var(--line)); }
.col h3 { font-size: 19px; margin: 0 0 18px; display: flex; align-items: center; gap: 10px; }
.col ul { list-style: none; margin: 0; padding: 0; }
.col li { display: flex; gap: 11px; align-items: flex-start; padding: 9px 0; font-size: 15px; color: var(--body); }
.col li svg { flex: none; margin-top: 3px; }
.col.bad li svg { color: #ef4444; }
.col.good li svg { color: var(--teal); }

/* FAQ */
.faq { max-width: 760px; margin: 0 auto; }
.faq details {
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 4px 20px; margin-bottom: 12px;
  background: var(--surface); transition: border-color .2s ease;
}
.faq details[open] { border-color: color-mix(in srgb, var(--teal) 40%, var(--line)); }
.faq summary {
  cursor: pointer; list-style: none; padding: 16px 0; font-weight: 700; color: var(--ink); font-size: 16px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; font-weight: 400; color: var(--teal); transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { margin: 0 0 18px; color: var(--muted); font-size: 15px; }

/* CTA band */
.cta-band {
  position: relative; overflow: hidden; text-align: center; color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  border-radius: 30px; padding: clamp(48px, 7vw, 80px) 28px; box-shadow: var(--shadow-lg);
}
.cta-band::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(50% 80% at 80% 10%, rgba(245,158,11,.30), transparent 60%);
}
.cta-band > * { position: relative; }
.cta-band h2 { color: #fff; font-size: clamp(28px, 4.4vw, 44px); font-weight: 850; margin: 0 0 14px; }
.cta-band p { font-size: 18px; opacity: .94; margin: 0 0 28px; }
.store-badges { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.store-badge {
  display: inline-flex; align-items: center; gap: 11px; background: #0b1220; color: #fff;
  padding: 12px 20px; border-radius: 14px; font-weight: 700; font-size: 18px; line-height: 1.05;
  border: 1px solid rgba(255,255,255,.14); box-shadow: 0 16px 36px -16px rgba(0,0,0,.55);
  transition: transform .15s ease, box-shadow .2s ease;
}
.store-badge:hover { transform: translateY(-2px); box-shadow: 0 22px 44px -16px rgba(0,0,0,.6); }
.store-badge svg { color: #fff; flex: none; }
.store-badge span { text-align: left; }
.store-badge small { display: block; font-size: 10.5px; font-weight: 600; letter-spacing: .02em; color: rgba(255,255,255,.72); text-transform: none; }

/* ---------- Legal pages ---------- */
.legal { padding: 56px 0 90px; max-width: 800px; }
.legal h1 { font-size: clamp(30px, 4vw, 40px); margin-bottom: 6px; }
.legal .meta { color: var(--muted); font-size: 14px; margin-bottom: 32px; }
.legal h2 { font-size: 21px; margin-top: 40px; }
.legal h3 { font-size: 16.5px; margin-top: 24px; }
.legal p, .legal li { color: var(--body); }
.legal a { font-weight: 600; }
.note {
  background: var(--soft); border-left: 4px solid var(--teal);
  padding: 16px 18px; border-radius: 12px; margin: 22px 0; font-size: 14.5px; color: var(--body);
}

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); margin-top: 40px; background: var(--surface-2); }
.footer-in { max-width: var(--maxw); margin: 0 auto; padding: 52px 24px 36px; display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .footer-in { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer .brand { margin-bottom: 14px; }
.footer .tag { color: var(--muted); font-size: 14px; max-width: 280px; }
.footer h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 0 0 14px; }
.footer .fcol a { display: block; color: var(--body); font-size: 14.5px; margin-bottom: 10px; font-weight: 500; }
.footer .fcol a:hover { color: var(--teal); }
.footer-bottom { border-top: 1px solid var(--line); }
.footer-bottom .fb { max-width: var(--maxw); margin: 0 auto; padding: 20px 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; color: var(--muted); font-size: 13px; }

/* ---------- Legal pages: standalone nav + simple footer ---------- */
/* These pages put <nav class="nav"> directly in <body> (no .nav-wrap) and use a simple
   centered footer (no .footer-in). Give them their own bar + padding so they match. */
body > .nav {
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.footer:not(:has(.footer-in)) { text-align: center; padding: 40px 24px; }
.footer:not(:has(.footer-in)) a { color: var(--muted); margin: 0 6px; }
.footer:not(:has(.footer-in)) a:hover { color: var(--teal); }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }
