/* ==========================================================================
   Madelyn Portlock: graphic design & illustration studio
   A sketchbook on warm paper. Navigation is a fanned swatch book; every
   section is introduced by its own color chip.
   ========================================================================== */

/* ---------- Fonts (self-hosted, latin subset) ---------- */
@font-face {
  font-family: 'Fanwood Text';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/fanwood-text-latin-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Fanwood Text';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/fanwood-text-latin-400-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Hind Madurai';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/hind-madurai-latin-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Hind Madurai';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/hind-madurai-latin-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Hind Madurai';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/hind-madurai-latin-600.woff2') format('woff2');
}

/* ---------- Tokens ---------- */
:root {
  /* Paper and ink */
  --paper: #f5f0e6;
  --paper-deep: #ebe3d3;
  --card: #fffdf8;
  --ink: #1f2233;
  --ink-soft: #4a4c5c;
  --rule: #d8cfbd;

  /* Swatch book: one color per section (decorative fills; text never sits on the light ones) */
  --sw-studio: #2b3a52;
  --sw-services: #b8442a;
  --sw-studies: #c9962e;
  --sw-process: #2f6f6a;
  --sw-rates: #6b3a5b;
  --sw-questions: #74866a;
  --accent-text: #9e3a22;   /* vermilion dark enough for text on paper */

  /* Type */
  --font-display: 'Fanwood Text', Georgia, 'Times New Roman', serif;
  --font-body: 'Hind Madurai', 'Segoe UI', Arial, sans-serif;
  --step--1: clamp(0.84rem, 0.82rem + 0.1vw, 0.9rem);
  --step-0: clamp(1.02rem, 0.98rem + 0.2vw, 1.12rem);
  --step-1: clamp(1.25rem, 1.15rem + 0.45vw, 1.5rem);
  --step-2: clamp(1.6rem, 1.4rem + 0.9vw, 2.15rem);
  --step-3: clamp(2.1rem, 1.7rem + 1.8vw, 3.2rem);
  --step-4: clamp(2.5rem, 1.8rem + 3.2vw, 4.6rem);

  /* Space */
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: clamp(2rem, 1.6rem + 1.6vw, 3rem);
  --space-5: clamp(3.5rem, 2.6rem + 4vw, 6.5rem);
  --gutter: clamp(1rem, 0.6rem + 2vw, 2.5rem);
  --wrap: 72rem;

  /* Shape */
  --radius: 4px;
  --shadow-chip: 0 1px 0 rgba(31, 34, 51, 0.08), 0 8px 18px -10px rgba(31, 34, 51, 0.45);
  --shadow-sheet: 0 1px 0 rgba(31, 34, 51, 0.06), 0 22px 40px -28px rgba(31, 34, 51, 0.45);
  --header-h: 5.75rem;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
}

body.nav-open { overflow: hidden; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.12;
  text-wrap: balance;
}

p, li, dd { text-wrap: pretty; }
p { margin: 0 0 1em; }

a {
  color: var(--ink);
  text-decoration-color: var(--sw-services);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.18em;
}
a:hover { color: var(--accent-text); }

:focus-visible {
  outline: 3px solid var(--sw-services);
  outline-offset: 3px;
  border-radius: 2px;
}
[tabindex="-1"]:focus { outline: none; }

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 100;
  padding: 0.7rem 1rem;
  background: var(--ink);
  color: var(--card);
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; color: var(--card); }

.wrap {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
}

