/* ==========================================================================
   Tera Interior. Public site.
   A drawing sheet: limestone paper, graphite ink, ochre marks, mono notes.
   Tokens and base live here and are shared with admin.css.
   ========================================================================== */

@font-face {
  font-family: "Bricolage";
  font-style: normal;
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
  src: url("../fonts/bricolage-grotesque-latin-variable.woff2") format("woff2-variations"),
       url("../fonts/bricolage-grotesque-latin-variable.woff2") format("woff2");
}
@font-face {
  font-family: "DM Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/dm-mono-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "DM Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/dm-mono-latin-500-normal.woff2") format("woff2");
}

:root {
  --paper: #ebe6dd;
  --paper-2: #f3efe8;
  --paper-3: #e1dbcf;
  --ink: #1f1e1b;
  --ink-2: #3d3a35;
  --mute: #6b665d;
  --line: #c6beae;
  --line-soft: #d8d1c3;
  --ochre: #9a6316;
  --ochre-bright: #c98a2c;
  --ochre-soft: #efe3cc;
  --graphite: #23221f;
  --graphite-2: #2c2b27;
  --on-dark: #ece7de;
  --on-dark-mute: #a7a194;
  --on-dark-line: rgba(236, 231, 222, 0.22);
  --bad: #c9694a;
  --bad-dark: #e6987d;
  --good: #5f7a3a;

  --font-display: "Bricolage", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "DM Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --fs-display: clamp(2.75rem, 1.6rem + 5.6vw, 6.25rem);
  --fs-h2: clamp(1.875rem, 1.3rem + 2.4vw, 3.25rem);
  --fs-h3: clamp(1.25rem, 1.1rem + 0.7vw, 1.75rem);
  --fs-lead: clamp(1.0625rem, 1rem + 0.45vw, 1.3125rem);
  --fs-body: clamp(0.9688rem, 0.93rem + 0.2vw, 1.0625rem);
  --fs-small: 0.875rem;
  --fs-mono: 0.75rem;
  --fs-tiny: 0.6875rem;

  --gutter: clamp(1.25rem, 0.9rem + 1.8vw, 3rem);
  --section-y: clamp(4.5rem, 3rem + 6vw, 9rem);
  --container: 84rem;
  --ruler-h: 3rem;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 280ms;
}

/* Base --------------------------------------------------------------------- */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--paper); }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; color: inherit; }
ul, ol { list-style: none; padding: 0; }
a { color: inherit; }
dl, dd { margin: 0; }
figure { margin: 0; }

h1, h2, h3 {
  font-weight: 520;
  font-stretch: 94%;
  line-height: 1.02;
  letter-spacing: -0.022em;
  text-wrap: balance;
}
p { text-wrap: pretty; }

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

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 1rem; top: 1rem;
  z-index: 300;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  text-decoration: none;
  transform: translateY(-200%);
}
.skip:focus-visible { transform: none; }

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

/* Mono notes. Every label on the sheet uses these. */
.mono, .sheetno, .specs dt, .sheet__index, .sheet__rows dt, .cell__code, .stage__num,
.stage__out, .studio__cap, .detail figcaption, .consult__facts dt, .field__label,
.foot__contact dt, .foot__legal, .titleblock__meta, .titleblock__nav a i, .ruler__where,
.ruler__nav, .ruler__book, .index__nav a i, .dims__label, .head__note {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.04em;
  line-height: 1.5;
}

.sheetno {
  display: flex;
  gap: 0.75rem;
  text-transform: uppercase;
  color: var(--mute);
}
.sheetno span:first-child { color: var(--ochre); }
.sheetno span + span::before { content: "/"; margin-right: 0.75rem; color: var(--line); }

/* Brackets. The one button shape on the site. ------------------------------ */

.bracket {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.8rem 1.6rem;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  background: transparent;
  border: 0;
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.bracket::before, .bracket::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 0.7rem;
  border: 1px solid currentColor;
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.bracket::before { left: 0; border-right: 0; }
.bracket::after { right: 0; border-left: 0; }
@media (hover: hover) {
  .bracket:hover::before { transform: translateX(-4px); }
  .bracket:hover::after { transform: translateX(4px); }
  .bracket:hover { color: var(--ochre); }
}
.bracket--fill { background: var(--ink); color: var(--paper); }
.bracket--fill::before, .bracket--fill::after { border-color: var(--ochre-bright); }
@media (hover: hover) { .bracket--fill:hover { background: var(--graphite-2); color: var(--paper); } }
.bracket--paper { color: var(--on-dark); }
.bracket--paper::before, .bracket--paper::after { border-color: var(--ochre-bright); }
@media (hover: hover) { .bracket--paper:hover { color: var(--ochre-bright); } }
.bracket[disabled] { opacity: 0.55; cursor: progress; }

.textlink {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 3rem;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-2);
}
.textlink svg { width: 0.9rem; height: 0.9rem; fill: none; stroke: currentColor; stroke-width: 1.4; transition: transform var(--dur) var(--ease); }
@media (hover: hover) { .textlink:hover { color: var(--ochre); } .textlink:hover svg { transform: translateY(3px); } }

