/* =====================================================================
   GRVI Design System v1 — Client-facing
   Editorial. Warm. Quiet. Generous.
   Atomic structure: Foundations → Atoms → Molecules → Organisms → Patterns.
   ===================================================================== */

:root {
  /* Brand */
  --c-ravello:     #764133;
  --c-duna:        #7D6F5F;
  --c-ombra:       #363128;
  --c-cipreste:    #363E33;
  --c-paper:       #F4F0E9;
  --c-white:       #FFFFFF;
  --c-black:       #0A0A0A;

  /* Semantic */
  --c-surface:           var(--c-paper);
  --c-surface-inverse:   var(--c-ombra);
  --c-surface-alt:       #FAF7F1;
  --c-surface-muted:     #EDE8DE;
  --c-ink:               var(--c-ombra);
  --c-ink-80:            rgba(54,49,40,.80);
  --c-ink-60:            rgba(54,49,40,.60);
  --c-ink-40:            rgba(54,49,40,.40);
  --c-ink-20:            rgba(54,49,40,.20);
  --c-ink-10:            rgba(54,49,40,.10);
  --c-ink-inverse:       var(--c-paper);
  --c-ink-inverse-70:    rgba(244,240,233,.78);
  --c-ink-inverse-50:    rgba(244,240,233,.60);
  --c-ink-inverse-30:    rgba(244,240,233,.35);
  --c-accent:            var(--c-ravello);
  --c-accent-hover:      #8A4E3E;
  --c-accent-pressed:    #5A3124;
  --c-border:            rgba(54,49,40,.12);
  --c-border-strong:     rgba(54,49,40,.24);
  --c-border-inverse:    rgba(244,240,233,.20);
  --c-success:           #5B6B4A;
  --c-warning:           #C48A3C;
  --c-error:             #9A3B2A;
  --c-info:              #4A6575;
  --c-focus-ring:        #C48A3C;

  /* Type */
  --ff-serif: "Cormorant Garamond", Georgia, serif;
  --ff-sans:  "Source Sans 3", "Inter", system-ui, sans-serif;
  --ff-mono:  "JetBrains Mono", ui-monospace, Menlo, monospace;

  /* Space */
  --s-1: 4px;  --s-2: 8px;   --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px;  --s-7: 48px; --s-8: 64px;
  --s-9: 96px; --s-10: 144px; --s-11: 200px;

  /* Radii */
  --r-none: 0;  --r-xs: 2px; --r-sm: 4px;
  --r-md: 8px;  --r-lg: 16px; --r-pill: 999px;

  /* Shadows */
  --sh-xs:    0 1px 2px rgba(54,49,40,.05);
  --sh-sm:    0 2px 8px rgba(54,49,40,.06);
  --sh-md:    0 12px 32px -8px rgba(54,49,40,.14);
  --sh-lg:    0 40px 80px -20px rgba(0,0,0,.35);
  --sh-focus: 0 0 0 3px rgba(196,138,60,.45);

  /* Motion */
  --ease-standard:  cubic-bezier(.2,.6,.2,1);
  --ease-enter:     cubic-bezier(0,.7,.3,1);
  --ease-exit:      cubic-bezier(.5,0,.7,.3);
  --ease-gentle:    cubic-bezier(.4,0,.2,1);
  --d-quick:   120ms;
  --d-base:    200ms;
  --d-calm:    360ms;
  --d-page:    600ms;
  --d-ritual:  900ms;
}

/* =================== RESET / FRAME =================== */
*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--c-surface);
  color: var(--c-ink);
  font-family: var(--ff-sans);
  font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body { overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

.page {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 96px;
}
@media (max-width: 900px) { .page { padding: 0 24px; } }

.section {
  padding: 144px 0 96px;
  border-top: 1px solid var(--c-border);
}
.section:first-of-type { border-top: 0; }
.section-head {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 48px;
  margin-bottom: 96px;
  align-items: baseline;
}
@media (max-width: 900px) {
  .section { padding: 64px 0 48px; }
  .section-head { grid-template-columns: 1fr; gap: 24px; margin-bottom: 48px; }
}
.section-title {
  font-family: var(--ff-serif);
  font-weight: 300; font-size: 72px; line-height: 1.08;
  letter-spacing: -0.015em; margin: 0 0 24px;
  color: var(--c-ink);
}
.section-title em { font-style: italic; color: var(--c-accent); font-weight: 400; }
.section-lede {
  font-family: var(--ff-serif);
  font-style: italic; font-weight: 300;
  font-size: 22px; line-height: 1.5;
  color: var(--c-ink-60); max-width: 640px; margin: 0;
}

/* Eyebrow label */
.label {
  font-family: var(--ff-sans);
  font-weight: 500; font-size: 11px;
  letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--c-ink-40);
}

/* Atomic level marker */
.atomic-level {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--ff-mono);
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--c-accent); font-weight: 500;
  margin-bottom: 12px;
}
.atomic-level::before {
  content: ""; width: 18px; height: 1px; background: var(--c-accent);
}

/* Chrome */
.chrome {
  display: flex; justify-content: space-between; align-items: center;
  padding: 32px 0;
  border-bottom: 1px solid var(--c-border);
  font-family: var(--ff-sans);
  font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--c-ink-40); font-weight: 500;
}

/* =================== COVER =================== */
.cover {
  min-height: 92vh;
  display: grid; grid-template-rows: auto 1fr auto;
  padding: 32px 0;
}
.cover-hero { align-self: center; max-width: 1100px; }
.cover-eyebrow {
  display: flex; gap: 16px; align-items: center;
  margin-bottom: 48px;
  font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--c-ink-40); font-weight: 500;
}
.cover-eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--c-accent); }
.cover-title {
  font-family: var(--ff-serif);
  font-weight: 300;
  font-size: clamp(72px, 11vw, 160px);
  line-height: 0.98; letter-spacing: -0.025em;
  margin: 0 0 56px; color: var(--c-ink);
}
.cover-title em { font-style: italic; color: var(--c-accent); font-weight: 400; }
.cover-sub {
  font-family: var(--ff-serif);
  font-style: italic; font-weight: 300;
  font-size: 28px; line-height: 1.45;
  color: var(--c-ink-60); max-width: 720px; margin: 0 0 72px;
}
.cover-meta {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--c-border);
}
.cover-meta .cell .k {
  font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--c-ink-40); font-weight: 500; margin-bottom: 8px;
}
.cover-meta .cell .v {
  font-family: var(--ff-serif); font-size: 22px; font-weight: 300; color: var(--c-ink);
}
@media (max-width: 900px) {
  .cover-meta { grid-template-columns: 1fr 1fr; gap: 24px; }
  .cover-sub { font-size: 20px; }
}

/* =================== TOC =================== */
.toc {
  display: grid; grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--c-border);
}
.toc-group {
  padding: 32px 32px 32px 0;
  border-bottom: 1px solid var(--c-border);
  border-right: 1px solid var(--c-border);
}
.toc-group:nth-child(2n) { border-right: 0; padding-right: 0; padding-left: 32px; }
.toc-group h4 {
  font-family: var(--ff-mono);
  font-weight: 500; font-size: 11px;
  letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--c-accent); margin: 0 0 24px;
}
.toc-group a {
  display: grid; grid-template-columns: 32px 1fr;
  gap: 16px; padding: 10px 0;
  font-family: var(--ff-serif); font-size: 18px; font-weight: 400;
  color: var(--c-ink);
  transition: color var(--d-base) var(--ease-standard);
}
.toc-group a:hover { color: var(--c-accent); }
.toc-group a .n {
  font-style: italic; color: var(--c-ink-40); font-weight: 300;
}
@media (max-width: 900px) {
  .toc { grid-template-columns: 1fr; }
  .toc-group { border-right: 0; padding: 24px 0; }
  .toc-group:nth-child(2n) { padding-left: 0; }
}

/* =================== LOGO STAGE =================== */
.logo-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 1100px) { .logo-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 700px)  { .logo-grid { grid-template-columns: 1fr; } }

.logo-card {
  border: 1px solid var(--c-border);
  background: var(--c-surface-alt);
  display: flex; flex-direction: column;
}
.logo-card .stage-area {
  flex: 1; min-height: 220px;
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
  position: relative;
}
.logo-card .stage-area.dark { background: var(--c-ombra); }
.logo-card .stage-area.ravello { background: var(--c-ravello); }
.logo-card .meta {
  border-top: 1px solid var(--c-border);
  padding: 16px 20px;
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--ff-mono);
  font-size: 11px; color: var(--c-ink-60);
}
.logo-card .meta strong {
  font-family: var(--ff-sans);
  font-weight: 500; font-size: 11px;
  letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--c-ink);
}
.logo-card .lg-mark { width: 200px; height: auto; }
.logo-card .lg-mark.invert path,
.logo-card .lg-mark.invert rect { fill: var(--c-paper); }
.logo-card .lg-mark.dark-fill path,
.logo-card .lg-mark.dark-fill rect { fill: var(--c-ombra); }

