/* ==========================================================================
   Shirley Estate — shared brand system
   --------------------------------------------------------------------------
   One design language for every surface: marketing site, sign-in, customer /
   company / staff spaces. Extracted from Shirley_Estate_Website_V1.html so
   the platform reads as one company.

   Display  : Fraunces (500/600, tight tracking, navy)
   Body     : Inter
   Document : IBM Plex Mono — the "estate record" metadata layer. All labels,
              keys, price units and tags render mono, uppercase, gold-ink.
   ========================================================================== */

:root {
  --navy: #0F2440;
  --navy-2: #183355;
  --navy-3: #0A1B30;
  --cream: #F7F1E1;
  --cream-2: #EFE4C6;
  --gold: #C6A45E;
  --gold-soft: #E3CFA0;
  --gold-ink: #785A1F;
  --ink: #211809;
  --brown: #5B3A26;
  --white: #FFFFFF;
  --line: rgba(198, 164, 94, 0.35);
  --rule: rgba(91, 58, 38, 0.16);
  --rule-gold: rgba(198, 164, 94, 0.5);
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Inter', system-ui, sans-serif;

  --ok: #4F6B45;
  --ok-bg: #E9EEE2;
  --warn: #96751F;
  --warn-bg: #F3EACE;
  --alert: #A6432B;
  --alert-bg: #F5E1D9;

  --shadow-card: 0 20px 44px rgba(91, 58, 38, 0.08);
  --shadow-pop: 0 24px 60px -12px rgba(15, 36, 64, 0.35);
  --ease: 0.18s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body.brand {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

h1, h2, h3, .display {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--navy);
}
h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); font-weight: 500; letter-spacing: -0.025em; }
h3 { font-size: 1.15rem; font-weight: 500; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 32px; }
.wrap-narrow { max-width: 920px; margin: 0 auto; padding: 0 32px; }

/* ---- Estate-document metadata layer ------------------------------------ */
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-weight: 500; font-size: 0.68rem;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold-ink);
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--gold); flex-shrink: 0; }
.on-navy .eyebrow, .eyebrow.on-navy { color: var(--gold-soft); }

.k {
  display: block; font-family: var(--mono); font-size: 0.64rem;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold-ink); margin-bottom: 9px;
}
.v {
  display: block; font-family: var(--serif); font-size: 1.24rem;
  font-weight: 500; color: var(--navy); letter-spacing: -0.01em;
}
.mono { font-family: var(--mono); font-weight: 500; font-variant-numeric: tabular-nums; }

/* ---- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 13px 24px; border-radius: 3px;
  font-family: var(--sans); font-weight: 600; font-size: 0.78rem;
  text-transform: uppercase; letter-spacing: 0.1em; cursor: pointer;
  border: 1px solid transparent;
  transition: transform var(--ease), background var(--ease), border-color var(--ease), color var(--ease);
}
.btn:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 2px;
}
.btn-gold { background: var(--gold); color: var(--navy-3); }
.btn-gold:hover { background: var(--gold-soft); transform: translateY(-1px); }
.btn-ghost-dark { border-color: rgba(255, 255, 255, 0.4); color: var(--white); background: transparent; }
.btn-ghost-dark:hover { border-color: var(--gold); color: var(--gold); }
.btn-ghost-light { border-color: rgba(15, 36, 64, 0.25); color: var(--navy); background: transparent; }
.btn-ghost-light:hover { border-color: var(--navy); background: rgba(15, 36, 64, 0.04); }
.btn-sm { padding: 8px 14px; font-size: 0.7rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ---- Estate record strip ------------------------------------------------ */
.estate-strip { background: var(--cream); border-top: 1px solid var(--rule-gold); border-bottom: 1px solid var(--rule-gold); }
.estate-strip .wrap { display: flex; flex-wrap: wrap; padding: 0; }
.estate-strip .rec { flex: 1 1 0; min-width: 170px; padding: 24px 30px; border-right: 1px solid var(--rule); }
.estate-strip .rec:last-child { border-right: none; }

/* ---- Document cards ------------------------------------------------------ */
.doc-card {
  background: var(--white); border: 1px solid var(--rule); border-radius: 4px;
  padding: 26px 28px; box-shadow: var(--shadow-card);
}
.doc-card.featured { border-top: 3px solid var(--gold); }
.doc-card .sheet-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding-bottom: 14px; margin-bottom: 18px; border-bottom: 1px solid var(--rule);
}

/* ---- Forms ---------------------------------------------------------------- */
.field { margin-bottom: 18px; }
.field label {
  display: block; font-family: var(--mono); font-size: 0.64rem;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-ink);
  margin-bottom: 8px;
}
.input {
  width: 100%; padding: 12px 14px; border-radius: 3px;
  border: 1px solid var(--rule); background: var(--white); color: var(--ink);
  font-family: var(--sans); font-size: 0.95rem;
  transition: border-color var(--ease);
}
.input:focus { border-color: var(--gold); outline: 2px solid var(--gold); outline-offset: 0; }
.input::placeholder { color: rgba(33, 24, 9, 0.35); }

/* ---- Status pills --------------------------------------------------------- */
.pill {
  display: inline-block; font-family: var(--mono); font-size: 0.62rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  border-radius: 3px; padding: 3px 9px;
}
.pill-ok { background: var(--ok-bg); color: var(--ok); }
.pill-warn { background: var(--warn-bg); color: var(--warn); }
.pill-alert { background: var(--alert-bg); color: var(--alert); }
.pill-navy { background: rgba(15, 36, 64, 0.08); color: var(--navy); }

