@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/instrument-serif-latin-400-normal.woff2) format("woff2");
}
@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/instrument-serif-latin-400-italic.woff2) format("woff2");
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url(fonts/archivo-latin-standard-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url(fonts/archivo-latin-ext-standard-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}


@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(fonts/newsreader-latin.woff2) format("woff2");
}
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url(fonts/figtree-latin.woff2) format("woff2");
}

:root {
  /* Quiet luxury: ivory stone, navy ink, champagne gold used only for fine lines.
     The switchboard survives as a discreet signature: brass jacks and a thin navy cord. */
  --ground: #f5f1ea;
  --surface: #fbf9f5;
  --stone: #ebe5da;
  --ink: #14223b;
  --ink-soft: #4a5468;
  --ink-faint: #646d7f;
  --hair: #ddd5c7;
  --hair-strong: #c4b8a4;
  --navy: #14294a;
  --navy-deep: #0e1d36;
  --ink-hover: #22365c;       /* solid button on hover */
  --on-dark: #eef1f6;
  --on-dark-soft: #b8c3d4;
  --on-dark-faint: #97a4b9;
  --gold: #b08d4f;            /* rings and hairlines */
  --gold-text: #7d6129;       /* gold for text on ivory, 5:1 */
  --gold-on-dark: #d8bc84;
  --lamp: #d9b26a;
  --error: #a3271c;
  --error-soft: #fbeeec;
  --paper-deep: #e4ddd1;      /* image and tile placeholder ground */
  --note: #e9e2d5;            /* success note ground */
  --glow: rgba(176, 141, 79, 0.08);
  --shadow: rgba(20, 34, 59, 0.22);

  /* Role colours: ivory by default, redefined on the few navy surfaces */
  --fg: var(--ink);
  --fg-soft: var(--ink-soft);
  --fg-faint: var(--ink-faint);
  --lab: var(--gold-text);
  --rule: var(--hair);
  --focus: var(--navy);

  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;

  /* Spacing scale (px): 4 8 12 16 24 32 48 64 96 128 */
  --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: 128px;
  --section: clamp(var(--s-8), 12vw, 144px);

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --gutter: 20px;
  --max: 1180px;
  --measure: 760px;
  --radius: 6px;
}
@media (min-width: 760px) { :root { --gutter: 40px; } }

/* The navy surfaces */
.site-footer, .form-status.ok {
  --fg: var(--on-dark);
  --fg-soft: var(--on-dark-soft);
  --fg-faint: var(--on-dark-faint);
  --lab: var(--gold-on-dark);
  --rule: rgba(238, 241, 246, 0.16);
  --focus: var(--lamp);
  color: var(--fg);
}

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

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

::selection { background: #e6d8bc; color: var(--ink); }

/* A faint paper grain over the ivory */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

main { flex: 1; }
a { color: inherit; text-underline-offset: 4px; text-decoration-thickness: 1px; }
a, button { touch-action: manipulation; }
.btn, .tab, .nav a, .brand { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.text-link:active, .nav a:active, .tab:active { opacity: 0.6; }
p { margin: 0; text-wrap: pretty; }
h1, h2, h3 { margin: 0; font-weight: 400; text-wrap: balance; }

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

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--navy);
  color: var(--on-dark);
  padding: 10px 14px;
  z-index: 20;
}
.skip:focus { left: 8px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}

/* Small caps section labels */
.label {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--lab);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(245, 241, 234, 0.9);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hair);
  padding-top: env(safe-area-inset-top);
}
@media (prefers-reduced-transparency: reduce) {
  .site-header { background: var(--ground); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: var(--s-4);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  min-height: 44px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
/* The mark is a jack: a fine brass ring */
.mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  box-shadow: inset 0 0 0 3px var(--ground), inset 0 0 0 4px rgba(176, 141, 79, 0.45);
  color: var(--gold-text);
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.04em;
  line-height: 1;
}
.nav { display: flex; gap: var(--s-1); }
.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--s-3);
  text-decoration: none;
  font-size: 15px;
  color: var(--fg-soft);
}
.nav a[aria-current="page"] { color: var(--fg); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 8px; text-decoration-thickness: 1px; }
@media (max-width: 380px) { .brand-name { display: none; } }

/* Display type: a fine serif, set large and tight */
.name, .contact-head h1, .project-title, .close-title, .card h3, .wait-title, .wrong h1 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.025em;
}

