:root {
  --bg: #f1efe9;
  --ink: #111110;
  --muted: #6d6a63;
  --line: rgba(17, 17, 16, 0.18);
  --accent: #ff4d1a;
  --gutter: clamp(16px, 4vw, 56px);
  --header-h: 71px;
  --ease: cubic-bezier(.19, 1, .22, 1);
  --ease-io: cubic-bezier(.7, 0, .2, 1);
  --grid: rgba(17, 17, 16, 0.06);
  --sans: "Space Grotesk", system-ui, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
}

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

html, body { margin: 0; }

html { scroll-behavior: smooth; }

/* Paper grain lives in the page background (no full-screen blended layer, so scrolling stays smooth) */
body {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .035 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E") var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; }

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

/* ---------- Header / nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  /* Corner layout: logo left, links centered, contact on the right */
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  height: var(--header-h);
  padding: 0 var(--gutter);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.logo { display: block; flex-shrink: 0; text-decoration: none; justify-self: start; }

/* Wordmark: light tracked caps; the O is the hero's orbit ring, its orange point slowly circling */
.wordmark {
  display: inline-flex;
  align-items: center;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.4em;
  margin-right: -0.4em; /* cancel the tracking after the last letter */
  line-height: 1;
  white-space: nowrap;
}

/* Full name lockup: "Creative House" sits beside the wordmark on wide screens */
.logo { display: inline-flex; align-items: center; }

.descriptor {
  display: none;
  margin-left: 20px;
  padding-left: 20px;
  border-left: 1px solid var(--line);
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  line-height: 1;
  color: var(--muted);
  white-space: nowrap;
}

@media (min-width: 1200px) {
  .descriptor { display: inline-block; }
}

.orbit {
  width: 0.78em;
  height: 0.78em;
  margin-right: 0.4em;
  overflow: visible;
}

.orbit .ring { fill: none; stroke: currentColor; stroke-width: 1; vector-effect: non-scaling-stroke; }
.orbit .sat { fill: var(--accent); transform-box: view-box; transform-origin: 0 0; animation: orbit 14s linear infinite; } /* (0,0) is the ring's center */
.logo:hover .sat { animation-duration: 2.4s; }

@keyframes orbit { to { transform: rotate(360deg); } }

@media (max-width: 720px) {
  :root { --header-h: 60px; }
  .wordmark { font-size: 13px; }
}

.nav {
  display: flex;
  gap: clamp(14px, 3vw, 36px);
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 13px;
}

.nav a {
  position: relative;
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease-io);
}

.nav a:hover::after,
.nav a[aria-current="page"]::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Home lives on the logo and Contact sits on the right, so desktop nav skips both */
@media (min-width: 961px) {
  .nav .nav-home,
  .nav .nav-contact { display: none; }
}

.header-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.header-cta::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  transition: transform 0.5s var(--ease);
}

.header-cta:hover::before,
.header-cta[aria-current="page"]::before { transform: scale(1.5); }

@media (max-width: 960px) {
  .site-header { grid-template-columns: auto 1fr; }
  .header-actions { grid-column: 2; }
  .header-cta { display: none; }
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 6px 14px;
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  cursor: pointer;
}

@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    display: none;
    max-height: calc(100svh - var(--header-h));
    overflow-y: auto;
  }
  .nav.open { display: flex; }
  .nav a {
    display: block;
    padding: 16px var(--gutter);
    font-size: 15px;
    border-top: 1px solid var(--line);
  }
  .nav a::after { display: none; }
}

/* ---------- Layout ---------- */

main { flex: 1; }

.page {
  padding: clamp(48px, 10vw, 120px) var(--gutter) 80px;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 20px;
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  margin-right: 10px;
  vertical-align: 1px;
}

.page-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(56px, 11vw, 168px);
  line-height: 0.9;
  letter-spacing: -0.02em;
  margin: 0 0 clamp(40px, 6vw, 80px);
}

.page-title em { font-style: italic; color: var(--muted); }

.lede {
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.4;
  max-width: 34ch;
  margin: 0;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}

/* The intro column rides along while the longer column scrolls */
@media (min-width: 861px) {
  .two-col > :first-child { position: sticky; top: 112px; }
}

@media (max-width: 860px) {
  .two-col { grid-template-columns: 1fr; }
}

.prose p { margin: 0 0 1.2em; max-width: 62ch; }

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

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 24px var(--gutter);
  border-top: 1px solid var(--line);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.site-footer a { text-decoration: none; transition: color 0.25s ease; }
.site-footer a:hover { color: var(--accent); }
.footer-links { display: flex; flex-wrap: wrap; gap: 24px; }