/* ---------- Components: buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.875rem;
  padding: 0.55rem 1.3rem 0.45rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  font: 600 var(--step--1) / 1 var(--font-body);
  letter-spacing: 0.04em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, transform 0.2s var(--ease), box-shadow 0.2s;
}
.btn-ink {
  position: relative;
  background: var(--ink);
  color: var(--card);
}
/* A folded vermilion corner, like a dog-eared page. */
.btn-ink::after {
  content: '';
  position: absolute;
  top: -2px;
  right: -2px;
  border-style: solid;
  border-width: 0 10px 10px 0;
  border-color: transparent var(--paper) var(--sw-services) transparent;
}
.btn-ink:hover { background: #343850; color: var(--card); transform: translateY(-1px); }
.btn-line { background: transparent; color: var(--ink); }
.btn-line:hover { background: var(--card); color: var(--ink); }
.btn:active { transform: translateY(1px); }

.link-button {
  min-height: 2.75rem;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-decoration-color: var(--sw-services);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.18em;
  cursor: pointer;
}
.link-button:hover { color: var(--accent-text); }

/* ---------- Header: brand, swatch fan, call to action ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: clamp(0.6rem, 2vw, 1.6rem);
  width: min(100% - 2 * var(--gutter), 80rem);
  min-height: var(--header-h);
  margin-inline: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.75rem;
  margin-right: auto;
  color: var(--ink);
  text-decoration: none;
}
.brand-mark { width: 2.5rem; height: 2.5rem; flex: none; }
.brand-name {
  display: flex;
  flex-direction: column;
  font-family: var(--font-display);
  font-size: 1.2rem;
  line-height: 1.02;
  white-space: nowrap;
}
.brand-name span + span { font-style: italic; }
.brand:hover { color: var(--ink); }
.brand:hover .brand-mark { color: var(--accent-text); }

.header-cta { flex: none; }

/* The swatch fan: chips pivot around a point far below the header. */
.fan-note { display: none; }
.fan-list {
  display: flex;
  gap: 0.9rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.fan-item { --tilt: 0deg; --chip: var(--sw-studio); }
.fan-item:nth-child(1) { --tilt: -5deg; --chip: var(--sw-studio); }
.fan-item:nth-child(2) { --tilt: -3deg; --chip: var(--sw-services); }
.fan-item:nth-child(3) { --tilt: -1deg; --chip: var(--sw-studies); }
.fan-item:nth-child(4) { --tilt: 1deg; --chip: var(--sw-process); }
.fan-item:nth-child(5) { --tilt: 3deg; --chip: var(--sw-rates); }
.fan-item:nth-child(6) { --tilt: 5deg; --chip: var(--sw-questions); }

.fan-chip {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: 5.4rem;
  height: 4.4rem;
  padding: 0 0.55rem 0.35rem;
  background: var(--card);
  border-radius: 3px;
  box-shadow: var(--shadow-chip);
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  transform: rotate(var(--tilt));
  transform-origin: 50% 320%;
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
}
.fan-chip::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 1.7rem;
  background: var(--chip);
  border-radius: 3px 3px 0 0;
}
.chip-code {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.3;
  color: var(--ink-soft);
}
.chip-name {
  font-family: var(--font-display);
  font-size: 1.02rem;
  line-height: 1.1;
}
.fan-chip:hover,
.fan-chip:focus-visible,
.fan-chip[aria-current] {
  color: var(--ink);
  transform: rotate(var(--tilt)) translateY(-0.4rem);
  box-shadow: 0 1px 0 rgba(31, 34, 51, 0.08), 0 14px 22px -12px rgba(31, 34, 51, 0.55);
}
.fan-chip[aria-current] .chip-name { text-decoration: underline 1.5px var(--chip); text-underline-offset: 0.2em; }

.fan-toggle {
  display: none;
  align-items: center;
  gap: 0.45rem;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0.4rem 0.7rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  font: 600 var(--step--1) / 1 var(--font-body);
  cursor: pointer;
}
.fan-toggle:hover { background: var(--paper-deep); }
.fan-toggle-icon { width: 1.3rem; height: 1.3rem; transition: transform 0.25s var(--ease); }
.fan-toggle[aria-expanded="true"] .fan-toggle-icon { transform: rotate(-30deg); }

/* Below 1100px the fan folds away into a swatch book that opens under the header. */
@media (max-width: 1099.98px) {
  :root { --header-h: 4.5rem; }
  .fan-toggle { display: inline-flex; }
  .fan {
    position: fixed;
    inset: var(--header-h) 0 0;
    z-index: 39;
    display: none;
    padding: var(--space-3) var(--gutter) var(--space-4);
    overflow-y: auto;
    background: var(--paper-deep);
  }
  .fan.is-open { display: block; }
  .fan-note {
    display: block;
    max-width: 30rem;
    margin: 0 auto var(--space-2);
    font-family: var(--font-display);
    font-style: italic;
    font-size: var(--step-1);
  }
  .fan-list {
    flex-direction: column;
    gap: 0.7rem;
    max-width: 30rem;
    margin-inline: auto;
  }
  .fan-item:nth-child(1) { --tilt: -2.5deg; }
  .fan-item:nth-child(2) { --tilt: -1.5deg; }
  .fan-item:nth-child(3) { --tilt: -0.5deg; }
  .fan-item:nth-child(4) { --tilt: 0.5deg; }
  .fan-item:nth-child(5) { --tilt: 1.5deg; }
  .fan-item:nth-child(6) { --tilt: 2.5deg; }
  .fan-chip {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
    width: 100%;
    height: 4rem;
    padding: 0 1rem 0 5.5rem;
    transform-origin: 1.5rem 50%;
  }
  .fan-chip::before {
    inset: 0 auto 0 0;
    width: 4.5rem;
    height: auto;
    border-radius: 3px 0 0 3px;
  }
  .chip-name { font-size: 1.35rem; order: -1; }
  .fan-chip:hover,
  .fan-chip:focus-visible,
  .fan-chip[aria-current] { transform: rotate(var(--tilt)) translateX(0.4rem); }
}

@media (max-width: 479.98px) {
  .header-inner { gap: 0.5rem; }
  .brand-mark { width: 2.1rem; height: 2.1rem; }
  .brand-name { font-size: 1.05rem; }
  .header-cta { padding-inline: 0.8rem; }
  .fan-toggle-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

/* ---------- Section heads: a color chip beside the title ---------- */
.section { padding-block: var(--space-5); }

.sec-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(1rem, 3vw, 2.5rem);
  align-items: end;
  margin-bottom: var(--space-4);
}
.sec-chip {
  --chip: var(--sw-studio);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: clamp(5.5rem, 10vw, 7.5rem);
  aspect-ratio: 3 / 4;
  padding: 0 0.6rem 0.5rem;
  background: linear-gradient(var(--chip) 0 62%, var(--card) 62% 100%);
  border-radius: 3px;
  box-shadow: var(--shadow-chip);
  transform: rotate(-3deg);
}
.sec-chip-code {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}
.sec-chip-name {
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 0.9rem + 0.3vw, 1.15rem);
  line-height: 1.1;
}
.sec-head h2 { font-size: var(--step-3); margin-bottom: 0.4rem; }
.sec-head .lede { max-width: 40rem; margin: 0; color: var(--ink-soft); font-size: var(--step-1); line-height: 1.45; }