/* Hero: who he is on the left, the jack board on the right */
.hero { position: relative; }
.hero-grid {
  display: grid;
  gap: var(--s-8);
  align-items: center;
  padding-top: clamp(var(--s-8), 10vw, 136px);
  padding-bottom: clamp(var(--s-8), 11vw, 152px);
}
@media (min-width: 960px) { .hero-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: var(--s-9); } }
.lamp {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  margin-bottom: var(--s-6);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--fg-soft);
}
.lamp-bulb {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px var(--ground), 0 0 0 5px rgba(176, 141, 79, 0.5);
}
.name {
  font-size: clamp(60px, 10vw, 136px);
  line-height: 0.9;
}
.name .word { display: inline-block; white-space: nowrap; }
.name .char { display: inline-block; }
.rotator {
  margin-top: var(--s-6);
  font-family: var(--serif);
  font-size: clamp(26px, 4.2vw, 40px);
  line-height: 1.2;
  letter-spacing: -0.005em;
  color: var(--fg-soft);
}
.rotate {
  display: flex;
  width: fit-content;
  overflow: hidden;
  padding-bottom: 0.08em;
  white-space: nowrap;
  font-style: italic;
  color: var(--gold-text);
}
.rotate-word { display: inline-flex; white-space: pre; }
.rotate-word .char { display: inline-block; }
.lead {
  margin-top: var(--s-5);
  max-width: 36ch;
  color: var(--fg-soft);
  font-size: clamp(17px, 4.2vw, 19px);
  line-height: 1.65;
}
/* Personal intro with the illustrated avatar, framed in a fine gold ring like the jacks */
.intro { display: flex; align-items: center; gap: var(--s-4); max-width: 46ch; }
.intro p { margin: 0; }
.avatar {
  flex: none;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--gold), 0 0 0 5px var(--ground), 0 0 0 6px rgba(176, 141, 79, 0.45), 0 18px 30px -18px var(--shadow);
}
@media (min-width: 760px) { .avatar { width: 96px; height: 96px; } }
.actions { margin-top: var(--s-7); display: flex; flex-wrap: wrap; gap: var(--s-3); }
@media (max-width: 559px) { .actions .btn { flex: 1 1 100%; } }

/* Buttons: one quiet navy button, one outline */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-3);
  min-height: 54px;
  padding: 0 var(--s-6);
  border: 1px solid var(--navy);
  border-radius: 3px;
  background: var(--navy);
  color: var(--on-dark);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 12px 24px -16px var(--shadow);
  transition: transform 160ms var(--ease-out), background-color 200ms ease, border-color 200ms ease, color 200ms ease, box-shadow 200ms ease;
}
.btn:active { transform: translateY(1px); box-shadow: none; }
.btn .arrow { flex: none; transition: transform 240ms var(--ease-out); }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.arrow.down { transform: rotate(90deg); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--hair-strong); box-shadow: none; }
@media (hover: hover) and (pointer: fine) {
  .nav a:hover { color: var(--fg); }
  .btn:hover { background: var(--ink-hover); border-color: var(--ink-hover); }
  .btn:hover .arrow { transform: translateX(4px); }
  .btn-outline:hover { background: transparent; border-color: var(--navy); color: var(--ink); }
}

/* Sections: hairline rules, generous space */
.block { border-top: 1px solid var(--rule); }
.block.close { border-top: 0; }
.block > .wrap { padding-top: var(--section); padding-bottom: var(--section); }
.split { display: grid; gap: var(--s-6); }
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 2fr; gap: var(--s-8); align-items: start; }
  .split > .label { padding-top: var(--s-3); }
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 44px;
  font-weight: 500;
  color: var(--lab);
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-underline-offset: 6px;
  transition: color 150ms ease;
}
.text-link .arrow { transition: transform 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .text-link:hover { color: var(--fg); }
  .text-link:hover .arrow:not(.down) { transform: translateX(3px); }
}

/* What I do: the jack board, kept as a quiet signature. Each service is a brass jack;
   choosing one draws a thin navy cord to it and shows its panel. */