/* Clearspace */
.clearspace-stage {
  position: relative;
  background: var(--c-surface-alt);
  padding: 80px;
  display: flex; align-items: center; justify-content: center;
}
.clearspace-stage .guides {
  position: absolute; inset: 32px;
  border: 1px dashed var(--c-accent);
  opacity: .5;
  pointer-events: none;
}
.clearspace-stage .x-mark {
  position: absolute;
  font-family: var(--ff-mono); font-size: 11px;
  color: var(--c-accent);
  background: var(--c-surface-alt);
  padding: 0 4px;
}
.cs-row {
  display: grid; grid-template-columns: 1.4fr 1fr;
  gap: 24px; align-items: stretch;
}
@media (max-width: 900px) { .cs-row { grid-template-columns: 1fr; } }

/* Min size */
.minsize-stage {
  background: var(--c-surface-alt);
  border: 1px solid var(--c-border);
  padding: 56px 40px;
  display: flex; flex-direction: column; align-items: center; gap: 28px;
}
.minsize-row {
  display: flex; align-items: flex-end; gap: 56px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--c-border);
  width: 100%; justify-content: center;
}
.minsize-row .item {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.minsize-row .item .lbl {
  font-family: var(--ff-mono); font-size: 11px; color: var(--c-ink-60);
}

/* Misuse */
.misuse-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 900px) { .misuse-grid { grid-template-columns: 1fr 1fr; } }
.misuse-card {
  border: 1px solid var(--c-border);
  display: flex; flex-direction: column;
  background: var(--c-surface-alt);
}
.misuse-card .show {
  aspect-ratio: 4/3;
  display: flex; align-items: center; justify-content: center;
  padding: 24px; position: relative;
  border-bottom: 1px solid var(--c-border);
}
.misuse-card .show::after {
  content: "";
  position: absolute;
  left: 12%; right: 12%; top: 50%;
  height: 1.5px;
  background: var(--c-error);
  transform: rotate(-12deg);
  transform-origin: center;
}
.misuse-card .desc {
  padding: 14px 16px;
  font-size: 12px; color: var(--c-ink-60);
  font-weight: 300; line-height: 1.45;
}

/* =================== COLOR =================== */
.brand-swatches {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 32px;
}
.sw { display: flex; flex-direction: column; gap: 16px; }
.sw .chip {
  height: 320px;
  border-radius: var(--r-xs);
  box-shadow: inset 0 0 0 1px rgba(54,49,40,.08);
}
.sw .chip.light { box-shadow: inset 0 0 0 1px var(--c-border); }
.sw .name {
  font-family: var(--ff-serif);
  font-style: italic; font-size: 32px;
  color: var(--c-ink); font-weight: 300;
  letter-spacing: -0.01em;
}
.sw .hex {
  font-family: var(--ff-sans);
  font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--c-ink-40); font-weight: 500;
}
.sw .role {
  font-size: 14px; color: var(--c-ink-60);
  line-height: 1.55; font-weight: 300;
}
@media (max-width: 900px) {
  .brand-swatches { grid-template-columns: 1fr 1fr; }
  .sw .chip { height: 200px; }
}

.sem-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 48px;
}
.sem .demo {
  aspect-ratio: 4/3;
  border-radius: var(--r-xs);
  padding: 24px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.sem .demo .txt {
  font-family: var(--ff-serif); font-size: 28px; font-weight: 300;
  line-height: 1.15;
}
.sem .demo .ratio { font-family: var(--ff-mono); font-size: 12px; opacity: .7; }
.sem .meta {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-top: 12px;
  font-size: 12px; color: var(--c-ink-60);
}
.sem .meta strong { color: var(--c-ink); font-weight: 500; }
@media (max-width: 900px) { .sem-grid { grid-template-columns: 1fr 1fr; } }

.state-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.state-card {
  display: flex; flex-direction: column; gap: 16px;
  padding: 28px; border: 1px solid var(--c-border);
  background: var(--c-surface-alt);
}
.state-card .swatch {
  width: 40px; height: 40px; border-radius: 50%;
}
.state-card .nm {
  font-family: var(--ff-sans); font-size: 11px; letter-spacing: 0.28em;
  text-transform: uppercase; font-weight: 500; color: var(--c-ink-60);
}
.state-card .hx {
  font-family: var(--ff-mono); font-size: 13px; color: var(--c-ink);
}
.state-card .use {
  font-size: 13px; color: var(--c-ink-60); line-height: 1.5; font-weight: 300;
}
@media (max-width: 900px) { .state-grid { grid-template-columns: 1fr 1fr; } }

/* =================== TYPOGRAPHY =================== */
.type-spec {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-bottom: 96px;
  align-items: stretch;
}
.type-spec .face {
  padding: 48px;
  background: var(--c-surface-alt);
  border-radius: var(--r-xs);
}
.type-spec .face.primary .big {
  font-family: var(--ff-serif); font-size: 140px;
  line-height: 0.9; color: var(--c-ink); font-weight: 300;
}
.type-spec .face.primary .big em { font-style: italic; color: var(--c-accent); }
.type-spec .face.secondary .big {
  font-family: var(--ff-sans); font-size: 140px;
  line-height: 0.9; color: var(--c-ink); font-weight: 300;
}
.type-spec .face .name {
  margin-top: 32px;
  font-family: var(--ff-sans); font-size: 13px;
  letter-spacing: 0.28em; text-transform: uppercase;
  font-weight: 500; color: var(--c-ink-40);
}
.type-spec .face .desc {
  margin-top: 12px; font-size: 16px; line-height: 1.55;
  color: var(--c-ink-60); font-weight: 300;
}
.type-spec .face .sample {
  margin-top: 24px; padding-top: 24px;
  border-top: 1px solid var(--c-border);
  font-size: 12px; color: var(--c-ink-40); letter-spacing: 0.04em;
}
@media (max-width: 900px) { .type-spec { grid-template-columns: 1fr; gap: 24px; } }

.type-scale { border-top: 1px solid var(--c-border); }
.type-row {
  display: grid; grid-template-columns: 200px 1fr 200px;
  gap: 48px; padding: 40px 0;
  border-bottom: 1px solid var(--c-border);
  align-items: baseline;
}
.type-row .role {
  font-family: var(--ff-sans);
  font-size: 11px; letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--c-ink-40); font-weight: 500;
}
.type-row .specs {
  font-family: var(--ff-mono); font-size: 12px; line-height: 1.8;
  color: var(--c-ink-60); text-align: right;
}
.type-row .specs strong { color: var(--c-ink); font-weight: 500; }
@media (max-width: 900px) {
  .type-row { grid-template-columns: 1fr; gap: 12px; }
  .type-row .specs { text-align: left; }
}
.t-display { font-family: var(--ff-serif); font-weight: 300; font-size: 140px; line-height: 1.0; letter-spacing: -0.02em; }
.t-display em { font-style: italic; color: var(--c-accent); }
.t-h1 { font-family: var(--ff-serif); font-weight: 400; font-size: 72px; line-height: 1.08; letter-spacing: -0.015em; }
.t-h1 em { font-style: italic; color: var(--c-accent); font-weight: 400; }
.t-h2 { font-family: var(--ff-serif); font-weight: 300; font-size: 56px; line-height: 1.10; letter-spacing: -0.012em; }
.t-h2 em { font-style: italic; color: var(--c-accent); }
.t-h3 { font-family: var(--ff-serif); font-weight: 400; font-size: 40px; line-height: 1.15; letter-spacing: -0.008em; }
.t-h4 { font-family: var(--ff-sans); font-weight: 500; font-size: 28px; line-height: 1.25; letter-spacing: -0.004em; }
.t-body-lg { font-family: var(--ff-sans); font-weight: 300; font-size: 20px; line-height: 1.55; }
.t-body-md { font-family: var(--ff-sans); font-weight: 400; font-size: 16px; line-height: 1.60; }
.t-body-sm { font-family: var(--ff-sans); font-weight: 400; font-size: 14px; line-height: 1.55; }
.t-caption { font-family: var(--ff-sans); font-weight: 500; font-size: 12px; line-height: 1.45; }
.t-label { font-family: var(--ff-sans); font-weight: 500; font-size: 11px; line-height: 1.10; letter-spacing: 0.28em; text-transform: uppercase; }

