/* cwiki.dev — studio site styles.
   Tokens first, then layout, then components. Classes only, so sections never fight. */

:root {
  --paper: #F2F4F8;
  --paper-2: #E9EDF5;
  --white: #FFFFFF;
  --ink: #101B33;
  --ink-2: #4A556E;
  --line: #CBD3E1;
  --blue: #2436D9;
  --blue-deep: #1A2AA8;
  --sky: #DCE4FF;
  --font: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --max: 1120px;
  --gutter: 24px;
  --r: 10px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-optical-sizing: auto;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 0.14em; }
a:hover { color: var(--blue-deep); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
p { margin: 0 0 1em; max-width: 64ch; }
h1, h2, h3 { margin: 0; line-height: 1.08; letter-spacing: -0.02em; text-wrap: balance; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  padding: 8px 14px; background: var(--ink); color: var(--white); border-radius: 6px;
}
.skip:focus { top: 12px; }

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

/* Header */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 22px 0;
}
.mark {
  font-weight: 800; font-size: 1.35rem; letter-spacing: -0.03em; color: var(--ink); text-decoration: none;
}
.mark span { color: var(--blue); }
.nav { display: flex; gap: 6px 22px; flex-wrap: wrap; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.nav a:hover { color: var(--blue); text-decoration: underline; }

/* Hero */
.hero {
  display: grid; grid-template-columns: 1fr; gap: 40px;
  padding: 36px 0 72px;
}
.hero h1 {
  font-weight: 800; font-size: clamp(2.5rem, 6.4vw, 4.4rem); line-height: 0.98; letter-spacing: -0.03em;
  max-width: 12ch;
}
.lead { font-size: 1.2rem; line-height: 1.5; color: var(--ink-2); margin: 26px 0 30px; max-width: 46ch; }
.cta-row { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 22px; background: var(--blue); color: var(--white);
  font-weight: 700; font-size: 1rem; border-radius: 8px; border: 0; cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--blue-deep); color: var(--white); }
.btn[disabled] { opacity: 0.6; cursor: default; }
.mail { font-weight: 600; }

/* Manifest */
.manifest {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r);
  padding: 22px 24px 6px;
}
.manifest-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.manifest-head h2 { font-size: 1.1rem; font-weight: 700; letter-spacing: -0.01em; }
.manifest-head p { margin: 0; font-size: 0.9rem; color: var(--ink-2); }
.manifest-list { list-style: none; margin: 0; padding: 0; }
.manifest-list li { padding: 16px 0 18px; border-top: 1px solid var(--line); }
.m-name { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.08rem; }
.m-name::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--blue); flex: none; }
.m-desc { margin: 4px 0 10px 19px; color: var(--ink-2); font-size: 0.95rem; max-width: none; }
.chips { list-style: none; margin: 0 0 0 19px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips a {
  display: inline-block; padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px;
  color: var(--ink); font-weight: 600; font-size: 0.8rem; text-decoration: none; background: var(--white);
}
.chips a:hover { border-color: var(--blue); color: var(--blue); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Sections */
.section { padding: 64px 0; border-top: 1px solid var(--line); }
.section > .wrap > h2, .section h2.title { font-size: clamp(1.7rem, 3.2vw, 2.3rem); font-weight: 700; margin-bottom: 28px; }
.intro { color: var(--ink-2); font-size: 1.08rem; margin-top: -14px; margin-bottom: 34px; }

/* Services */
.services { display: grid; grid-template-columns: 1fr; gap: 26px 48px; margin: 0; }
.services div { margin: 0; }
.services dt { font-weight: 700; font-size: 1.15rem; margin-bottom: 6px; }
.services dd { margin: 0; color: var(--ink-2); max-width: 52ch; }

/* Case notes */
.cases { display: grid; grid-template-columns: 1fr; gap: 28px; }
.case { border-top: 3px solid var(--ink); padding-top: 18px; }
.case h3 { font-size: 1.35rem; font-weight: 700; margin-bottom: 4px; }
.case .what { font-weight: 600; color: var(--ink); margin-bottom: 10px; max-width: none; }
.case p { color: var(--ink-2); max-width: none; font-size: 0.98rem; }
.case p:last-child { margin-bottom: 0; }
.case a { font-weight: 600; }

/* Process */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 22px 32px; counter-reset: step; }
.steps li { counter-increment: step; border-top: 1px solid var(--line); padding-top: 14px; }
.steps li::before {
  content: counter(step); display: block; font-weight: 800; font-size: 2rem; line-height: 1; color: var(--blue); margin-bottom: 10px;
}
.steps h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 6px; }
.steps p { margin: 0; color: var(--ink-2); font-size: 0.98rem; }

/* About */
.about p { font-size: 1.12rem; max-width: 62ch; }
.about p:last-child { margin-bottom: 0; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 40px; }
.form { display: grid; gap: 16px; max-width: 560px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: 0.95rem; }
.field .hint { color: var(--ink-2); font-size: 0.85rem; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--white);
  border: 1px solid var(--line); border-radius: 8px; padding: 11px 13px;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--blue); outline-offset: 0; border-color: var(--blue); }
.field.err input, .field.err textarea { border-color: #B3261E; }
.err-msg { color: #B3261E; font-size: 0.88rem; display: none; }
.field.err .err-msg { display: block; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-note { color: var(--ink-2); font-size: 0.9rem; margin: 0; }
.form-status { margin: 0; font-weight: 600; }
.form-status.bad { color: #B3261E; }
.sent {
  background: var(--sky); border-radius: var(--r); padding: 22px 24px; max-width: 560px;
}
.sent h3 { font-size: 1.3rem; margin-bottom: 8px; }
.sent p { margin: 0; color: var(--ink); }
.aside h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 6px; }
.aside p { color: var(--ink-2); margin-bottom: 20px; max-width: 36ch; }
.aside .big { font-size: 1.3rem; font-weight: 700; }

/* Footer */
.foot {
  border-top: 1px solid var(--line); padding: 30px 0 40px;
  display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap;
  color: var(--ink-2); font-size: 0.92rem;
}
.foot a { color: var(--ink-2); }
.foot a:hover { color: var(--blue); }
.foot .links { display: flex; gap: 18px; flex-wrap: wrap; }

/* Simple pages (privacy, 404) */
.page { padding: 20px 0 80px; max-width: 64ch; }
.page h1 { font-size: clamp(2rem, 4.5vw, 2.8rem); font-weight: 800; margin-bottom: 22px; }
.page h2 { font-size: 1.25rem; font-weight: 700; margin: 30px 0 8px; }
.page p, .page li { color: var(--ink-2); }

/* Load moment: manifest rows settle in once. */
@media (prefers-reduced-motion: no-preference) {
  .manifest-list li { animation: settle 0.5s ease-out both; animation-delay: calc(120ms + var(--i, 0) * 70ms); }
  @keyframes settle { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
}

/* Layout at width */
@media (min-width: 720px) {
  .services { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .cases { grid-template-columns: repeat(3, 1fr); gap: 32px; }
}
@media (min-width: 960px) {
  .hero { grid-template-columns: 6fr 6fr; gap: 56px; align-items: start; padding: 48px 0 84px; }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .contact-grid { grid-template-columns: 7fr 4fr; gap: 64px; }
  .section { padding: 80px 0; }
}