/* Brand ------------------------------------------------------------------- */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.75rem;
  text-decoration: none;
  font-weight: 560;
  font-stretch: 92%;
  letter-spacing: -0.01em;
  font-size: 1.0625rem;
}
.brand__mark, .ruler__brand svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.5; }
.brand__fill { fill: var(--ochre-bright); stroke: none; }

/* Title block --------------------------------------------------------------- */

.titleblock {
  position: relative;
  z-index: 5;
  border-bottom: 1px solid var(--ink);
}
.titleblock__grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
}
.titleblock__meta { display: none; }
.titleblock__nav { display: none; }
.titleblock__nav a {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  min-height: 2.75rem;
  padding-top: 0.75rem;
  text-decoration: none;
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--ink-2);
  transition: color var(--dur) var(--ease);
}
.titleblock__nav a i { font-style: normal; color: var(--ochre); }
@media (hover: hover) { .titleblock__nav a:hover { color: var(--ochre); } }
.titleblock__end { display: flex; align-items: center; gap: 0.75rem; }
.titleblock__end .bracket { display: none; }

.indexbtn {
  min-height: 2.75rem;
  padding: 0 0.9rem;
  border: 1px solid var(--ink);
  background: transparent;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

@media (min-width: 60rem) {
  .titleblock__grid {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: 2.5rem;
    min-height: 5rem;
  }
  .titleblock__meta {
    display: flex;
    gap: 1.5rem;
    color: var(--mute);
    padding-left: 2.5rem;
    border-left: 1px solid var(--line);
    line-height: 1.4;
  }
  .titleblock__nav { display: flex; gap: 1.75rem; }
  .titleblock__end .bracket { display: inline-flex; }
  .indexbtn:not(.indexbtn--ruler) { display: none; }
}

/* Ruler --------------------------------------------------------------------- */

.ruler {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 120;
  height: var(--ruler-h);
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
  transform: translateY(-101%);
  transition: transform 420ms var(--ease);
}
.ruler.is-on { transform: none; }
.no-js .ruler { display: none; }

.ruler__grid {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 100%;
}
.ruler__brand { display: inline-flex; align-items: center; height: 100%; }
.ruler__where { display: flex; gap: 0.6rem; text-transform: uppercase; color: var(--mute); white-space: nowrap; }
.ruler__where span:first-child { color: var(--ochre); }
.ruler__nav { display: none; }
.ruler__book {
  margin-left: auto;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  padding: 0.4rem 0;
}
.indexbtn--ruler { min-height: 2rem; padding-inline: 0.7rem; }
.ruler__progress {
  position: absolute;
  left: 0; bottom: -1px;
  height: 2px;
  width: 100%;
  background: var(--ochre-bright);
  transform: scaleX(0);
  transform-origin: left;
}
@media (min-width: 60rem) {
  .ruler__nav { display: flex; gap: 1.5rem; margin-left: 1.5rem; padding-left: 1.5rem; border-left: 1px solid var(--line); text-transform: uppercase; }
  .ruler__nav a { text-decoration: none; color: var(--ink-2); }
  .ruler__nav a:hover { color: var(--ochre); }
  .indexbtn--ruler { display: none; }
}

/* Cover --------------------------------------------------------------------- */

.cover {
  position: relative;
  padding-block: clamp(2.5rem, 1.5rem + 4vw, 5rem) clamp(3rem, 2rem + 5vw, 7rem);
  overflow: hidden;
}
.cover__gridlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(to right, var(--line-soft) 0 1px, transparent 1px calc(100% / 12));
  opacity: 0.6;
  mask-image: linear-gradient(to bottom, #000 60%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent);
}
.cover__grid { position: relative; display: grid; gap: 2.5rem; }
@media (min-width: 60rem) {
  .cover__grid { grid-template-columns: 1.15fr 0.85fr; gap: clamp(2rem, 1rem + 4vw, 6rem); align-items: start; }
}

.cover__title {
  font-size: var(--fs-display);
  margin-top: 1.25rem;
  max-width: 11ch;
}
.line { display: block; overflow: hidden; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.line__in { display: block; }

.cover__lead {
  margin-top: 1.75rem;
  font-size: var(--fs-lead);
  color: var(--ink-2);
  max-width: 42ch;
}
.cover__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; margin-top: 1.75rem; }

.specs {
  margin-top: 2.5rem;
  border-top: 1px solid var(--ink);
  max-width: 34rem;
}
.specs div {
  display: grid;
  grid-template-columns: 6rem 1fr;
  gap: 1rem;
  padding-block: 0.7rem;
  border-bottom: 1px solid var(--line-soft);
}
.specs dt { text-transform: uppercase; color: var(--ochre); padding-top: 0.1rem; }
.specs dd { font-size: var(--fs-small); color: var(--ink-2); }

.cover__fig { position: relative; padding: 1.75rem 1.75rem 0 0; }
.cover__frame {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--paper-3);
}
.cover__frame img { width: 100%; height: 100%; object-fit: cover; }