.board {
  background: var(--surface);
  border-radius: var(--radius);
  padding: clamp(var(--s-5), 3.4vw, var(--s-7));
  box-shadow: 0 0 0 1px var(--hair), 0 40px 70px -50px var(--shadow);
}
.board-title { margin-bottom: var(--s-6); }
.tabs { position: relative; }
.cords { display: none; }
.tablist, .plugbase { display: none; }
.panels { display: grid; gap: var(--s-7); }
.panel h3 {
  font-family: var(--serif);
  font-size: clamp(30px, 4.2vw, 42px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  max-width: 18ch;
}
.panel p { margin-top: var(--s-4); color: var(--fg-soft); font-size: 18px; max-width: 42ch; }
.panel .text-link { margin-top: var(--s-3); }

.tabs-ready .cords {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 2;
}
.cords path { fill: none; stroke: var(--navy); stroke-width: 2; stroke-linecap: round; }
.cords circle { fill: var(--gold); stroke: var(--surface); stroke-width: 2; }
.tabs-ready .tablist {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(var(--s-2), 2vw, var(--s-4));
  position: relative;
  z-index: 1;
}
.tabs-ready .plugbase { display: flex; justify-content: center; margin: 40px 0 var(--s-6); }
.plugbase span { width: 34px; height: 8px; border-radius: 8px; border: 1px solid var(--gold); background: var(--navy-deep); }
.tab {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: var(--s-3);
  min-height: 44px;
}
.hole {
  width: clamp(30px, 4vw, 38px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, var(--navy-deep) 0 26%, var(--surface) 28% 60%, var(--gold) 62% 100%);
  transition: box-shadow 260ms var(--ease-out), transform 260ms var(--ease-out);
}
.strip {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.4;
  text-align: center;
  white-space: nowrap;
  color: var(--ink-faint);
  padding-bottom: 6px;
  border-bottom: 1px solid transparent;
  transition: color 200ms ease, border-color 200ms ease;
  overflow-wrap: anywhere;
}
.tab[aria-selected="true"] .strip { color: var(--ink); border-bottom-color: var(--gold); }
.tab[aria-selected="true"] .hole { box-shadow: 0 0 0 4px var(--surface), 0 0 0 5px var(--navy); }
@media (max-width: 420px) { .strip { white-space: normal; letter-spacing: 0.1em; } }
@media (hover: hover) and (pointer: fine) { .tab:hover .strip { color: var(--ink); } .tab:hover .hole { transform: scale(1.06); } }
.tabs-ready .panels { padding-top: var(--s-6); border-top: 1px solid var(--hair); }
.tabs-ready .panel {
  grid-area: 1 / 1;
  transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out), filter 200ms var(--ease-out), visibility 0s linear 200ms;
}
.tabs-ready .panel[aria-hidden="true"] {
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  filter: blur(2px);
  pointer-events: none;
}
.tabs-ready .panel[aria-hidden="false"] { transition-delay: 0s; }

/* Background */
.background { display: grid; gap: var(--s-4); max-width: 60ch; }
.background p { color: var(--fg-soft); }
.background p:first-child {
  color: var(--fg);
  font-family: var(--serif);
  font-size: clamp(24px, 4.8vw, 32px);
  line-height: 1.3;
  letter-spacing: -0.005em;
  margin-bottom: var(--s-3);
}

/* Projects */
.projects-head { display: grid; gap: var(--s-4); max-width: var(--measure); }
.section-lede {
  font-family: var(--serif);
  font-size: clamp(30px, 5.6vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.cards { margin-top: var(--s-7); display: grid; gap: var(--s-4); }
@media (min-width: 820px) { .cards { grid-template-columns: 1fr 1fr; gap: var(--s-5); } }
/* A project card: ivory on ivory, a hairline and its own brass jack */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  padding: clamp(var(--s-6), 4vw, var(--s-7));
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 0 0 1px var(--hair);
  overflow: hidden;
  min-width: 0;
  transition: box-shadow 260ms ease, transform 200ms var(--ease-out);
}
.card:not(.industry)::before {
  content: "";
  position: absolute;
  top: clamp(var(--s-6), 4vw, var(--s-7));
  right: clamp(var(--s-6), 4vw, var(--s-7));
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--navy-deep) 0 26%, var(--surface) 28% 60%, var(--gold) 62% 100%);
}
.role {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-text);
}
.card h3 { font-size: clamp(36px, 5vw, 48px); line-height: 1; overflow-wrap: anywhere; }
.card .desc { color: var(--fg-soft); flex: 1; max-width: 46ch; overflow-wrap: anywhere; }
.card .text-link { align-self: flex-start; margin-top: var(--s-2); }

/* Soft pointer glow, fine pointers only */
@media (hover: hover) and (pointer: fine) {
  .card::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 200ms ease;
    background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), var(--glow), transparent 70%);
  }
  .card:hover { box-shadow: 0 0 0 1px var(--gold), 0 34px 60px -44px var(--shadow); }
  .card:hover::after { opacity: 1; }
}

/* Close: a deeper stone band to end on */
.close { background: var(--stone); }
.close-title {
  margin-top: var(--s-4);
  font-size: clamp(48px, 8.4vw, 104px);
  line-height: 0.95;
  max-width: 14ch;
}
.close p:not(.label) { margin: var(--s-5) 0 var(--s-7); color: var(--fg-soft); font-size: 18px; max-width: 40ch; }

/* Footer */
.site-footer {
  padding: var(--s-5) 0 calc(var(--s-5) + env(safe-area-inset-bottom));
  font-size: 14px;
  background: var(--navy-deep);
  color: var(--fg-faint);
  border-top: 1px solid var(--navy-deep);
}
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s-3); }
.site-footer a { min-height: 44px; display: inline-flex; align-items: center; color: var(--fg-soft); }

