/* ────────────────────────────────────────────────────────────────
   MailSloth — Writing Desk visual tokens
   Mahogany + brass + ebony-holly stringing + parchment
   ──────────────────────────────────────────────────────────────── */

:root {
  /* Mahogany (light mode — mid-day at the desk) */
  --wood-base:    #7A4E2E;
  --wood-hi:      #A87555;
  --wood-recess:  #3D2618;
  --wood-deep:    #2A180D;
  --wood-warm:    #8B5A36;
  --wood-shadow:  rgba(20,8,2,0.55);

  /* Brass */
  --brass:        #C49A56;
  --brass-hi:     #F0D38C;
  --brass-mid:    #A07A38;
  --brass-shadow: #5A3F18;
  --brass-muted:  #8E6A38;
  --brass-amber:  #D7A24A;

  /* Stringing — ebony-holly marquetry */
  --holly:        #F0E6CD;
  --holly-mute:   #C8B98C;
  --ebony:        #1A1410;

  /* Parchment */
  --parchment:    #F4E8C8;
  --parchment-2:  #E9D9A8;
  --ink:          #2A1A0A;
  --ink-faded:    #5A3E20;
  --ink-rubric:   #8A2515;

  /* Status stringing (holly-stripe state shift) */
  --status-ok:    #6B8E3D;   /* jade-ish, period green */
  --status-warn:  #C8851F;   /* amber */
  --status-err:   #9A2417;   /* oxblood */

  --rope-light:   #C28F5C;
  --rope-dark:    #3A220F;
}

/* ─── type ─────────────────────────────────────────────────────── */