.dims { position: absolute; overflow: visible; color: var(--ink); }
.dims line { stroke: currentColor; stroke-width: 1; vector-effect: non-scaling-stroke; }
.dims--top { left: 0; right: 1.75rem; top: 0; width: calc(100% - 1.75rem); height: 24px; }
.dims--side { top: 1.75rem; right: 0; width: 24px; height: calc(100% - 1.75rem); }
.dims__label { position: absolute; text-transform: uppercase; color: var(--mute); white-space: nowrap; }
.dims__label--top { left: 0; top: -1.1rem; }
.dims__label--side {
  right: -0.6rem; top: 1.75rem;
  transform: rotate(90deg) translateY(-100%);
  transform-origin: right top;
}
@media (max-width: 59.99rem) { .dims__label--side { display: none; } .dims--side { display: none; } .cover__fig { padding-right: 0; } .dims--top { width: 100%; right: 0; } }

/* Stamps. The signature. ---------------------------------------------------- */

.stamp {
  width: clamp(5.5rem, 4rem + 4vw, 7.5rem);
  height: auto;
  color: var(--ochre);
  fill: none;
  mix-blend-mode: multiply;
  transform: rotate(-8deg);
  opacity: 0.92;
}
.stamp circle { stroke: currentColor; stroke-width: 1.4; }
.stamp circle:nth-of-type(2) { stroke-width: 0.9; }
.stamp text { fill: currentColor; font-family: var(--font-mono); }
.stamp__ring { font-size: 9.2px; letter-spacing: 1.2px; text-transform: uppercase; }
.stamp__core { font-size: 22px; font-weight: 500; text-anchor: middle; }
.stamp__core--word { font-size: 15px; letter-spacing: 1px; }
.stamp--cover { position: absolute; right: -0.5rem; bottom: -1.5rem; transform: rotate(-12deg); }
@media (min-width: 60rem) { .stamp--cover { right: 0.75rem; bottom: -2rem; } }

/* Note ----------------------------------------------------------------------- */

.note { padding-block: var(--section-y); border-top: 1px solid var(--ink); }
.note__grid { display: grid; gap: 1.5rem; }
@media (min-width: 60rem) { .note__grid { grid-template-columns: 1fr 2fr; gap: 4rem; } }
.note__text { font-size: var(--fs-lead); max-width: 54ch; color: var(--ink-2); }
.note__text + .note__text { margin-top: 1.25rem; }

/* Section heads --------------------------------------------------------------- */

.head {
  display: grid;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--ink);
  margin-bottom: clamp(2rem, 1rem + 3vw, 3.5rem);
}
.head__title { font-size: var(--fs-h2); max-width: 16ch; }
.head__note { color: var(--mute); max-width: 32ch; }
@media (min-width: 60rem) {
  .head { grid-template-columns: 10rem 1fr minmax(14rem, 20rem); align-items: end; gap: 2rem; }
  .head__note { justify-self: end; text-align: right; }
}

/* Sheets. Sticky, stacking work cards. --------------------------------------- */

.sheets { padding-block: var(--section-y); }
.stack { display: grid; gap: 1rem; }

.sheet { position: sticky; top: calc(var(--ruler-h) + 0.75rem); }
.no-js .sheet, .no-motion .sheet { position: relative; top: auto; }