.section-services .sec-chip { --chip: var(--sw-services); }
.section-studies .sec-chip { --chip: var(--sw-studies); }
.section-process .sec-chip { --chip: var(--sw-process); }
.section-rates .sec-chip { --chip: var(--sw-rates); }
.section-questions .sec-chip { --chip: var(--sw-questions); }

@media (max-width: 599.98px) {
  .sec-head { grid-template-columns: 1fr; align-items: start; }
  .sec-chip { width: 5rem; }
}

/* ---------- Hero: headline over an open sketchbook ---------- */
.hero {
  padding: var(--space-4) var(--gutter) 0;
  overflow: hidden;
}
.hero-text {
  max-width: 50rem;
  margin-inline: auto;
  text-align: center;
}
.hero-kicker {
  display: inline-block;
  margin-bottom: 1rem;
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--step-1);
  color: var(--ink-soft);
}
.hero h1 {
  font-size: var(--step-4);
  line-height: 1.04;
  margin-bottom: 1.1rem;
}
.hero h1 em { color: var(--accent-text); }
.hero-lede {
  max-width: 40rem;
  margin-inline: auto;
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--ink-soft);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  margin-top: var(--space-3);
}
.hero-art {
  width: min(100%, 72rem);
  margin: var(--space-4) auto 0;
}
.sketchbook-art { width: 100%; height: auto; }

@media (max-width: 599.98px) {
  .hero-art { width: 132%; margin-left: -16%; }
}

