/* =================================================================
   MSI STUDIO — "The Drafting Table"
   Ink on warm paper · oxblood pen accent · expressive serif display
   · self-drawing SVG paths as the brand motif
   ================================================================= */

:root {
  /* Paper */
  --paper:   #faf6ef;
  --paper-2: #f4eee1;
  --paper-3: #ece3d0;

  /* Ink */
  --ink:       #1c1712;
  --ink-soft:  #5d5246;
  --ink-line:  rgba(28, 23, 18, .25);  /* drawn rules */
  --ink-faint: rgba(28, 23, 18, .13);  /* hairlines */

  /* The red pen */
  --ox:      #9a3324;
  --ox-deep: #7a2418;
  --ox-soft: rgba(154, 51, 36, .09);

  /* Type */
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body:    'Karla', system-ui, -apple-system, sans-serif;
  --font-mono:    'DM Mono', ui-monospace, 'Courier New', monospace;

  /* Structure — print-like: sharp corners, hairline rules */
  --maxw: 1160px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section-pad: clamp(4.5rem, 10vw, 8rem);
  --radius: 4px;
  --radius-sm: 2px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  position: relative;
}
/* Paper grain — sits over everything like print stock */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 2000;
  pointer-events: none;
  opacity: .35;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.08'/%3E%3C/svg%3E");
}
/* Faint drafting grid, fading out toward the bottom */
body::after {
  content: "";
  position: fixed; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(28,23,18,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(28,23,18,.045) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 95% 75% at 50% 0%, #000 35%, transparent 100%);
          mask-image: radial-gradient(ellipse 95% 75% at 50% 0%, #000 35%, transparent 100%);
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
::selection { background: var(--ox); color: var(--paper); }
:focus-visible { outline: 2px solid var(--ox); outline-offset: 3px; }

/* Red margin rule, like a legal pad — wide screens only */
@media (min-width: 1200px) {
  main::before {
    content: "";
    position: fixed; top: 0; bottom: 0;
    left: calc(50% - 645px);
    width: 1px;
    background: var(--ox);
    opacity: .16;
    pointer-events: none;
  }
}

/* ---------- self-drawing SVG paths (the motif) ---------- */
/* js/main.js measures each .draw path and animates stroke-dashoffset */
.draw-svg { display: block; overflow: visible; }
.draw-svg .draw {
  fill: none;
  stroke: var(--ox);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.draw-svg .draw.thin { stroke-width: 1.8; }

/* ---------- the unbroken thread ----------
   One page-long ink stroke behind the content, scrubbed by scroll.
   js/main.js builds the path from real element positions. */
main { position: relative; }
.thread { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.thread svg { display: block; width: 100%; height: 100%; overflow: visible; }
#threadPath {
  fill: none; stroke: var(--ox); stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  opacity: .55;
}
#threadNib { fill: var(--ox); opacity: 0; transition: opacity .6s ease .5s; }
#threadNib.scribing { opacity: .9; transition: opacity .15s ease; }
@media (max-width: 880px) { .thread { display: none; } }

/* ---------- shared ---------- */
.kicker {
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ox);
  margin-bottom: 1.2rem;
  display: inline-flex;
  align-items: center;
  gap: .6rem;
}
.kicker::before {
  content: ""; width: 26px; height: 1px; background: var(--ox); display: inline-block;
}
.section { padding: var(--section-pad) var(--gutter); max-width: var(--maxw); margin: 0 auto; }
.section-head { max-width: 680px; margin-bottom: clamp(2.5rem, 6vw, 4rem); }
.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -.015em;
  color: var(--ink);
}
.section-title em { font-style: italic; color: var(--ox); }
.section-lead { font-size: 1.12rem; color: var(--ink-soft); margin-top: 1.1rem; max-width: 50ch; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-body); font-weight: 700; font-size: 1rem;
  padding: .85rem 1.6rem; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer;
  transition: transform .18s ease, box-shadow .25s ease, background .25s ease,
              border-color .2s ease, color .2s ease;
}
.btn-primary { background: var(--ox); color: var(--paper); }
.btn-primary::after { content: "→"; transition: transform .2s ease; }
.btn-primary:hover {
  background: var(--ox-deep); transform: translateY(-2px);
  box-shadow: 0 12px 26px -14px rgba(122, 36, 24, .65);
}
.btn-primary:hover::after { transform: translateX(3px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: rgba(28,23,18,.4); }
.btn-ghost:hover { border-color: var(--ox); color: var(--ox); background: var(--ox-soft); transform: translateY(-2px); }
.btn-block { width: 100%; justify-content: center; }

/* =========================== NAV =========================== */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250, 246, 239, .82);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background .3s ease;
}
.nav.scrolled { border-bottom-color: var(--ink-line); background: rgba(250, 246, 239, .94); }
.nav-inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: 1.05rem var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
}
.wordmark {
  font-family: var(--font-display); font-weight: 600; font-size: 1.3rem;
  letter-spacing: -.01em; color: var(--ink);
}
.wordmark em { font-style: italic; }
.wordmark-dash { color: var(--ox); margin: 0 .12em; }
.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a { font-size: .95rem; color: var(--ink-soft); position: relative; transition: color .2s ease; }
.nav-links a:not(.nav-cta):hover { color: var(--ink); }
.nav-links a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 0; bottom: -5px; width: 0; height: 1.5px;
  background: var(--ox); transition: width .25s ease;
}
.nav-links a:not(.nav-cta):hover::after,
.nav-links a:not(.nav-cta).active::after { width: 100%; }
.nav-links a:not(.nav-cta).active { color: var(--ink); }
.nav-cta {
  color: var(--ink); border: 1px solid rgba(28,23,18,.4);
  padding: .5rem 1rem; border-radius: var(--radius-sm); transition: all .2s ease;
}
.nav-cta:hover { background: var(--ox); border-color: var(--ox); color: var(--paper); }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: 1px solid rgba(28,23,18,.4); border-radius: var(--radius-sm);
  padding: .55rem .5rem; cursor: pointer;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); transition: transform .25s ease, opacity .25s ease; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =========================== HERO =========================== */