.sheet__inner {
  position: relative;
  display: grid;
  gap: 1.25rem;
  padding: 0.85rem;
  background: var(--paper-2);
  border: 1px solid var(--ink);
  transform-origin: 50% 0;
  overflow: hidden;
}
@media (min-width: 60rem) {
  .sheet__inner { grid-template-columns: 7fr 5fr; gap: 2rem; padding: 1rem; }
}

.sheet__media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--paper-3);
}
.sheet__media img { width: 100%; height: 118%; margin-top: -9%; object-fit: cover; }
.no-js .sheet__media img, .no-motion .sheet__media img { height: 100%; margin-top: 0; }
@media (max-width: 59.99rem) { .sheet__media { aspect-ratio: 4 / 3; } }
@media (min-width: 60rem) and (max-height: 48rem) { .sheet__media { aspect-ratio: 3 / 2; } }

.sheet__block {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.25rem 0.25rem 0.25rem;
}
.sheet__index { text-transform: uppercase; color: var(--ochre); }
.sheet__index span { color: var(--mute); }
.sheet__name { font-size: var(--fs-h3); font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.5rem); }
.sheet__rows { border-top: 1px solid var(--ink); margin-top: 0.5rem; }
.sheet__rows div {
  display: grid;
  grid-template-columns: 6rem 1fr;
  gap: 1rem;
  padding-block: 0.55rem;
  border-bottom: 1px solid var(--line-soft);
}
.sheet__rows dt { text-transform: uppercase; color: var(--mute); padding-top: 0.1rem; }
.sheet__rows dd { font-size: var(--fs-small); color: var(--ink-2); }
.sheet__block .stamp { margin-top: auto; align-self: flex-end; }
@media (max-width: 59.99rem) {
  /* On phones the stamp sits on the photo, so the title block keeps its full width. */
  .sheet__block .stamp {
    position: absolute; right: 1.35rem; top: 1.35rem; width: 4.75rem;
    color: var(--ochre-bright); mix-blend-mode: normal;
    filter: drop-shadow(0 0 3px rgba(243, 239, 232, 0.9));
  }
}

.sheet__veil {
  position: absolute;
  inset: 0;
  background: var(--paper);
  opacity: 0;
  pointer-events: none;
}

/* Spec grid. Services. -------------------------------------------------------- */

.spec { padding-block: var(--section-y); }
.spec__grid {
  display: grid;
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--ink);
}
@media (min-width: 48rem) { .spec__grid { grid-template-columns: repeat(2, 1fr); } }
.cell {
  position: relative;
  padding: clamp(1.25rem, 1rem + 1.5vw, 2.25rem);
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: transparent;
  transition: background var(--dur) var(--ease);
}
.cell__code { text-transform: uppercase; color: var(--ochre); }
.cell__name { font-size: var(--fs-h3); margin-top: 2.5rem; }
.cell__text { margin-top: 0.75rem; color: var(--ink-2); max-width: 40ch; }
.cell__corner {
  position: absolute;
  right: 0.9rem; top: 0.9rem;
  width: 0.55rem; height: 0.55rem;
  background: var(--ochre-bright);
  transform: scale(0);
  transition: transform var(--dur) var(--ease);
}
@media (hover: hover) {
  .cell:hover { background: var(--paper-2); }
  .cell:hover .cell__corner { transform: none; }
}

/* Timeline. Process. ---------------------------------------------------------- */