/* ---------- Studio ---------- */
.section-studio { border-top: 1px solid var(--rule); }
.studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: var(--space-4);
  align-items: start;
}
.studio-statement {
  font-family: var(--font-display);
  font-size: var(--step-2);
  line-height: 1.25;
}
.label-sheet {
  margin: 0;
  padding: var(--space-3);
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sheet);
  transform: rotate(1deg);
}
.label-sheet div {
  padding-block: 0.65rem;
  border-bottom: 1px dashed var(--rule);
}
.label-sheet div:last-child { border-bottom: 0; }
.label-sheet dt {
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}
.label-sheet dd { margin: 0; font-family: var(--font-display); font-size: var(--step-1); line-height: 1.3; }

@media (max-width: 859.98px) {
  .studio-grid { grid-template-columns: 1fr; }
  .label-sheet { transform: none; }
}

/* ---------- Services: a type specimen sheet ---------- */
.section-services { background: var(--card); border-block: 1px solid var(--rule); }
.specimen { margin: 0; padding: 0; list-style: none; counter-reset: spec; }
.spec-row {
  counter-increment: spec;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.25fr) minmax(0, 0.6fr);
  grid-template-areas:
    "name why time"
    "name list time";
  column-gap: var(--space-4);
  padding-block: var(--space-4);
  border-top: 1px solid var(--rule);
}
.spec-row:last-child { border-bottom: 1px solid var(--rule); }
.spec-name {
  grid-area: name;
  font-size: var(--step-3);
  line-height: 1;
}
.spec-name::before {
  content: counter(spec, upper-alpha);
  display: block;
  margin-bottom: 0.5rem;
  font: 600 var(--step--1) / 1 var(--font-body);
  letter-spacing: 0.1em;
  color: var(--accent-text);
}
.spec-why { grid-area: why; font-size: var(--step-1); line-height: 1.45; }
.spec-list {
  grid-area: list;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--ink-soft);
}
.spec-list li::before { content: '\2014\00a0'; color: var(--sw-services); }
.spec-time {
  grid-area: time;
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--step-2);
  line-height: 1.1;
  text-align: right;
}
.spec-time span {
  display: block;
  margin-bottom: 0.3rem;
  font: 600 var(--step--1) / 1.2 var(--font-body);
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

@media (max-width: 859.98px) {
  .spec-row {
    grid-template-columns: 1fr;
    grid-template-areas: "name" "why" "list" "time";
    row-gap: 0.8rem;
  }
  .spec-time { text-align: left; }
}

/* ---------- Studies: a proof sheet with crop marks ---------- */
.section-studies { background: var(--paper-deep); }
.proof-sheet {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-4);
  align-items: start;
}
.proof { position: relative; margin: 0; padding: 0.9rem; }
/* Printer's crop marks at the four corners of each proof. */
.proof::before,
.proof::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(var(--ink), var(--ink)) left 0 top 0.55rem / 0.7rem 1px no-repeat,
    linear-gradient(var(--ink), var(--ink)) left 0.55rem top 0 / 1px 0.7rem no-repeat,
    linear-gradient(var(--ink), var(--ink)) right 0 top 0.55rem / 0.7rem 1px no-repeat,
    linear-gradient(var(--ink), var(--ink)) right 0.55rem top 0 / 1px 0.7rem no-repeat;
}
.proof::after {
  background:
    linear-gradient(var(--ink), var(--ink)) left 0 bottom 0.55rem / 0.7rem 1px no-repeat,
    linear-gradient(var(--ink), var(--ink)) left 0.55rem bottom 0 / 1px 0.7rem no-repeat,
    linear-gradient(var(--ink), var(--ink)) right 0 bottom 0.55rem / 0.7rem 1px no-repeat,
    linear-gradient(var(--ink), var(--ink)) right 0.55rem bottom 0 / 1px 0.7rem no-repeat;
}
.study-art { width: 100%; height: auto; }
.proof figcaption {
  margin-top: 0.9rem;
  font-size: var(--step--1);
  line-height: 1.5;
  color: var(--ink-soft);
}
.proof-slug {
  display: block;
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--step-1);
  color: var(--ink);
}
.proof-sheet .proof:nth-child(2) { margin-top: var(--space-4); }