.italics-rule {
  margin-top: 96px;
  display: grid; grid-template-columns: 1fr 2fr;
  gap: 48px; padding: 48px;
  background: var(--c-surface-alt);
  border-radius: var(--r-xs);
  align-items: center;
}
.italics-rule .one {
  font-family: var(--ff-serif); font-size: 120px;
  font-style: italic; color: var(--c-accent);
  line-height: 1; font-weight: 300;
}
.italics-rule p.lead {
  font-family: var(--ff-serif); font-size: 32px;
  font-weight: 300; line-height: 1.3;
  margin: 0 0 16px; color: var(--c-ink); letter-spacing: -0.005em;
}
.italics-rule p.lead em { color: var(--c-accent); }
.italics-rule p.note {
  font-size: 15px; color: var(--c-ink-60);
  line-height: 1.6; font-weight: 300; margin: 0;
}
@media (max-width: 900px) { .italics-rule { grid-template-columns: 1fr; } }

/* =================== TOKENS GRID (foundations: spacing/radii/shadow) =================== */
.tokens-grid { display: grid; grid-template-columns: 1fr; }
.token-row {
  display: grid;
  grid-template-columns: 160px 1fr 200px 240px;
  gap: 32px; padding: 24px 0;
  border-bottom: 1px solid var(--c-border);
  align-items: center;
  font-size: 14px;
}
.token-row .tok {
  font-family: var(--ff-mono); font-size: 13px;
  color: var(--c-ink); font-weight: 500;
}
.token-row .viz { display: flex; align-items: center; min-height: 48px; }
.token-row .val { font-family: var(--ff-mono); font-size: 13px; color: var(--c-ink-60); }
.token-row .use { color: var(--c-ink-60); font-size: 14px; line-height: 1.55; font-weight: 300; }
@media (max-width: 900px) { .token-row { grid-template-columns: 1fr; gap: 8px; } }
.space-bar { height: 24px; background: var(--c-accent); border-radius: 2px; }
.radius-demo { width: 80px; height: 80px; background: var(--c-ink); }
.shadow-demo { width: 120px; height: 80px; background: var(--c-surface); border-radius: var(--r-xs); }

/* =================== MOTION (real component examples) =================== */
.motion-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  margin-top: 32px;
}
@media (max-width: 1100px) { .motion-grid { grid-template-columns: 1fr; } }
.motion-card {
  border: 1px solid var(--c-border);
  background: var(--c-surface-alt);
  display: flex; flex-direction: column;
}
.motion-card .head {
  padding: 20px 28px;
  display: flex; justify-content: space-between; align-items: baseline;
  border-bottom: 1px solid var(--c-border);
}
.motion-card .head .tok {
  font-family: var(--ff-mono); font-size: 13px; color: var(--c-ink); font-weight: 500;
}
.motion-card .head .dur {
  font-family: var(--ff-mono); font-size: 12px; color: var(--c-accent);
}
.motion-card .stage-mo {
  flex: 1; min-height: 220px;
  display: flex; align-items: center; justify-content: center;
  padding: 40px; position: relative;
  background: var(--c-paper);
}
.motion-card .stage-mo.dark { background: var(--c-ombra); color: var(--c-ink-inverse); }
.motion-card .desc {
  padding: 16px 28px 22px;
  border-top: 1px solid var(--c-border);
  font-size: 13px; color: var(--c-ink-60); font-weight: 300;
  line-height: 1.5;
}
.motion-card .desc strong {
  color: var(--c-ink); font-weight: 500;
  display: block; margin-bottom: 4px;
  font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase;
}
.motion-card .replay {
  margin-left: auto;
  font-family: var(--ff-mono); font-size: 11px;
  color: var(--c-accent); cursor: pointer;
  padding: 4px 10px; border: 1px solid var(--c-border);
  background: transparent;
  letter-spacing: 0.08em;
}
.motion-card .replay:hover { background: var(--c-paper); }

/* Easing curves (now with purpose) */
.ease-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 24px; margin-top: 32px;
}
@media (max-width: 900px) { .ease-grid { grid-template-columns: 1fr; } }
.ease-card {
  border: 1px solid var(--c-border);
  background: var(--c-surface-alt);
  padding: 28px;
  display: grid; grid-template-columns: 140px 1fr;
  gap: 28px; align-items: center;
}
.ease-card .curve { background: var(--c-paper); padding: 12px; }
.ease-card .info .tok {
  font-family: var(--ff-mono); font-size: 13px;
  color: var(--c-ink); font-weight: 500; margin-bottom: 8px;
}
.ease-card .info .pur {
  font-family: var(--ff-serif); font-style: italic;
  font-size: 18px; color: var(--c-accent);
  line-height: 1.3; margin-bottom: 8px;
}
.ease-card .info .ex {
  font-size: 13px; color: var(--c-ink-60);
  line-height: 1.5; font-weight: 300;
}
.ease-card .info .val {
  font-family: var(--ff-mono); font-size: 11px;
  color: var(--c-ink-40); margin-top: 8px;
}
@media (max-width: 700px) { .ease-card { grid-template-columns: 1fr; } }

/* Shared ease keyframe demos */
@keyframes mo-btn-bg { 0% { background: var(--c-ombra); } 50% { background: var(--c-black); } 100% { background: var(--c-ombra); } }
@keyframes mo-fade-in { 0%, 18% { opacity: 0; transform: translateY(8px); } 50%, 80% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(-8px); } }
@keyframes mo-modal { 0% { opacity: 0; transform: scale(.96); } 50%, 75% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(.98); } }
@keyframes mo-acc { 0% { max-height: 28px; } 45%, 80% { max-height: 120px; } 100% { max-height: 28px; } }
@keyframes mo-breath { 0%, 100% { opacity: .6; } 50% { opacity: 1; } }

/* =================== GRID =================== */
.grid-demo {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.grid-card {
  border: 1px solid var(--c-border);
  background: var(--c-surface-alt);
  padding: 24px;
  display: flex; flex-direction: column;
  min-height: 320px;
}
.grid-card .vis {
  flex: 1; position: relative;
  display: grid; gap: 6px;
  margin-bottom: 16px;
}
.grid-card .vis .col-bar {
  background: rgba(118,65,51,.12);
}
.grid-card .meta-grid {
  font-family: var(--ff-mono); font-size: 11px;
  color: var(--c-ink-60); line-height: 1.5;
}
.grid-card .meta-grid .nm {
  color: var(--c-ink); font-weight: 500;
  font-size: 13px; margin-bottom: 6px;
}
@media (max-width: 1000px) { .grid-demo { grid-template-columns: 1fr; } }

/* =================== ACCESSIBILITY (restructured) =================== */
.a11y-block {
  margin-bottom: 96px;
}
.a11y-block .head {
  display: grid; grid-template-columns: 200px 1fr;
  gap: 48px; align-items: baseline;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--c-border);
  margin-bottom: 32px;
}
.a11y-block .head .num {
  font-family: var(--ff-serif); font-style: italic;
  font-size: 32px; color: var(--c-accent); font-weight: 300;
}
.a11y-block .head h3 {
  font-family: var(--ff-serif); font-weight: 400;
  font-size: 32px; line-height: 1.2; margin: 0 0 8px;
  color: var(--c-ink); letter-spacing: -0.005em;
}
.a11y-block .head h3 em { font-style: italic; color: var(--c-accent); }
.a11y-block .head p {
  font-size: 15px; color: var(--c-ink-60);
  line-height: 1.6; font-weight: 300;
  margin: 0; max-width: 580px;
}
.a11y-block .body {
  display: grid; grid-template-columns: 1.2fr 1fr;
  gap: 48px;
}
@media (max-width: 1000px) {
  .a11y-block .head, .a11y-block .body { grid-template-columns: 1fr; gap: 16px; }
}
.a11y-demo {
  border: 1px solid var(--c-border);
  background: var(--c-surface-alt);
  padding: 40px;
  display: flex; flex-direction: column; gap: 20px;
  min-height: 220px;
}
.a11y-demo.dark { background: var(--c-ombra); color: var(--c-ink-inverse); border: 0; }
.a11y-rules {
  font-size: 14px; color: var(--c-ink-60);
  line-height: 1.7; font-weight: 300;
}
.a11y-rules ul { padding-left: 20px; margin: 0; }
.a11y-rules li { padding: 6px 0; }
.a11y-rules strong { color: var(--c-ink); font-weight: 500; }
.a11y-rules code {
  font-family: var(--ff-mono); font-size: 12px;
  background: var(--c-ink-10); padding: 2px 6px;
  color: var(--c-ink);
}