.process { padding-block: var(--section-y); background: var(--paper-3); }
.timeline {
  --p: 0;
  position: relative;
  display: grid;
  gap: 2rem;
  padding-left: 2rem;
}
.timeline__track {
  position: absolute;
  left: 0.4rem; top: 0.4rem; bottom: 0.4rem;
  width: 1px;
  background: var(--line);
}
.timeline__fill {
  position: absolute;
  inset: 0;
  background: var(--ochre-bright);
  transform: scaleY(var(--p));
  transform-origin: top;
}
.stage { position: relative; }
.stage__node {
  position: absolute;
  left: -2rem; top: 0.15rem;
  width: 0.85rem; height: 0.85rem;
  border: 1px solid var(--ink);
  background: var(--paper-3);
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.stage.is-lit .stage__node { background: var(--ochre-bright); border-color: var(--ochre-bright); transform: rotate(45deg); }
.stage__num { text-transform: uppercase; color: var(--ochre); }
.stage__title { font-size: var(--fs-h3); margin-top: 0.5rem; }
.stage__text { margin-top: 0.6rem; color: var(--ink-2); max-width: 36ch; }
.stage__out { margin-top: 0.9rem; padding-top: 0.6rem; border-top: 1px solid var(--line); color: var(--mute); }

@media (min-width: 60rem) {
  .timeline { grid-template-columns: repeat(4, 1fr); gap: 2.5rem; padding-left: 0; padding-top: 2.25rem; }
  .timeline__track { left: 0; right: 0; top: 0.4rem; bottom: auto; width: auto; height: 1px; }
  .timeline__fill { transform: scaleX(var(--p)); transform-origin: left; }
  .stage__node { left: 0; top: -2.25rem; }
}
.no-js .timeline, .no-motion .timeline { --p: 1; }
.no-js .stage .stage__node, .no-motion .stage .stage__node { background: var(--ochre-bright); border-color: var(--ochre-bright); transform: rotate(45deg); }

/* Studio ---------------------------------------------------------------------- */

.studio { padding-block: var(--section-y); }
.studio__frame {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--paper-3);
}
.studio__frame img { width: 100%; height: 124%; margin-top: -12%; object-fit: cover; }
.no-js .studio__frame img, .no-motion .studio__frame img { height: 100%; margin-top: 0; }
@media (max-width: 47.99rem) {
  .studio__frame { aspect-ratio: 4 / 3; margin-inline: calc(var(--gutter) * -1); }
}
.studio__cap {
  display: flex;
  gap: 0.75rem;
  padding-top: 0.6rem;
  color: var(--mute);
  text-transform: uppercase;
}
.studio__cap span:first-child { color: var(--ochre); }

.studio__grid { display: grid; gap: 2.5rem; margin-top: clamp(2rem, 1rem + 3vw, 4rem); }
@media (min-width: 60rem) { .studio__grid { grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; } }
.studio__text p { font-size: var(--fs-lead); color: var(--ink-2); max-width: 46ch; }
.studio__text p + p { margin-top: 1.25rem; }