@media (max-width: 959.98px) {
  .proof-sheet { grid-template-columns: 1fr 1fr; }
  .proof-large { grid-column: 1 / -1; width: min(100%, 30rem); justify-self: center; }
  .proof-sheet .proof:nth-child(2) { margin-top: 0; }
}
@media (max-width: 559.98px) {
  .proof-sheet { grid-template-columns: 1fr; }
}

/* ---------- Process: steps strung on an ink line ---------- */
.steps {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
}
.steps::before {
  content: '';
  position: absolute;
  top: 1.5rem;
  bottom: 1.5rem;
  left: 1.45rem;
  border-left: 2px dashed var(--sw-process);
}
.step {
  position: relative;
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) minmax(0, 16rem);
  gap: 0 var(--space-4);
  align-items: start;
  padding-bottom: var(--space-4);
}
.step:last-child { padding-bottom: 0; }
.step-blot {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  background: var(--sw-process);
  border-radius: 46% 54% 51% 49% / 55% 45% 55% 45%;
  color: var(--card);
  font-family: var(--font-display);
  font-size: 1.4rem;
}
.step-body h3 { font-size: var(--step-2); margin: 0.35rem 0 0.4rem; }
.step-body p { margin: 0; max-width: 36rem; }
.step-note {
  margin: 0.6rem 0 0;
  padding-left: 0.9rem;
  border-left: 3px solid var(--sw-studies);
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--step-1);
  line-height: 1.3;
  color: var(--ink-soft);
}

@media (max-width: 759.98px) {
  .step { grid-template-columns: 3rem minmax(0, 1fr); gap: 0 1rem; }
  .step-note { grid-column: 2; }
}

/* ---------- Rates: a perforated job ticket ---------- */
.section-rates { background: var(--card); border-block: 1px solid var(--rule); }
.ticket {
  position: relative;
  padding: var(--space-4) clamp(1rem, 3vw, 2.5rem);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}
/* Punched holes along the top edge, like a tear-off ticket. */
.ticket::before {
  content: '';
  position: absolute;
  inset: -1px 1.5rem auto;
  height: 0.8rem;
  background: radial-gradient(circle at 50% 0, var(--card) 0.36rem, transparent 0.4rem) 0 0 / 1.5rem 0.8rem repeat-x;
}
.ticket-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.4rem 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 2px solid var(--ink);
}
.ticket-title { margin: 0; font-family: var(--font-display); font-size: var(--step-2); }
.ticket-meta { margin: 0; font-size: var(--step--1); color: var(--ink-soft); }

.rate-table,
.stack-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--step--1);
}
.rate-table th,
.rate-table td,
.stack-table th,
.stack-table td {
  padding: 0.85rem 0.8rem 0.85rem 0;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}
.rate-table thead th,
.stack-table thead th {
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
}
.rate-table tbody th {
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 400;
  line-height: 1.2;
}
.rate-price {
  font-family: var(--font-display);
  font-size: var(--step-1);
  white-space: nowrap;
}
.ticket-terms {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem var(--space-4);
  margin: var(--space-3) 0 0;
  padding: 0;
  list-style: none;
  font-size: var(--step--1);
}
.ticket-terms li { padding-left: 1.1rem; border-left: 3px solid var(--sw-rates); }

@media (max-width: 719.98px) {
  .ticket-terms { grid-template-columns: 1fr; }
}

/* Tables stack into label/value rows on narrow screens. */
@media (max-width: 719.98px) {
  .rate-table thead,
  .stack-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  .rate-table tr,
  .stack-table tr {
    display: block;
    padding-block: 0.6rem;
    border-bottom: 1px solid var(--rule);
  }
  /* Block cells with an absolutely placed label, so mixed content (code + text) stays on one line. */
  .rate-table th,
  .rate-table td,
  .stack-table td {
    position: relative;
    display: block;
    padding: 0.3rem 0 0.3rem 8.3rem;
    border: 0;
  }
  .rate-table th::before,
  .rate-table td::before,
  .stack-table td::before {
    content: attr(data-label);
    position: absolute;
    top: 0.3rem;
    left: 0;
    width: 7.5rem;
    line-height: 1.65;
    font-family: var(--font-body);
    font-size: var(--step--1);
    font-weight: 600;
    color: var(--ink-soft);
  }
  .rate-price { white-space: normal; }
}