.contrast-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.contrast-card {
  padding: 32px 24px; border-radius: var(--r-xs);
  display: flex; flex-direction: column; justify-content: space-between;
  min-height: 180px;
}
.contrast-card .big {
  font-family: var(--ff-serif); font-size: 48px;
  font-weight: 300; line-height: 1;
}
.contrast-card .ratio {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--ff-mono); font-size: 11px;
  padding-top: 16px;
  border-top: 1px solid currentColor;
  opacity: .9;
}
.contrast-card .pass {
  padding: 2px 8px; font-size: 10px;
  letter-spacing: 0.24em; text-transform: uppercase;
  font-weight: 500;
}
.contrast-card .pass.aaa { background: rgba(91,107,74,.3); color: #5B6B4A; }
.contrast-card .pass.aa  { background: rgba(91,107,74,.2); color: #5B6B4A; }
.contrast-card.inverse .pass.aaa,
.contrast-card.inverse .pass.aa  { background: rgba(244,240,233,.18); color: var(--c-paper); }
@media (max-width: 900px) { .contrast-grid { grid-template-columns: 1fr; } }

/* =================== ATOMIC SECTION HEADERS =================== */
.atomic-band {
  margin: 144px 0 64px;
  padding: 48px;
  background: var(--c-ombra);
  color: var(--c-ink-inverse);
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 48px;
  align-items: center;
}
.atomic-band .num {
  font-family: var(--ff-serif); font-style: italic;
  font-size: 96px; font-weight: 300;
  color: var(--c-accent);
  line-height: 1;
}
.atomic-band h2 {
  font-family: var(--ff-serif); font-weight: 300;
  font-size: 56px; line-height: 1.1;
  letter-spacing: -0.015em; margin: 0 0 16px;
}
.atomic-band h2 em { font-style: italic; color: var(--c-accent); font-weight: 400; }
.atomic-band p {
  font-family: var(--ff-serif); font-style: italic;
  font-size: 20px; color: var(--c-ink-inverse-70);
  line-height: 1.5; margin: 0; max-width: 620px;
}
@media (max-width: 900px) { .atomic-band { grid-template-columns: 1fr; gap: 16px; padding: 32px; } .atomic-band .num { font-size: 64px; } .atomic-band h2 { font-size: 36px; } }

/* =================== COMPONENT BLOCK =================== */
.comp-block { margin-bottom: 96px; }
.comp-head {
  display: flex; justify-content: space-between; align-items: baseline;
  border-bottom: 1px solid var(--c-border);
  padding-bottom: 16px;
  margin-bottom: 32px;
}
.comp-head h3 {
  font-family: var(--ff-serif); font-weight: 400;
  font-size: 32px; margin: 0; letter-spacing: -0.005em;
}
.comp-head h3 em { font-style: italic; color: var(--c-accent); }
.comp-head .tag {
  font-size: 11px; letter-spacing: 0.28em;
  text-transform: uppercase; color: var(--c-ink-40); font-weight: 500;
}

.comp-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.comp-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.comp-grid.four  { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) {
  .comp-grid.three, .comp-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .comp-grid, .comp-grid.three, .comp-grid.four { grid-template-columns: 1fr; }
}

.stage {
  background: var(--c-surface-alt);
  border: 1px solid var(--c-border);
  padding: 40px 32px;
  display: flex; flex-direction: column;
  gap: 20px; align-items: flex-start;
  min-height: 200px; min-width: 0;
}
.stage.dark { background: var(--c-ombra); color: var(--c-ink-inverse); border: 0; }
.stage.ravello { background: var(--c-ravello); color: var(--c-ink-inverse); border: 0; }
.stage.centered { align-items: center; justify-content: center; text-align: center; }
.stage .spec {
  margin-top: auto;
  font-family: var(--ff-mono); font-size: 11px;
  color: var(--c-ink-40); width: 100%;
  padding-top: 16px; border-top: 1px dashed var(--c-border);
}
.stage.dark .spec, .stage.ravello .spec {
  color: var(--c-ink-inverse-50); border-top-color: var(--c-border-inverse);
}

/* =================== ATOMS =================== */

/* Buttons — fully testable, real hover/active/disabled */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  font-family: var(--ff-serif); font-size: 15px;
  letter-spacing: 0.08em; font-weight: 400;
  border: 1px solid transparent;
  border-radius: 0; cursor: pointer;
  transition: background var(--d-base) var(--ease-standard),
              color var(--d-base) var(--ease-standard),
              border-color var(--d-base) var(--ease-standard),
              box-shadow var(--d-base) var(--ease-standard),
              transform var(--d-quick) var(--ease-standard);
  min-height: 48px; white-space: nowrap;
}
.btn:focus-visible { outline: none; box-shadow: var(--sh-focus); }
.btn-lg { padding: 18px 48px; font-size: 16px; min-height: 55px; }
.btn-sm { padding: 10px 20px; font-size: 13px; min-height: 36px; }

/* Primary (dark) — paper surfaces */
.btn-primary {
  background: var(--c-ombra); color: var(--c-paper);
}
.btn-primary:hover:not(:disabled) { background: var(--c-accent); }
.btn-primary:active:not(:disabled) { background: var(--c-accent-pressed); transform: translateY(1px); }

/* Inverse (paper) — for dark / brand surfaces — accent border on hover */
.btn-inverse {
  background: var(--c-paper); color: var(--c-ombra);
}
.btn-inverse:hover:not(:disabled) {
  background: transparent; color: var(--c-paper);
  box-shadow: inset 0 0 0 1px var(--c-paper);
}
.btn-inverse:active:not(:disabled) { background: rgba(244,240,233,.18); color: var(--c-paper); }

/* Secondary — bordered, transparent */
.btn-secondary {
  background: transparent; color: var(--c-ink);
  border-color: var(--c-border-strong);
}
.btn-secondary:hover:not(:disabled) {
  border-color: var(--c-ink); background: var(--c-ink);
  color: var(--c-paper);
}
.btn-secondary:active:not(:disabled) { background: var(--c-accent); border-color: var(--c-accent); color: var(--c-paper); }

.stage.dark .btn-secondary, .stage.ravello .btn-secondary {
  color: var(--c-ink-inverse); border-color: var(--c-border-inverse);
}
.stage.dark .btn-secondary:hover:not(:disabled),
.stage.ravello .btn-secondary:hover:not(:disabled) {
  background: var(--c-paper); color: var(--c-ombra);
  border-color: var(--c-paper);
}
.stage.dark .btn-secondary:active:not(:disabled),
.stage.ravello .btn-secondary:active:not(:disabled) {
  background: var(--c-accent); color: var(--c-paper); border-color: var(--c-accent);
}

/* Ghost */
.btn-ghost {
  background: transparent; color: var(--c-ink-60);
  border: 0; padding: 14px 16px; font-style: italic;
}
.btn-ghost:hover:not(:disabled) { color: var(--c-accent); }
.btn-ghost:active:not(:disabled) { color: var(--c-accent-pressed); }
.stage.dark .btn-ghost, .stage.ravello .btn-ghost { color: var(--c-ink-inverse-70); }
.stage.dark .btn-ghost:hover:not(:disabled),
.stage.ravello .btn-ghost:hover:not(:disabled) { color: var(--c-paper); }

/* Disabled — true distinct visual: hatched, never confused with secondary */
.btn:disabled, .btn[disabled] {
  cursor: not-allowed; pointer-events: auto;
  background: transparent !important;
  color: var(--c-ink-40) !important;
  border: 1px dashed var(--c-border-strong) !important;
  box-shadow: none !important;
  transform: none !important;
}
.stage.dark .btn:disabled, .stage.dark .btn[disabled],
.stage.ravello .btn:disabled, .stage.ravello .btn[disabled] {
  color: var(--c-ink-inverse-50) !important;
  border-color: var(--c-border-inverse) !important;
}

/* Button state matrix demo */
.btn-states {
  display: grid;
  grid-template-columns: 100px repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: center;
  width: 100%;
  min-width: 0;
  max-width: 880px;
}
.btn-states .btn {
  padding: 13px 18px;
  font-size: 13px;
  letter-spacing: 0.18em;
  min-height: 46px;
  width: 100%;
  min-width: 0;
}
.btn-states .lab {
  font-family: var(--ff-mono); font-size: 11px;
  color: var(--c-ink-40); letter-spacing: 0.12em; text-transform: uppercase;
}
.stage.dark .btn-states .lab, .stage.ravello .btn-states .lab { color: var(--c-ink-inverse-50); }
.btn-states .col-h {
  font-family: var(--ff-mono); font-size: 10px;
  color: var(--c-ink-40); letter-spacing: 0.18em; text-transform: uppercase;
  text-align: center;
}
.stage.dark .btn-states .col-h, .stage.ravello .btn-states .col-h { color: var(--c-ink-inverse-50); }

/* Pills */
.opt-pill {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 32px;
  border: 1px solid var(--c-border-strong);
  border-radius: var(--r-pill);
  font-family: var(--ff-sans);
  font-weight: 300; font-size: 15px;
  color: var(--c-ink); background: transparent;
  cursor: pointer;
  transition: background var(--d-base) var(--ease-standard),
              color var(--d-base) var(--ease-standard),
              border-color var(--d-base) var(--ease-standard);
  white-space: nowrap;
  min-height: 48px;
}
.opt-pill:hover { border-color: var(--c-ink); background: rgba(54,49,40,.06); }
.opt-pill:focus-visible { outline: none; box-shadow: var(--sh-focus); }
.opt-pill[aria-pressed="true"], .opt-pill.selected {
  background: var(--c-ink); color: var(--c-paper); border-color: var(--c-ink);
}
.stage.ravello .opt-pill, .stage.dark .opt-pill {
  color: var(--c-ink-inverse);
  border-color: var(--c-ink-inverse-30);
}
.stage.ravello .opt-pill:hover, .stage.dark .opt-pill:hover {
  background: rgba(244,240,233,.08); border-color: var(--c-paper);
}
.stage.ravello .opt-pill[aria-pressed="true"],
.stage.dark .opt-pill[aria-pressed="true"] {
  background: var(--c-paper); color: var(--c-ombra); border-color: var(--c-paper);
}

/* Tag chips */
.tag-chip {
  display: inline-flex; align-items: center; padding: 6px 14px;
  font-family: var(--ff-sans); font-size: 11px; font-weight: 500;
  letter-spacing: 0.24em; text-transform: uppercase;
  background: var(--c-ink-10); color: var(--c-ink);
}
.tag-chip.accent { background: var(--c-accent); color: var(--c-paper); }
.tag-chip.outline { background: transparent; border: 1px solid var(--c-border-strong); }
.tag-chip.inverse { background: rgba(244,240,233,.18); color: var(--c-paper); }

/* Form atoms */
.field { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 420px; }
.field label {
  font-family: var(--ff-sans); font-weight: 500;
  font-size: 12px; color: var(--c-ink-60);
  letter-spacing: 0.04em;
}
.input, .select, .textarea {
  width: 100%;
  padding: 14px 16px;
  background: var(--c-paper);
  border: 1px solid var(--c-border-strong);
  border-radius: var(--r-xs);
  font-family: var(--ff-sans);
  font-size: 16px; font-weight: 300;
  color: var(--c-ink);
  transition: border-color var(--d-base) var(--ease-standard),
              box-shadow var(--d-base) var(--ease-standard);
}
.input:hover, .select:hover, .textarea:hover { border-color: var(--c-ink); }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--c-accent);
  box-shadow: var(--sh-focus);
}
.input::placeholder, .textarea::placeholder {
  color: var(--c-ink-40); font-style: italic;
  font-family: var(--ff-serif);
}
.input:disabled, .select:disabled, .textarea:disabled {
  background: var(--c-ink-10); color: var(--c-ink-40);
  cursor: not-allowed;
}
.field .hint { font-size: 12px; color: var(--c-ink-40); }
.field .err { font-size: 12px; color: var(--c-error); }
.field.invalid .input { border-color: var(--c-error); }
.field.invalid .input:focus { box-shadow: 0 0 0 3px rgba(154,59,42,.2); }

