:root {
  --ivory: #f3ece0;
  --ink: #2c2418;
  --moss: #5b6b4a;
  --dust: #8a6a45;
  --display: "Cormorant Garamond", "Noto Serif SC", serif;
  --sans: "Noto Sans SC", "PingFang SC", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 64px; }
body { margin: 0; color: var(--ink); background: var(--ivory); font-family: var(--sans); font-size: 16px; line-height: 1.7; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.app-link { color: var(--moss); text-decoration: underline; text-underline-offset: 3px; }
button { font-family: inherit; cursor: pointer; }
code { font-family: var(--mono); background: #e6dccb; padding: 0.05em 0.35em; }
.linen { pointer-events: none; position: fixed; inset: 0; z-index: 5; opacity: 0.18; background-image: url("images/texture.webp"); background-size: 400px auto; mix-blend-mode: multiply; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 10px; top: 10px; z-index: 80; background: var(--moss); color: #fff; padding: 8px; }
.atelier { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 18px; min-height: 60px; background: #efe6d6; border-bottom: 1px solid #d7ccb8; }
.brand { font-family: var(--display); font-size: 26px; }
.brand small { display: block; font-family: var(--mono); font-size: 10px; color: var(--moss); letter-spacing: 0.14em; }
.studio-links { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 14px; }
.studio-links a.is-active { color: var(--moss); }
.studio-links .live { background: var(--moss); color: #fff; padding: 6px 12px; font-weight: 700; }
.nav-toggle { display: none; background: transparent; border: 1px solid var(--ink); padding: 6px 12px; }
.hero { position: relative; }
.hero > img { width: 100%; height: 80vh; object-fit: cover; }
.mat { position: absolute; left: 6vw; bottom: 28px; max-width: 560px; background: rgba(243, 236, 224, 0.94); padding: 28px; border: 1px solid #d7ccb8; }
.kicker { font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; color: var(--moss); margin: 0 0 8px; }
h1, h2, h3 { font-family: var(--display); margin: 0 0 12px; line-height: 1.15; }
h1 { font-size: clamp(36px, 6vw, 56px); }
h1 em { font-style: italic; color: var(--dust); }
h2 { font-size: clamp(26px, 3.4vw, 40px); }
.quiet { color: #5c5346; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.btn { display: inline-block; padding: 10px 16px; border: 1px solid var(--ink); font-weight: 700; }
.btn.fill { background: var(--moss); color: #fff; border-color: var(--moss); }
.btn.ghost { background: transparent; }
.wrap { width: min(1080px, calc(100% - 40px)); margin: 0 auto; padding: 72px 0; }
.ivory { background: #efe6d6; }
.three, .four, .io { display: grid; gap: 16px; }
.three { grid-template-columns: repeat(3, 1fr); }
.four { grid-template-columns: repeat(4, 1fr); }
.three article, .four article, .io > div { background: #fffaf3; border: 1px solid #d7ccb8; padding: 18px; }
.three .warn { border-color: var(--dust); }
ul { margin: 0; padding-left: 1.1em; }
li + li { margin-top: 6px; }
.steps { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; list-style: none; padding: 0; margin: 0 0 36px; }
.steps li { padding: 12px 8px; background: #fffaf3; border-bottom: 3px solid var(--moss); font-size: 14px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center; margin-bottom: 40px; }
.pair.flip figure { order: -1; }
.num { font-family: var(--mono); color: var(--dust); font-size: 12px; }
figure { margin: 0; }
figcaption { color: #5c5346; font-size: 13px; margin-top: 8px; }
.rest { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.rest button { background: #fffaf3; border: 1px solid #d7ccb8; padding: 8px 12px; }
.rest button.on { border-color: var(--moss); color: var(--moss); }
.bound { padding-left: 1.2em; }
.io { grid-template-columns: 1fr 1fr; }
footer { padding: 24px 20px 40px; background: #2c2418; color: #d7ccb8; font-size: 14px; }
footer .app-link { color: #c5d4b0; }
@media (max-width: 900px) {
  .nav-toggle { display: inline-block; }
  .studio-links { display: none; position: absolute; top: 60px; left: 0; right: 0; background: #efe6d6; padding: 12px 18px; flex-direction: column; align-items: flex-start; }
  .studio-links.open { display: flex; }
  .hero > img { height: 48vh; }
  .mat { position: relative; left: 0; bottom: 0; max-width: none; }
  .three, .four, .pair, .pair.flip, .io, .steps { grid-template-columns: 1fr; }
  .pair.flip figure { order: 0; }
}