.contact-social { margin: 24px 0 0; color: var(--muted); }
.contact-social a { color: var(--ink); text-underline-offset: 3px; transition: color 0.25s ease; }
.contact-social a:hover { color: var(--accent); }

@media (max-width: 720px) {
  .footer-mid { display: none; }
}

/* ---------- Home ---------- */

.stage::before {
  content: "";
  position: absolute;
  inset: 16px;
  z-index: 1;
  pointer-events: none;
  opacity: 0.5;
  background:
    linear-gradient(var(--ink), var(--ink)) left top / 12px 1px no-repeat,
    linear-gradient(var(--ink), var(--ink)) left top / 1px 12px no-repeat,
    linear-gradient(var(--ink), var(--ink)) right top / 12px 1px no-repeat,
    linear-gradient(var(--ink), var(--ink)) right top / 1px 12px no-repeat,
    linear-gradient(var(--ink), var(--ink)) left bottom / 12px 1px no-repeat,
    linear-gradient(var(--ink), var(--ink)) left bottom / 1px 12px no-repeat,
    linear-gradient(var(--ink), var(--ink)) right bottom / 12px 1px no-repeat,
    linear-gradient(var(--ink), var(--ink)) right bottom / 1px 12px no-repeat;
}

.stage {
  position: relative;
  overflow: hidden;
  height: calc(100vh - var(--header-h));
  height: calc(100svh - var(--header-h));
  min-height: 320px;
}

#lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Shares the same box as #lines so the dots can travel along the rings */
.morph {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

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

.hero-tag {
  position: absolute;
  bottom: 28px;
  left: var(--gutter);
  right: var(--gutter);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 16px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-tag > span:last-child { text-align: right; }

/* A thin line that keeps falling, inviting a scroll */
.scroll-cue {
  display: grid;
  justify-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--muted);
}

.scroll-cue::after {
  content: "";
  width: 1px;
  height: 40px;
  background: linear-gradient(var(--ink), var(--ink)) no-repeat;
  background-size: 1px 100%;
  animation: cue 2.2s var(--ease-io) infinite;
}

@keyframes cue {
  0% { background-position: 0 -40px; }
  50% { background-position: 0 0; }
  100% { background-position: 0 40px; }
}

/* Short screens (landscape phones): the cue would collide with the word */
@media (max-height: 500px) {
  .scroll-cue { visibility: hidden; }
}

@media (max-width: 600px) {
  .hero-tag { grid-template-columns: 1fr; justify-items: center; gap: 14px; bottom: 20px; }
  .hero-tag > span:first-child { display: none; }
  .hero-tag > span:last-child { order: -1; text-align: center; }
}

/* ---------- Home: the studio ---------- */

.home-next { border-top: 1px solid var(--line); }

.statement {
  font-family: var(--serif);
  font-size: clamp(30px, 3.4vw, 48px);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0;
  max-width: 19ch;
}

.index-list {
  list-style: none;
  margin: 0 0 40px;
  padding: 0;
  border-top: 1px solid var(--ink);
}

.index-list a {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: baseline;
  gap: 16px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: padding 0.4s var(--ease);
}

.index-list .num { font-size: 13px; color: var(--muted); }

.index-list .name {
  font-family: var(--serif);
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1;
}

.index-list .arrow {
  transform: translateX(-8px);
  opacity: 0;
  color: var(--accent);
  transition: opacity 0.3s ease, transform 0.4s var(--ease);
}

.index-list a:hover { padding-left: 12px; }
.index-list a { transition: padding 0.4s var(--ease), opacity 0.4s var(--ease); }
.index-list:hover a:not(:hover) { opacity: 0.35; }
.index-list a:hover .arrow { opacity: 1; transform: none; }

/* ---------- Services ---------- */

.service-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--ink);
}

.service-list li {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 16px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  transition: padding 0.4s ease;
}

.service-list li:hover { padding-left: 12px; }

.service-list .num {
  font-size: 13px;
  color: var(--muted);
  padding-top: 8px;
}

.service-list h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.1;
  margin: 0 0 8px;
}

.service-list p { margin: 0; color: var(--muted); max-width: 52ch; }

/* ---------- Projects ---------- */

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.project-card {
  border: 1px solid var(--line);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color 0.3s ease;
}

.project-card:hover { border-color: var(--ink); }