/* Contact */
.contact-band { border-bottom: 1px solid var(--hair); }
.contact-head { padding: clamp(var(--s-8), 9vw, var(--s-9)) 0 clamp(var(--s-8), 9vw, var(--s-9)); max-width: var(--measure); }
.contact-head h1 {
  font-size: clamp(60px, 11.5vw, 120px);
  line-height: 0.92;
}
.contact-head p { margin-top: var(--s-5); font-size: clamp(17px, 4.2vw, 19px); color: var(--fg-soft); max-width: 44ch; }
.contact-head .email { display: inline-block; color: var(--gold-text); font-weight: 500; text-underline-offset: 6px; }

.form-card {
  max-width: var(--measure);
  margin: var(--s-8) 0 var(--section);
  padding: var(--s-2) clamp(var(--s-5), 4vw, var(--s-7)) clamp(var(--s-5), 4vw, var(--s-7));
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
}
.fields { display: grid; grid-template-columns: 1fr; column-gap: var(--s-6); }
@media (min-width: 760px) { .fields { grid-template-columns: 1fr 1fr; } .fields .full { grid-column: 1 / -1; } }

.cell {
  position: relative;
  scroll-margin-top: 96px;
  display: grid;
  min-width: 0;
  padding-top: var(--s-5);
}
.cell label { font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-soft); }
.cell label .opt { font-weight: 400; letter-spacing: 0.04em; text-transform: none; color: var(--ink-faint); }
.cell input, .cell select, .cell textarea {
  scroll-margin-top: 130px;
  width: 100%;
  min-width: 0;
  border: 0;
  border-bottom: 1px solid var(--hair-strong);
  background: transparent;
  color: var(--ink);
  font: 400 17px/1.5 var(--sans); /* 16px+ stops iOS zoom on focus */
  padding: var(--s-3) 0;
  min-height: 52px;
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
}
.cell input:focus, .cell select:focus, .cell textarea:focus { outline: none; border-bottom-color: var(--navy); box-shadow: 0 1px 0 var(--navy); }
.cell select {
  cursor: pointer;
  text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%230c1c35' stroke-width='1.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 2px center;
  padding-right: var(--s-6);
}
.cell textarea { min-height: 160px; resize: vertical; overflow-wrap: anywhere; }
.cell [aria-invalid="true"] { border-bottom-color: var(--error); box-shadow: 0 1px 0 var(--error); }
.error { color: var(--error); font-size: 14px; padding-top: var(--s-2); }
.error:empty { display: none; }
.hp { position: absolute; left: -9999px; }

.form-foot { display: grid; gap: var(--s-4); padding-top: var(--s-6); }
@media (min-width: 760px) { .form-foot { grid-template-columns: auto 1fr; align-items: center; gap: var(--s-6); } }
.form-foot .btn { width: 100%; }
@media (min-width: 760px) { .form-foot .btn { width: auto; min-width: 220px; } }
.privacy { font-size: 14px; color: var(--ink-faint); max-width: 60ch; }

