/* ============================================================================
   KASTURI site styles
   Every colour comes from tokens.css. Do not write a literal colour here.
   ========================================================================= */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.62;
  font-synthesis-weight: none;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--rust);
  outline-offset: 3px;
}

/* ---------------------------------------------------------------- primitives */

.mark {
  font-family: var(--font-display);
  font-weight: 200;
  text-transform: uppercase;
  letter-spacing: var(--track-mark);
  font-size: var(--step--1);
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}
.mark--lg { font-size: var(--step-1); }

.label {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: var(--track-label);
  line-height: 1.2;
}

.display {
  font-family: var(--font-display);
  font-weight: 300;
  line-height: 0.98;
  letter-spacing: -0.015em;
  text-wrap: balance;
  margin: 0;
}

.lede {
  font-size: var(--step-1);
  line-height: 1.5;
  max-width: 34ch;
  margin: 0;
}

.prose { max-width: var(--measure); }
.prose p { margin: 0 0 1.1em; }
.prose p:last-child { margin-bottom: 0; }

.btn {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: var(--track-label);
  text-decoration: none;
  display: inline-block;
  padding: 0.85em 1.5em 0.8em;
  border: var(--hair) solid currentColor;
  border-radius: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}
.btn--solid { background: var(--rust); border-color: var(--rust); color: var(--cream); }
.btn--solid:hover { background: var(--rust-ink); border-color: var(--rust-ink); }
.btn--onDark:hover { background: var(--ink-invert); color: var(--espresso); }
.btn--onLight:hover { background: var(--espresso); color: var(--cream); }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }

/* ------------------------------------------------------------------- layout */

.wrap {
  padding-inline: var(--gutter);
  max-width: 100rem;
  margin-inline: auto;
}

/* The specimen sheet: a fixed label rail on the left, content on the right.
   It repeats the header/footer grid of the printed design guidelines. */
.sheet {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: start;
}
.sheet__rail { position: sticky; top: 6rem; }
.sheet__rail .label { color: var(--ink-muted); }
@media (max-width: 52rem) {
  .sheet { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .sheet__rail { position: static; }
}

.section { padding-block: var(--block); }
.section + .section { border-top: var(--hair) solid var(--swirl); }

/* ------------------------------------------------------------------- header */

.masthead {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--cream);
  border-bottom: var(--hair) solid var(--olive-haze);
}
.masthead__inner {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 4vw, 3rem);
  min-height: 4.5rem;
  padding-inline: var(--gutter);
  max-width: 100rem;
  margin-inline: auto;
}
.masthead .mark { margin-right: auto; }

.nav { display: flex; gap: clamp(1rem, 2.5vw, 2.25rem); }
.nav a {
  text-decoration: none;
  color: var(--ink-muted);
  position: relative;
  padding-block: 0.35rem;
}
.nav a:hover { color: var(--ink); }
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: var(--hair);
  background: var(--rust);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}
.nav a:hover::after { transform: scaleX(1); }
@media (prefers-reduced-motion: reduce) { .nav a::after { transition: none; } }
@media (max-width: 46rem) { .nav { display: none; } }

.masthead .btn { padding: 0.6em 1.1em 0.55em; }

/* --------------------------------------------------------------------- hero */

.hero {
  background: var(--espresso);
  color: var(--ink-invert);
  padding-block: clamp(3.5rem, 8vw, 7rem) 0;
  overflow: hidden;
}
.hero__eyebrow { color: var(--rust-lift); margin: 0 0 clamp(1.5rem, 4vw, 2.75rem); }
.hero__title {
  font-size: var(--step-4);
  max-width: 14ch;
  margin: 0 0 clamp(1.5rem, 3vw, 2.25rem);
}
.hero__lede { color: var(--ink-invert-muted); }
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: clamp(1.75rem, 4vw, 2.75rem);
}
.hero__stage { margin-top: clamp(3rem, 7vw, 5.5rem); }
.hero__stage svg { width: 100%; height: auto; }
.hero__caption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--ink-invert-muted);
  border-top: var(--hair) solid rgb(255 255 255 / 0.14);
  margin-top: 1.5rem;
  padding-block: 1rem 2.5rem;
}

/* ------------------------------------------------------------------- attrs */

.attrs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: clamp(1.75rem, 4vw, 3rem);
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
}
.attrs > div { border-top: var(--hair) solid var(--olive-haze); padding-top: 1rem; }
.attrs h3 { font-family: var(--font-display); font-weight: 400; font-size: var(--step-1); margin: 0 0 0.5rem; }
.attrs p { margin: 0; color: var(--ink-muted); font-size: var(--step--1); line-height: 1.6; }

