/* The Ink Co. site styles */
:root {
  --paper: #ffffff;
  --mist: #f5f5f7;
  --ink: #1d1d1f;
  --graphite: #5f5f64;   /* 6.4:1 on white, 5.9:1 on mist */
  --rule: #d2d2d7;
  --cyan: #00a0e0;
  --magenta: #e5007e;
  --yellow: #ffe100;
  --danger: #b3261e;     /* 6.5:1 on white */
  --focus: #0066cc;
  --radius-pill: 980px;
  --radius-panel: 28px;
  --max: 1120px;
  --gutter: clamp(20px, 5vw, 48px);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -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(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.53;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.025em; line-height: 1.08; }

/* Accessibility helpers */
.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px;
  text-decoration: none; font-weight: 500;
}
.skip-link:focus { top: 12px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

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

/* Header */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 18px; letter-spacing: -0.02em; }
.brand .logo { height: 34px; width: auto; color: var(--ink); }
.nav { display: flex; align-items: center; gap: 28px; }
.nav-links { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; font-size: 14px; color: var(--graphite); }
.nav-links a:hover { color: var(--ink); }
.menu-btn { display: none; width: 44px; height: 44px; margin-right: -10px; padding: 0; border: 0; background: none; color: var(--ink); cursor: pointer; border-radius: 12px; }
.menu-icon, .menu-icon::before { display: block; width: 20px; height: 1.5px; margin: 0 auto; background: currentColor; border-radius: 2px; transition: transform .25s ease; }
.menu-icon { position: relative; transform: translateY(-3.5px); }
.menu-icon::before { content: ""; position: absolute; left: 0; top: 7px; }
.menu-open .menu-icon { transform: translateY(0) rotate(45deg); }
.menu-open .menu-icon::before { transform: translateY(-7px) rotate(-90deg); }
.menu {
  position: absolute; left: 0; right: 0; top: 100%;
  height: calc(100vh - 61px); height: calc(100dvh - 61px);
  background: var(--paper); overflow-y: auto; overscroll-behavior: contain;
  padding: 24px 0 calc(32px + env(safe-area-inset-bottom, 0px));
}
.menu ul { list-style: none; margin: 0; padding: 0; }
.menu-main a { display: flex; align-items: center; min-height: 64px; font-size: 32px; font-weight: 600; letter-spacing: -0.025em; text-decoration: none; border-bottom: 1px solid var(--rule); }
.menu-small { margin-top: 28px !important; display: grid; gap: 4px; }
.menu-small a { display: inline-flex; align-items: center; min-height: 44px; color: var(--graphite); text-decoration: none; font-size: 17px; }
.menu-cta { width: 100%; margin-top: 32px; }
@media (max-width: 760px) {
  .nav-links { display: none; }
  .menu-btn { display: inline-flex; align-items: center; justify-content: center; }
  .nav { gap: 12px; }
  .nav-cta { min-height: 40px; padding: 0 16px; font-size: 14px; }
}
@media (max-width: 380px) { .nav-cta { display: none; } }
@media (min-width: 761px) { .menu { display: none !important; } }
html.is-locked { overflow: hidden; }

/* Buttons: one action, one style */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 22px;
  border-radius: var(--radius-pill); border: 0;
  background: var(--ink); color: #fff;
  font: 500 15px/1 var(--font); letter-spacing: -0.01em;
  text-decoration: none; cursor: pointer;
  transition: background-color .2s ease, transform .2s ease;
}
.btn:hover { background: #000; }
.btn:active { transform: scale(0.98); }
.btn-lg { min-height: 54px; padding: 0 32px; font-size: 17px; }
.btn-quiet { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--rule); }
.btn-quiet:hover { background: var(--mist); }
.btn[disabled] { opacity: .55; cursor: progress; }

/* Hero */
.hero { padding: clamp(40px, 9vh, 120px) 0 clamp(64px, 10vh, 112px); text-align: center; overflow: hidden; }
.hero-art { width: min(220px, 40vw); height: auto; margin: 0 auto clamp(28px, 5vh, 56px); overflow: visible; }
.hero-art .plate { mix-blend-mode: multiply; }

/* The one orchestrated moment: the three process plates come into register */
@media (prefers-reduced-motion: no-preference) {
  .hero-art .plate { animation: register 1.8s cubic-bezier(.2,.7,.1,1) both; }
  .hero-art .c { --dx: -18px; --dy: 10px; }
  .hero-art .m { --dx: 16px; --dy: 14px; animation-delay: .06s; }
  .hero-art .y { --dx: 4px; --dy: -18px; animation-delay: .12s; }
  @keyframes register { from { transform: translate(var(--dx), var(--dy)); opacity: 0; } 30% { opacity: 1; } }
}
.hero h1 { font-size: clamp(44px, 8.2vw, 96px); max-width: 12ch; margin: 0 auto; }
.hero .lede { font-size: clamp(19px, 2.2vw, 24px); color: var(--graphite); max-width: 34ch; margin: 22px auto 36px; line-height: 1.38; letter-spacing: -0.015em; }