.form-status { margin-top: var(--s-5); padding: var(--s-4) var(--s-5); font-size: 16px; border-radius: 8px; overflow-wrap: anywhere; }
.form-status:empty { display: none; }
.form-status a { display: inline-block; }
.form-status.ok { display: flex; align-items: flex-start; gap: var(--s-3); color: var(--on-dark); background: var(--navy); }
.form-status.ok strong { font-weight: 700; }
/* The lamp lights when the message is put through */
.status-lamp {
  flex: none;
  width: 14px;
  height: 14px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--lamp);
  box-shadow: 0 0 0 3px var(--navy), 0 0 0 4px rgba(216, 188, 132, 0.6);
}
@media (prefers-reduced-motion: no-preference) {
  .status-lamp { animation: lamp-on 520ms var(--ease-out) both; }
  .form-status.ok { animation: rise 420ms var(--ease-out) both; transform: translateY(6px); opacity: 0; }
}
@keyframes lamp-on { from { background: #4a4330; transform: scale(0.7); } 60% { transform: scale(1.12); } to { background: var(--lamp); transform: none; } }

/* Wrong number: the 404 page */
.wrong { background: transparent; }
.wrong .wrap { display: grid; gap: var(--s-8); align-items: center; padding-top: clamp(var(--s-8), 9vw, var(--s-9)); padding-bottom: clamp(var(--s-8), 9vw, var(--s-10)); }
@media (min-width: 900px) { .wrong .wrap { grid-template-columns: 1fr 1fr; } }
.wrong h1 { font-size: clamp(60px, 11.5vw, 136px); line-height: 0.9; }
.wrong p { margin-top: var(--s-5); color: var(--fg-soft); font-size: clamp(17px, 4.2vw, 19px); max-width: 36ch; }
.wrong .board { position: relative; }
.loose-cord { display: block; width: 100%; height: auto; margin-bottom: var(--s-4); }
.loose-cord path { fill: none; stroke: var(--navy); stroke-width: 2; stroke-linecap: round; }
.loose-cord .plug-tip { fill: var(--gold); stroke: var(--surface); stroke-width: 2; }
.jack-links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(var(--s-2), 2vw, var(--s-4)); }
.jack-links a { display: flex; flex-direction: column-reverse; align-items: center; gap: var(--s-3); min-height: 44px; text-decoration: none; }
.jack-links .strip { color: var(--ink); }
@media (hover: hover) and (pointer: fine) {
  .jack-links a:hover .hole { transform: scale(1.06); box-shadow: 0 0 0 4px var(--surface), 0 0 0 5px var(--navy); }
}
@media (prefers-reduced-motion: no-preference) {
  .loose-cord path, .loose-cord .plug-tip { animation: sway 3.6s ease-in-out 2 alternate; transform-origin: 70% 0; transform-box: view-box; }
}
@keyframes sway { from { transform: rotate(-2.5deg); } to { transform: rotate(2.5deg); } }
.form-status.fail { color: var(--error); background: var(--error-soft); }

/* Motion: finished before the visitor starts reading (about 1.1s).
   Reduced motion shows the final state with no animation. */
@media (prefers-reduced-motion: no-preference) {
  .js .name .char {
    opacity: 0;
    transform: translateY(0.25em);
    filter: blur(4px);
    animation: rise 700ms var(--ease-out) forwards;
    animation-delay: calc(var(--i) * 24ms + 60ms);
  }
  .js .hero .lamp, .js .hero .rotator, .js .hero .lead, .js .hero .actions, .js .hero .board {
    opacity: 0;
    transform: translateY(10px);
    animation: rise 600ms var(--ease-out) forwards;
  }
  .js .hero .lamp { animation-delay: 0ms; }
  .js .hero .rotator { animation-delay: 380ms; }
  .js .hero .lead { animation-delay: 460ms; }
  .js .hero .actions { animation-delay: 540ms; }
  .js .hero .board { animation-delay: 620ms; }

  .js .reveal > .wrap {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
  }
  .js .reveal.in > .wrap { opacity: 1; transform: none; }

  .rotate-word .char {
    transition: transform 420ms var(--ease-out), opacity 420ms var(--ease-out), filter 420ms var(--ease-out);
    transition-delay: calc(var(--i) * 18ms);
  }
  .rotate-word.out .char { transform: translateY(-100%); opacity: 0; filter: blur(2px); }
  .rotate-word.in .char { transform: translateY(100%); opacity: 0; filter: blur(2px); transition: none; }
}
@keyframes rise { to { opacity: 1; transform: none; filter: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0ms !important; animation: none !important; }
}

@media print {
  .js .reveal > .wrap, .js .name .char, .js .hero .lamp, .js .hero .rotator, .js .hero .lead, .js .hero .actions, .js .hero .board { opacity: 1 !important; transform: none !important; filter: none !important; }
}

/* Home cards: the whole card opens the project page */
.card-link { text-decoration: none; }
.card-link::before { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: var(--radius); }
.card-link:focus-visible { outline: none; }
.card:has(.card-link:focus-visible) { outline: 2px solid var(--navy); outline-offset: 3px; }
.card .text-link { pointer-events: none; }
@media (hover: hover) and (pointer: fine) {
  .card:hover .text-link { color: var(--fg); }
  .card:hover .text-link .arrow { transform: translateX(3px); }
}
.card:active { transform: scale(0.99); }

/* Project pages */
.project-hero { border-bottom: 1px solid var(--hair); }
.project-hero .wrap { padding-top: var(--s-6); padding-bottom: clamp(var(--s-8), 10vw, var(--s-10)); }
.back {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: var(--s-2);
  min-height: 44px;
  margin-bottom: clamp(var(--s-6), 6vw, var(--s-8));
  font-size: 15px;
  color: var(--fg-soft);
  text-decoration: none;
}
.back-arrow { transform: rotate(180deg); }
@media (hover: hover) and (pointer: fine) { .back:hover { color: var(--fg); } }
/* The role sits above the title as a quiet label */
.project-title {
  margin-top: var(--s-4);
  font-size: clamp(60px, 11.5vw, 136px);
  line-height: 0.9;
  overflow-wrap: anywhere;
}
.project-lede {
  margin-top: var(--s-5);
  max-width: 34ch;
  font-family: var(--serif);
  font-size: clamp(24px, 4.6vw, 32px);
  line-height: 1.3;
  color: var(--fg-soft);
}
.cta-row { margin-top: var(--s-7); display: flex; flex-wrap: wrap; gap: var(--s-3); }
@media (max-width: 559px) { .cta-row .btn { flex: 1 1 100%; } }
.arrow.ext { transform: rotate(-45deg); }
@media (hover: hover) and (pointer: fine) { .btn:hover .arrow.ext { transform: rotate(-45deg) translateX(3px); } }
.close .cta-row { margin-top: 0; }

.section-body { display: grid; gap: var(--s-6); min-width: 0; }
.section-text { color: var(--fg-soft); font-size: 18px; max-width: 52ch; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; counter-reset: none; }
.step { padding: var(--s-5) 0; border-top: 1px solid var(--rule); display: grid; gap: var(--s-2); }
.step:last-child { border-bottom: 1px solid var(--rule); }
.step-n { font-size: 12px; font-weight: 600; letter-spacing: 0.16em; color: var(--lab); }
.step h3 { font-family: var(--serif); font-size: clamp(26px, 4.6vw, 32px); line-height: 1.15; }
.step p { color: var(--fg-soft); max-width: 48ch; }

.facts { list-style: none; margin: 0; padding: 0; }
.facts li { padding: var(--s-4) 0; border-top: 1px solid var(--rule); font-size: 18px; }
.facts li:last-child { border-bottom: 1px solid var(--rule); }

.listings { display: grid; gap: var(--s-4); }
.listing {
  padding: clamp(var(--s-5), 4vw, var(--s-6));
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  display: grid;
  gap: var(--s-3);
}
.listing h3 { font-family: var(--serif); font-size: clamp(30px, 5.6vw, 38px); line-height: 1.05; }
.listing .desc { color: var(--fg-soft); }
.listing .text-link { justify-self: start; }

/* Images */
.wide-img { margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--paper-deep); }
.wide-img img { display: block; width: 100%; height: auto; }
.wide-img img.tall { max-height: 560px; object-fit: cover; }
.hero-img img { aspect-ratio: 16 / 10; object-fit: cover; }