.hero { max-width: var(--maxw); margin: 0 auto; padding: clamp(4rem, 9vw, 7rem) var(--gutter) clamp(2.5rem, 5vw, 4rem); }
.hero-title {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(3rem, 8vw, 6.4rem);
  line-height: 1.02; letter-spacing: -.02em;
  margin: .4rem 0 1.7rem;
  color: var(--ink);
}
.hero-title .line { display: block; }
.ink-word { position: relative; font-style: italic; color: var(--ox); white-space: nowrap; }
.underline-svg { position: absolute; left: -2%; bottom: -.12em; width: 104%; height: .26em; }
.hero-sub { font-size: clamp(1.05rem, 1.5vw, 1.22rem); max-width: 58ch; color: var(--ink-soft); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: 2.4rem; }

/* "start here" annotation beside the CTAs */
.cta-anno {
  display: flex; flex-direction: column; gap: .15rem;
  margin-left: .9rem; transform: translateY(-32px);
  font-family: var(--font-mono); font-size: .76rem;
  letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft);
}
.cta-anno svg { width: 58px; height: 44px; margin-left: -8px; }
.cta-anno .draw { stroke-width: 2.2; }

/* Spec-sheet stats strip */
.spec {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-block: 1px solid var(--ink-line);
  margin-top: clamp(3rem, 6vw, 4.5rem);
}
.spec-item { padding: 1.4rem 1.6rem; display: flex; flex-direction: column; gap: .15rem; }
.spec-item:not(:first-child) { border-left: 1px solid var(--ink-faint); }
.spec-item dd {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.9rem, 3.5vw, 2.7rem); line-height: 1; color: var(--ink);
}
.spec-item dt {
  font-family: var(--font-mono); font-size: .74rem; text-transform: uppercase;
  letter-spacing: .08em; color: var(--ink-soft); margin-top: .45rem;
}

/* Hero load-in: staggered rise */
.rise { opacity: 0; animation: rise .7s cubic-bezier(.25, .7, .3, 1) forwards; }
.r1 { animation-delay: .1s; }
.r2 { animation-delay: .22s; }
.r3 { animation-delay: .34s; }
.r4 { animation-delay: .5s; }
.r5 { animation-delay: .66s; }
.r6 { animation-delay: .85s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}