/* ---- Platform chrome (shared header/footer for signed-in spaces) --------- */
.plat-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(15, 36, 64, 0.94); backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(198, 164, 94, 0.18);
}
.plat-nav {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 12px 32px; max-width: 1180px; margin: 0 auto;
}
.plat-brand { display: flex; align-items: center; gap: 12px; color: var(--white); }
.plat-brand .name { font-family: var(--serif); font-weight: 500; font-size: 1.05rem; letter-spacing: 0.01em; }
.plat-brand .role-tag {
  font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--gold-soft);
  border: 1px solid rgba(198, 164, 94, 0.4); border-radius: 3px; padding: 3px 8px;
}
.plat-links { display: flex; align-items: center; gap: 22px; }
.plat-links a {
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: rgba(255, 255, 255, 0.75);
  padding: 6px 2px; border-bottom: 1px solid transparent;
  transition: color var(--ease), border-color var(--ease);
}
.plat-links a:hover { color: var(--gold-soft); }
.plat-links a.active { color: var(--gold-soft); border-bottom-color: var(--gold); }

.plat-main { padding: 44px 0 80px; }

/* ---- Stat blocks ----------------------------------------------------------- */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.stat {
  background: var(--white); border: 1px solid var(--rule); border-radius: 4px;
  padding: 18px 20px;
}
.stat .num { font-family: var(--serif); font-size: 1.7rem; font-weight: 500; color: var(--navy); letter-spacing: -0.02em; }
.stat .num.alert { color: var(--alert); }
.stat .lbl { font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-ink); margin-top: 6px; }

/* ---- Tables ------------------------------------------------------------------ */
.doc-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.doc-table th {
  font-family: var(--mono); font-weight: 500; font-size: 0.62rem;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-ink);
  text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--rule-gold);
}
.doc-table td { padding: 13px 14px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.doc-table tr:last-child td { border-bottom: none; }

/* ---- Utility ------------------------------------------------------------------ */
.muted { color: rgba(33, 24, 9, 0.55); }
.hidden { display: none !important; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }

/* ==========================================================================
   Portal refinement layer — the "estate ledger" aesthetic.
   Hairlines over boxes, serif numerals, generous air. Hermès restraint:
   one gold accent per view, everything else typography and space.
   ========================================================================== */
.lux .plat-main { padding: 64px 0 110px; }
.lux .page-head { margin-bottom: 58px; }
.lux .page-head h2 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); margin-top: 10px; }
.lux .page-head .sub { color: rgba(33, 24, 9, 0.5); font-size: 0.95rem; margin-top: 10px; max-width: 520px; }

.lux-section { border-top: 1px solid var(--rule-gold); padding: 40px 0 8px; margin-top: 46px; }
.lux-section > .sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 30px; flex-wrap: wrap; }
.lux-section > .sec-head h3 { font-size: 1.3rem; font-weight: 500; }

.lux .stat { background: none; border: none; border-top: 1px solid var(--rule-gold); border-radius: 0; padding: 18px 2px 0; }
.lux .stat .num { font-size: clamp(1.7rem, 2.6vw, 2.3rem); }
.lux .stat .sub-note { font-size: 0.74rem; color: rgba(33, 24, 9, 0.45); margin-top: 4px; }

.lux .doc-card { box-shadow: none; border: 1px solid var(--rule); padding: 30px 32px; }
.lux .doc-card.featured { border-top: 2px solid var(--gold); }

.lux .doc-table th { padding: 10px 14px 12px; }
.lux .doc-table td { padding: 15px 14px; }
.lux .doc-table tbody tr { transition: background var(--ease); }
.lux .doc-table tbody tr:hover { background: rgba(198, 164, 94, 0.05); }

.hero-band {
  background: var(--navy-3); border-radius: 4px; color: var(--white);
  padding: 40px 44px; position: relative; overflow: hidden;
}
.hero-band::after {
  content: ""; position: absolute; left: 44px; right: 44px; top: 0;
  height: 2px; background: var(--gold);
}
.hero-band .k { color: var(--gold-soft); }
.hero-band .big { font-family: var(--serif); font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 500; letter-spacing: -0.02em; }
.hero-band .meta { color: rgba(255, 255, 255, 0.6); font-size: 0.92rem; margin-top: 8px; }
.hero-band .actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }

.lux-in { opacity: 0; transform: translateY(14px); animation: luxIn 0.7s ease forwards; }
.lux-in.d1 { animation-delay: 0.08s; }
.lux-in.d2 { animation-delay: 0.16s; }
.lux-in.d3 { animation-delay: 0.24s; }
@keyframes luxIn { to { opacity: 1; transform: translateY(0); } }

.bar-chart { display: flex; align-items: flex-end; gap: 14px; height: 120px; }
.bar-chart .bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 8px; height: 100%; }
.bar-chart .bar i { display: block; width: 100%; max-width: 44px; background: var(--cream-2); border-top: 2px solid var(--gold); transition: height 0.6s ease; }
.bar-chart .bar.current i { background: var(--gold-soft); }
.bar-chart .bar b { font-family: var(--mono); font-weight: 500; font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-ink); }

@media (max-width: 760px) {
  .wrap, .wrap-narrow { padding: 0 18px; }
  .plat-nav { padding: 10px 18px; }
  .grid-2 { grid-template-columns: 1fr; }
  .plat-links { gap: 14px; flex-wrap: wrap; }
  .hero-band { padding: 30px 26px; }
  .hero-band::after { left: 26px; right: 26px; }
  .lux .plat-main { padding: 40px 0 80px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