/* Drafting sheet: corner ticks over faint grid paper */
.plate,
.project-card svg {
  background:
    linear-gradient(var(--ink), var(--ink)) left top / 12px 1px no-repeat,
    linear-gradient(var(--ink), var(--ink)) left top / 1px 12px no-repeat,
    linear-gradient(var(--ink), var(--ink)) right top / 12px 1px no-repeat,
    linear-gradient(var(--ink), var(--ink)) right top / 1px 12px no-repeat,
    linear-gradient(var(--ink), var(--ink)) left bottom / 12px 1px no-repeat,
    linear-gradient(var(--ink), var(--ink)) left bottom / 1px 12px no-repeat,
    linear-gradient(var(--ink), var(--ink)) right bottom / 12px 1px no-repeat,
    linear-gradient(var(--ink), var(--ink)) right bottom / 1px 12px no-repeat,
    linear-gradient(to right, var(--grid) 1px, transparent 1px) center / 24px 24px,
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px) center / 24px 24px;
}

.project-card svg {
  width: 100%;
  aspect-ratio: 4 / 3;
}

.project-card svg * {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 2400;
  stroke-dashoffset: 2400;
  transition: stroke-dashoffset 1.6s var(--ease-io);
}

.project-card.drawn svg * { stroke-dashoffset: 0; }

.project-card .meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.project-card h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 28px;
  margin: 0;
}

/* ---------- Projects: index with live preview ---------- */

.work {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}

.work-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }

.work-row {
  --d: 0;
  width: 100%;
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: baseline;
  gap: 16px;
  padding: 26px 0;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  font: inherit;
  color: var(--ink);
  text-align: left;
  /* rows fade the further they sit from the active one */
  opacity: calc(1 - min(var(--d), 3) * 0.22);
  transition: opacity 0.5s var(--ease), padding 0.5s var(--ease);
}

.work-row.on { padding-left: 12px; }
.work-row .num { font-size: 13px; color: var(--muted); }
.work-row .name { font-family: var(--serif); font-size: clamp(30px, 3.4vw, 48px); line-height: 1; }
.work-row .tag { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }

.work-preview {
  position: sticky;
  top: calc(var(--header-h) + 40px);
  margin: 0;
  aspect-ratio: 4 / 3;
}

.work-preview svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
}

.work-preview svg * {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 2400;
  stroke-dashoffset: 2400;
}

.work-preview svg.on { opacity: 1; }
.work-preview svg.on * { stroke-dashoffset: 0; transition: stroke-dashoffset 1.6s var(--ease-io); }

.work-preview figcaption {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (max-width: 860px) {
  .work { grid-template-columns: 1fr; gap: 24px; }
  .work-preview { order: -1; position: relative; top: auto; }
  .work-row .tag { display: none; }
}

/* ---------- Shop ---------- */

.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 24px; grid-column: 3; }

.cart-toggle {
  white-space: nowrap;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  line-height: inherit;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}

.product-grid { margin-top: 24px; }


.product-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
}

.sizes { display: flex; gap: 6px; }

.choice.size span {
  padding: 6px 0;
  width: 38px;
  text-align: center;
  font-size: 13px;
}

.add-btn {
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 10px 18px;
  transition: background 0.25s ease, color 0.25s ease;
}

.add-btn:hover { background: var(--ink); color: var(--bg); }

.cart-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(17, 17, 16, 0.25);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cart-backdrop.show { opacity: 1; }

.cart {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  width: min(420px, 100%);
  background: var(--bg);
  border-left: 1px solid var(--ink);
  display: flex;
  flex-direction: column;
  padding: 24px;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.45s var(--ease-io), visibility 0s linear 0.45s;
}

.cart.open {
  transform: none;
  visibility: visible;
  transition: transform 0.45s var(--ease-io);
}

.cart-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 16px;
}

.cart-head h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 40px;
  margin: 0;
}

.cart-close {
  background: none;
  border: 0;
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
}

.cart-items { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; }

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.cart-item p { margin: 0; }
.cart-item-name { font-family: var(--serif); font-size: 22px; line-height: 1.15; }
.cart-item-detail { font-size: 13px; color: var(--muted); }

.qty { display: flex; align-items: center; gap: 12px; }

.qty button {
  width: 28px;
  height: 28px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: none;
  font: inherit;
  color: var(--ink);
  line-height: 1;
}

.cart-empty { color: var(--muted); flex: 1; margin: 24px 0; }
.cart-empty[hidden] { display: none; }

.cart-foot { border-top: 1px solid var(--ink); padding-top: 16px; display: grid; gap: 12px; }

.cart-total { display: flex; justify-content: space-between; font-size: 18px; }
.cart-note { margin: 0; font-size: 13px; color: var(--muted); }
.cart-checkout { justify-self: stretch; }
.cart-checkout:disabled { opacity: 0.35; transform: none; background: var(--ink); }
.cart-msg { margin: 0; font-size: 14px; min-height: 1.2em; }