/* =========================== MARQUEE =========================== */
.marquee {
  overflow: hidden; padding: .9rem 0;
  border-block: 1px solid var(--ink-line);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: inline-flex; align-items: center; gap: 2rem; white-space: nowrap;
  font-family: var(--font-mono); font-size: .82rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-soft);
  animation: marquee 36s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track .sep { color: var(--ox); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* =========================== WORK — numbered plates =========================== */
.work-list { display: flex; flex-direction: column; gap: clamp(3.5rem, 7vw, 5.5rem); }
.work-link {
  display: grid; grid-template-columns: 1.08fr .92fr;
  gap: clamp(1.8rem, 4vw, 3.5rem);
  align-items: center;
}
/* Editorial rhythm: alternate the plate left/right */
.work-card:nth-child(even) .plate-frame { order: 2; }

.plate-frame {
  position: relative; margin: 0;
  background: var(--paper-2);
  border: 1px solid var(--ink-line);
  padding: clamp(.7rem, 1.4vw, 1.1rem);
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}
.plate-media { overflow: hidden; border: 1px solid var(--ink-faint); }
.plate-media img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(.92);
  transition: transform .6s ease, filter .4s ease;
}
.plate-caption {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: .25rem 1rem;
  padding-top: .8rem;
  font-family: var(--font-mono); font-size: .72rem;
  letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft);
}
.work-link:hover .plate-frame {
  transform: translateY(-6px);
  border-color: rgba(28,23,18,.5);
  box-shadow: 0 26px 48px -30px rgba(28, 23, 18, .45);
}
.work-link:hover .plate-media img { transform: scale(1.04); filter: saturate(1); }

/* Circled annotation + drawn arrow over each plate */
.plate-anno {
  position: absolute; top: -32px; right: 7%;
  width: 150px; height: 50px;
  display: grid; place-items: center;
  z-index: 2; pointer-events: none;
}
.plate-anno > span {
  position: relative; z-index: 1;
  font-family: var(--font-mono); font-size: .74rem;
  letter-spacing: .04em; color: var(--ox); white-space: nowrap;
}
.anno-loop { position: absolute; inset: 0; width: 100%; height: 100%; }
.anno-loop .draw { stroke-width: 2; }
.anno-arrow { position: absolute; top: 44px; left: 2px; width: 44px; height: 44px; }
.anno-arrow .draw { stroke-width: 2; }

.work-body { display: flex; flex-direction: column; align-items: flex-start; }
.work-name {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.6rem, 2.6vw, 2.2rem); line-height: 1.1; letter-spacing: -.015em;
  color: var(--ink);
  display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap;
}
.work-name .arrow { color: var(--ox); transition: transform .25s ease; }
.work-link:hover .work-name .arrow { transform: translate(4px, -4px); }
.work-desc { margin: .9rem 0 1.1rem; color: var(--ink-soft); max-width: 46ch; }
.work-tags {
  display: flex; flex-wrap: wrap; gap: .3rem .8rem;
  font-family: var(--font-mono); font-size: .72rem;
  text-transform: uppercase; letter-spacing: .07em; color: var(--ink-soft);
}
.work-tags li + li::before { content: "·"; margin-right: .8rem; color: var(--ox); }
.plate-visit {
  display: inline-block; margin-top: 1.6rem; padding-bottom: 2px;
  font-weight: 700; font-size: .95rem; color: var(--ox);
  background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0% 1.5px;
  transition: background-size .3s ease;
}
.plate-visit::after { content: " →"; }
.work-link:hover .plate-visit { background-size: 100% 1.5px; }

/* =========================== PROCESS =========================== */
/* Full-height stage — fills the viewport so it can be presented on its own */
.process {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
}
.process-head { max-width: 760px; }

/* "Present full screen" affordance */
.present-btn {
  margin-top: 1.7rem;
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--font-mono); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ox); cursor: pointer;
  padding: .62rem 1.05rem; border-radius: var(--radius-sm);
  border: 1px solid rgba(28,23,18,.4); background: transparent;
  transition: transform .2s ease, border-color .2s ease, background .2s ease, color .2s ease;
}
.present-btn:hover {
  border-color: var(--ox); background: var(--ox-soft); transform: translateY(-2px);
}
.present-ico { font-size: 1.05rem; line-height: 1; }

.process-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.2rem, 2.4vw, 2rem);
  position: relative;
  margin-top: clamp(2.5rem, 5vw, 4rem);
}
/* One continuous pen stroke threading the four step numbers */
.process-stroke {
  position: absolute; top: -14px; left: 0;
  width: 100%; height: 110px;
  pointer-events: none;
}
.process-stroke .draw { stroke-width: 2; }
.stroke-dot { fill: var(--ox); }