/* Sections */
.section { padding: clamp(80px, 12vw, 140px) 0; }
.section-mist { background: var(--mist); }
.section-head { max-width: 640px; margin-bottom: clamp(40px, 6vw, 72px); }
.section-head h2 { font-size: clamp(34px, 5vw, 56px); }
.section-head p { color: var(--graphite); font-size: 19px; margin-top: 16px; }

/* Disciplines: rows, not cards */
.disciplines { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.discipline {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 24px 48px; padding: clamp(28px, 4vw, 44px) 0; border-bottom: 1px solid var(--rule);
}
.discipline h3 { font-size: clamp(26px, 3.2vw, 36px); }
.discipline p { color: var(--graphite); margin: 0 0 14px; max-width: 52ch; }
.discipline ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.discipline li { font-size: 14px; padding: 6px 14px; border-radius: var(--radius-pill); background: var(--mist); }
.section-mist .discipline li { background: var(--paper); }
@media (max-width: 760px) { .discipline { grid-template-columns: 1fr; } }

/* Process: a real sequence, so numbered */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px; counter-reset: step; }
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step); display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 50%; margin-bottom: 20px;
  background: var(--ink); color: #fff; font-size: 15px; font-weight: 600;
}
.steps h3 { font-size: 21px; margin-bottom: 8px; letter-spacing: -0.02em; }
.steps p { color: var(--graphite); margin: 0; font-size: 16px; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; gap: 32px; } }

/* Contact */
.contact { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.contact .section-head { margin-bottom: 0; }
.contact-alt { margin-top: 28px; color: var(--graphite); font-size: 16px; }
.contact-alt a { color: var(--ink); }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } }

.form { background: var(--paper); border-radius: var(--radius-panel); padding: clamp(24px, 4vw, 44px); }
.field { margin-bottom: 22px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.field label, .field legend { display: block; font-size: 14px; font-weight: 500; margin-bottom: 8px; padding: 0; }
.field .opt { color: var(--graphite); font-weight: 400; }
.input {
  width: 100%; min-height: 50px; padding: 13px 16px;
  font: 17px/1.4 var(--font); color: var(--ink); letter-spacing: -0.01em;
  background: var(--paper); border: 1px solid #86868b; border-radius: 12px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
textarea.input { min-height: 140px; resize: vertical; }
select.input { appearance: none; -webkit-appearance: none; padding-right: 44px;
  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='%231d1d1f' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 18px center; }
.input:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px rgba(0, 102, 204, .25); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.error { display: block; color: var(--danger); font-size: 14px; margin-top: 6px; min-height: 0; }
.error:empty { display: none; }
fieldset.field { border: 0; margin: 0 0 22px; padding: 0; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px;
  border-radius: var(--radius-pill); border: 1px solid #86868b; font-size: 15px;
  transition: background-color .15s ease, color .15s ease;
}
.chip input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 8px; }
.form-foot small { color: var(--graphite); font-size: 13px; max-width: 34ch; }
.form-foot small a { color: var(--ink); }
.form-status { margin-top: 20px; font-size: 16px; }
.form-status[data-state="error"] { color: var(--danger); }
.form-done { text-align: center; padding: 32px 8px; }
.form-done h3 { font-size: 28px; margin-bottom: 10px; }
.form-done p { color: var(--graphite); margin: 0; }

/* Footer */
.site-footer { padding: 40px 0 calc(88px + env(safe-area-inset-bottom, 0px)); font-size: 13px; color: var(--graphite); border-top: 1px solid var(--rule); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-footer a, .site-footer button.linklike { color: var(--graphite); text-decoration: none; }
.site-footer a:hover, .site-footer button.linklike:hover { color: var(--ink); text-decoration: underline; }
button.linklike { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }

/* Legal + utility pages */
.doc { padding: clamp(56px, 9vw, 104px) 0 clamp(72px, 10vw, 120px); }
.doc .wrap { max-width: 760px; }
.doc h1 { font-size: clamp(40px, 6vw, 64px); margin-bottom: 12px; }
.doc .updated { color: var(--graphite); margin-bottom: 48px; }
.doc h2 { font-size: 24px; margin: 48px 0 12px; letter-spacing: -0.02em; }
.doc p, .doc li { color: #333336; }
.doc ul { padding-left: 1.2em; margin: 0 0 1em; }
.doc li { margin-bottom: .4em; }
.doc a { color: var(--focus); }

.notfound { min-height: calc(100vh - 61px - 110px); display: grid; place-items: center; text-align: center; padding: 64px 0; }
.notfound .mark { width: 64px; height: auto; margin: 0 auto 32px; color: var(--ink); }
.notfound h1 { font-size: clamp(40px, 6vw, 64px); margin-bottom: 14px; }
.notfound p { color: var(--graphite); font-size: 19px; max-width: 30ch; margin: 0 auto 32px; }

/* Accessibility button + panel */
.a11y-btn {
  position: fixed; z-index: 80; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  width: 52px; height: 52px; border-radius: 50%; border: 2px solid var(--paper);
  background: var(--ink); color: #fff; cursor: pointer;
  display: grid; place-items: center; box-shadow: 0 6px 20px rgba(0,0,0,.18);
}
.a11y-btn svg { width: 26px; height: 26px; }
.a11y-btn.is-active::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--focus); border: 2px solid #fff; }
.a11y-panel {
  position: fixed; z-index: 90; right: 16px; bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  width: min(360px, calc(100vw - 32px)); max-height: calc(100vh - 110px); overflow-y: auto;
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--rule); border-radius: 22px; box-shadow: 0 24px 64px rgba(0,0,0,.2);
  padding: 18px 20px 20px;
}
.a11y-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.a11y-head h2 { font-size: 20px; letter-spacing: -0.02em; }
.a11y-close { width: 44px; height: 44px; margin-right: -10px; border: 0; background: none; color: var(--ink); cursor: pointer; border-radius: 12px; display: grid; place-items: center; }
.a11y-close svg { width: 22px; height: 22px; }
.a11y-group { border: 0; margin: 0 0 8px; padding: 0; min-width: 0; }
.a11y-group legend { font-size: 14px; font-weight: 500; margin-bottom: 8px; padding: 0; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; background: var(--mist); border-radius: 14px; }
.seg label { position: relative; }
.seg input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.seg span { display: grid; place-items: center; min-height: 44px; border-radius: 10px; font-size: 15px; }
.seg input:checked + span { background: var(--paper); box-shadow: 0 1px 4px rgba(0,0,0,.14); font-weight: 600; }
.seg input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 1px; }
.a11y-switches { list-style: none; margin: 8px 0 0; padding: 0; }
.a11y-switches li + li { border-top: 1px solid var(--rule); }
.a11y-switches button {
  width: 100%; min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0; border: 0; background: none; color: var(--ink); font: 16px/1.3 var(--font); text-align: left; cursor: pointer;
}
.a11y-switches i { flex: none; position: relative; width: 44px; height: 26px; border-radius: 13px; background: #8e8e93; transition: background-color .2s ease; }
.a11y-switches i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s ease; }
.a11y-switches [aria-checked="true"] i { background: var(--ink); }
.a11y-switches [aria-checked="true"] i::after { transform: translateX(18px); }
.a11y-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.a11y-foot a { color: var(--focus); font-size: 15px; display: inline-flex; align-items: center; min-height: 44px; }
@media (max-width: 560px) {
  .a11y-panel { left: 8px; right: 8px; width: auto; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); max-height: calc(100vh - 80px); }
}