/* ---------- Contact ---------- */

.form {
  display: grid;
  gap: 28px;
}

.field { display: grid; gap: 8px; }

.field label,
.field legend {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.field .opt { text-transform: none; letter-spacing: 0; opacity: 0.8; }

.form input[type="text"],
.form input[type="email"],
.form input[type="tel"],
.form select,
.form textarea {
  width: 100%;
  font: inherit;
  font-size: 18px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  padding: 10px 0;
  outline: none;
  transition: border-color 0.2s ease;
}

.form textarea {
  border: 1px solid var(--ink);
  padding: 14px;
  min-height: 160px;
  resize: vertical;
}

.form input:focus,
.form select:focus,
.form textarea:focus { border-color: var(--accent); }

.form select {
  appearance: none;
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%),
    linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 12px) 55%, calc(100% - 7px) 55%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: 28px;
}

.phone-row {
  display: grid;
  grid-template-columns: minmax(120px, 160px) 1fr;
  gap: 16px;
}

.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

@media (max-width: 600px) {
  .row-2 { grid-template-columns: 1fr; }
}

fieldset.field { border: 0; margin: 0; padding: 0; }

.choices { display: flex; flex-wrap: wrap; gap: 10px; }

.choice input { position: absolute; opacity: 0; pointer-events: none; }

.choice span {
  display: inline-block;
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 10px 20px;
  cursor: pointer;
  font-size: 15px;
  transition: background 0.2s ease, color 0.2s ease;
}

.choice input:checked + span { background: var(--ink); color: var(--bg); }
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }


.btn {
  display: inline-block;
  text-decoration: none;
  justify-self: start;
  font: inherit;
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--bg);
  border: 0;
  border-radius: 999px;
  padding: 18px 40px;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}

.btn:hover { background: var(--accent); transform: translateY(-2px); }

.form-error { margin: 0; color: #b3261e; font-size: 15px; }

.success {
  border: 1px solid var(--ink);
  padding: clamp(28px, 4vw, 48px);
  animation: rise 0.7s var(--ease);
}

.success h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.1;
  margin: 0;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Page entrance ---------- */

.reveal { animation: rise 0.9s var(--ease) both; }
.reveal.d1 { animation-delay: 0.1s; }
.reveal.d2 { animation-delay: 0.2s; }

/* ---------- Custom cursor ---------- */

.has-cursor,
.has-cursor * { cursor: none; }

.has-cursor input:not([type="radio"]),
.has-cursor textarea { cursor: text; }

.cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  pointer-events: none;
}

.cursor::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  left: -4px;
  top: -4px;
  border-radius: 50%;
  background: var(--ink);
  border: 1px solid var(--ink);
  transition:
    width 0.35s var(--ease),
    height 0.35s var(--ease),
    left 0.35s var(--ease),
    top 0.35s var(--ease),
    background-color 0.25s ease,
    opacity 0.2s ease;
}

.cursor.hot::after {
  width: 44px;
  height: 44px;
  left: -22px;
  top: -22px;
  background: transparent;
}

.cursor.press::after { transform: scale(0.8); }
.cursor.hide::after,
.cursor.gone::after { opacity: 0; }

/* ---------- Page transitions ---------- */

/* Arriving: a curtain slides off to the right, its leading line sweeping across */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--bg);
  border-left: 1px solid var(--ink);
  pointer-events: none;
  animation: curtain-out 0.55s var(--ease-io) both;
}

/* Leaving: a curtain draws in from the left, line first */
.curtain {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--bg);
  border-right: 1px solid var(--ink);
  animation: curtain-in 0.4s var(--ease-io) both;
}

@keyframes curtain-out {
  from { transform: translateX(0); }
  to { transform: translateX(101%); }
}

@keyframes curtain-in {
  from { transform: translateX(-101%); }
  to { transform: translateX(0); }
}

/* Small phones: tighten the header so logo, cart and menu share one row */
@media (max-width: 420px) {
  :root { --header-h: 54px; }
  .site-header { gap: 12px; }
  .wordmark { font-size: 12px; letter-spacing: 0.32em; margin-right: -0.32em; }
  .orbit { margin-right: 0.32em; }
  .header-actions { gap: 10px; }
  .cart-toggle { font-size: 12px; }
  .nav-toggle { padding: 5px 12px; font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  body::after { display: none; }
  html { scroll-behavior: auto; }

  *, *::before, *::after { animation: none !important; transition: none !important; }
}
