:root {
  --paper: #FDFDFC;
  --ink: #191916;
  --muted: #6E6A63;
  --line: rgba(25, 25, 22, .14);
  --red: #E4533F;
  --radius: 14px;
  --hand: 'Caveat', 'Segoe Script', cursive;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; overflow-x: hidden; background: var(--paper); color: var(--ink);
  font: 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.hand { font-family: var(--hand); font-weight: 700; }
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .5;
  background-image: linear-gradient(rgba(25,25,22,.032) 1px, transparent 1px), linear-gradient(90deg, rgba(25,25,22,.032) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, #000 0, #000 60%, transparent 100%);
}
main, header, footer { position: relative; z-index: 1; }
.wrap, main > section { width: min(1160px, calc(100% - 40px)); margin-inline: auto; }

/* nav */
.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 18px max(20px, calc((100% - 1160px) / 2));
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: rgba(253,253,252,.88); backdrop-filter: blur(12px); z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; letter-spacing: -.02em; font-size: 18px; }
.brand svg { width: 30px; height: 30px; }
.brand em { font-style: normal; font-weight: 500; color: var(--muted); }
.navlinks { display: flex; gap: 22px; align-items: center; font-size: 14px; font-weight: 500; }
.navlinks a { text-decoration: none; color: var(--muted); }
.navlinks a:hover { color: var(--ink); }
.navlinks .ghost { border: 1px solid var(--line); padding: 7px 12px; border-radius: 99px; color: var(--ink); }
@media (max-width: 720px) { .navlinks a:not(.ghost) { display: none; } }

/* hero */
.hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 60px; align-items: center; padding: 64px 0 72px; }
.eyebrow { display: flex; align-items: center; gap: 9px; font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 18px; font-weight: 600; }
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px rgba(228,83,63,.14); }
h1 { font-size: clamp(42px, 6.2vw, 78px); line-height: .98; letter-spacing: -.045em; margin: 0 0 22px; font-weight: 800; }
h1 .hand { font-size: 1.1em; letter-spacing: -.01em; }
h1 .mark { position: relative; white-space: nowrap; }
h1 .mark::after { content: ''; position: absolute; left: -2%; right: -2%; bottom: .06em; height: .14em; background: var(--red); opacity: .35; border-radius: 99px; transform: rotate(-.7deg); }
.lede { font-size: 18px; color: #45423C; max-width: 52ch; margin: 0 0 26px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.tiny { font-size: 12.5px; color: var(--muted); margin: 16px 0 0; }
.tiny.center { text-align: center; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--ink); background: var(--ink); color: var(--paper);
  padding: 13px 20px; border-radius: 99px; font: 600 14.5px var(--sans);
  text-decoration: none; cursor: pointer; transition: transform .12s ease, background .15s, color .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(25,25,22,.16); }