.studio__details { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.detail picture { display: block; aspect-ratio: 4 / 5; overflow: hidden; background: var(--paper-3); }
.detail img { width: 100%; height: 100%; object-fit: cover; }
.detail figcaption { display: flex; gap: 0.6rem; padding-top: 0.5rem; color: var(--mute); text-transform: uppercase; }
.detail figcaption span:first-child { color: var(--ochre); }

/* Consultation ---------------------------------------------------------------- */

.consult { padding-block: var(--section-y); background: var(--graphite); color: var(--on-dark); }
.consult .sheetno { color: var(--on-dark-mute); }
.consult .sheetno span:first-child { color: var(--ochre-bright); }
.consult .sheetno span + span::before { color: var(--on-dark-line); }
.consult__grid { display: grid; gap: 3rem; }
@media (min-width: 60rem) { .consult__grid { grid-template-columns: 0.8fr 1.2fr; gap: 5rem; align-items: start; } }

.consult__title { font-size: var(--fs-h2); margin-top: 1.25rem; max-width: 12ch; }
.consult__text { margin-top: 1.25rem; color: var(--on-dark-mute); max-width: 40ch; }
.consult__facts { margin-top: 2rem; border-top: 1px solid var(--on-dark-line); max-width: 30rem; }
.consult__facts div {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 1rem;
  padding-block: 0.7rem;
  border-bottom: 1px solid var(--on-dark-line);
}
.consult__facts dt { text-transform: uppercase; color: var(--ochre-bright); padding-top: 0.1rem; }
.consult__facts dd { font-size: var(--fs-small); color: var(--on-dark); }

.form__row { display: grid; gap: 1.25rem; }
.form__row + .form__row { margin-top: 1.25rem; }
@media (min-width: 34rem) { .form__row--two { grid-template-columns: 1fr 1fr; } }

.field { display: flex; flex-direction: column; gap: 0.45rem; }
.field__label { text-transform: uppercase; color: var(--on-dark-mute); }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 3rem;
  padding: 0.75rem 0.9rem;
  background: var(--graphite-2);
  border: 1px solid var(--on-dark-line);
  border-radius: 0;
  color: var(--on-dark);
  font-size: 1rem;
  resize: vertical;
  transition: border-color var(--dur) var(--ease);
}
.field select {
  appearance: none;
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 6 8 10.5 12.5 6' fill='none' stroke='%23c98a2c' stroke-width='1.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  background-size: 1rem;
}
.field select option { background: var(--graphite); color: var(--on-dark); }
.field input::placeholder, .field textarea::placeholder { color: rgba(167, 161, 148, 0.7); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ochre-bright); }
.field[data-invalid="true"] input, .field[data-invalid="true"] select, .field[data-invalid="true"] textarea { border-color: var(--bad-dark); }
.field__error { font-family: var(--font-mono); font-size: var(--fs-tiny); letter-spacing: 0.03em; color: var(--bad-dark); min-height: 1rem; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 1.75rem; }
.form__status { font-family: var(--font-mono); font-size: var(--fs-mono); color: var(--on-dark-mute); min-height: 1.5rem; }
.form__status[data-tone="error"] { color: var(--bad-dark); }
.form__status[data-tone="ok"] { color: #b9cf9a; }

.done {
  display: grid;
  gap: 1.5rem;
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  border: 1px solid var(--on-dark-line);
}
@media (min-width: 34rem) { .done { grid-template-columns: auto 1fr; align-items: center; gap: 2rem; } }
.stamp--done { color: var(--ochre-bright); mix-blend-mode: normal; opacity: 1; transform: rotate(-10deg); }
.done__title { font-size: var(--fs-h3); }
.done__text { margin-top: 0.5rem; color: var(--on-dark-mute); max-width: 40ch; }

/* Footer ---------------------------------------------------------------------- */

.foot { border-top: 1px solid var(--ink); padding-block: 2.5rem calc(2.5rem + env(safe-area-inset-bottom)); }
.foot__grid { display: grid; gap: 1.75rem; }
@media (min-width: 60rem) {
  .foot__grid { grid-template-columns: auto 1fr auto; grid-template-areas: "brand contact note" "legal legal legal"; align-items: start; gap: 2rem 4rem; }
  .foot .brand { grid-area: brand; }
  .foot__contact { grid-area: contact; }
  .foot__note { grid-area: note; }
  .foot__legal { grid-area: legal; }
}
.foot__contact { display: grid; gap: 0.35rem; max-width: 26rem; }
.foot__contact div { display: grid; grid-template-columns: 5.5rem 1fr; gap: 1rem; }
.foot__contact dt { text-transform: uppercase; color: var(--ochre); padding-top: 0.15rem; }
.foot__contact dd { font-size: var(--fs-small); color: var(--ink-2); }
.foot__contact a { text-decoration: none; border-bottom: 1px solid var(--line); }
.foot__contact a:hover { color: var(--ochre); border-color: currentColor; }
.foot__note { font-size: var(--fs-small); color: var(--mute); max-width: 30ch; }
.foot__legal {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line-soft);
  color: var(--mute);
}
.foot__legal a { text-decoration: none; color: var(--ink-2); }
.foot__legal a:hover { color: var(--ochre); }

/* Index. Phone sheet list. ------------------------------------------------------ */

.index {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--paper);
  color: var(--ink);
  overflow-y: auto;
  padding: var(--gutter);
  padding-top: calc(var(--gutter) + 0.5rem);
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
}
.index.is-open { opacity: 1; }
.index__inner { display: flex; flex-direction: column; min-height: 100%; }
.index__nav { margin-top: 2rem; border-top: 1px solid var(--ink); }
.index__nav a {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line-soft);
  text-decoration: none;
  font-size: clamp(1.5rem, 6vw, 2rem);
  font-weight: 520;
  font-stretch: 94%;
  letter-spacing: -0.015em;
}
.index__nav a i { font-style: normal; color: var(--ochre); }
.index__book { margin-top: 2rem; align-self: flex-start; }
.index__close {
  position: absolute;
  right: var(--gutter); top: var(--gutter);
  min-height: 2.75rem;
  padding: 0 0.9rem;
  border: 1px solid var(--ink);
  background: transparent;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

/* Motion states ---------------------------------------------------------------- */

/* Only when JS confirmed motion is welcome do elements start hidden. */
.motion [data-reveal], .motion [data-reveal-group] > * { opacity: 0; }
.motion .line__in { transform: translateY(110%); }
.motion [data-intro] { opacity: 0; }
.motion .cover__frame { clip-path: inset(0% 0% 0% 100%); }
.motion .dims__line { stroke-dasharray: 1; stroke-dashoffset: 1; }
.motion .dims__tick { opacity: 0; }
.motion .cover__gridlines { clip-path: inset(0% 0% 100% 0%); }
.motion [data-stamp] { opacity: 0; }
.motion .stamp--done { opacity: 0; }

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

/* The hidden attribute has to beat every display rule above. */
[hidden] { display: none !important; }