/* Native checkbox/radio */
.check {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--ff-sans); font-size: 15px;
  color: var(--c-ink); font-weight: 300;
  cursor: pointer; user-select: none;
}
.check input {
  position: absolute; opacity: 0;
  width: 0; height: 0; pointer-events: none;
}
.check .box {
  width: 20px; height: 20px;
  border: 1.5px solid var(--c-border-strong);
  background: var(--c-paper);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all var(--d-base) var(--ease-standard);
}
.check.radio .box { border-radius: 50%; }
.check:hover .box { border-color: var(--c-ink); }
.check input:focus-visible + .box { box-shadow: var(--sh-focus); }
.check input:checked + .box { background: var(--c-ink); border-color: var(--c-ink); }
.check input:checked + .box::after {
  content: "";
  width: 9px; height: 5px;
  border-left: 1.5px solid var(--c-paper);
  border-bottom: 1.5px solid var(--c-paper);
  transform: rotate(-45deg) translate(0, -1px);
}
.check.radio input:checked + .box { background: var(--c-paper); }
.check.radio input:checked + .box::after {
  width: 10px; height: 10px;
  border: 0; border-radius: 50%;
  background: var(--c-ink); transform: none;
}
.check input:disabled + .box { opacity: .4; }
.check input:disabled ~ .lbl { color: var(--c-ink-40); }

/* Toggle (switch) */
.toggle {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--ff-sans); font-size: 15px;
  color: var(--c-ink); font-weight: 300;
  cursor: pointer; user-select: none;
}
.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle .track {
  width: 44px; height: 24px;
  border-radius: 12px;
  background: var(--c-ink-20);
  position: relative;
  transition: background var(--d-base) var(--ease-standard);
}
.toggle .track::after {
  content: "";
  position: absolute; left: 3px; top: 3px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--c-paper);
  transition: transform var(--d-base) var(--ease-standard);
  box-shadow: var(--sh-xs);
}
.toggle input:checked + .track { background: var(--c-ink); }
.toggle input:checked + .track::after { transform: translateX(20px); }
.toggle input:focus-visible + .track { box-shadow: var(--sh-focus); }

/* Native select wrapper */
.field .select {
  -webkit-appearance: none;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--c-ink-60) 50%),
                    linear-gradient(135deg, var(--c-ink-60) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 40px;
}

/* Slider (range) */
.range-input {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 1px; background: var(--c-ink-20);
  outline: none; padding: 0;
}
.range-input::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--c-paper);
  border: 1px solid var(--c-accent);
  box-shadow: var(--sh-sm);
  cursor: pointer;
}
.range-input::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--c-paper); border: 1px solid var(--c-accent);
  box-shadow: var(--sh-sm); cursor: pointer;
}
.range-input:focus-visible { box-shadow: var(--sh-focus); }
.range-wrap { display: flex; flex-direction: column; gap: 14px; width: 100%; max-width: 360px; }
.range-wrap .v {
  display: flex; justify-content: space-between;
  font-family: var(--ff-mono); font-size: 12px; color: var(--c-ink-60);
}

/* Language switch — testable hover, active state */
.lang-switch {
  display: inline-flex; gap: 4px; align-items: center;
  font-family: var(--ff-sans); font-size: 11px; font-weight: 400;
  letter-spacing: 0.28em;
}
.lang-switch button {
  border: 0; background: transparent;
  padding: 8px 10px; cursor: pointer;
  font: inherit; letter-spacing: inherit;
  color: var(--c-ink-40);
  transition: color var(--d-base) var(--ease-standard),
              background var(--d-base) var(--ease-standard);
  position: relative;
}
.lang-switch button::after {
  content: ""; position: absolute;
  left: 10px; right: 10px; bottom: 4px;
  height: 1px; background: currentColor;
  opacity: 0;
  transition: opacity var(--d-base) var(--ease-standard);
}
.lang-switch button:hover { color: var(--c-ink); }
.lang-switch button:hover::after { opacity: .4; }
.lang-switch button[aria-pressed="true"] { color: var(--c-ink); }
.lang-switch button[aria-pressed="true"]::after { opacity: 1; }
.lang-switch button:focus-visible { outline: none; box-shadow: var(--sh-focus); }
.lang-switch .sep { color: var(--c-ink-40); }

.stage.dark .lang-switch button, .stage.ravello .lang-switch button { color: var(--c-ink-inverse-50); }
.stage.dark .lang-switch button:hover, .stage.ravello .lang-switch button:hover { color: var(--c-paper); }
.stage.dark .lang-switch button[aria-pressed="true"],
.stage.ravello .lang-switch button[aria-pressed="true"] { color: var(--c-paper); }
.stage.dark .lang-switch .sep, .stage.ravello .lang-switch .sep { color: var(--c-ink-inverse-30); }

/* Tooltip */
.tip-wrap { position: relative; display: inline-block; }
.tip-trigger {
  border: 1px dashed var(--c-border-strong);
  background: transparent; padding: 10px 18px;
  font-family: var(--ff-serif); font-size: 14px;
  cursor: help; color: var(--c-ink); font-style: italic;
}
.tip-trigger:focus-visible { outline: none; box-shadow: var(--sh-focus); }
.tooltip {
  position: absolute;
  bottom: calc(100% + 12px); left: 50%; transform: translateX(-50%) translateY(4px);
  background: var(--c-ombra); color: var(--c-paper);
  padding: 10px 14px;
  font-family: var(--ff-sans); font-size: 12px; font-weight: 300;
  line-height: 1.4;
  white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity var(--d-base) var(--ease-standard),
              transform var(--d-base) var(--ease-standard);
  box-shadow: var(--sh-md);
  z-index: 50;
}
.tooltip::after {
  content: "";
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--c-ombra);
}
.tip-wrap:hover .tooltip,
.tip-wrap:focus-within .tooltip {
  opacity: 1; transform: translateX(-50%) translateY(0);
}