/* ---------- Questions: answered as footnotes ---------- */
.notes {
  max-width: 50rem;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}
.note {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr);
  column-gap: var(--space-3);
  padding-block: var(--space-3);
  border-top: 1px solid var(--rule);
}
.note-mark {
  grid-row: span 2;
  font-family: var(--font-display);
  font-size: var(--step-4);
  line-height: 0.8;
  color: var(--sw-questions);
  text-align: right;
}
.note-q { font-style: italic; font-size: var(--step-2); margin-bottom: 0.5rem; }
.note-a { margin: 0; color: var(--ink-soft); }

@media (max-width: 479.98px) {
  .note { grid-template-columns: 2.4rem minmax(0, 1fr); column-gap: 0.8rem; }
}

/* ---------- Brief: a creative-brief sheet ---------- */
.section-brief { padding-top: var(--space-4); }
.brief-sheet {
  max-width: 56rem;
  margin-inline: auto;
  padding: var(--space-4) clamp(1.1rem, 4vw, 3.5rem);
  background: var(--card);
  border: 1px solid var(--rule);
  border-top: 0.7rem solid var(--sw-services);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sheet);
}
.brief-head { margin-bottom: var(--space-3); }
.brief-head h2 { font-size: var(--step-3); margin-bottom: 0.7rem; }
.brief-head p { max-width: 42rem; color: var(--ink-soft); }
.brief-direct { margin: 0; }

.brief-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem var(--space-4);
}
.form-required-note { grid-column: 1 / -1; margin: 0; font-size: var(--step--1); color: var(--ink-soft); }
.field { display: flex; flex-direction: column; min-width: 0; margin: 0; padding: 0; border: 0; }
.field-wide { grid-column: 1 / -1; }
.field label,
.field legend {
  margin-bottom: 0.35rem;
  padding: 0;
  font-weight: 600;
  font-size: var(--step--1);
  letter-spacing: 0.03em;
}
.req { color: var(--accent-text); }
.opt { font-weight: 400; color: var(--ink-soft); }
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 2.875rem;
  padding: 0.55rem 0.2rem 0.4rem;
  border: 0;
  border-bottom: 2px solid var(--ink-soft);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
}
.field select { cursor: pointer; }
.field textarea { padding: 0.6rem; border: 2px solid var(--ink-soft); border-radius: var(--radius); resize: vertical; }
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible { outline-offset: 2px; border-color: var(--ink); }
.field [aria-invalid="true"] { border-color: var(--accent-text); }
.field-hint { margin: 0.4rem 0 0; font-size: var(--step--1); color: var(--ink-soft); }
.field-error { margin: 0.35rem 0 0; font-size: var(--step--1); font-weight: 600; color: var(--accent-text); }
.field-error:empty { display: none; }

/* Project type picked like a paint chip. */
.swatch-options { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.swatch-option { position: relative; margin: 0; font-weight: 500; }
.field .swatch-option { margin-bottom: 0; font-weight: 500; letter-spacing: 0; }
.swatch-option input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.swatch-option span {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.875rem;
  padding: 0.45rem 1rem 0.35rem 0.55rem;
  border: 2px solid var(--rule);
  border-radius: var(--radius);
  background: var(--paper);
  font-size: var(--step--1);
  transition: border-color 0.2s, background-color 0.2s;
}
.swatch-option span::before {
  content: '';
  width: 1.3rem;
  height: 1.7rem;
  border-radius: 2px;
  background: var(--sw-studio);
}
.swatch-option:nth-child(2) span::before { background: var(--sw-services); }
.swatch-option:nth-child(3) span::before { background: var(--sw-studies); }
.swatch-option:nth-child(4) span::before { background: var(--sw-process); }
.swatch-option:nth-child(5) span::before { background: var(--sw-rates); }
.swatch-option:hover span { border-color: var(--ink-soft); }
.swatch-option input:checked + span { border-color: var(--ink); background: var(--card); box-shadow: inset 0 0 0 1px var(--ink); }
.swatch-option input:focus-visible + span { outline: 3px solid var(--sw-services); outline-offset: 3px; }
.swatch-choice[aria-invalid="true"] .swatch-option span { border-color: var(--accent-text); }

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

.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem 1.4rem; }
.form-privacy { margin: 0; font-size: var(--step--1); color: var(--ink-soft); }
.form-status:empty { display: none; }
.form-status {
  padding: 0.9rem 1rem;
  border-left: 4px solid var(--sw-process);
  background: var(--paper);
}
.form-status.is-error { border-left-color: var(--accent-text); }