/* Key facts as a two column list */
.specs { margin: 0; display: grid; grid-template-columns: 1fr; }
@media (min-width: 640px) { .specs { grid-template-columns: 1fr 1fr; column-gap: var(--s-6); } }
.specs > div { padding: var(--s-4) 0; border-top: 1px solid var(--rule); display: grid; gap: var(--s-1); }
.specs dt { font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-faint); }
.specs dd { margin: 0; font-family: var(--serif); font-size: 24px; line-height: 1.25; }

/* Product range */
.products { display: grid; gap: var(--s-4); }
@media (min-width: 640px) { .products { grid-template-columns: repeat(3, 1fr); } }
.product {
  padding: var(--s-5);
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  display: grid;
  gap: var(--s-2);
  align-content: start;
}
.product-img { height: 180px; display: flex; align-items: center; justify-content: center; overflow: hidden; margin-bottom: var(--s-2); }
.product-img img { height: 100%; width: auto; max-width: 100%; object-fit: contain; }
.product h3 { font-family: var(--serif); font-size: 28px; line-height: 1.1; }
.product-cap { font-weight: 600; color: var(--lab); }
.product .desc { color: var(--fg-soft); font-size: 16px; }

/* Gallery */
.gallery { columns: 2 220px; column-gap: var(--s-3); }
.gallery figure { margin: 0 0 var(--s-3); break-inside: avoid; border-radius: 8px; overflow: hidden; background: var(--paper-deep); }
.gallery img { display: block; width: 100%; height: auto; }

/* Listing with image */
.listing { position: relative; overflow: hidden; padding: 0; transition: border-color 200ms ease, transform 160ms var(--ease-out); }
.listing-img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.listing-body { padding: clamp(var(--s-5), 4vw, var(--s-6)); display: grid; gap: var(--s-3); }
.listing .text-link { pointer-events: none; justify-self: start; }
.listing:has(.card-link:focus-visible) { outline: 2px solid var(--navy); outline-offset: 3px; }
.listing:active { transform: scale(0.99); }
@media (min-width: 820px) { .listing { display: grid; grid-template-columns: 1.2fr 1fr; } .listing-img { height: 100%; } }
@media (hover: hover) and (pointer: fine) {
  .listing:hover { border-color: var(--hair-strong); }
  .listing:hover .text-link { color: var(--fg); }
}

/* Short tag list */
.sub-title { font-family: var(--serif); font-weight: 400; font-size: 28px; line-height: 1.15; margin-top: var(--s-4); }
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-2); }
.tags li { padding: var(--s-2) var(--s-4); border: 1px solid var(--hair-strong); border-radius: 999px; font-size: 15px; color: var(--fg-soft); }