/* Spinner */
.spinner {
  width: 24px; height: 24px;
  border: 1.5px solid var(--c-accent);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 900ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Progress linear */
.progress-linear {
  width: 100%; height: 2px;
  background: var(--c-ink-10);
  position: relative; overflow: hidden;
}
.progress-linear .bar {
  position: absolute; left: 0; top: 0; height: 100%;
  background: var(--c-accent);
  transition: width var(--d-calm) var(--ease-gentle);
}
.progress-concierge {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.progress-concierge .pl {
  font-family: var(--ff-sans); font-size: 10px; font-weight: 500;
  letter-spacing: 0.45em; text-transform: uppercase;
  color: var(--c-ink-inverse-50);
}
.progress-concierge .track {
  width: 140px; height: 1px;
  background: var(--c-border-inverse);
  position: relative; overflow: hidden;
}
.progress-concierge .track .fill {
  position: absolute; left: 0; top: 0; height: 100%;
  background: var(--c-paper);
}

/* =================== MOLECULES =================== */

/* Form group */
.form-stack { display: flex; flex-direction: column; gap: 20px; width: 100%; }

/* Cards */
.card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--c-surface-alt);
  border-radius: var(--r-xs);
  transition: transform var(--d-calm) var(--ease-standard),
              box-shadow var(--d-calm) var(--ease-standard);
  border: 1px solid var(--c-border);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--sh-md); }
.card .media {
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, #8a6e5a, #5a3124);
  position: relative;
}
.card .media .tag {
  position: absolute; top: 14px; left: 14px;
  font-family: var(--ff-sans); font-size: 10px;
  letter-spacing: 0.28em; font-weight: 500; text-transform: uppercase;
  color: var(--c-paper);
  padding: 5px 10px;
  background: rgba(0,0,0,.35); backdrop-filter: blur(8px);
}
.card .body {
  padding: 22px;
  display: flex; flex-direction: column; gap: 10px;
}
.card h4 {
  font-family: var(--ff-serif); font-weight: 400; font-size: 24px;
  line-height: 1.2; margin: 0; color: var(--c-ink);
}
.card h4 em { font-style: italic; color: var(--c-accent); font-weight: 400; }
.card .meta { font-family: var(--ff-sans); font-size: 13px; color: var(--c-ink-60); font-weight: 300; }
.card .price { font-family: var(--ff-serif); font-style: italic; font-size: 18px; color: var(--c-ink); margin-top: 4px; }
.card.xs .media { aspect-ratio: 1/1; }
.card.xs h4 { font-size: 18px; }

/* Toasts */
.toast {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 18px 22px;
  background: var(--c-ombra);
  color: var(--c-ink-inverse);
  border-radius: var(--r-xs);
  box-shadow: var(--sh-md);
  max-width: 420px;
}
.toast .mk {
  font-family: var(--ff-serif); font-style: italic; font-size: 18px;
  color: var(--c-accent); flex-shrink: 0; line-height: 1.2;
}
.toast .msg {
  font-family: var(--ff-sans); font-size: 14px;
  line-height: 1.5; font-weight: 300;
}
.toast .msg strong {
  font-weight: 500; display: block;
  margin-bottom: 4px; letter-spacing: 0.02em;
}
.toast.success .mk { color: var(--c-success); }
.toast.warning .mk { color: var(--c-warning); }
.toast.error .mk { color: var(--c-error); }

/* Tabs */
.tabs { width: 100%; }
.tab-list {
  display: flex; gap: 32px;
  border-bottom: 1px solid var(--c-border);
}
.tab {
  padding: 14px 0;
  background: transparent; border: 0;
  font-family: var(--ff-sans); font-size: 14px; font-weight: 400;
  color: var(--c-ink-60); cursor: pointer;
  position: relative;
  letter-spacing: 0.02em;
  transition: color var(--d-base) var(--ease-standard);
}
.tab:hover { color: var(--c-ink); }
.tab[aria-selected="true"] { color: var(--c-ink); font-weight: 500; }
.tab[aria-selected="true"]::after {
  content: ""; position: absolute;
  left: 0; right: 0; bottom: -1px; height: 1px;
  background: var(--c-ink);
}
.tab:focus-visible { outline: none; box-shadow: var(--sh-focus); }
.tab-panel { padding: 28px 0; display: none; }
.tab-panel[data-active="true"] { display: block; }
.tab-panel p {
  font-family: var(--ff-serif); font-style: italic;
  font-size: 18px; color: var(--c-ink-60); margin: 0;
  line-height: 1.5;
}

/* Accordion */
.accordion { border-top: 1px solid var(--c-border); width: 100%; }
.accordion-item { border-bottom: 1px solid var(--c-border); }
.accordion-head {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 22px 32px;
  width: 100%; text-align: left;
  background: transparent; border: 0; cursor: pointer;
  font: inherit;
}
.accordion-head:focus-visible { outline: none; box-shadow: var(--sh-focus); }
.accordion-head h4 {
  font-family: var(--ff-serif); font-weight: 400;
  font-size: 20px; margin: 0; color: var(--c-ink);
}
.accordion-head .plus {
  font-family: var(--ff-serif); font-style: italic;
  font-size: 24px; color: var(--c-accent);
  transition: transform var(--d-base) var(--ease-standard);
  line-height: 1;
}
.accordion-item[aria-expanded="true"] .accordion-head .plus { transform: rotate(45deg); }
.accordion-body {
  max-height: 0; overflow: hidden;
  transition: max-height var(--d-calm) var(--ease-gentle);
}
.accordion-body-inner {
  padding: 0 32px 24px;
  font-size: 15px; line-height: 1.6; color: var(--c-ink-60);
  font-weight: 300; max-width: 80%;
}
.accordion-item[aria-expanded="true"] .accordion-body { max-height: 280px; }

/* Concierge bubbles (conversational) */
.bubble-conc {
  max-width: 460px;
  border-radius: 22px;
  background: rgba(244,240,233,.08);
  border: 1px solid rgba(244,240,233,.15);
  padding: 18px 24px;
  font-family: var(--ff-serif);
  font-weight: 300; font-style: italic;
  font-size: 20px; line-height: 1.4;
  color: var(--c-ink-inverse);
}
.bubble-guest {
  border-radius: 22px;
  background: rgba(244,240,233,.14);
  border: 1px solid rgba(244,240,233,.2);
  padding: 16px 24px;
  font-family: var(--ff-sans);
  font-size: 15px; line-height: 1.4;
  color: var(--c-ink-inverse);
}
.chat-input {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; max-width: 520px;
  height: 56px; border-radius: 28px;
  background: rgba(244,240,233,.04);
  border: 1px solid rgba(244,240,233,.3);
  padding: 0 8px 0 24px;
}
.chat-input input {
  flex: 1; background: transparent; border: 0; outline: none;
  font-family: var(--ff-serif); font-style: italic;
  font-size: 16px; color: var(--c-paper);
}
.chat-input input::placeholder { color: var(--c-ink-inverse-50); font-style: italic; }
.chat-input .send {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--c-paper); color: var(--c-ravello);
  border: 0; cursor: pointer;
  font-family: var(--ff-serif); font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  transition: transform var(--d-quick) var(--ease-standard);
}
.chat-input .send:hover { transform: scale(1.05); }

/* =================== ORGANISMS =================== */

/* =================== HEADER · two rows · centred lockup =================== */
.hdr-demo { width: 100%; }
.hdr-controls {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; gap: 24px; flex-wrap: wrap;
}
.hdr-controls .seg {
  display: inline-flex;
  border: 1px solid var(--c-border-strong);
  border-radius: var(--r-pill);
  padding: 3px;
  background: var(--c-paper);
}
.hdr-controls .seg button {
  appearance: none; border: 0; background: transparent;
  font-family: var(--ff-sans); font-size: 11px; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--c-ink-60);
  padding: 9px 22px; border-radius: var(--r-pill);
  cursor: pointer;
  transition: background var(--d-base) var(--ease-standard),
              color var(--d-base) var(--ease-standard);
}
.hdr-controls .seg button.is-on {
  background: var(--c-ink); color: var(--c-paper);
}
.hdr-spec {
  font-family: var(--ff-mono); font-size: 11px;
  color: var(--c-ink-40);
  letter-spacing: 0.16em; text-transform: uppercase;
}

.hdr-frame {
  position: relative;
  border: 1px solid var(--c-border);
  background: var(--c-paper);
  overflow: hidden;
}

