/* ════════════════════════════════════════════════════════════════
   MARLWOOD PROPERTY INTELLIGENCE — PUBLIC PAGES BRAND LAYER
   Landing, login, legal and error pages. Same palette, type and day / night
   modes as the app (see brand-theme.css); the generated
   brand-theme-public-{night,day}.css map the pages' hard-coded colours.
   ════════════════════════════════════════════════════════════════ */

:root,
html[data-theme="day"] {
  --gold: #C9A86C;
  --gold-bright: #F0D19A;
  --gold-deep: #8C7140;
  --gold-soft: rgba(201, 168, 108, 0.14);
  --font-sans: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Cinzel', Georgia, serif;
  --font-display: 'Cinzel', Georgia, serif;
  --accent: #11100E;
  --accent-hover: #2A2620;
  --text-primary: #11100E;
  --text-secondary: #4A4338;
  --text-muted: #7D7262;
  --border: #E2D8C4;
  --card-bg: #FBF8F1;
  color-scheme: light;
}
html[data-theme="day"] body { background-color: #F4EDE0; color: #11100E; }

html[data-theme="night"] {
  --accent: #F0D19A;
  --accent-hover: #F6DFB5;
  --text-primary: #F4EDE0;
  --text-secondary: #D6CDBD;
  --text-muted: #A89880;
  --border: rgba(240, 209, 154, 0.16);
  --card-bg: #11100E;
  color-scheme: dark;
}
html[data-theme="night"] body { background-color: #070707; color: #F4EDE0; }

body, input, select, textarea, button { font-family: var(--font-sans); }
h1, h2, h3, .section-title, .hero h1 { font-family: var(--font-display); font-style: normal; }

/* ── Lockup ───────────────────────────────────────────────────── */
.mw-shield { display: block; height: 38px; width: auto; }
.mw-shield-sm { display: inline-block; height: 24px; vertical-align: middle; margin-right: 8px; }
.mw-shield-lg { height: 85px; margin: 0 auto 14px; }
.mw-lockup { display: inline-flex !important; align-items: center; gap: 12px; text-decoration: none; }
.mw-lockup-text { display: flex; flex-direction: column; line-height: 1.1; }
.mw-word { font-family: var(--font-display); font-weight: 600; font-size: 17px; letter-spacing: 0.22em; color: #F0D19A; }
.mw-sub { font-family: var(--font-display); font-weight: 500; font-size: 9px; letter-spacing: 0.30em; text-transform: uppercase; color: #C9A86C; margin-top: 3px; }
html[data-theme="day"] .auth-brand h1 { color: #11100E; }
html[data-theme="day"] .auth-brand .mw-sub { color: #8C7140; }
html[data-theme="night"] .auth-brand h1 { color: #F0D19A; }
.auth-brand h1 { font-family: var(--font-display); letter-spacing: 0.22em; }
.auth-brand .mw-sub { font-size: 11px; letter-spacing: 0.32em; }

/* The landing nav sits on ink in both modes — the header lockup is always on ink. */
.nav { background: rgba(7, 7, 7, 0.94) !important; border-bottom: 1px solid rgba(240, 209, 154, 0.10); }
.nav-inner { gap: 16px; }

/* ── Day / night switch ───────────────────────────────────────── */
.mw-theme-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 8px; background: transparent;
  border: 1px solid rgba(201, 168, 108, 0.6); border-radius: 999px;
  font-family: var(--font-display); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  color: #F4EDE0; cursor: pointer;
}
.mw-theme-toggle:hover { border-color: #F0D19A; background: rgba(240, 209, 154, 0.06); }
.mw-theme-toggle:focus-visible { outline: 2px solid #F0D19A; outline-offset: 2px; }
.mw-theme-toggle svg { width: 15px; height: 15px; stroke: #F0D19A; fill: none; stroke-width: 1.6; }
.mw-theme-toggle .mw-icon-sun { display: none; }
html[data-theme="night"] .mw-theme-toggle .mw-icon-sun { display: block; }
html[data-theme="night"] .mw-theme-toggle .mw-icon-moon { display: none; }
.nav .mw-theme-toggle { margin-left: auto; order: 2; }
.mw-theme-corner { position: fixed; top: 16px; right: 16px; z-index: 50; }
html[data-theme="day"] .mw-theme-corner .mw-theme-toggle { color: #11100E; border-color: rgba(140, 113, 64, 0.55); background: rgba(251, 248, 241, 0.9); }
html[data-theme="day"] .mw-theme-corner .mw-theme-toggle svg { stroke: #8C7140; }

/* ── Buttons: champagne on ink at night, ink on cream by day ──── */
html[data-theme="night"] .btn-primary, html[data-theme="night"] .btn-gold { background: #F0D19A !important; color: #070707 !important; border-color: #F0D19A !important; }
html[data-theme="night"] .btn-primary:hover, html[data-theme="night"] .btn-gold:hover { background: #F6DFB5 !important; color: #070707 !important; }
html[data-theme="night"] .btn-outline, html[data-theme="night"] .btn-ghost { color: #F4EDE0 !important; border-color: rgba(201, 168, 108, 0.6) !important; background: transparent !important; }
html[data-theme="day"] .btn-primary { background: #11100E !important; color: #F4EDE0 !important; }
html[data-theme="day"] .btn-gold { background: #C9A86C !important; color: #11100E !important; }

/* Forms on ink. */
html[data-theme="night"] input:not([type="checkbox"]):not([type="radio"]),
html[data-theme="night"] select,
html[data-theme="night"] textarea { background-color: #15130F !important; color: #F4EDE0 !important; border-color: rgba(240, 209, 154, 0.18) !important; }
html[data-theme="night"] input::placeholder { color: #7D7262 !important; }
html[data-theme="night"] a { color: #F0D19A; }

/* Day: the ground is cream, whatever gradient the page drew underneath. */
html[data-theme="day"] body { background: #F4EDE0 !important; }
/* The landing nav is always on ink, so its actions keep the ink-plate treatment. */
.nav .btn-primary, .nav .btn-gold { background: #F0D19A !important; color: #070707 !important; border-color: #F0D19A !important; }
.nav .btn-outline, .nav .btn-ghost { color: #F4EDE0 !important; border-color: rgba(201, 168, 108, 0.6) !important; background: transparent !important; }
.nav .nav-links a:not(.btn) { color: #D6CDBD; }
html[data-theme="day"] .auth-card { border-color: #E2D8C4; }

/* ════ Landing hero — the ink plate with the champagne grid (brand guide, link preview) ════ */
.hero {
  background-color: #070707 !important;
  background-image:
    radial-gradient(ellipse at 50% 35%, rgba(240, 209, 154, 0.07) 0%, rgba(7, 7, 7, 0) 55%),
    radial-gradient(ellipse at 50% 100%, rgba(7, 7, 7, 0.9) 0%, rgba(7, 7, 7, 0) 60%),
    linear-gradient(rgba(240, 209, 154, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(240, 209, 154, 0.07) 1px, transparent 1px) !important;
  background-size: 100% 100%, 100% 100%, 72px 72px, 72px 72px !important;
  background-position: center, center, center top, center top !important;
  border-bottom: 1px solid rgba(240, 209, 154, 0.12);
}
.hero::before { display: none !important; }
.hero h1 { font-family: var(--font-display) !important; letter-spacing: 0.01em !important; color: #F4EDE0 !important; }
.hero h1 span { color: #F0D19A !important; font-style: normal !important; }
.hero p { color: #D6CDBD !important; }
.hero-badge { background: rgba(240, 209, 154, 0.06) !important; color: #F0D19A !important; border-color: rgba(201, 168, 108, 0.45) !important; font-family: var(--font-display); letter-spacing: 0.18em !important; }
.hero-stats { border-top-color: rgba(240, 209, 154, 0.14) !important; }
.hero-stat-value { font-family: var(--font-display) !important; font-weight: 600 !important; color: #F0D19A !important; letter-spacing: 0.02em; }
.hero-stat-label { color: #A89880 !important; }
.hero .btn-ghost, .hero .btn-outline { color: #F4EDE0 !important; border-color: rgba(201, 168, 108, 0.6) !important; background: transparent !important; }
.hero .btn-primary, .hero .btn-gold { background: #F0D19A !important; color: #070707 !important; border-color: #F0D19A !important; box-shadow: none !important; }

/* Day: the same plate in cream — ink type, gold grid. */
html[data-theme="day"] .hero {
  background-color: #F4EDE0 !important;
  background-image:
    radial-gradient(ellipse at 50% 35%, rgba(255, 255, 255, 0.55) 0%, rgba(244, 237, 224, 0) 55%),
    radial-gradient(ellipse at 50% 100%, rgba(244, 237, 224, 0.9) 0%, rgba(244, 237, 224, 0) 60%),
    linear-gradient(rgba(140, 113, 64, 0.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140, 113, 64, 0.10) 1px, transparent 1px) !important;
  border-bottom-color: #E2D8C4;
}
html[data-theme="day"] .hero h1 { color: #11100E !important; }
html[data-theme="day"] .hero h1 span { color: #8C7140 !important; }
html[data-theme="day"] .hero p { color: #4A4338 !important; }
html[data-theme="day"] .hero-badge { color: #8C7140 !important; background: rgba(140, 113, 64, 0.06) !important; border-color: rgba(140, 113, 64, 0.4) !important; }
html[data-theme="day"] .hero-stats { border-top-color: #E2D8C4 !important; }
html[data-theme="day"] .hero-stat-value { color: #11100E !important; }
html[data-theme="day"] .hero-stat-label { color: #7D7262 !important; }
html[data-theme="day"] .hero .btn-primary, html[data-theme="day"] .hero .btn-gold { background: #11100E !important; color: #F4EDE0 !important; border-color: #11100E !important; }
html[data-theme="day"] .hero .btn-ghost, html[data-theme="day"] .hero .btn-outline { color: #11100E !important; border-color: rgba(140, 113, 64, 0.55) !important; }

/* ════ Landing navigation — a fixed order that holds at every width ════ */
.nav-inner { max-width: 1240px !important; gap: 20px; }
.nav-brand { order: 0; flex: 0 0 auto; min-width: 0; }
.nav-links { order: 1; flex: 1 1 auto; justify-content: center; gap: 28px !important; min-width: 0; }
.nav-links a { white-space: nowrap; }
.nav-actions { order: 2; flex: 0 0 auto; }
.nav-actions .btn { white-space: nowrap; }
.nav .mw-theme-toggle { order: 3 !important; margin-left: 0 !important; flex: 0 0 auto; }
.nav-hamburger { order: 4 !important; }
/* Narrow windows (preview panes, small laptops, tablets): links fold into the menu. */
@media (max-width: 1100px) {
  .nav-hamburger { display: block !important; }
  .nav-links {
    display: none !important; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 6px !important; padding: 14px 24px 18px;
    background: rgba(7, 7, 7, 0.98) !important; border-bottom: 1px solid rgba(240, 209, 154, 0.12);
  }
  .nav-links.open { display: flex !important; }
  .nav-links a { padding: 8px 0; font-size: 15px; }
  .nav-actions { margin-left: auto; }
}
@media (max-width: 640px) {
  .nav-inner { gap: 10px; padding: 0 14px !important; }
  .mw-lockup .mw-sub { display: none; }
  .mw-word { font-size: 14px; letter-spacing: 0.18em; }
  .nav .mw-theme-toggle { padding: 6px; }
  .nav .mw-theme-toggle .mw-theme-label { display: none; }
  .nav-actions .btn-ghost { display: none; }
}
@media (max-width: 900px) {
  .hero h1 { font-size: 2.35rem !important; }
}

/* The nav is ink in both modes, so its buttons outrank the day button rules. */
html .nav .btn-primary, html .nav .btn-gold { background: #F0D19A !important; color: #070707 !important; border-color: #F0D19A !important; }
html .nav .btn-ghost, html .nav .btn-outline { color: #F4EDE0 !important; border-color: rgba(201, 168, 108, 0.6) !important; background: transparent !important; }
/* Stat headings stay on one line. */
.hero-stats { gap: 40px !important; flex-wrap: wrap; }
.hero-stat { min-width: 150px; }
.hero-stat-value { font-size: 1.45rem !important; white-space: nowrap; }
@media (max-width: 640px) {
  .hero-badge { font-size: 10px !important; letter-spacing: 0.12em !important; padding: 6px 12px !important; }
  .hero-stats { gap: 18px !important; }
  .hero-stat-value { font-size: 1.15rem !important; }
}