.btn.quiet { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.quiet:hover { border-color: var(--ink); }
.btn.primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn.wide { width: 100%; padding: 15px; font-size: 15.5px; }
.btn:disabled { opacity: .55; cursor: progress; transform: none; }

/* hero art */
.hero-art { position: relative; width: 100%; max-width: 480px; }
.sheet {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: 18px;
  padding: 22px; transform: rotate(1.4deg); box-shadow: 14px 18px 0 rgba(25,25,22,.05);
  aspect-ratio: 4 / 3.3; overflow: hidden;
}
.sheet-head { font: 600 10.5px var(--sans); letter-spacing: .14em; color: var(--muted); }
.sheet-title { font-family: var(--hand); font-weight: 700; font-size: clamp(30px, 3.1vw, 38px); line-height: .92; margin-top: 10px; }
.sheet-title span { color: var(--red); }
.walker { position: absolute; right: 12px; bottom: 62px; width: 44%; color: var(--ink); }
.walker .fig { transform-origin: 100px 250px; animation: bob 2.4s ease-in-out infinite; }
.arm-b { transform-origin: 100px 88px; animation: wave 2.4s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-7px) rotate(-1deg); } }
@keyframes wave { 0%,100% { transform: rotate(0); } 50% { transform: rotate(-14deg); } }
.sheet-prop { position: absolute; left: 10%; bottom: 82px; font-size: 46px; color: #E2A93A; transform: rotate(-8deg); }
.sheet-caption { position: absolute; left: 0; right: 0; bottom: 16px; text-align: center; font-weight: 600; font-size: 13px; color: #3B3833; }
.sheet-tag {
  position: absolute; right: -8px; top: -13px; transform: rotate(-3deg);
  background: var(--ink); color: var(--paper); font-size: 11px; letter-spacing: .06em;
  padding: 6px 11px; border-radius: 99px;
}

/* sections */
.sect-head { display: flex; align-items: baseline; gap: 18px; justify-content: space-between; margin: 0 0 22px; flex-wrap: wrap; }
.sect-head h2 { font-size: clamp(26px, 3vw, 36px); letter-spacing: -.03em; margin: 0; }
.sect-head p { margin: 0; color: var(--muted); font-size: 14px; }

/* studio */
.studio { padding: 20px 0 10px; scroll-margin-top: 80px; }
.studio-grid { display: grid; grid-template-columns: 1.12fr .88fr; gap: 18px; align-items: start; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 22px; }
.preview-panel { position: sticky; top: 82px; background: #FBFBF8; }
.modes { display: flex; gap: 6px; background: #F3F2ED; padding: 4px; border-radius: 99px; margin-bottom: 18px; }
.mode { flex: 1; border: 0; background: transparent; padding: 9px; border-radius: 99px; font: 600 13.5px var(--sans); color: var(--muted); cursor: pointer; }
.mode.on { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(25,25,22,.12); }

.field { display: block; margin: 0 0 18px; border: 0; padding: 0; min-width: 0; }
.label { display: block; font: 600 13px var(--sans); margin-bottom: 8px; letter-spacing: .01em; }
.label .len { float: right; font-family: var(--hand); font-size: 20px; color: var(--red); line-height: 1; }
textarea, select, input[type=range] { width: 100%; max-width: 100%; font: inherit; }
textarea, .card, .sheet { min-width: 0; }
textarea {
  border: 1px solid var(--line); border-radius: 10px; padding: 13px; resize: vertical;
  background: #FDFDFC; min-height: 118px; line-height: 1.5;
}
textarea:focus, select:focus { outline: 2px solid rgba(228,83,63,.32); border-color: var(--red); }
select { border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; background: #FDFDFC; }
.counter { display: block; text-align: right; font-size: 11.5px; color: var(--muted); margin-top: 5px; }
.hint { font-size: 12px; color: var(--muted); display: block; margin-top: 8px; }

.themes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.theme { position: relative; border: 1px solid var(--line); border-radius: 10px; padding: 0; overflow: hidden; cursor: pointer; background: none; text-align: left; }
.theme span { display: block; height: 44px; }
.theme b { display: block; font: 600 10.5px var(--sans); padding: 6px 7px; color: var(--muted); letter-spacing: .01em; }
.theme.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.theme.on b { color: var(--ink); }
.theme.on::after { content: '✓'; position: absolute; right: 6px; top: 5px; font-size: 11px; background: var(--ink); color: #fff; width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; }

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.segmented { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.segmented button { flex: 1; border: 0; background: #FDFDFC; padding: 11px 6px; font: 600 13px var(--sans); color: var(--muted); cursor: pointer; }
.segmented button.on { background: var(--ink); color: var(--paper); }

input[type=range] { -webkit-appearance: none; height: 30px; background: transparent; }
input[type=range]::-webkit-slider-runnable-track { height: 4px; background: var(--line); border-radius: 99px; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 19px; height: 19px; border-radius: 50%; background: var(--red); border: 3px solid #fff; box-shadow: 0 1px 5px rgba(0,0,0,.25); margin-top: -8px; }
input[type=range]::-moz-range-track { height: 4px; background: var(--line); border-radius: 99px; }
input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--red); border: 3px solid #fff; }

/* live storyboard */
.preview-head { display: flex; justify-content: space-between; font: 600 11px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.badge { border: 1px solid var(--line); border-radius: 99px; padding: 2px 8px; letter-spacing: .04em; color: var(--ink); }
.canvas-wrap { perspective: 900px; }
.pv-canvas {
  position: relative; border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  aspect-ratio: 16 / 9; background: #FDFDFC; color: #191916; transition: aspect-ratio .3s, background .3s;
}
.pv-canvas[data-ratio="9:16"] { aspect-ratio: 9 / 16; max-height: 430px; margin-inline: auto; }
.pv-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(25,25,22,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(25,25,22,.05) 1px, transparent 1px); background-size: 26px 26px; }
.pv-title { position: absolute; left: 8%; top: 13%; font: 800 clamp(15px, 2.1vw, 24px)/.98 var(--sans); letter-spacing: -.03em; }
.pv-title span { color: var(--red); }
.pv-canvas[data-ratio="9:16"] .pv-title { font-size: 20px; top: 9%; }
.pv-fig { position: absolute; right: 7%; bottom: 18%; height: 58%; color: var(--ink); }
.pv-canvas[data-ratio="9:16"] .pv-fig { height: 40%; right: auto; left: 14%; bottom: 30%; }
.pv-prop { position: absolute; left: 9%; bottom: 26%; font-size: 34px; color: #E2A93A; transform: rotate(-8deg); }
.pv-canvas[data-ratio="9:16"] .pv-prop { bottom: 64%; left: auto; right: 14%; }
.pv-cap { position: absolute; left: 6%; right: 6%; bottom: 6%; text-align: center; font: 600 11px var(--sans); color: #2A2723; }
.pv-canvas[data-ratio="9:16"] .pv-cap { font-size: 10px; }
.preview-panel .hint { margin-top: 14px; }

/* job */
.job { padding: 60px 0 30px; scroll-margin-top: 80px; }
.job-card { max-width: 760px; margin: 0 auto; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; background: #fff; }
.job-top h2 { margin: 0 0 18px; font-size: 26px; letter-spacing: -.02em; }
.bar { height: 7px; border-radius: 99px; background: #EFEDE7; overflow: hidden; }
.bar i { display: block; height: 100%; width: 2%; background: var(--red); border-radius: 99px; transition: width .5s ease; }
.steps { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; padding: 0; margin: 18px 0 0; font-size: 12px; color: var(--muted); }
.steps li::before { content: ''; display: block; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--line); margin-bottom: 7px; }
.steps li.done { color: var(--ink); }
.steps li.done::before { background: var(--ink); border-color: var(--ink); }
.steps li.active { color: var(--red); font-weight: 600; }
.steps li.active::before { background: var(--red); border-color: var(--red); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { transform: scale(1.45); opacity: .6; } }
.job-out { margin-top: 22px; }
.job-out video { width: 100%; border-radius: 10px; background: #000; border: 1px solid var(--line); }
.job-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.job-err { margin-top: 18px; border: 1px solid rgba(228,83,63,.4); background: rgba(228,83,63,.06); color: #8d2c1e; padding: 12px 14px; border-radius: 10px; font-size: 13.5px; white-space: pre-wrap; }

/* gallery */
.gallery { padding: 60px 0 20px; scroll-margin-top: 80px; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.card { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; text-decoration: none; display: block; transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(25,25,22,.1); }
.card .thumb { aspect-ratio: 16/9; background: #EFEDE7 center/cover no-repeat; position: relative; }
.card .thumb span { position: absolute; right: 7px; bottom: 7px; background: rgba(0,0,0,.7); color: #fff; font-size: 10.5px; padding: 2px 6px; border-radius: 4px; }
.card .meta { padding: 9px 10px; }
.card .meta b { display: block; font-size: 12.5px; line-height: 1.35; font-weight: 600; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.card .meta span { font-size: 11px; color: var(--muted); }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, 1fr); } }

/* how */
.how { padding: 56px 0 70px; border-top: 1px solid var(--line); margin-top: 50px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cards article { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; background: #FBFBF8; }
.num { font-family: var(--hand); font-size: 28px; color: var(--red); }
.cards h3 { margin: 6px 0 8px; font-size: 17px; }
.cards p { margin: 0; font-size: 13.5px; color: #4E4A43; }

footer { border-top: 1px solid var(--line); padding: 22px 20px; text-align: center; font-size: 12px; color: var(--muted); }
footer a { color: var(--ink); }

.hidden { display: none !important; }

@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 36px; padding: 42px 0 30px; }
  .hero-art, .sheet { max-width: 100%; }
  .hero-copy, .preview-panel, .panel { min-width: 0; }
  .studio-grid { grid-template-columns: minmax(0, 1fr); }
  .preview-panel { position: static; }
  .cards { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .steps li { font-size: 11px; }
}
@media (max-width: 560px) {
  .themes { grid-template-columns: repeat(3, 1fr); }
  .row { grid-template-columns: 1fr; }
  .panel { padding: 16px; }
  .job-card { padding: 18px; }
}