/* The header itself */
.gh-header {
  position: relative; z-index: 2;
  background: var(--c-paper);
  border-bottom: 1px solid var(--c-border);
  width: 100%;
}

/* ---------- Row 1: utility ---------- */
.gh-utility {
  height: 80px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 40px;
  border-bottom: 1px solid var(--c-border);
  transition: height var(--d-calm) var(--ease-gentle);
}

.gh-left {
  display: flex; align-items: center;
  gap: 18px;
  justify-self: start;
}
.gh-right {
  display: flex; align-items: center;
  gap: 18px;
  justify-self: end;
}

/* Quiet utility links: small caps, letter-spaced */
.gh-link {
  font-family: var(--ff-sans); font-weight: 500;
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--c-ink-60); text-decoration: none;
  position: relative; padding: 6px 0;
  transition: color var(--d-quick) var(--ease-standard);
}
.gh-link::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: var(--c-accent);
  transform: scaleX(0); transform-origin: center;
  transition: transform var(--d-base) var(--ease-standard);
}
.gh-link:hover { color: var(--c-ink); }
.gh-link:hover::after { transform: scaleX(1); }

.gh-divider {
  font-family: var(--ff-sans); color: var(--c-ink-40); font-size: 11px;
  user-select: none;
}

/* ---------- Brand ---------- */
.gh-brand {
  justify-self: center;
  display: inline-flex; align-items: center; justify-content: center;
  position: relative;
  height: 56px; width: 220px;
  text-decoration: none;
  transition: width var(--d-calm) var(--ease-gentle),
              height var(--d-calm) var(--ease-gentle);
}
.gh-wordmark, .gh-monogram {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  transition: opacity var(--d-calm) var(--ease-gentle),
              transform var(--d-calm) var(--ease-gentle);
}
.gh-wordmark { width: 200px; opacity: 1; }
.gh-monogram {
  font-family: var(--ff-serif); font-style: italic; font-weight: 300;
  font-size: 38px; line-height: 1; letter-spacing: -0.02em;
  color: var(--c-ombra);
  opacity: 0;
}

/* ---------- Language dropdown ---------- */
.gh-lang-wrap { position: relative; }
.gh-lang {
  appearance: none; background: transparent; border: 0; padding: 0; cursor: pointer;
  font-family: var(--ff-sans); font-weight: 500;
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--c-ink-60);
  display: inline-flex; align-items: center; gap: 8px;
  height: 32px;
  transition: color var(--d-quick) var(--ease-standard);
}
.gh-lang:hover { color: var(--c-ink); }
.gh-lang-caret { transition: transform var(--d-quick) var(--ease-standard); color: var(--c-ink-40); }
.gh-lang[aria-expanded="true"] .gh-lang-caret { transform: rotate(180deg); }
.gh-lang-menu {
  position: absolute; top: calc(100% + 6px); right: 0;
  margin: 0; padding: 6px 0;
  list-style: none;
  background: var(--c-paper);
  border: 1px solid var(--c-border);
  min-width: 180px;
  opacity: 0; pointer-events: none;
  transform: translateY(-4px);
  transition: opacity var(--d-quick) var(--ease-standard),
              transform var(--d-quick) var(--ease-standard);
  z-index: 10;
  box-shadow: var(--sh-soft);
}
.gh-lang[aria-expanded="true"] + .gh-lang-menu {
  opacity: 1; pointer-events: auto; transform: translateY(0);
}
.gh-lang-menu li {
  display: flex; align-items: baseline; gap: 14px;
  padding: 10px 18px;
  font-family: var(--ff-sans); font-weight: 500;
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--c-ink); cursor: pointer;
  transition: background var(--d-quick) var(--ease-standard);
}
.gh-lang-menu li span {
  font-family: var(--ff-serif); font-style: italic; font-weight: 300;
  font-size: 14px; letter-spacing: 0; text-transform: none;
  color: var(--c-ink-60);
}
.gh-lang-menu li:hover { background: rgba(54, 49, 40, 0.04); }
.gh-lang-menu li[aria-selected="true"] { color: var(--c-accent); }

/* ---------- Reserve CTA ---------- */
.gh-cta {
  appearance: none; border: 0; cursor: pointer;
  background: var(--c-ombra); color: var(--c-paper);
  font-family: var(--ff-sans); font-weight: 500;
  font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase;
  padding: 12px 26px;
  height: 36px;
  display: inline-flex; align-items: center;
  transition: background var(--d-quick) var(--ease-standard);
}
.gh-cta:hover { background: var(--c-accent); }
.gh-cta:focus-visible { outline: none; box-shadow: var(--sh-focus); }

/* ---------- Row 2: primary navigation, centred ---------- */
.gh-subnav {
  height: 48px;
  display: flex; align-items: center; justify-content: center;
  gap: 36px;
  padding: 0 40px;
  overflow: hidden;
  transition: height var(--d-calm) var(--ease-gentle),
              opacity var(--d-base) var(--ease-standard);
}
.gh-navlink {
  font-family: var(--ff-sans); font-weight: 500;
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--c-ink-60); text-decoration: none;
  position: relative; padding: 16px 0;
  transition: color var(--d-quick) var(--ease-standard);
}
.gh-navlink::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 12px;
  height: 1px; background: var(--c-accent);
  transform: scaleX(0); transform-origin: center;
  transition: transform var(--d-base) var(--ease-standard);
}
.gh-navlink:hover, .gh-navlink.is-current { color: var(--c-ink); }
.gh-navlink:hover::after, .gh-navlink.is-current::after { transform: scaleX(1); }