body { margin: 0; font-family: 'Cormorant Garamond', 'EB Garamond', Georgia, serif; color: var(--ink); background: #1f140a; }

.t-engrave {
  font-family: 'Cormorant SC', 'Cormorant Garamond', Georgia, serif;
  font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
}
.t-mono {
  font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  letter-spacing: 0.02em;
}
.t-script {
  font-family: 'IM Fell English', 'EB Garamond', Georgia, serif;
  font-style: italic;
}
.t-ledger {
  font-family: 'IM Fell English', 'EB Garamond', Georgia, serif;
}

/* ─── mahogany surface ────────────────────────────────────────── */

.wood {
  background-color: var(--wood-base);
  background-image:
    /* warm pooled highlight */
    radial-gradient(140% 80% at 30% 30%, rgba(220,170,120,0.18), transparent 55%),
    radial-gradient(120% 70% at 70% 85%, rgba(40,18,4,0.45), transparent 60%),
    /* grain — varied vertical streaks */
    repeating-linear-gradient(91deg,
      rgba(40,18,4,0.06) 0 1px,
      transparent 1px 3px,
      rgba(40,18,4,0.10) 3px 4px,
      transparent 4px 8px,
      rgba(200,150,90,0.04) 8px 11px,
      transparent 11px 17px),
    /* coarser banding */
    repeating-linear-gradient(89deg,
      rgba(58,28,8,0.10) 0 2px,
      transparent 2px 22px),
    /* base tint */
    linear-gradient(180deg, var(--wood-warm), var(--wood-base) 40%, var(--wood-recess));
  background-blend-mode: normal, normal, multiply, multiply, normal;
  position: relative;
}

.wood-dark {
  background-color: #3D2618;
  background-image:
    radial-gradient(140% 80% at 30% 30%, rgba(200,140,90,0.12), transparent 55%),
    radial-gradient(120% 70% at 70% 85%, rgba(10,4,1,0.6), transparent 60%),
    repeating-linear-gradient(91deg,
      rgba(10,4,1,0.18) 0 1px,
      transparent 1px 3px,
      rgba(10,4,1,0.10) 3px 4px,
      transparent 4px 8px,
      rgba(150,100,60,0.04) 8px 11px,
      transparent 11px 17px),
    linear-gradient(180deg, #5C3922, #3D2618 50%, #1f120a);
  background-blend-mode: normal, normal, multiply, normal;
}

/* deepened recess interior (inside a pigeonhole or drawer) */
.wood-recess {
  background: radial-gradient(110% 90% at 50% 30%, var(--wood-recess), var(--wood-deep) 70%, #110700);
  box-shadow:
    inset 0 8px 14px rgba(0,0,0,0.55),
    inset 0 -4px 8px rgba(0,0,0,0.5);
}

/* ─── rope-twist molding (rendered as a striped pill across an edge) ── */
.rope {
  height: 14px;
  background:
    radial-gradient(circle at 50% 70%, rgba(0,0,0,0.4), transparent 60%),
    repeating-linear-gradient(115deg,
      var(--rope-dark) 0 3px,
      #7a4a25 3px 6px,
      var(--rope-light) 6px 9px,
      #7a4a25 9px 12px,
      var(--rope-dark) 12px 15px);
  border-top: 1px solid rgba(0,0,0,0.35);
  border-bottom: 1px solid rgba(0,0,0,0.35);
  box-shadow: 0 2px 3px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,200,140,0.18);
}

/* ─── ebony / holly stringing border ──────────────────────────── */
/* Apply to any container — a 3-band inlay: ebony / holly / ebony  */
.stringing {
  position: relative;
  padding: 4px;
}
.stringing::before {
  content: '';
  position: absolute; inset: 4px;
  border: 1px solid var(--ebony);
  pointer-events: none;
}
.stringing::after {
  content: '';
  position: absolute; inset: 5px;
  border: 1.5px solid var(--holly);
  outline: 1px solid var(--ebony);
  pointer-events: none;
}

/* status-stringing tints (apply alongside .stringing) */
.stringing--ok::after    { border-color: var(--status-ok); }
.stringing--warn::after  { border-color: var(--status-warn); }
.stringing--err::after   { border-color: var(--status-err); }
.stringing--brass::after { border-color: var(--brass); }

/* a single-line stringing divider (within a panel) */
.stringing-line {
  height: 4px;
  background:
    linear-gradient(180deg,
      var(--ebony) 0 1px,
      var(--holly) 1px 3px,
      var(--ebony) 3px 4px);
  box-shadow: 0 1px 0 rgba(255,220,160,0.05), 0 -1px 0 rgba(0,0,0,0.4);
}

/* ─── brass surfaces ──────────────────────────────────────────── */

.brass {
  background:
    linear-gradient(180deg,
      var(--brass-hi) 0%,
      var(--brass) 32%,
      var(--brass-mid) 70%,
      var(--brass-shadow) 100%);
  color: #2d1c08;
}
.brass-radial {
  background:
    radial-gradient(60% 80% at 50% 25%, var(--brass-hi), var(--brass) 55%, var(--brass-mid) 88%, var(--brass-shadow));
  color: #2d1c08;
}
.brass-edge {
  box-shadow:
    inset 0 1px 0 rgba(255,235,180,0.7),
    inset 0 -1.5px 0 rgba(60,38,10,0.65),
    inset 1px 0 0 rgba(255,220,150,0.25),
    inset -1px 0 0 rgba(40,22,4,0.45),
    0 1px 2px rgba(0,0,0,0.6);
}

/* engraved label on brass — incised text */
.brass-engrave {
  color: #2d1c08;
  text-shadow:
    0 1px 0 rgba(255,235,180,0.5),
    0 -1px 0 rgba(40,22,4,0.5);
}

/* brass beading along an edge — apply as a thin border-image */
.brass-bead {
  box-shadow:
    inset 0 0 0 1px var(--brass-mid),
    inset 0 0 0 2px var(--brass-hi),
    inset 0 0 0 3px var(--brass-shadow);
}

/* ─── parchment surface (composition + analytics) ─────────────── */

.parchment {
  background-color: var(--parchment);
  background-image:
    radial-gradient(120% 80% at 30% 20%, rgba(255,250,225,0.7), transparent 55%),
    radial-gradient(100% 80% at 80% 90%, rgba(160,110,40,0.18), transparent 55%),
    repeating-linear-gradient(2deg,
      rgba(120,80,30,0.04) 0 1px,
      transparent 1px 9px),
    repeating-linear-gradient(94deg,
      rgba(120,80,30,0.03) 0 1px,
      transparent 1px 11px);
  color: var(--ink);
  box-shadow:
    inset 0 1px 0 rgba(255,250,225,0.7),
    inset 0 -2px 4px rgba(120,80,30,0.15);
}

/* deckle / torn-edge feel using a clip-path with subtle jitter */
.parchment-deckle {
  -webkit-mask-image: radial-gradient(ellipse 100% 99% at 50% 50%, #000 96%, transparent 100%);
          mask-image: radial-gradient(ellipse 100% 99% at 50% 50%, #000 96%, transparent 100%);
}

/* leather blotter inset (subtle, optional centerpiece) */
.blotter {
  background:
    radial-gradient(80% 75% at 50% 35%, #6b3a1a, #4a2510 70%, #2a1408);
  box-shadow:
    inset 0 2px 5px rgba(0,0,0,0.6),
    inset 0 -1px 0 rgba(255,210,150,0.15);
}

/* ─── small util ──────────────────────────────────────────────── */
.center { display: flex; align-items: center; justify-content: center; }
.col { display: flex; flex-direction: column; }
.row { display: flex; flex-direction: row; }
.gap-4 { gap: 4px; } .gap-6 { gap: 6px; } .gap-8 { gap: 8px; }
.gap-10 { gap: 10px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.muted { opacity: 0.7; }

/* phone frame — a soft black bezel; we don't need full iOS chrome */
.phone {
  width: 390px; height: 844px; border-radius: 44px;
  background: #0a0604;
  padding: 12px;
  box-shadow:
    0 0 0 2px #2a1c0c,
    0 30px 60px rgba(0,0,0,0.55),
    0 0 0 4px #060300;
  position: relative;
}
.phone-screen {
  width: 100%; height: 100%; border-radius: 34px;
  overflow: hidden; position: relative;
  isolation: isolate;
}
.notch {
  position: absolute; top: 18px; left: 50%; transform: translateX(-50%);
  width: 110px; height: 32px; border-radius: 18px; background: #0a0604;
  z-index: 50;
}
.home-ind {
  position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
  width: 130px; height: 4px; border-radius: 2px; background: rgba(255,220,180,0.55);
  z-index: 50;
}

/* status bar over wood */
.statusbar {
  height: 50px; padding: 0 28px;
  display: flex; align-items: flex-end; justify-content: space-between;
  font-family: -apple-system, system-ui; font-weight: 600; font-size: 15px;
  color: #f4e6c8; padding-bottom: 14px;
  text-shadow: 0 1px 0 rgba(0,0,0,0.4);
  position: relative; z-index: 5;
}

/* light "wood reflection" overlay — soft highlight from above */
.wood-sheen {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,220,170,0.10), transparent 25%, transparent 70%, rgba(0,0,0,0.25));
}