/* ------------------------------------------------------------------- craft */

.craft {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
@media (max-width: 62rem) { .craft { grid-template-columns: minmax(0, 1fr); } }

.panel {
  background: var(--cream-warm);
  border: var(--hair) solid var(--swirl);
  padding: clamp(1rem, 3vw, 2rem);
}
.panel svg { width: 100%; height: auto; }

.motifs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 1rem;
}
.motif {
  appearance: none;
  border: var(--hair) solid var(--swirl);
  background: var(--cream);
  padding: 0.6rem 0.4rem 0.5rem;
  cursor: pointer;
  color: var(--ink-muted);
  display: grid;
  justify-items: center;
  gap: 0.5rem;
  transition: border-color 160ms ease, color 160ms ease;
}
.motif svg { width: 2.25rem; height: auto; }
.motif[aria-pressed="true"] { border-color: var(--rust); color: var(--rust-ink); }
.motif:hover { border-color: var(--olive-haze); }
@media (prefers-reduced-motion: reduce) { .motif { transition: none; } }

.note {
  font-size: var(--step--1);
  color: var(--ink-muted);
  border-left: 2px solid var(--rust);
  padding-left: 0.9rem;
  max-width: 46ch;
}
/* .prose p is (0,1,1) and would otherwise cancel the margin below. */
.note, .prose .note { margin: 1.9rem 0 0; }

/* ------------------------------------------------------------------- specs */

.specs { background: var(--sage); color: var(--espresso); }
.specs .sheet__rail .label { color: var(--espresso); opacity: 0.72; }
.specs .section + .section { border: 0; }
.spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr));
  gap: clamp(1.5rem, 4vw, 3rem);
}
.spec-grid > div { border-top: var(--hair) solid rgb(46 33 27 / 0.28); padding-top: 0.9rem; }
.spec-grid dt { margin: 0 0 0.6rem; opacity: 0.72; }
.spec-grid dd {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.25rem, 1.05rem + 0.55vw, 1.6rem);
  line-height: 1.12;
  text-wrap: balance;
  font-variant-numeric: tabular-nums;
}

/* ----------------------------------------------------------------- journal */

.journal {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: clamp(1.5rem, 4vw, 2.75rem);
  align-items: start;
}
.entry { display: grid; gap: 0.9rem; text-decoration: none; }
.entry__plate {
  min-height: clamp(11rem, 16vw, 15rem);
  background: var(--swirl);
  border: var(--hair) solid var(--napa);
  display: grid;
  place-items: center;
  color: var(--ink-muted);
  text-align: center;
  padding: 1rem;
}
.entry__meta { color: var(--ink-muted); }
.entry h3 { font-family: var(--font-display); font-weight: 400; font-size: var(--step-1); margin: 0; }
.entry:hover h3 { color: var(--rust-ink); }

/* ----------------------------------------------------------------- enquire */

.enquire { background: var(--espresso); color: var(--ink-invert); }
.enquire .sheet__rail .label { color: var(--ink-invert-muted); }
.enquire .lede { color: var(--ink-invert-muted); }

.form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1.25rem;
  margin-top: clamp(1.75rem, 4vw, 2.5rem);
  max-width: 46rem;
}
.field { display: grid; gap: 0.5rem; }
.field--wide { grid-column: 1 / -1; }
.field .label { color: var(--ink-invert-muted); }
.field input, .field textarea {
  font: inherit;
  font-size: var(--step-0);
  color: var(--ink-invert);
  background: none;
  border: 0;
  border-bottom: var(--hair) solid rgb(255 255 255 / 0.28);
  padding: 0.5rem 0;
  border-radius: 0;
}
.field textarea { resize: vertical; min-height: 5.5rem; }
.field input:focus, .field textarea:focus {
  outline: 0;
  border-bottom-color: var(--rust-lift);
}
.form .btn { justify-self: start; grid-column: 1 / -1; }

/* ------------------------------------------------------------------ footer */

.colophon {
  background: var(--shark);
  color: var(--ink-invert-muted);
  padding-block: clamp(2.5rem, 5vw, 4rem);
}
.colophon__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
}
.colophon .mark { color: var(--ink-invert); }
.colophon a { text-decoration: none; }
.colophon a:hover { color: var(--ink-invert); }
.colophon nav { display: flex; gap: 1.5rem; }
.colophon__legal { flex-basis: 100%; font-size: var(--step--1); opacity: 0.7; }

/* --------------------------------------------------------------- utilities */

.stack { display: grid; gap: clamp(1.25rem, 3vw, 2rem); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

/* The spec band carries one row, so it does not need the full section rhythm. */
.specs .section { padding-block: clamp(3rem, 6vw, 5rem); }