/* ---------- Scrolled state ---------- */
.hdr-frame[data-state="scrolled"] .gh-utility {
  border-bottom-color: transparent;
}
.hdr-frame[data-state="scrolled"] .gh-subnav {
  height: 0;
  opacity: 0;
  pointer-events: none;
}
.hdr-frame[data-state="scrolled"] .gh-wordmark {
  opacity: 0;
  transform: translate(-50%, -50%) scale(.92);
}
.hdr-frame[data-state="scrolled"] .gh-monogram {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.hdr-frame[data-state="scrolled"] .gh-brand {
  width: 80px;
}

/* ---------- Hero context inside the demo frame ---------- */
.gh-hero {
  height: 220px; position: relative; overflow: hidden;
  background: var(--c-ravello);
}
.gh-hero-art {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 80% at 30% 20%, rgba(244,240,233,.18), transparent 50%),
    radial-gradient(120% 80% at 80% 90%, rgba(0,0,0,.35), transparent 60%),
    linear-gradient(135deg, #b69a6b 0%, #8a6a4a 38%, #5a3124 100%);
}

/* ---------- Header rules grid ---------- */
.hdr-rules {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 28px;
}
.hdr-rule {
  border-top: 1px solid var(--c-border);
  padding-top: 16px;
}
.hdr-rule-k {
  font-family: var(--ff-mono); font-size: 11px;
  color: var(--c-ink-40); letter-spacing: 0.18em; text-transform: uppercase;
  margin-bottom: 8px;
}
.hdr-rule-v {
  font-family: var(--ff-serif); font-weight: 300;
  font-size: 17px; line-height: 1.55; color: var(--c-ink);
}
.hdr-rule-v em { font-style: italic; color: var(--c-ink-60); }

@media (max-width: 1100px) {
  .gh-utility, .gh-subnav { padding: 0 24px; }
  .gh-subnav { gap: 22px; overflow-x: auto; }
  .gh-navlink, .gh-link, .gh-lang { font-size: 10px; letter-spacing: 0.18em; }
  .gh-brand { width: 180px; }
  .gh-wordmark { width: 160px; }
}
@media (max-width: 800px) {
  .gh-utility { grid-template-columns: 1fr auto 1fr; height: 64px; }
  .gh-left, .gh-subnav { display: none; }
  .gh-brand { width: 140px; }
  .gh-wordmark { width: 130px; }
  .hdr-rules { grid-template-columns: 1fr; }
}

/* Hero */
.hero-block {
  aspect-ratio: 16/9;
  background: var(--c-ravello);
  background-image:
    radial-gradient(circle at 50% 30%, rgba(244,240,233,.12) 0%, rgba(244,240,233,0) 38%),
    radial-gradient(circle at 50% 85%, rgba(0,0,0,.45) 0%, rgba(0,0,0,0) 55%),
    linear-gradient(180deg, #764133 0%, #5a3124 100%);
  color: var(--c-ink-inverse);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 80px 40px;
  position: relative; border-radius: var(--r-xs);
  overflow: hidden;
}
.hero-block .lbl {
  font-family: var(--ff-sans); font-size: 11px; font-weight: 500;
  letter-spacing: 0.45em; text-transform: uppercase; opacity: .65;
  margin-bottom: 32px;
}
.hero-block h2 {
  font-family: var(--ff-serif); font-weight: 300;
  font-size: 64px; line-height: 1.1; margin: 0 0 32px;
  letter-spacing: -0.015em; max-width: 780px;
}
.hero-block h2 em { font-style: italic; }
.hero-block p {
  font-family: var(--ff-serif); font-style: italic; font-weight: 300;
  font-size: 20px; max-width: 560px; opacity: .82; line-height: 1.55;
}

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: repeat(2, 1fr);
  gap: 14px; aspect-ratio: 16/10;
}
.gallery .tile {
  background: linear-gradient(135deg, #8a6e5a, #5a3124);
  border-radius: var(--r-xs);
}
.gallery .tile:nth-child(1) { grid-row: 1 / 3; }
.gallery .tile:nth-child(2) { background: linear-gradient(135deg, #a58971, #6b4533); }
.gallery .tile:nth-child(3) { background: linear-gradient(135deg, #7d6f5f, #4a4235); }
.gallery .tile:nth-child(4) { background: linear-gradient(135deg, #363e33, #1f2a1e); }
.gallery .tile:nth-child(5) { background: linear-gradient(135deg, #964e3d, #5a2a1d); }

/* Modal */
.modal-stage {
  position: relative;
  background: rgba(54,49,40,.85);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 60px;
  min-height: 480px;
  border-radius: var(--r-xs);
}
.modal {
  background: var(--c-paper);
  padding: 56px 48px;
  max-width: 480px;
  text-align: center;
  box-shadow: var(--sh-lg);
  border-radius: var(--r-xs);
  position: relative;
  width: 100%;
}
.modal .close {
  position: absolute; top: 20px; right: 20px;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  color: var(--c-ink-60); cursor: pointer;
  font-size: 20px; background: transparent; border: 0;
  line-height: 1;
}
.modal .close:hover { color: var(--c-ink); }
.modal .lbl-sm {
  font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--c-ink-40); font-weight: 500; margin-bottom: 18px;
}
.modal h3 {
  font-family: var(--ff-serif); font-weight: 300;
  font-size: 32px; margin: 0 0 14px; line-height: 1.15;
}
.modal h3 em { font-style: italic; color: var(--c-accent); }
.modal p {
  font-family: var(--ff-serif); font-style: italic;
  font-size: 16px; color: var(--c-ink-60);
  margin: 0 0 28px; line-height: 1.5;
}

/* JS-driven modal (functional) */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(54,49,40,.65);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  opacity: 0; pointer-events: none;
  transition: opacity var(--d-page) var(--ease-enter);
  padding: 24px;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal-overlay .modal {
  transform: scale(.96);
  transition: transform var(--d-page) var(--ease-enter);
  max-width: 480px;
}
.modal-overlay.open .modal { transform: scale(1); }

/* Footer */
.site-footer {
  background: var(--c-ombra);
  color: var(--c-ink-inverse);
  padding: 80px 40px 40px;
}
.site-footer .cols {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--c-border-inverse);
}
.site-footer h5 {
  font-family: var(--ff-sans); font-weight: 500; font-size: 11px;
  letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--c-ink-inverse-50); margin: 0 0 18px;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.site-footer ul a {
  font-family: var(--ff-sans); font-size: 13px;
  color: var(--c-ink-inverse); font-weight: 300;
  transition: opacity var(--d-base) var(--ease-standard);
}
.site-footer ul a:hover { opacity: .65; }
.site-footer .brand-mark { margin-bottom: 16px; }
.site-footer .brand-mark svg { width: 160px; height: auto; }
.site-footer .brand-mark svg path,
.site-footer .brand-mark svg rect { fill: var(--c-paper); }
.site-footer .tag {
  font-family: var(--ff-serif); font-style: italic;
  font-size: 16px; font-weight: 300;
  color: var(--c-ink-inverse-70); line-height: 1.5;
}
.site-footer .bot {
  display: flex; justify-content: space-between;
  padding-top: 28px; font-size: 11px;
  color: var(--c-ink-inverse-50);
  letter-spacing: 0.06em;
}
@media (max-width: 900px) { .site-footer .cols { grid-template-columns: 1fr 1fr; gap: 32px; } }

/* Concierge frame organism */
.concierge-frame {
  background:
    radial-gradient(circle at 50% 20%, rgba(255,255,255,.04) 0%, rgba(255,255,255,0) 60%),
    radial-gradient(circle at 50% 80%, rgba(0,0,0,.25) 0%, rgba(0,0,0,0) 55%),
    linear-gradient(180deg, #764133 0%, #5a3124 100%);
  color: var(--c-paper);
  padding: 56px 48px;
  border-radius: var(--r-xs);
  position: relative;
  min-height: 560px;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.concierge-frame .top {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 32px;
}
.concierge-frame .brand-mark svg { width: 110px; height: auto; }
.concierge-frame .brand-mark svg path,
.concierge-frame .brand-mark svg rect { fill: var(--c-paper); }
.concierge-frame .center {
  text-align: center;
  margin-bottom: 24px;
}
.concierge-frame .pl {
  font-family: var(--ff-sans); font-size: 10px; font-weight: 500;
  letter-spacing: 0.45em; text-transform: uppercase;
  color: var(--c-paper); opacity: .7;
}
.concierge-frame .center .track {
  width: 140px; height: 1px; background: rgba(244,240,233,.2);
  margin: 12px auto 0; position: relative;
}
.concierge-frame .center .track .fill {
  position: absolute; left: 0; top: 0;
  width: 60%; height: 100%; background: var(--c-paper);
}
.concierge-frame .conv {
  flex: 1;
  display: flex; flex-direction: column; gap: 14px;
  align-items: stretch;
  max-width: 580px; margin: 0 auto; width: 100%;
}
.concierge-frame .conv .row-c { display: flex; justify-content: flex-start; }
.concierge-frame .conv .row-g { display: flex; justify-content: flex-end; }
.concierge-frame .conv .chips {
  display: flex; gap: 10px; flex-wrap: wrap;
}
.concierge-frame .conv .chip {
  border: 1px solid var(--c-ink-inverse-30);
  border-radius: 100px;
  padding: 9px 18px;
  font-family: var(--ff-serif); font-size: 14px;
  color: var(--c-ink-inverse-70);
  background: rgba(244,240,233,.03);
  cursor: pointer;
  transition: all var(--d-base) var(--ease-standard);
}
.concierge-frame .conv .chip:hover {
  background: rgba(244,240,233,.08);
  color: var(--c-paper); border-color: var(--c-paper);
}
.concierge-frame .footer-input {
  margin-top: 28px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.concierge-frame .footer-input .hint {
  font-family: var(--ff-sans); font-size: 9px;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--c-ink-inverse-50);
}

/* =================== INVENTORY =================== */
.inventory {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--c-border);
}
.inv-item {
  padding: 22px 24px 22px 0;
  border-bottom: 1px solid var(--c-border);
  border-right: 1px solid var(--c-border);
  padding-left: 24px;
  display: flex; flex-direction: column; gap: 8px;
  background: var(--c-surface-alt);
}
.inv-item:nth-child(3n) { border-right: 0; }
.inv-item .nm {
  font-family: var(--ff-serif); font-size: 18px; font-weight: 400;
  color: var(--c-ink); line-height: 1.3;
}
.inv-item .nm em { font-style: italic; color: var(--c-accent); }
.inv-item .lvl {
  font-family: var(--ff-mono); font-size: 10px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--c-ink-40);
}
.inv-item .vars {
  font-family: var(--ff-sans); font-size: 12px;
  color: var(--c-ink-60); line-height: 1.55; font-weight: 300;
}
.inv-item .status {
  align-self: flex-start; margin-top: 6px;
  font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase;
  font-weight: 500; padding: 3px 8px;
}
.inv-item .status.done { background: rgba(91,107,74,.15); color: #5B6B4A; }
.inv-item .status.todo { background: rgba(196,138,60,.18); color: #7C5621; }
.inv-item .status.later { background: rgba(74,101,117,.15); color: #4A6575; }
@media (max-width: 900px) {
  .inventory { grid-template-columns: 1fr; }
  .inv-item:nth-child(3n) { border-right: 1px solid var(--c-border); }
}

/* Closing */
.close-mark {
  text-align: center;
  padding: 96px 0 144px;
  border-top: 1px solid var(--c-border);
}
.close-mark h2 {
  font-family: var(--ff-serif); font-weight: 300;
  font-size: 56px; font-style: italic;
  color: var(--c-ink-60);
  margin: 0 0 16px;
}
.close-mark p {
  color: var(--c-ink-40); font-size: 12px;
  letter-spacing: 0.28em; text-transform: uppercase; font-weight: 500;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