@media (max-width: 639.98px) {
  .brief-form { grid-template-columns: 1fr; }
}

/* ---------- Footer: a colophon ---------- */
.site-footer {
  margin-top: var(--space-4);
  border-top: 1px solid var(--rule);
  background: var(--paper-deep);
}
.colophon {
  width: min(100% - 2 * var(--gutter), 44rem);
  margin-inline: auto;
  padding-block: var(--space-4);
  text-align: center;
}
.colophon-mark { display: inline-block; }
.colophon-svg { width: 2.6rem; height: 2.6rem; margin-inline: auto; }
.colophon-title {
  margin: 0.6rem 0 0.8rem;
  font-size: var(--step-1);
  font-style: italic;
  letter-spacing: 0.04em;
}
.colophon-text { font-size: var(--step--1); color: var(--ink-soft); }
.colophon-contact,
.colophon-links ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 1.4rem;
  margin: 0 0 0.6rem;
  padding: 0;
  list-style: none;
  font-size: var(--step--1);
}
.colophon-contact li,
.colophon-links li { display: flex; align-items: center; min-height: 2.75rem; }
.colophon-legal { margin: 0.4rem 0 0; font-size: var(--step--1); color: var(--ink-soft); }
.swatch-strip { display: grid; grid-template-columns: repeat(6, 1fr); height: 0.7rem; }
.swatch-strip span:nth-child(1) { background: var(--sw-studio); }
.swatch-strip span:nth-child(2) { background: var(--sw-services); }
.swatch-strip span:nth-child(3) { background: var(--sw-studies); }
.swatch-strip span:nth-child(4) { background: var(--sw-process); }
.swatch-strip span:nth-child(5) { background: var(--sw-rates); }
.swatch-strip span:nth-child(6) { background: var(--sw-questions); }

/* ---------- Pages: legal ---------- */
.legal-head {
  width: min(100% - 2 * var(--gutter), 60rem);
  margin: 0 auto;
  padding-block: var(--space-4) var(--space-3);
  border-bottom: 2px solid var(--ink);
}
.legal-stamp {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.2rem 0.7rem 0.1rem;
  border: 1.5px solid var(--accent-text);
  border-radius: 2px;
  color: var(--accent-text);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.06em;
  transform: rotate(-1.5deg);
}
.legal-head h1 { font-size: var(--step-4); margin-bottom: 0.6rem; }
.legal-intro { max-width: 40rem; margin: 0; font-size: var(--step-1); color: var(--ink-soft); line-height: 1.45; }

.legal-layout {
  display: grid;
  grid-template-columns: 14rem minmax(0, 1fr);
  gap: var(--space-4);
  width: min(100% - 2 * var(--gutter), 60rem);
  margin: var(--space-4) auto var(--space-5);
}
.legal-toc-title { margin-bottom: 0.4rem; font-family: var(--font-display); font-style: italic; font-size: var(--step-1); }
.legal-toc ol {
  margin: 0;
  padding: 0 0 0 0.9rem;
  border-left: 3px solid var(--sw-services);
  list-style: none;
  font-size: var(--step--1);
}
.legal-toc li { padding-block: 0.15rem; }
.legal-toc a { display: inline-block; padding-block: 0.25rem; text-decoration: none; }
.legal-toc a:hover { text-decoration: underline; }

.prose { max-width: 42rem; min-width: 0; }
.prose h2 { font-size: var(--step-2); margin: 2.2rem 0 0.7rem; }
.prose h3 { font-size: var(--step-1); font-style: italic; margin: 1.5rem 0 0.5rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: 0.45rem; }
.prose code { font-size: 0.92em; overflow-wrap: anywhere; }
.prose address { font-style: normal; margin-bottom: 1rem; }
.callout {
  padding: 1rem 1.2rem;
  background: var(--card);
  border-left: 4px solid var(--sw-services);
}
.table-wrap { margin-block: 1rem 1.4rem; }