/* Industry cards: small plates, same pointer glow as the home cards */
.industries { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
@media (min-width: 640px) { .industries { grid-template-columns: repeat(3, 1fr); } }
.card.industry { padding: var(--s-4) var(--s-5); font-family: var(--serif); font-size: 22px; line-height: 1.2; overflow-wrap: anywhere; }
.card.industry:active { transform: none; }

/* Capsule: the app drawn in its own look, inside phone frames.
   The app is not the switchboard, so its screens use the platform's own type and a white UI. */
.hero-split { display: grid; gap: var(--s-8); align-items: center; }
@media (min-width: 960px) { .hero-split { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); } }
.hero-phone { margin: 0; display: flex; justify-content: center; }

.phone {
  /* Capsule's own palette and type, from capsulekip.com */
  --app-bg: #faf6f1;
  --app-ink: #1f1a17;
  --app-soft: #6d625a;
  --app-line: #e8dfd5;
  --app-fill: #efe7de;
  --wax: #b82a55;
  --wax-soft: #fbe3ec;
  flex: none;
  width: 290px;
  height: 610px;
  padding: 11px;
  border-radius: 48px;
  background: #1a1c22;
  box-shadow: 0 0 0 1.5px #3a3e48, 0 40px 60px -34px var(--shadow);
}
.screen {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: 38px;
  background: var(--app-bg);
  color: var(--app-ink);
  font-family: "Figtree", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.35;
  padding: 0 18px 18px;
  display: flex;
  flex-direction: column;
  text-align: left;
}
.statusbar { display: flex; justify-content: space-between; align-items: center; height: 46px; font-size: 14px; font-weight: 600; padding: 0 8px; }
.island { width: 88px; height: 26px; border-radius: 20px; background: #000; }
.sb-icons { width: 40px; height: 11px; border-radius: 3px; background: linear-gradient(90deg, var(--app-ink) 0 60%, transparent 60% 70%, var(--app-ink) 70%); opacity: 0.85; }
.app-nav { display: flex; justify-content: space-between; align-items: center; height: 34px; font-size: 15px; }
.app-back { color: var(--wax); }
.app-back::before { content: "‹ "; font-size: 20px; line-height: 0; }
.app-cancel { color: var(--wax); }
.app-nav-title { font-weight: 600; }
.app-title { margin-top: 12px; font-family: "Newsreader", Georgia, serif; font-size: 27px; font-weight: 500; letter-spacing: -0.015em; line-height: 1.1; }
.app-sub { margin-top: 4px; color: var(--app-soft); }
.app-section { margin-top: 18px; margin-bottom: 8px; font-size: 12px; font-weight: 600; color: var(--app-soft); }
.app-spacer { flex: 1; }
.app-foot { margin-top: 12px; text-align: center; font-size: 12px; color: var(--app-soft); }

.count-label { margin-top: 20px; text-align: center; font-size: 12px; color: var(--app-soft); }
.countdown { margin-top: 6px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; text-align: center; }
.countdown span { display: grid; padding: 8px 0 6px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px var(--app-line); font-size: 10px; color: var(--app-soft); }
.countdown b { font-family: "Newsreader", Georgia, serif; font-size: 24px; font-weight: 500; color: var(--app-ink); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; line-height: 1.1; }
.hidden-tiles, .own-tiles, .open-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.hidden-tiles { margin-top: 14px; }
.hidden-tiles span, .own-tiles span, .open-grid span {
  aspect-ratio: 1;
  border-radius: 8px;
  background-color: var(--paper-deep);
  background-size: cover;
  background-position: center;
}
.hidden-tiles span { filter: blur(9px) saturate(0.8); transform: scale(0.94); }
.own-tiles { grid-template-columns: repeat(4, 1fr); }
.own-tiles .voice { display: grid; place-items: center; align-content: center; gap: 2px; background: var(--app-fill); color: var(--wax); font-size: 11px; font-weight: 600; }
.others { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 12px; background: var(--app-fill); color: var(--app-soft); }
.seal-mini { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--wax); color: #fff; }
.add-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.add-bar span { padding: 10px 0; border-radius: 12px; background: var(--app-fill); text-align: center; font-size: 12px; font-weight: 600; }
.add-bar span:first-child { background: var(--wax); color: #fff; }

.app-field { display: grid; gap: 4px; padding: 12px 0; border-bottom: 1px solid var(--app-line); }
.app-field:first-of-type { margin-top: 14px; }
.f-label { font-size: 12px; color: var(--app-soft); }
.f-value { font-size: 16px; font-weight: 500; }
.avatars { display: flex; }
.avatars i { display: grid; place-items: center; width: 34px; height: 34px; margin-right: -8px; border-radius: 50%; border: 2px solid var(--app-bg); background: var(--c); font-style: normal; font-size: 11px; font-weight: 700; color: #3a2e2e; }
.avatars .more { background: var(--app-fill); color: var(--app-soft); }
.app-invite { margin-top: 16px; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; border-radius: 14px; border: 1.5px dashed #e3b5c4; color: var(--wax); font-weight: 600; }
.app-btn { padding: 15px; border-radius: 16px; background: var(--wax); color: #fff; text-align: center; font-size: 15px; font-weight: 600; }

.opened { align-self: flex-start; margin-top: 6px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 99px; background: var(--wax-soft); color: var(--wax); font-size: 12px; font-weight: 600; }
.open-grid { margin-top: 16px; }
.open-grid .big { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.note-card { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: #fff; box-shadow: 0 0 0 1px var(--app-line); font-family: "Newsreader", Georgia, serif; font-style: normal; font-size: 16px; line-height: 1.3; }

/* Walkthrough: three screens, each with its step */
.showcase-head { display: grid; gap: var(--s-4); max-width: var(--measure); }
.walkthrough { list-style: none; margin: var(--s-8) 0 0; padding: 0; display: grid; gap: var(--s-8); }
@media (min-width: 960px) { .walkthrough { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-6); } }
.walk { display: grid; gap: var(--s-5); justify-items: center; align-content: start; }
.walk-text { display: grid; gap: var(--s-2); width: 100%; max-width: 320px; padding-top: var(--s-4); border-top: 1px solid var(--rule); }
.walk-text h3 { font-family: var(--serif); font-size: clamp(26px, 4.6vw, 32px); line-height: 1.15; }
.walk-text p { color: var(--fg-soft); }
.showcase-note { margin-top: var(--s-7); font-size: 14px; color: var(--fg-faint); }

/* Moments */
.moments { list-style: none; margin: var(--s-7) 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
@media (min-width: 900px) { .moments { grid-template-columns: repeat(4, 1fr); gap: var(--s-4); } }
.moments figure { margin: 0; display: grid; gap: var(--s-3); }
.moments img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); background: var(--paper-deep); }
.moments figcaption { font-family: var(--serif); font-size: 22px; line-height: 1.2; }

@media (max-width: 360px) { .phone { width: 262px; height: 560px; } }
/* Narrow screens: the three screens become a swipeable row */
@media (max-width: 959px) {
  .walkthrough {
    grid-auto-flow: column;
    grid-auto-columns: min(300px, 82vw);
    gap: var(--s-5);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    margin-inline: calc(-1 * var(--gutter));
    padding: 0 var(--gutter) var(--s-4);
    scrollbar-width: thin;
    scrollbar-color: var(--hair-strong) transparent;
  }
  .walk { scroll-snap-align: start; justify-items: start; }
}

/* Capsule screens: cover, chips, tab bar */
.cover { position: relative; margin: 4px -6px 0; height: 150px; border-radius: 20px; background-size: cover; background-position: center; background-color: var(--paper-deep); }
.chip { position: absolute; left: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 99px; background: rgba(31, 26, 23, 0.78); color: #fff; font-size: 12px; font-weight: 600; }
.chip.live { background: var(--wax); }
.app-hint { margin-top: 10px; font-size: 12px; color: var(--app-soft); text-align: center; }
.app-spacer { min-height: 8px; }
.tabbar { margin: 12px -18px -18px; padding: 10px 8px 16px; display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--app-line); background: #fff; font-size: 10px; font-weight: 600; color: var(--app-soft); text-align: center; }
.tabbar span::before { content: ""; display: block; width: 18px; height: 18px; margin: 0 auto 4px; border-radius: 6px; border: 1.8px solid currentColor; }
.tabbar .on { color: var(--wax); }
.tabbar .new::before { border-radius: 50%; background: var(--wax); border-color: var(--wax); }

/* Moments: five, each with the opening day the app suggests */
@media (min-width: 900px) { .moments { grid-template-columns: repeat(5, 1fr); } }
.moments figcaption { display: grid; gap: 2px; }
.m-name { font-family: var(--serif); font-size: 22px; line-height: 1.2; }
.m-when { font-size: 15px; color: var(--fg-soft); }
.moments li:last-child { grid-column: span 2; }
@media (min-width: 900px) { .moments li:last-child { grid-column: auto; } }
.moments li:last-child img { aspect-ratio: 8 / 5; }
@media (min-width: 900px) { .moments li:last-child img { aspect-ratio: 4 / 5; } }

/* The wait */
.wait .wrap { display: grid; gap: var(--s-4); justify-items: start; }
.wait-title { font-size: clamp(48px, 8.4vw, 104px); line-height: 0.95; max-width: 14ch; }

/* FAQ */
.faq { margin: 0; }
.faq > div { padding: var(--s-5) 0; border-top: 1px solid var(--rule); display: grid; gap: var(--s-2); }
.faq > div:last-child { border-bottom: 1px solid var(--rule); }
.faq dt { font-family: var(--serif); font-size: clamp(24px, 4.6vw, 28px); line-height: 1.2; }
.faq dd { margin: 0; color: var(--fg-soft); max-width: 52ch; }
.screen > .tabbar { margin-top: auto; }