/* Visitor-chosen modes (set by the accessibility panel) */
html[data-a11y-text="1"] body { zoom: 1.15; }
html[data-a11y-text="2"] body { zoom: 1.3; }
html.a11y-contrast {
  --graphite: #000; --rule: #000; --mist: #fff; --focus: #0040a0;
}
html.a11y-contrast body { color: #000; }
html.a11y-contrast .input, html.a11y-contrast .chip span, html.a11y-contrast .btn-quiet { border-color: #000; box-shadow: none; }
html.a11y-contrast .input, html.a11y-contrast .chip span { border-width: 2px; }
html.a11y-contrast .discipline li, html.a11y-contrast .form { outline: 1px solid #000; }
html.a11y-contrast .hero-art .plate { fill: #000; mix-blend-mode: normal; }
html.a11y-contrast .site-header { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; border-bottom-color: #000; }
html.a11y-contrast :focus-visible { outline-width: 4px; }
html.a11y-links a:not(.btn) { text-decoration: underline !important; text-underline-offset: 3px; text-decoration-thickness: 2px; }
html.a11y-motion *, html.a11y-motion *::before, html.a11y-motion *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
html.a11y-spacing body { word-spacing: .16em; letter-spacing: .02em; }
html.a11y-spacing p, html.a11y-spacing li, html.a11y-spacing label, html.a11y-spacing .lede { line-height: 1.8 !important; }
html.a11y-spacing p { margin-bottom: 1.6em; }
html.a11y-spacing h1, html.a11y-spacing h2, html.a11y-spacing h3 { letter-spacing: 0; line-height: 1.25; }

@media print {
  .site-header, .a11y-btn, .a11y-panel, .site-footer nav { display: none; }
}

/* Comfortable tap targets for footer links */
.site-footer nav a, .site-footer nav button.linklike { display: inline-flex; align-items: center; min-height: 44px; }
.site-footer p { margin: 0; align-self: center; }

/* Menu panel uses its own stacked layout, not the header row */
.site-header .menu .wrap { display: block; height: auto; }
.menu-open .a11y-btn { display: none; }
.btn { white-space: nowrap; }
@media (max-width: 760px) {
  html[data-a11y-text] .nav-cta { display: none; }
}