@media (max-width: 859.98px) {
  .legal-layout { grid-template-columns: 1fr; }
}

/* ---------- Pages: 404 ---------- */
.lost-inner {
  width: min(100% - 2 * var(--gutter), 40rem);
  margin: 0 auto;
  padding-block: var(--space-5);
  text-align: center;
}
.lost-art { width: min(100%, 20rem); margin: 0 auto var(--space-3); }
.lost h1 { font-size: var(--step-3); margin-bottom: 0.8rem; }
.lost-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.8rem; margin-top: var(--space-3); }

/* ---------- Cookie consent: a pinned note ---------- */
.consent {
  position: fixed;
  right: clamp(0.75rem, 2vw, 1.5rem);
  bottom: clamp(0.75rem, 2vw, 1.5rem);
  z-index: 60;
  width: min(100% - 1.5rem, 30rem);
  padding: 1.3rem 1.3rem 1.1rem;
  background: var(--card);
  border: 1px solid var(--rule);
  border-top: 0.55rem solid var(--sw-studies);
  border-radius: var(--radius);
  box-shadow: 0 24px 50px -20px rgba(31, 34, 51, 0.5);
}
.consent-title { font-size: var(--step-1); margin-bottom: 0.4rem; }
.consent-text { font-size: var(--step--1); color: var(--ink-soft); }
.consent-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.consent-btn {
  flex: 1 1 8rem;
  min-height: 2.75rem;
  padding: 0.5rem 1rem 0.4rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--card);
  font: 600 var(--step--1) / 1 var(--font-body);
  cursor: pointer;
}
.consent-btn:hover { background: #343850; }
.consent-btn-save { background: var(--card); color: var(--ink); }
.consent-btn-save:hover { background: var(--paper-deep); }
.consent-link {
  flex-basis: 100%;
  min-height: 2.75rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: 600 var(--step--1) / 1 var(--font-body);
  text-decoration: underline;
  text-decoration-color: var(--sw-services);
  text-underline-offset: 0.2em;
  cursor: pointer;
}
.consent-link:hover { color: var(--accent-text); }

.consent-dialog {
  width: min(100% - 1.5rem, 34rem);
  max-height: calc(100dvh - 2rem);
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
}
.consent-dialog::backdrop { background: rgba(31, 34, 51, 0.5); }
.consent-dialog-inner { padding: 1.5rem; }
.consent-categories { margin: 1rem 0; padding: 0; list-style: none; }
.consent-category { padding-block: 0.8rem; border-top: 1px solid var(--rule); }
.consent-category p { margin: 0.3rem 0 0; font-size: var(--step--1); color: var(--ink-soft); }
.consent-category-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.consent-category h3 { font-size: var(--step-0); font-family: var(--font-body); font-weight: 600; }
.consent-always { font-size: var(--step--1); font-weight: 600; color: var(--sw-process); }
.consent-switch { position: relative; display: inline-flex; align-items: center; min-width: 2.75rem; min-height: 2.75rem; cursor: pointer; }
.consent-switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.consent-switch-track {
  position: relative;
  width: 2.9rem;
  height: 1.6rem;
  border-radius: 1rem;
  background: #8b8d99;
  transition: background-color 0.2s;
}
.consent-switch-track::after {
  content: '';
  position: absolute;
  top: 0.2rem;
  left: 0.2rem;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  background: var(--card);
  transition: transform 0.2s var(--ease);
}
.consent-switch input:checked + .consent-switch-track { background: var(--sw-process); }
.consent-switch input:checked + .consent-switch-track::after { transform: translateX(1.3rem); }
.consent-switch input:focus-visible + .consent-switch-track { outline: 3px solid var(--sw-services); outline-offset: 3px; }

/* ---------- Utilities: reveal on scroll ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- 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;
  }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- Print ---------- */
@media print {
  .site-header,
  .site-footer,
  .consent,
  .legal-toc,
  .hero-art { display: none; }
  body { background: #fff; }
  .js .reveal { opacity: 1; transform: none; }
}