.step { position: relative; z-index: 1; }
.step-num {
  position: relative;
  width: 60px; height: 60px; border-radius: 50%;
  display: grid; place-items: center; margin-bottom: 1.3rem;
  font-family: var(--font-display); font-weight: 600; font-size: 1.5rem;
  color: var(--ink);
  background: var(--paper); /* lets the stroke pass "behind" the circle */
}
.step-num svg { position: absolute; inset: -2px; width: calc(100% + 4px); height: calc(100% + 4px); }
.step-num .draw { stroke-width: 2.5; }
.step-label {
  font-family: var(--font-mono); font-size: .72rem; text-transform: uppercase;
  letter-spacing: .12em; color: var(--ox); display: block; margin-bottom: .45rem;
}
.step h3 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.3rem, 1.8vw, 1.55rem);
  letter-spacing: -.01em; color: var(--ink); margin-bottom: .55rem; line-height: 1.15;
}
.step p { color: var(--ink-soft); font-size: clamp(.95rem, 1.05vw, 1.05rem); }
/* Step 4: two hosting choices */
.step-options { display: flex; flex-direction: column; gap: .55rem; margin-top: 1rem; }
.step-option {
  display: flex; align-items: baseline; gap: .5rem;
  font-size: .92rem; color: var(--ink);
  padding: .6rem .75rem; border-radius: var(--radius-sm);
  border: 1px solid var(--ink-faint); background: var(--paper-2);
  transition: border-color .25s ease, transform .25s ease;
}
.step-option:hover { border-color: var(--ox); transform: translateX(4px); }
.step-option b { font-family: var(--font-mono); color: var(--ox); font-weight: 500; }
.step-option span { color: var(--ink-soft); font-size: .85rem; }

/* ---- Full-screen presentation mode ---- */
.process:fullscreen {
  max-width: none; margin: 0; overflow-y: auto;
  padding: clamp(2rem, 6vh, 5rem) clamp(2rem, 7vw, 7rem);
  background: var(--paper);
}
.process:fullscreen .section-title { font-size: clamp(2.8rem, 6vw, 5rem); }
.process:fullscreen .section-lead { font-size: clamp(1.2rem, 1.6vw, 1.5rem); }
.process:fullscreen .process-grid { gap: clamp(1.5rem, 2.6vw, 2.4rem); margin-top: clamp(3rem, 6vw, 5rem); }
.process:fullscreen .step-num { width: 76px; height: 76px; font-size: 1.9rem; }
.process:fullscreen .step h3 { font-size: clamp(1.5rem, 2vw, 2rem); }
.process:fullscreen .step p { font-size: clamp(1.05rem, 1.2vw, 1.25rem); }

@media (max-width: 920px), (min-height: 1600px) {
  .process { min-height: 0; }
}
@media (max-width: 920px) {
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .process-stroke { display: none; }
}
@media (max-width: 560px) {
  .process-grid { grid-template-columns: 1fr; }
}

/* =========================== SERVICES — ruled index =========================== */
.services-list { border-top: 1px solid var(--ink-line); counter-reset: service; }
.service {
  display: grid; grid-template-columns: 90px 1fr 1.3fr;
  gap: clamp(1rem, 3vw, 2.5rem); align-items: baseline;
  padding: clamp(1.4rem, 2.5vw, 2rem) .25rem;
  border-bottom: 1px solid var(--ink-line);
  transition: background .25s ease, padding-left .25s ease;
}
.service:hover { background: var(--paper-2); padding-left: 1rem; }
.service-num { font-family: var(--font-mono); font-size: .82rem; color: var(--ox); }
.service h3 {
  font-family: var(--font-display); font-weight: 600; font-size: clamp(1.35rem, 2vw, 1.65rem);
  letter-spacing: -.01em; color: var(--ink);
}
.service p { color: var(--ink-soft); }

/* =========================== ABOUT =========================== */
.about-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(2.5rem, 5vw, 4.5rem); align-items: start; }
.about-text p { font-size: 1.1rem; color: var(--ink-soft); margin-bottom: 1.1rem; max-width: 54ch; }
.signature { width: 180px; margin: .4rem 0 1.5rem; }
.signature svg { width: 100%; height: auto; }
.signature .draw { stroke-width: 2.2; }
.colophon {
  border: 1px solid var(--ink-line);
  background: var(--paper-2);
}
.colophon-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: 1.15rem 1.4rem;
  border-bottom: 1px solid var(--ink-faint);
}
.colophon-row:last-child { border-bottom: 0; }
.colophon-row dt { font-family: var(--font-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); }
.colophon-row dd { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; color: var(--ink); }

