/* City Ambitions site. Colours follow TycoonTheme (TycoonNYC/DesignSystem/TycoonTheme.swift)
   and the green of the v2 store screenshots. No external requests: fonts are self-hosted. */

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/fraunces-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/fraunces-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #f4f1ea;
  --surface: #ffffff;
  --raised: #faf8f3;
  --line: #d8d2c5;
  --ink: #1c1a17;
  --muted: #5d6762;
  --green: #1d4631;
  --green-ink: #f4f1ea;
  --green-soft: #e3ebe5;
  --brass: #a9701a;
  --action: #5b3a12;
  --action-ink: #fbf7ef;
  --profit: #128053;
  --loss: #be362e;
  --shadow: 0 1px 2px rgba(28, 26, 23, .06), 0 8px 24px rgba(28, 26, 23, .06);
  --radius: 14px;
  --radius-sm: 10px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --page: 1120px;
  --gutter: 20px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1512;
    --surface: #161d19;
    --raised: #1b241f;
    --line: #2b3630;
    --ink: #edf2ef;
    --muted: #97a59e;
    --green: #173a28;
    --green-ink: #edf2ef;
    --green-soft: #1a2b22;
    --brass: #d99a2b;
    --action: #d99a2b;
    --action-ink: #1a1206;
    --profit: #35c88a;
    --loss: #e5544b;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
h1, h2, h3 { font-family: var(--serif); font-weight: 650; line-height: 1.12; letter-spacing: -0.01em; margin: 0 0 .5em; font-variation-settings: "opsz" 72; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.2rem; font-variation-settings: "opsz" 24; }
p { margin: 0 0 1em; }
.num, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.wrap { max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }
.label { font-size: .75rem; font-weight: 650; letter-spacing: .14em; text-transform: uppercase; color: var(--brass); margin: 0 0 .75em; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; background: var(--surface); padding: 8px 12px; z-index: 10; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 92%, transparent); position: sticky; top: 0; z-index: 5; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; letter-spacing: .02em; margin-right: auto; white-space: nowrap; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.nav { display: flex; gap: 4px; align-items: center; }
.nav a { text-decoration: none; padding: 8px 10px; border-radius: 8px; font-size: .95rem; color: var(--muted); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); background: var(--raised); }
.lang { position: relative; }
.lang select { appearance: none; -webkit-appearance: none; font: inherit; font-size: .9rem; color: var(--ink); background: var(--raised); border: 1px solid var(--line); border-radius: 8px; padding: 6px 28px 6px 10px; cursor: pointer; }
.lang::after { content: ""; position: absolute; right: 11px; top: 50%; width: 6px; height: 6px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.menu-toggle { display: none; }
@media (max-width: 820px) {
  .nav { display: none; position: absolute; top: 60px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 16px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 8px; font-size: 1rem; }
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: var(--raised); color: var(--ink); font: inherit; cursor: pointer; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 22px; border-radius: 12px; font-weight: 650; text-decoration: none; border: 1px solid transparent; cursor: pointer; font-size: 1rem; line-height: 1.2; box-shadow: 0 2px 0 color-mix(in srgb, var(--action) 55%, black); transition: transform .08s ease, box-shadow .08s ease; }
.btn:active { transform: translateY(2px); box-shadow: 0 0 0 transparent; }
.btn-primary { background: var(--action); color: var(--action-ink); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line); box-shadow: 0 2px 0 var(--line); }
.btn-store { background: #000; color: #fff; box-shadow: 0 2px 0 #333; padding: 10px 20px; }
.btn-store small { display: block; font-size: .72rem; font-weight: 500; opacity: .85; letter-spacing: .02em; }
.btn-store span { display: block; text-align: left; font-size: 1.15rem; }
.btn-store svg { width: 26px; height: 26px; flex: none; }
.btn-store img.badge { height: 52px; width: auto; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.on-green .btn-secondary { background: transparent; color: var(--green-ink); border-color: color-mix(in srgb, var(--green-ink) 40%, transparent); box-shadow: none; }

/* Hero */
.hero { position: relative; color: #fbf7ef; background: #10241a; overflow: hidden; }
.hero picture, .hero .hero-img { position: absolute; inset: 0; }
.hero .hero-img img { width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10, 22, 16, .92) 0%, rgba(10, 22, 16, .72) 45%, rgba(10, 22, 16, .15) 100%); }
.hero .wrap { position: relative; z-index: 1; padding-top: clamp(64px, 11vw, 140px); padding-bottom: clamp(64px, 11vw, 140px); }
.hero h1 { max-width: 15ch; }
.hero p.lede { font-size: clamp(1.05rem, 2vw, 1.25rem); max-width: 36ch; color: rgba(251, 247, 239, .88); }
.hero .label { color: #e9b866; }
.hero .facts { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 22px 0 0; padding: 0; list-style: none; font-size: .92rem; color: rgba(251, 247, 239, .8); }
.hero .facts li::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #e9b866; margin-right: 8px; vertical-align: middle; }
@media (max-width: 640px) {
  .hero::after { background: linear-gradient(180deg, rgba(10, 22, 16, .55) 0%, rgba(10, 22, 16, .92) 70%); }
}
.page-hero { padding: clamp(40px, 7vw, 80px) 0 clamp(24px, 4vw, 40px); }
.page-hero p.lede { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }

/* Sections */
section.block { padding: clamp(48px, 8vw, 96px) 0; }
section.block.alt { background: var(--raised); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
section.block.green { background: var(--green); color: var(--green-ink); }
section.block.green .label { color: #e9b866; }
section.block.green .muted { color: color-mix(in srgb, var(--green-ink) 75%, transparent); }
.section-head { max-width: 640px; margin-bottom: 32px; }
.section-head p { color: var(--muted); font-size: 1.08rem; }
.green .section-head p { color: color-mix(in srgb, var(--green-ink) 78%, transparent); }

/* Story */
.story { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
.story img { border-radius: var(--radius); box-shadow: var(--shadow); }
.ledger { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 6px 18px; margin-top: 20px; }
.ledger div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ledger div:last-child { border-bottom: 0; }
.ledger dt { color: var(--muted); }
.ledger dd { margin: 0; font-family: var(--mono); font-weight: 600; }
@media (max-width: 820px) { .story { grid-template-columns: 1fr; } }

/* Screenshot rail */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 260px); gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px var(--gutter) 18px; margin: 0 calc(-1 * var(--gutter)); scrollbar-width: thin; }
.rail figure { margin: 0; scroll-snap-align: start; }
.rail img { border-radius: 18px; box-shadow: var(--shadow); aspect-ratio: 1320 / 2868; object-fit: cover; }
@media (min-width: 1200px) { .rail { grid-auto-columns: 1fr; overflow: visible; margin: 0; padding: 4px 0 18px; } }

/* Feature grid */
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h3 { margin-bottom: .35em; }
.card p { color: var(--muted); margin: 0; }
.card .art { margin: -22px -22px 18px; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; aspect-ratio: 16 / 9; }
.card .art img { width: 100%; height: 100%; object-fit: cover; }
a.card { text-decoration: none; display: block; transition: border-color .15s ease, transform .15s ease; }
a.card:hover { border-color: var(--brass); transform: translateY(-2px); }
.card .more { display: inline-block; margin-top: 12px; color: var(--brass); font-weight: 650; }

/* Split CTA */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
.split img { border-radius: var(--radius); }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; padding: 14px 0; font-weight: 650; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--brass); }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--muted); }

