:root {
  --paper: #fbf6ea;
  --paper-2: #f2e9d6;
  --ink: #1d1a16;
  --soft: #6a6255;
  --orange: #f29a2e;
  --blue: #2a7de0;
  --sky: #8fcdf2;
  --green: #3aa34a;
  --yellow: #f3d23e;
  --display: "Darumadrop One", "Zen Kaku Gothic New", sans-serif;
  --body: "Zen Kaku Gothic New", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.2, .7, .1, 1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--body); color: var(--ink); background: var(--paper); font-size: 17px; line-height: 1.7; -webkit-font-smoothing: antialiased; overflow-x: clip; }
body::after { content: ""; position: fixed; inset: 0; z-index: 100; pointer-events: none; opacity: .07; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
a { color: inherit; }
h1, h2, h3, .logo, .ph-title, .note, .bigmark, .hero-media span { font-family: var(--display); font-weight: 400; letter-spacing: .01em; }
h1, h2, h3 { margin: 0; line-height: 1.08; }
.wrap { width: min(1200px, 100% - 64px); margin: 0 auto; position: relative; }

/* ---------- ink strokes (ink.js) ---------- */
svg.ink { position: absolute; pointer-events: none; overflow: visible; z-index: 3; color: var(--ink); }
svg.ink path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.1s var(--ease); }
.drawn > svg.ink path { stroke-dashoffset: 0; }
.ink-line, .ink-top, .ink-bottom, .ink-box, .ink-under, .ink-hover, .ink-circle { position: relative; }
.ink-under, .ink-circle { display: inline-block; }
.ink-under { --ink-w: 4.5; }
.ink-circle { --ink-w: 3; }
.ink-circle > svg.ink path { transition-duration: 1.4s; transition-delay: .5s; }
.ink-hover { --ink-w: 2.2; }
.ink-hover > svg.ink path { transition-duration: .45s; }
.ink-hover:hover > svg.ink path { stroke-dashoffset: 0; }
.u-orange > svg.ink { color: var(--orange); }
.u-green > svg.ink { color: var(--green); }
.u-yellow > svg.ink { color: var(--yellow); }
.u-yellow { --ink-w: 9; }
.c-blue > svg.ink, .note.c-blue { color: var(--blue); }
.note.c-orange { color: #d9811a; }
.note.c-green { color: var(--green); }
.rule { height: 4px; --ink-w: 2.3; }

/* ---------- doodles ---------- */
.doodle { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.doodle path, .doodle g path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.2s var(--ease); }
.doodle.drawn path { stroke-dashoffset: 0; }
.doodle.drawn path:nth-child(2) { transition-delay: .35s; }
.doodle.drawn path:nth-child(3) { transition-delay: .6s; }
.doodle.drawn path:nth-child(4) { transition-delay: .8s; }
.wiggle { animation: wiggle 3.2s ease-in-out infinite alternate; transform-origin: 50% 60%; }
@keyframes wiggle { from { transform: rotate(-3deg); } to { transform: rotate(3deg); } }

/* ---------- header ---------- */
.top { position: fixed; inset: 0 0 auto; z-index: 20; transition: background .35s var(--ease); }
.top > svg.ink { opacity: 0; transition: opacity .35s; }
.top.solid { background: rgba(251, 246, 234, .94); backdrop-filter: blur(8px); }
.top.solid > svg.ink { opacity: 1; }
.bar { display: flex; align-items: center; justify-content: space-between; height: 78px; }
.logo { font-size: 32px; line-height: 1; text-decoration: none; display: inline-block; transition: transform .3s var(--ease); }
.logo:hover { transform: rotate(-3deg) scale(1.04); }
.top nav { display: flex; gap: 30px; }
.top nav a { text-decoration: none; font-weight: 500; font-size: 15.5px; }

/* ---------- buttons & links ---------- */
.btn { display: inline-block; text-decoration: none; font-weight: 700; font-size: 15.5px; padding: 13px 26px; background: var(--paper); transition: transform .3s var(--ease), background .2s; --ink-w: 2.2; }
.btn:hover { background: #fff1c4; transform: rotate(-1.5deg) translateY(-2px); }
.link { font-weight: 700; font-size: 15.5px; text-decoration: none; }
.link.muted { color: var(--soft); }

/* ---------- hero ---------- */
.hero { padding: 168px 0 90px; position: relative; }
.hero h1 { font-size: clamp(42px, 5.9vw, 86px); }
.hero h1 .ink-under { white-space: nowrap; }
.sparkles { position: absolute; width: 110px; right: 4%; top: -18px; color: var(--ink); }
.sparkles .tw { stroke-width: 2; animation: twinkle 2.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes twinkle { 0%, 100% { transform: scale(.75) rotate(0); } 50% { transform: scale(1.1) rotate(18deg); } }
.hero-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; margin: 40px 0 64px; flex-wrap: wrap; }
.hero-row p { margin: 0; font-size: 19px; max-width: 30ch; color: var(--soft); }
.actions { display: flex; align-items: center; gap: 26px; position: relative; }
.note { position: absolute; font-size: 21px; line-height: 1; white-space: nowrap; pointer-events: none; transition: translate .6s var(--ease); }
.note svg { position: absolute; }
.n-start { right: 168px; top: -66px; transform: rotate(-6deg); color: var(--blue); }
.n-start svg { width: 70px; left: 92px; top: 8px; }
.hero-media { aspect-ratio: 16 / 7.5; background: var(--paper-2); display: grid; place-items: center; align-content: center; gap: 10px; --ink-w: 2.4; }
.hero-media .play { width: 84px; color: var(--ink); }
.hero-media span { font-size: 22px; color: var(--soft); transform: rotate(-3deg); }
.corner { position: absolute; width: 26px; height: 26px; border-color: var(--orange); border-style: solid; border-width: 0; }
.corner.c1 { left: 16px; top: 16px; border-left-width: 3px; border-top-width: 3px; border-radius: 3px 0 0 0; }
.corner.c2 { right: 16px; bottom: 16px; border-right-width: 3px; border-bottom-width: 3px; border-radius: 0 0 3px 0; }
.rise { opacity: 0; transform: translateY(18px); animation: rise 1s var(--ease) forwards; }
.hero-row.rise { animation-delay: .15s; }
.hero-media.rise { animation-delay: .3s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- games ---------- */
.games { padding: 110px 0 130px; }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; margin-bottom: 72px; flex-wrap: wrap; }
.sec-head h2, .publishing h2, .about h2, .contact h2 { font-size: clamp(44px, 5.4vw, 76px); }
.sec-head p { margin: 0; color: var(--soft); font-size: 18px; }
.covers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 56px; }
.cover-wrap { position: relative; }
.game h3 { font-size: 34px; margin-top: 30px; }
.game .meta { color: var(--soft); font-size: 14px; font-weight: 500; margin: 4px 0 12px; }
.game p { margin: 0 0 18px; }
.cover { display: block; aspect-ratio: 2 / 3; text-decoration: none; color: #fffaf0; transition: transform .6s var(--ease); --ink-w: 2.4; }
.cover:hover { transform: rotate(-1.4deg) translateY(-6px); }
.game:nth-child(2) .cover:hover { transform: rotate(1.4deg) translateY(-6px); }
.ph-orange { background: linear-gradient(175deg, #f6b14f 0%, var(--orange) 70%); }
.ph-blue { background: linear-gradient(175deg, #4d97ea 0%, var(--blue) 70%); }
.ph-open { background: var(--paper-2); color: var(--ink); }
.ph-title { position: absolute; left: 24px; right: 24px; top: 50%; transform: translateY(-50%); text-align: center; font-size: 46px; line-height: 1; -webkit-text-stroke: 2.5px var(--ink); paint-order: stroke fill; }
.ph-open .ph-title { -webkit-text-stroke: 0; font-size: 40px; top: 58%; }
.ph-open .q { position: absolute; width: 46px; left: 50%; top: 22%; margin-left: -23px; }
.ph-label { position: absolute; left: 0; right: 0; bottom: 18px; text-align: center; font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ink); opacity: .45; font-family: var(--body); }
.tape { position: absolute; z-index: 4; width: 86px; height: 26px; background: rgba(255, 244, 214, .82); box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
  clip-path: polygon(3% 8%, 12% 0, 25% 10%, 38% 2%, 52% 9%, 66% 1%, 80% 8%, 92% 0, 100% 12%, 97% 92%, 86% 100%, 72% 91%, 58% 99%, 44% 90%, 30% 98%, 16% 90%, 4% 99%, 0 85%); }
.tape.t1 { left: -18px; top: 14px; transform: rotate(-38deg); }
.tape.t2 { right: -18px; top: 14px; transform: rotate(36deg); }
.n-cover { right: -8px; top: -46px; transform: rotate(5deg); }
.n-cover svg { width: 54px; left: -48px; top: 6px; }
.note { opacity: 0; transition: opacity .8s .6s var(--ease), translate .6s var(--ease); }
.reveal.in .note, .actions .note { opacity: 1; }

/* ---------- publishing ---------- */
.publishing, .about { padding: 120px 0; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; }
.big { font-size: clamp(21px, 1.9vw, 26px); font-weight: 500; line-height: 1.5; margin: 24px 0 0; }
.offer { list-style: none; padding: 0; margin: 4px 0 40px; }
.offer li { display: grid; grid-template-columns: 44px 150px 1fr; gap: 16px; align-items: center; padding: 18px 0; --ink-w: 1.8; }
.offer .ic { width: 36px; height: 36px; color: var(--green); stroke-width: 2; }
.offer li:hover .ic { animation: wiggle .5s ease-in-out 2 alternate; }
.offer strong { font-weight: 700; }
.offer span { color: var(--soft); }
.about-title { position: relative; display: flex; align-items: flex-start; gap: 18px; }
.about .bulb { width: 62px; color: var(--yellow); stroke-width: 2.6; margin-top: -10px; }
.about .bulb .ray { stroke: var(--orange); }
.about .big { margin-top: 0; }
.soft { color: var(--soft); margin: 22px 0 0; }

/* ---------- contact ---------- */
.contact { padding: 120px 0 130px; }
.contact-title { position: relative; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.plane { width: 260px; color: var(--blue); }
.plane .trail { stroke-dasharray: .015 .03; stroke-dashoffset: 0; opacity: 0; transition: opacity 1s .3s; }
.plane.drawn .trail { opacity: .7; }
.plane .fly { animation: fly 3.6s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }
@keyframes fly { from { transform: translate(0, 0) rotate(0); } to { transform: translate(6px, -8px) rotate(-6deg); } }
.mails { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 56px; }
.mails a { display: block; text-decoration: none; font-weight: 700; font-size: clamp(17px, 1.6vw, 21px); padding: 24px 0 0; transition: color .2s, transform .3s var(--ease); --ink-w: 2; }
.mails a:hover { color: var(--blue); transform: translateY(-3px) rotate(-1deg); }
.mails span { display: block; font-size: 13px; font-weight: 500; color: var(--soft); margin-bottom: 4px; }

/* ---------- footer ---------- */
footer { padding: 0 0 0; overflow: hidden; }
.foot { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: 34px 0 10px; }
.foot nav { display: flex; gap: 26px; }
.foot nav a { text-decoration: none; font-size: 15px; font-weight: 500; }
.foot small { color: var(--soft); font-size: 14px; }
.bigmark { font-size: 16.6vw; line-height: 1; text-align: center; white-space: nowrap; margin: 24px 0 0; user-select: none; }
.bigmark span { display: inline-block; transition: transform .45s var(--ease), color .3s; }
.bigmark:hover span { transform: translateY(-4%) rotate(-3deg); transition-delay: calc(var(--i) * 35ms); }
.bigmark span:nth-child(3n+1):hover { color: var(--orange); }
.bigmark span:nth-child(3n+2):hover { color: var(--blue); }
.bigmark span:nth-child(3n):hover { color: var(--green); }

/* ---------- reveal ---------- */
.still *, .still *::before, .still *::after { transition: none !important; animation-duration: 0s !important; animation-delay: 0s !important; }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .split { grid-template-columns: 1fr; gap: 32px; }
  .covers { grid-template-columns: minmax(0, 340px); gap: 90px; justify-content: center; }
  .mails { grid-template-columns: 1fr; gap: 8px; }
  .hero-media { aspect-ratio: 16 / 10; }
  .hero h1 br { display: none; }
  .n-start { display: none; }
}
@media (max-width: 640px) {
  .wrap { width: calc(100% - 40px); }
  .top nav { gap: 18px; }
  .top nav a:nth-child(n+3) { display: none; }
  .hero { padding-top: 130px; }
  .hero h1 .ink-under { white-space: normal; }
  .sparkles { width: 70px; top: -40px; right: 0; }
  .offer li { grid-template-columns: 40px 1fr; }
  .offer li span { grid-column: 2; }
  .games, .publishing, .about, .contact { padding: 90px 0; }
  .foot nav { display: none; }
  .plane { width: 180px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .rise, .note { opacity: 1; transform: none; }
}

/* ---------- extra hand-drawn details ---------- */
/* line boil: tiny stepped jitter, like redrawn animation frames */
.boil { animation: boil .5s steps(1) infinite; }
@keyframes boil { 0% { transform: rotate(-.8deg) translate(.4px, 0); } 33% { transform: rotate(.7deg) translate(-.4px, .4px); } 66% { transform: rotate(.1deg) translate(0, -.5px); } }
.has-marks { position: relative; display: inline-block; }
.marks { position: absolute; width: 42px; right: -46px; top: -10px; color: var(--orange); stroke-width: 3; }
.ink-strike { --ink-w: 2.6; text-decoration: none; display: inline-block; position: relative; color: var(--soft); }
.ink-strike > svg.ink { color: var(--orange); }
.ink-strike > svg.ink path { transition-delay: .5s; }
.stamp { display: block; width: 170px; margin: 64px 0 0 6%; color: var(--ink); overflow: visible; transform: rotate(-8deg); }
.stamp text { font-family: var(--display); font-size: 16px; fill: var(--ink); }
.stamp .spin { animation: spin 38s linear infinite; transform-origin: 100px 100px; }
.stamp .rim { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.stamp .star { fill: var(--green); stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; transform-origin: 100px 97px; animation: twinkle 3.4s ease-in-out infinite; }
.stamp:hover .spin { animation-duration: 6s; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 960px) { .stamp { width: 130px; margin: 36px 0 0 auto; } }
@media (max-width: 640px) { .marks { width: 34px; right: -38px; top: -18px; } }