/* =========================== CONTACT =========================== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2.5rem, 5vw, 4.5rem); align-items: start; }
.contact-intro p { color: var(--ink-soft); font-size: 1.1rem; max-width: 46ch; margin: 1.1rem 0 1.6rem; }
.contact-email-wrap { position: relative; display: inline-block; }
.contact-email {
  font-family: var(--font-mono); font-size: 1.02rem; color: var(--ox);
  transition: color .2s ease;
}
.contact-email:hover { color: var(--ox-deep); }
.contact-email-wrap .underline-svg { left: 0; width: 100%; bottom: -10px; height: 12px; }
.contact-email-wrap .draw { stroke-width: 2; }

/* The form, with crop-mark corners like a print proof */
.contact-form {
  position: relative;
  border: 1px solid var(--ink-line);
  background: var(--paper-2);
  padding: clamp(1.6rem, 3vw, 2.4rem);
  display: flex; flex-direction: column; gap: 1.25rem;
}
.contact-form::before,
.contact-form::after {
  content: ""; position: absolute; width: 22px; height: 22px; pointer-events: none;
}
.contact-form::before { top: -8px; left: -8px; border-top: 2px solid var(--ox); border-left: 2px solid var(--ox); }
.contact-form::after { bottom: -8px; right: -8px; border-bottom: 2px solid var(--ox); border-right: 2px solid var(--ox); }
.contact-form label { display: flex; flex-direction: column; gap: .4rem; }
.contact-form span {
  font-family: var(--font-mono); font-size: .72rem; text-transform: uppercase;
  letter-spacing: .08em; color: var(--ink-soft);
}
.contact-form input, .contact-form textarea {
  font-family: var(--font-body); font-size: 1rem; color: var(--ink);
  border: 0; border-bottom: 1px solid rgba(28,23,18,.4); border-radius: 0;
  background: transparent; padding: .6rem .1rem; resize: vertical;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.contact-form input::placeholder, .contact-form textarea::placeholder { color: rgba(93,82,70,.6); }
.contact-form input:focus, .contact-form textarea:focus {
  outline: none; border-color: var(--ox); box-shadow: 0 1px 0 var(--ox);
}
.contact-form .btn { margin-top: .4rem; }

/* =========================== FOOTER =========================== */
.footer { position: relative; border-top: 1px solid var(--ink-line); margin-top: 2rem; }
.footer::before {
  content: ""; position: absolute; top: 3px; left: 0; right: 0; height: 1px;
  background: var(--ink-faint);
}
.footer-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 2.6rem var(--gutter);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.2rem;
}
.footer-nav { display: flex; flex-wrap: wrap; gap: 1.6rem; }
.footer-nav a { font-size: .92rem; color: var(--ink-soft); transition: color .2s ease; }
.footer-nav a:hover { color: var(--ox); }
.footer-copy { font-family: var(--font-mono); font-size: .78rem; color: var(--ink-soft); width: 100%; }

/* =========================== SCROLL REVEAL =========================== */
.fade-in { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.fade-in.visible { opacity: 1; transform: none; }
/* Cascade the process steps */
.step:nth-child(3) { transition-delay: .08s; }
.step:nth-child(4) { transition-delay: .16s; }
.step:nth-child(5) { transition-delay: .24s; }

/* =========================== RESPONSIVE =========================== */
@media (max-width: 880px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(250, 246, 239, .98);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--ink-line);
    max-height: 0; overflow: hidden; transition: max-height .35s ease;
  }
  .nav-links.open { max-height: 360px; }
  .nav-links a { padding: 1rem var(--gutter); border-top: 1px solid var(--ink-faint); }
  .nav-links a:not(.nav-cta)::after { display: none; }
  .nav-cta { border: 0; border-top: 1px solid var(--ink-faint); border-radius: 0; color: var(--ox); }
  .nav-cta:hover { background: transparent; color: var(--ox-deep); }

  .cta-anno, .plate-anno { display: none; }
  .work-link { grid-template-columns: 1fr; gap: 1.4rem; }
  .work-card:nth-child(even) .plate-frame { order: 0; } /* media back on top */
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .service { grid-template-columns: 1fr; gap: .35rem; }
  .service-num { margin-bottom: .2rem; }
}
@media (max-width: 520px) {
  .spec { grid-template-columns: 1fr; }
  .spec-item { border-left: 0 !important; }
  .spec-item:not(:first-child) { border-top: 1px solid var(--ink-faint); }
}

/* =========================== MOTION SAFETY =========================== */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  .fade-in { opacity: 1; transform: none; }
  .rise { opacity: 1; animation: none; transform: none; }
  .stroke-dot { display: none; }
  /* js/main.js also skips path-draw setup, so strokes render fully drawn */
}