/* Prose (guides, legal) */
.prose { max-width: 720px; }
.prose h2 { font-size: 1.6rem; margin-top: 1.8em; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .35em 0; }
.prose table { border-collapse: collapse; width: 100%; margin: 1em 0 1.5em; font-size: .95rem; }
.prose th, .prose td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.prose td.num, .prose th.num { text-align: right; }
.prose .tip { background: var(--green-soft); border-left: 3px solid var(--profit); padding: 14px 18px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 1.4em 0; }
.prose .tip p:last-child { margin: 0; }
.table-scroll { overflow-x: auto; }
.crumbs { font-size: .9rem; color: var(--muted); margin-bottom: 16px; }
.crumbs a { color: var(--muted); }
.guide-cta { margin-top: 48px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }

/* Forms */
.form { display: grid; gap: 14px; max-width: 480px; }
.form label { font-weight: 600; }
.input { width: 100%; font: inherit; padding: 13px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); min-height: 48px; }
.input:focus { outline: 2px solid var(--brass); outline-offset: 1px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; color: var(--muted); font-weight: 400 !important; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--action); flex: none; }
.form-status { min-height: 1.5em; font-weight: 600; }
.form-status.ok { color: var(--profit); }
.form-status.err { color: var(--loss); }
.green .input { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .25); color: var(--green-ink); }
.green .check { color: color-mix(in srgb, var(--green-ink) 80%, transparent); }
.green .form-status.ok { color: #7fe0b2; }
.green .form-status.err { color: #ff9c94; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Comparison table */
.compare { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.compare th, .compare td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.compare thead th { background: var(--raised); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }

/* Language suggestion */
.lang-hint { display: none; background: var(--green); color: var(--green-ink); font-size: .92rem; }
.lang-hint.show { display: block; }
.lang-hint .wrap { display: flex; gap: 12px; align-items: center; justify-content: space-between; min-height: 44px; }
.lang-hint a { color: var(--green-ink); font-weight: 650; }
.lang-hint button { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; min-width: 44px; min-height: 44px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 56px; color: var(--muted); font-size: .92rem; }
.site-footer .cols { display: flex; flex-wrap: wrap; gap: 24px 48px; justify-content: space-between; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer a { color: var(--muted); }
.site-footer .langs { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.site-footer p.fine { margin-top: 28px; font-size: .82rem; }

/* Demo */
.demo-shell { max-width: 460px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); overflow: hidden; }
.demo-top { display: flex; justify-content: space-between; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--line); background: var(--raised); }
.demo-top .brandmark { font-size: .72rem; letter-spacing: .3em; color: var(--brass); font-weight: 700; }
.demo-top .cash { font-family: var(--mono); font-weight: 700; }
.demo-body { padding: 18px; min-height: 560px; display: flex; flex-direction: column; gap: 14px; }
.demo-art { margin: -18px -18px 0; aspect-ratio: 21 / 9; overflow: hidden; position: relative; }
.demo-art img { width: 100%; height: 100%; object-fit: cover; }
.demo-body h2 { font-size: 1.5rem; margin: 4px 0 0; }
.demo-body .sub { color: var(--muted); margin: 0; font-size: .95rem; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--raised); padding: 16px; }
.panel .row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; }
.panel .row span:last-child { font-family: var(--mono); font-weight: 600; }
.big-num { font-family: var(--mono); font-size: 3.2rem; font-weight: 650; text-align: center; letter-spacing: -0.02em; margin: 6px 0; }
.mid-num { font-family: var(--mono); font-size: 1.6rem; font-weight: 700; }
.range { width: 100%; accent-color: var(--brass); height: 32px; }
.skill { display: block; width: 100%; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 14px 16px; cursor: pointer; font: inherit; color: var(--ink); }
.skill:hover, .skill:focus-visible { border-color: var(--brass); }
.skill strong { display: block; font-size: 1.05rem; }
.skill span { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--brass); font-weight: 650; }
.feed { list-style: none; margin: 0; padding: 0; min-height: 210px; }
.feed li { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .95rem; animation: feedIn .24s ease; }
.feed li:last-child { border-bottom: 0; }
.feed .amt { color: var(--profit); font-weight: 700; font-family: var(--mono); margin-left: 6px; }
.feed .missed { color: var(--loss); font-weight: 700; font-size: .72rem; letter-spacing: .08em; margin-left: 6px; }
@keyframes feedIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.bar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--brass); width: 0; transition: width .5s linear; }
.pct { font-family: var(--mono); font-size: 2.4rem; font-weight: 700; }
.pos { color: var(--profit); }
.neg { color: var(--loss); }
.demo-body .btn { width: 100%; }
.rain { position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(transparent 0 60%, rgba(255, 255, 255, .35) 60% 100%); background-size: 2px 26px; opacity: .45; animation: rain .5s linear infinite; mask-image: linear-gradient(transparent, #000 30%); }
@keyframes rain { from { background-position: 0 0; } to { background-position: -12px 26px; } }
@media (prefers-reduced-motion: reduce) { .rain, .feed li { animation: none; } .btn { transition: none; } }
.share-row { display: flex; gap: 10px; flex-wrap: wrap; }
.share-row .btn { flex: 1 1 140px; width: auto; }
.demo-note { text-align: center; color: var(--muted); font-size: .85rem; margin-top: 14px; }
.focus-ring:focus-visible, .btn:focus-visible, .nav a:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }

/* Specificity fixes: labels keep their brass colour inside cards and section heads. */
.section-head p.label, .card p.label { color: var(--brass); font-size: .75rem; }
.green .section-head p.label { color: #e9b866; }
.site-footer .btn-store { color: #fff; margin-top: 4px; }
.site-footer .langs { margin-top: 28px; }
.nav-langs { display: none; }
@media (max-width: 820px) {
  .site-header .lang { display: none; }
  .nav-langs { display: flex; flex-wrap: wrap; gap: 4px 14px; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 8px; }
  .nav-langs a { padding: 8px 0; font-size: .92rem; }
}
