/* nouman.ca — token-driven theme engine
   Themes: obsidian (dark luxury, default) · harbour (modern trust) · estate (warm editorial) */


:root, [data-theme="crest"] {
  --bg: #F7FAFD;            /* crisp cool white */
  --surface: #FFFFFF;       /* white */
  --surface-2: #EAF1F9;     /* light blue-grey panels */
  --text: #0F2547;          /* deep RE/MAX navy-blue */
  --muted: #55668A;         /* slate blue */
  --accent: #E01B2D;        /* RE/MAX red — buttons, links, emphasis (the action color) */
  --accent-ink: #FFFFFF;
  --navy: #0B4DA2;          /* RE/MAX blue — nav button, labels, structure */
  --pop: #0B4DA2;           /* blue section labels */
  --line: rgba(15,37,71,.24);
  --line-soft: rgba(15,37,71,.10);
  --danger: #E01B2D;
  --ok: #1F7A4D;
}
[data-theme="crest"] .eyebrow { color: var(--pop); }             /* blue labels */
[data-theme="crest"] .nav-cta { background: var(--navy); }        /* blue nav button */
[data-theme="crest"] .hero h1 em, [data-theme="crest"] .hero-cine h1 em { color: var(--accent); } /* red emphasis */
[data-theme="crest"] .badge { color: var(--accent); }             /* red */
[data-theme="crest"] .stats-bar .n { color: var(--navy); }        /* blue stat numbers */
[data-theme="obsidian"] {
  --bg: #14120D;
  --surface: #1D1A13;
  --surface-2: #262218;
  --text: #F2EDE3;
  --muted: #A39B8B;
  --accent: #C9A227;
  --accent-ink: #14120D;
  --line: rgba(201,162,39,.35);
  --line-soft: rgba(242,237,227,.12);
  --danger: #E0654F;
  --ok: #7FB069;
}
[data-theme="harbour"] {
  --bg: #FFFFFF;
  --surface: #F4F6F9;
  --surface-2: #E9EEF4;
  --text: #102132;
  --muted: #5A6B7C;
  --accent: #0E2A47;
  --accent-ink: #FFFFFF;
  --line: rgba(14,42,71,.35);
  --line-soft: rgba(16,33,50,.12);
  --danger: #B3402E;
  --ok: #2E7D4F;
}
[data-theme="estate"] {
  --bg: #F6F1E7;
  --surface: #FFFFFF;
  --surface-2: #EFE7D8;
  --text: #20241F;
  --muted: #6B6F62;
  --accent: #1E3D2F;
  --accent-ink: #F6F1E7;
  --line: rgba(176,104,47,.45);
  --line-soft: rgba(32,36,31,.14);
  --danger: #A6442C;
  --ok: #3C6B43;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .display { font-family: "Fraunces", Georgia, serif; font-weight: 400; line-height: 1.15; letter-spacing: .01em; }
h1 { font-size: clamp(2.6rem, 6.5vw, 5.2rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
h3 { font-size: 1.25rem; }
.num, .mono { font-family: "IBM Plex Mono", monospace; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 22px; }
section { padding: 104px 0; }

/* ledger motif — the signature */
.ledger { border-top: 1px solid var(--line); position: relative; }
.ledger::after { content: ""; position: absolute; top: 3px; left: 0; right: 0; border-top: 1px solid var(--line); }
.eyebrow {
  font-family: "IBM Plex Mono", monospace;
  font-size: .72rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--accent); display: inline-block; margin: 26px 0 14px;
}
[data-theme="harbour"] .eyebrow { color: #B3402E; }
[data-theme="estate"] .eyebrow { color: #B0682F; }

/* nav */
header.site {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { font-family: "Fraunces", serif; font-size: 1.3rem; letter-spacing: .04em; }
.brand b { color: var(--accent); font-weight: 400; }
.nav-links { display: flex; gap: 26px; list-style: none; font-size: .92rem; }
.nav-links a { color: var(--muted); transition: color .2s; }
.nav-links a:hover, .nav-links a[aria-current] { color: var(--text); }
.nav-cta {
  background: var(--accent); color: var(--accent-ink);
  padding: 10px 20px; border-radius: 2px; font-weight: 600; font-size: .9rem;
}
.burger { display: none; background: none; border: 1px solid var(--line-soft); color: var(--text); padding: 8px 12px; border-radius: 2px; font-size: 1.1rem; }
@media (max-width: 880px) {
  .nav-links { display: none; position: absolute; top: 68px; left: 0; right: 0; background: var(--bg); flex-direction: column; padding: 18px 22px 26px; gap: 16px; border-bottom: 1px solid var(--line); }
  .nav-links.open { display: flex; }
  .burger { display: block; }
}

/* hero */
.hero { padding: 96px 0 80px; }
.hero .kicker { font-family: "IBM Plex Mono", monospace; font-size: .78rem; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p.lede { max-width: 560px; color: var(--muted); margin: 22px 0 34px; font-size: 1.08rem; }
.hero-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 56px; align-items: start; }
@media (max-width: 880px) { .hero-grid { grid-template-columns: 1fr; } }

/* triage doors */
.doors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 880px) { .doors { grid-template-columns: 1fr; } }
.door {
  background: var(--surface); border: 1px solid var(--line-soft);
  padding: 26px 22px; border-radius: 2px; display: block;
  transition: border-color .2s, transform .2s;
}
.door:hover { border-color: var(--accent); transform: translateY(-3px); }
.door .mono { font-size: .7rem; letter-spacing: .2em; color: var(--accent); text-transform: uppercase; }
.door h3 { margin: 10px 0 8px; }
.door p { font-size: .92rem; color: var(--muted); }

/* cards & grids */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 880px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 2px; padding: 28px 26px; }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--muted); font-size: .95rem; }
.badge {
  display: inline-block; font-family: "IBM Plex Mono", monospace; font-size: .66rem;
  letter-spacing: .16em; text-transform: uppercase; padding: 5px 10px;
  border: 1px solid var(--line); color: var(--accent); border-radius: 2px; margin-bottom: 14px;
}

/* forms */
.lead-form { background: var(--surface); border: 1px solid var(--line); padding: 30px 28px; border-radius: 2px; }
.lead-form h3 { margin-bottom: 6px; }
.lead-form .sub { color: var(--muted); font-size: .9rem; margin-bottom: 20px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: .8rem; color: var(--muted); margin-bottom: 6px; letter-spacing: .04em; }
.field input, .field select {
  width: 100%; padding: 12px 14px; background: var(--bg); color: var(--text);
  border: 1px solid var(--line-soft); border-radius: 2px; font-size: 1rem; font-family: inherit;
}
.field input:focus, .field select:focus { border-color: var(--accent); outline: none; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .78rem; color: var(--muted); margin: 16px 0; }
.consent input { margin-top: 3px; }
.btn {
  color: var(--accent-ink) !important;
  display: inline-block; background: var(--accent); color: var(--accent-ink);
  border: none; padding: 14px 28px; font-size: .95rem; font-weight: 600;
  border-radius: 2px; cursor: pointer; font-family: inherit; transition: opacity .2s;
}
.btn:hover { opacity: .88; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.form-note { font-size: .78rem; color: var(--muted); margin-top: 12px; }
.form-success { display: none; padding: 18px; border: 1px solid var(--ok); color: var(--ok); border-radius: 2px; margin-top: 14px; font-size: .92rem; }

/* calculators */
.calc { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 2px; padding: 30px 28px; margin-bottom: 30px; }
.calc h3 { margin-bottom: 18px; }
.calc-row { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.calc-row label { flex: 0 0 170px; font-size: .85rem; color: var(--muted); }
.calc-row input[type="range"] { flex: 1; min-width: 140px; accent-color: var(--accent); }
.calc-row input[type="number"] { width: 130px; padding: 9px 10px; background: var(--bg); color: var(--text); border: 1px solid var(--line-soft); border-radius: 2px; font-family: "IBM Plex Mono", monospace; }
.calc-row .val { font-family: "IBM Plex Mono", monospace; min-width: 96px; text-align: right; font-size: .95rem; }
.calc-out { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 22px; }
.stat { background: var(--bg); border: 1px solid var(--line-soft); border-radius: 2px; padding: 16px; }
.stat .l { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.stat .v { font-family: "IBM Plex Mono", monospace; font-size: 1.35rem; margin-top: 4px; }
.stat .v.pos { color: var(--ok); }
.stat .v.neg { color: var(--danger); }

/* listings */
.listing { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 2px; overflow: hidden; }
.listing .ph { aspect-ratio: 16/10; background: var(--surface-2); display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: .8rem; letter-spacing: .1em; }
.listing .body { padding: 20px; }
.listing .price { font-family: "IBM Plex Mono", monospace; font-size: 1.2rem; color: var(--accent); }
.listing .addr { margin: 6px 0 2px; font-size: .95rem; }
.listing .meta { font-size: .8rem; color: var(--muted); }

/* footer */
footer.site { background: #E9EEF6; border-top: 1px solid var(--line); padding: 54px 0 40px; margin-top: 40px; }
footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
@media (max-width: 880px) { footer .cols { grid-template-columns: 1fr; } }
footer h4 { font-family: "Fraunces", serif; font-weight: 400; margin-bottom: 14px; font-size: 1.05rem; }
footer ul { list-style: none; }
footer li { margin-bottom: 8px; font-size: .9rem; }
footer a { color: var(--muted); } footer a:hover { color: var(--text); }
.legal { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line-soft); font-size: .74rem; color: var(--muted); line-height: 1.7; }

/* utility band */
.band { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band-inner { display: flex; align-items: center; justify-content: space-between; gap: 26px; padding: 34px 0; flex-wrap: wrap; }
.center { text-align: center; }
.mt-1 { margin-top: 14px; } .mt-2 { margin-top: 28px; } .mb-2 { margin-bottom: 28px; }
.lang-strip { font-family: "IBM Plex Mono", monospace; font-size: .74rem; letter-spacing: .14em; color: var(--muted); }


/* ============ luxury layer ============ */

/* glass nav with scroll state */
header.site { transition: box-shadow .3s, background .3s; }
header.site.scrolled { box-shadow: 0 10px 40px rgba(20,49,92,.10); }
[data-theme="obsidian"] header.site.scrolled { box-shadow: 0 10px 40px rgba(0,0,0,.5); }

/* cinematic hero */
.hero-cine {
  min-height: 88vh; display: flex; align-items: center; position: relative; overflow: hidden;
  padding: 0;
}
.hero-cine .wrap { position: relative; z-index: 2; width: 100%; padding-top: 40px; padding-bottom: 120px; }
.hero-cine h1 { max-width: 13ch; }
.hero-cine h1 .line { display: block; overflow: hidden; }
.hero-cine h1 .line span { display: inline-block; transform: translateY(110%); animation: riseUp .9s cubic-bezier(.2,.7,.2,1) forwards; }
.hero-cine h1 .line:nth-child(2) span { animation-delay: .12s; }
.hero-cine h1 .line:nth-child(3) span { animation-delay: .24s; }
@keyframes riseUp { to { transform: translateY(0); } }
.hero-rule { width: 64px; height: 3px; background: var(--accent); margin: 30px 0 26px; transform-origin: left; animation: growIn 1s .5s cubic-bezier(.2,.7,.2,1) backwards; }
@keyframes growIn { from { transform: scaleX(0); } }
.hero-cine .lede { opacity: 0; animation: fadeUp .8s .55s forwards; }
.hero-cine .hero-ctas { opacity: 0; animation: fadeUp .8s .7s forwards; display: flex; gap: 14px; flex-wrap: wrap; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* skyline artwork */
.skyline { position: absolute; bottom: -2px; left: 0; right: 0; z-index: 1; width: 100%; pointer-events: none; }
.skyline svg { width: 100%; height: auto; display: block; }
.skyline .stroke { stroke: var(--text); opacity: .16; fill: none; stroke-width: 1.6; }
.skyline .glow { stroke: var(--accent); opacity: .9; fill: none; stroke-width: 1.6;
  stroke-dasharray: 3000; stroke-dashoffset: 3000; animation: draw 3.2s 1s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
[data-theme="obsidian"] .skyline .stroke { opacity: .25; }

/* scroll cue */
.scroll-cue { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 2;
  font-family: "IBM Plex Mono", monospace; font-size: .62rem; letter-spacing: .3em; text-transform: uppercase;
  color: var(--muted); animation: cueFloat 2.2s ease-in-out infinite; }
@keyframes cueFloat { 0%,100% { transform: translate(-50%,0); } 50% { transform: translate(-50%,8px); } }

/* stats bar */
.stats-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
@media (max-width: 880px) { .stats-bar { grid-template-columns: repeat(2, 1fr); } }
.stats-bar .cell { padding: 34px 26px; border-right: 1px solid var(--line-soft); }
.stats-bar .cell:last-child { border-right: none; }
.stats-bar .n { font-family: "Fraunces", serif; font-size: clamp(2rem, 3.6vw, 3rem); color: var(--accent); }
.stats-bar .t { font-size: .8rem; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; margin-top: 6px; }

/* marquee */
.marquee { overflow: hidden; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); padding: 18px 0; }
.marquee-track { display: flex; gap: 56px; width: max-content; animation: slide 34s linear infinite; font-family: "Fraunces", serif; font-size: 1.2rem; color: var(--muted); white-space: nowrap; }
.marquee-track em { font-style: normal; color: var(--accent); }
@keyframes slide { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

/* scroll reveals (auto-applied by main.js) */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* card polish */
.card, .door, .listing, .calc, .lead-form { transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s, border-color .35s; }
.card:hover, .listing:hover { transform: translateY(-6px); box-shadow: 0 24px 60px rgba(20,49,92,.12); border-color: var(--line); }
[data-theme="obsidian"] .card:hover { box-shadow: 0 24px 60px rgba(0,0,0,.5); }
.door { position: relative; }
.door::after { content: "→"; position: absolute; top: 24px; right: 22px; color: var(--accent); opacity: 0; transform: translateX(-8px); transition: all .3s; }
.door:hover::after { opacity: 1; transform: none; }

/* button polish */
.btn { position: relative; overflow: hidden; letter-spacing: .03em; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0,0,0,.22); opacity: 1; }
[data-theme="obsidian"] .btn:hover { box-shadow: 0 12px 30px rgba(201,162,39,.3); }
.btn-ghost:hover { box-shadow: none; border-color: var(--accent); color: var(--accent); }

/* big section intros */
.intro-grid { display: grid; grid-template-columns: 320px 1fr; gap: 56px; align-items: start; }
@media (max-width: 880px) { .intro-grid { grid-template-columns: 1fr; gap: 20px; } }
.intro-grid h2 { position: sticky; top: 100px; }


/* ============ real-number signature + photo ============ */
.mark { position: relative; color: var(--accent); white-space: nowrap; }
.mark svg { position: absolute; left:0; right:0; bottom:-6px; width:100%; height:12px; overflow:visible; }
.mark path { fill:none; stroke: var(--pop); stroke-width:3.2; stroke-linecap:round;
  stroke-dasharray:340; stroke-dashoffset:340; animation: nkdraw 1.1s .5s cubic-bezier(.6,0,.3,1) forwards; }
@keyframes nkdraw { to { stroke-dashoffset:0; } }
@media (prefers-reduced-motion: reduce){ .mark path{ animation:none; stroke-dashoffset:0; } }

.slip { background: var(--surface); border:1px solid var(--line-soft); border-radius:5px; padding:22px 22px 18px; }
.slip-h { font-family:"IBM Plex Mono",monospace; font-size:.66rem; letter-spacing:.2em; text-transform:uppercase; color:var(--pop); margin-bottom:14px; }
.slip-row { display:flex; justify-content:space-between; align-items:baseline; padding:7px 0; }
.slip-row .l { font-size:.85rem; color:var(--muted); }
.slip-row .v { font-family:"Fraunces",serif; font-size:1.05rem; }
.slip-row .v.strike { text-decoration:line-through; color:#A7AEB8; }
.slip-row.big .v { font-size:1.7rem; font-weight:600; color:var(--accent); position:relative; }
.slip-note { font-family:"Fraunces",serif; font-style:italic; font-size:.85rem; color:var(--pop); margin-top:11px; }

.meet { background: var(--surface-2); border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.meet-grid { display:grid; grid-template-columns: 280px 1fr; gap:44px; align-items:center; padding:70px 0; }
@media (max-width:880px){ .meet-grid{ grid-template-columns:1fr; gap:28px; } }
.headshot { width:100%; aspect-ratio:4/5; border-radius:6px; object-fit:cover; display:block; background:var(--surface-2); }
.headshot-fb { width:100%; aspect-ratio:4/5; border-radius:6px; background:var(--navy); color:#fff; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; }
.headshot-fb .ini { font-family:"Fraunces",serif; font-size:3rem; }
.headshot-fb .lbl { font-family:"IBM Plex Mono",monospace; font-size:.62rem; letter-spacing:.18em; text-transform:uppercase; opacity:.7; }
