/* Ikota Paper Co. Studio — cream ground, bright rounded blocks, sticker dragons */
:root {
  --cream: #fff3e6;
  --white: #fffdf9;
  --pink: #f7a3bd;
  --pink-soft: #fbd0dc;
  --coral: #f47c57;
  --yellow: #ffcf66;
  --green: #a9cbb0;
  --peach: #ffd9c2;
  --ink: #2c1b3a;
  --muted: #4d3a5c;

  --display: "Bricolage Grotesque", "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  --text: "DM Sans", "Helvetica Neue", Arial, sans-serif;

  --step-small: 0.9375rem;
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.12rem + 0.55vw, 1.5rem);
  --step-head: clamp(2.125rem, 1.4rem + 3.1vw, 4rem);
  --step-display: clamp(3.25rem, 1.2rem + 7.6vw, 7.5rem);

  --m: clamp(12px, 1.6vw, 24px);
  --pad: clamp(20px, 4vw, 64px);
  --r-panel: clamp(28px, 3.4vw, 48px);
  --r-card: 26px;
  --gap: clamp(72px, 9vw, 136px);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { overflow-x: clip; }
body {
  margin: 0; background: var(--cream); color: var(--ink);
  font-family: var(--text); font-size: var(--step-body); line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, figure { margin: 0; padding: 0; }
ul { list-style: none; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: -0.03em; line-height: 0.98; text-wrap: balance; }
h1 { font-size: var(--step-display); line-height: 0.92; }
h2 { font-size: var(--step-head); }
h3 { font-size: var(--step-lead); letter-spacing: -0.02em; line-height: 1.1; }
p { text-wrap: pretty; }
.lead { font-size: var(--step-lead); line-height: 1.35; max-width: 36ch; margin-top: 16px; }
.center { text-align: center; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--ink); color: var(--yellow); }

/* Layout: everything sits in the same gutter; panels are big rounded colour blocks */
.block { margin: var(--gap) var(--m) 0; }
.block:not(.panel) { padding-inline: calc(var(--pad) - var(--m)); }
.panel { border-radius: var(--r-panel); padding: var(--pad); position: relative; }
.panel--white { background: var(--white); }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }

/* Buttons: one pill shape everywhere */
.btn {
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  min-height: 54px; padding: 0 28px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--yellow); color: var(--ink);
  font: 700 var(--step-body)/1.1 var(--text); text-decoration: none;
  transition: transform 160ms var(--ease-out), background-color 180ms ease;
}
.btn:hover { background: #ffbf3a; transform: translateY(-2px) rotate(-1.5deg); }
.btn:active { transform: translateY(1px) scale(0.98); }
.btn--sm { min-height: 44px; padding: 0 20px; font-size: var(--step-small); }
.btn--white { background: var(--white); }
.btn--white:hover { background: #ffffff; }
.btn--cream { background: var(--cream); }
.btn--cream:hover { background: var(--peach); }
.btn--ink { background: var(--ink); color: var(--cream); }
.btn--ink:hover { background: #45305a; }

/* Stickers: cut-outs with a white edge, slightly tilted, never clickable */
.st { position: absolute; pointer-events: none; height: auto; z-index: 3; }

.tag {
  align-self: flex-start; display: inline-block; white-space: nowrap; padding: 5px 14px; border-radius: 999px;
  background: var(--tc, var(--yellow)); font-size: var(--step-small); font-weight: 700;
}
.dots { display: grid; gap: 12px; }
.dots li { display: grid; grid-template-columns: 16px 1fr; gap: 14px; align-items: start; }
.dots li::before { content: ""; width: 16px; height: 16px; margin-top: 0.3em; border-radius: 50%; background: var(--dc, var(--coral)); }

/* ---------- Hero ---------- */
.hero { margin: var(--m) var(--m) 0; background: var(--pink); padding-top: clamp(16px, 2vw, 28px); overflow: hidden; }
.nav {
  display: flex; align-items: center; gap: 28px;
  background: var(--white); border-radius: 999px; padding: 10px 10px 10px 28px;
}
.nav__mark { font-family: var(--display); font-weight: 800; font-size: var(--step-lead); letter-spacing: -0.02em; text-decoration: none; margin-right: auto; white-space: nowrap; }
.nav__links { display: flex; gap: 26px; }
.nav__links a { font-weight: 500; text-decoration: none; white-space: nowrap; }
.nav__links a:hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 6px; text-decoration-color: var(--coral); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(24px, 4vw, 64px); align-items: center; padding-block: clamp(36px, 5vw, 72px) clamp(20px, 3vw, 40px); }
.hero__sub { font-size: var(--step-lead); line-height: 1.4; max-width: 34ch; margin-top: 26px; }
.hero__btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero__fact { margin-top: 22px; font-weight: 500; }
.hero__art { position: relative; aspect-ratio: 1 / 1; max-width: 600px; width: 100%; justify-self: center; }
.hero__sun { position: absolute; inset: 2% 0 0 4%; border-radius: 50%; background: var(--yellow); }
.hero__cover { position: absolute; left: 30%; top: 10%; width: 52%; border: 10px solid var(--white); border-radius: 20px; rotate: 6deg; }
.hero__d1 { left: -6%; bottom: 0; width: 56%; }
.hero__d2 { right: -4%; bottom: 4%; width: 34%; }
.badge {
  position: absolute; left: 2%; top: 4%; z-index: 4; width: 27%; aspect-ratio: 1; border-radius: 50%;
  background: var(--coral); rotate: -12deg;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  font-weight: 700; font-size: var(--step-small); line-height: 1.1;
}
.badge b { font-family: var(--display); font-weight: 800; font-size: var(--step-head); line-height: 0.9; letter-spacing: -0.03em; }

/* ---------- How a game goes ---------- */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 36px); margin-top: 56px; }
.step { position: relative; background: var(--sc); border-radius: var(--r-card); padding: 18px 18px 30px; rotate: var(--rot); transition: rotate 300ms var(--ease-out), transform 300ms var(--ease-out); }
.step:hover { rotate: 0deg; transform: translateY(-6px); }
.step figure { aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden; background: var(--white); border: 6px solid var(--white); }
.step img:not(.st) { width: 100%; height: 100%; object-fit: cover; }
.step h3 { margin-top: 22px; padding-inline: 8px; font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
.step p { margin-top: 10px; padding-inline: 8px; max-width: 34ch; }
.step__st { width: 34%; right: -6%; top: -9%; rotate: 8deg; }
.step:nth-child(2) .step__st { right: auto; left: -7%; top: -12%; rotate: -8deg; }

/* ---------- Ribbon ---------- */
.ribbon { margin-top: clamp(56px, 7vw, 104px); background: var(--yellow); rotate: -1.6deg; width: 104vw; margin-left: -2vw; overflow: hidden; padding: 16px 0; }
.ribbon__track { display: flex; width: max-content; }
.ribbon span { font-family: var(--display); font-weight: 800; font-size: var(--step-lead); letter-spacing: -0.02em; white-space: nowrap; padding-inline: 22px; display: flex; align-items: center; gap: 44px; }
.ribbon span::after { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--coral); }

/* ---------- Kit ---------- */
.kit { margin-top: clamp(56px, 7vw, 104px); }
.kit__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px); align-items: center; }
.kit__pic { position: relative; }
.kit__frame { position: relative; aspect-ratio: 900 / 798; background: var(--peach); border-radius: var(--r-card); overflow: hidden; }
.kit__frame img { position: absolute; inset: 5%; width: 90%; height: 90%; object-fit: contain; border-radius: 12px; opacity: 0; transform: scale(0.96) rotate(-2deg); transition: opacity 240ms ease, transform 500ms var(--ease-out); }
.kit__frame img.is-on { opacity: 1; transform: none; }
.kit__tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.kit__tabs button { border: 0; cursor: pointer; border-radius: 999px; padding: 10px 20px; background: var(--cream); color: var(--ink); font: 500 var(--step-small)/1.1 var(--text); transition: background-color 180ms ease, transform 160ms var(--ease-out); }
.kit__tabs button:hover { background: var(--peach); }
.kit__tabs button:active { transform: scale(0.96); }
.kit__tabs button[aria-selected="true"] { background: var(--ink); color: var(--cream); font-weight: 700; }
.kit__st { width: 30%; right: -5%; top: -8%; rotate: 7deg; }
.kit__text h2 { color: var(--ink); }
.kit__text .dots { margin-top: 26px; }
.kit__text .dots + p { margin-top: 24px; color: var(--muted); }
.kit__btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- Game cards (Emberdale, Willowmere) ---------- */
.ember { background: var(--peach); }
.willow { background: var(--green); }
.games { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 22px); margin-top: 44px; }
.games--two { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 0; }
.game { background: var(--white); border-radius: var(--r-card); padding: 12px; display: flex; flex-direction: column; transition: transform 260ms var(--ease-out), rotate 260ms var(--ease-out); }
.game:hover { transform: translateY(-8px); rotate: -1.2deg; }
.game:nth-child(even):hover { rotate: 1.2deg; }
.game__cover { display: block; border-radius: 16px; overflow: hidden; aspect-ratio: 1126 / 1458; }
.game__cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 700ms var(--ease-soft); }
.game:hover .game__cover img { transform: scale(1.04); }
.game__body { display: flex; flex-direction: column; gap: 10px; padding: 16px 6px 6px; flex: 1; }
.game__body p { color: var(--muted); }
.game__btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 8px; }
.game__btns .btn { flex: 1 1 auto; }
.game__btns .btn--white { background: var(--cream); }
.game__btns .btn--white:hover { background: var(--peach); }
.ember .head { position: relative; padding-right: 26%; }
.ember__fly { width: clamp(130px, 19vw, 280px); right: 2%; bottom: -18px; rotate: -6deg; }
.ember__map { position: relative; margin-top: clamp(48px, 6vw, 88px); }
.ember__map > img:first-child { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; object-position: 50% 42%; border-radius: var(--r-card); border: 10px solid var(--white); }
.ember__map figcaption { margin-top: 14px; font-size: var(--step-small); font-weight: 500; }
.ember__sleep { width: clamp(120px, 17vw, 250px); left: 3%; top: 0; transform: translateY(-58%); rotate: -4deg; }
.ember__kite { width: clamp(110px, 14vw, 210px); right: 3%; bottom: 0; transform: translateY(18%); rotate: 5deg; }

.willow__grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.willow__grid > div:first-child { position: sticky; top: 32px; }
.willow__pic { position: relative; margin-top: 36px; }
.willow__pic > img:first-child { width: 100%; border-radius: var(--r-card); border: 10px solid var(--white); rotate: -2deg; }
.willow__st { width: 62%; right: -8%; bottom: -16%; rotate: 6deg; }

/* ---------- One-offs ---------- */
.oneoff .head { position: relative; padding-right: 22%; }
.oneoff__st { width: clamp(110px, 14vw, 200px); right: 4%; bottom: -26px; rotate: 6deg; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 22px); margin-top: 44px; }
.tile { display: flex; flex-direction: column; gap: 8px; padding: 12px 12px 18px; border-radius: var(--r-card); background: var(--tc); text-decoration: none; transition: transform 260ms var(--ease-out), rotate 260ms var(--ease-out); }
.tile:hover { transform: translateY(-8px); rotate: 1.4deg; }
.tile:nth-child(odd):hover { rotate: -1.4deg; }
.tile img { width: 100%; aspect-ratio: 1126 / 1458; object-fit: cover; border-radius: 16px; border: 5px solid var(--white); }
.tile b { font-family: var(--display); font-weight: 800; font-size: var(--step-lead); letter-spacing: -0.02em; line-height: 1.1; padding: 8px 6px 0; }
.tile span { padding-inline: 6px; }
.tile u { margin-top: auto; padding: 8px 6px 0; font-weight: 700; font-size: var(--step-small); text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* Kit stickers: one piece from each game's own kit, pinned to its card */
.game, .tile { position: relative; }
.game .game__st, .tile img.tile__st {
  width: 40%; height: auto; aspect-ratio: auto; object-fit: contain; border: 0; border-radius: 0;
  left: auto; right: -5%; top: 0; transform: translateY(-56%) rotate(7deg); transition: transform 300ms var(--ease-out);
}
.game:nth-child(even) .game__st, .tile:nth-child(even) img.tile__st { transform: translateY(-56%) rotate(-5deg); }
.game:hover .game__st, .tile:hover img.tile__st { transform: translateY(-64%) rotate(0deg) scale(1.06); }
.tiles { row-gap: clamp(44px, 5vw, 72px); padding-top: 28px; }
.games--two { row-gap: clamp(44px, 5vw, 72px); padding-top: 36px; }
.willow__st { width: 74%; right: -10%; bottom: -22%; rotate: 4deg; }

/* ---------- Formats ---------- */
.formats__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2.6vw, 40px); margin-top: 56px; }
.format { position: relative; background: var(--fc); border-radius: var(--r-panel); padding: clamp(24px, 3.6vw, 52px); rotate: var(--rot); display: flex; flex-direction: column; align-items: flex-start; }
.format h3 { font-size: var(--step-head); }
.format__where { font-size: var(--step-lead); font-weight: 500; margin-top: 10px; }
.format .dots { margin: 28px 0 32px; max-width: 30ch; }
.format .btn { margin-top: auto; }
.format__st { width: 30%; right: -3%; bottom: -7%; rotate: 6deg; }

/* ---------- Draw a card ---------- */
.draw { background: var(--coral); overflow: hidden; }
.draw__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px); align-items: center; }
.draw .btn { margin-top: 30px; }
.draw__card { background: var(--white); border-radius: var(--r-card); padding: 14px; display: grid; grid-template-columns: 44% 1fr; gap: 22px; align-items: center; rotate: 3deg; max-width: 560px; justify-self: center; }
.draw__card img { width: 100%; border-radius: 14px; }
.draw__card p { margin-top: 10px; color: var(--muted); }
.draw__card .btn { margin-top: 18px; }
.draw__card.is-flip { animation: deal 560ms var(--ease-out); }
@keyframes deal { from { transform: translateY(24%) rotate(-14deg) scale(0.86); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Footer ---------- */
.foot { margin: var(--gap) var(--m) 0; padding: 0 calc(var(--pad) - var(--m)) 48px; }
.foot__row { position: relative; display: flex; align-items: flex-end; }
.foot__st { position: static; width: clamp(110px, 13vw, 190px); margin: 0 16px -6px 0; }
.foot__mark { font-family: var(--display); font-weight: 800; font-size: var(--step-head); letter-spacing: -0.03em; line-height: 1; }
.foot__links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.foot__links a { display: inline-block; padding: 12px 22px; border-radius: 999px; background: var(--white); font-weight: 700; text-decoration: none; transition: background-color 180ms ease, transform 160ms var(--ease-out); }
.foot__links a:hover { background: var(--yellow); transform: translateY(-2px); }
.foot__note { margin-top: 28px; max-width: 62ch; }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-rise] { opacity: 0; transform: translateY(20px); animation: rise 800ms var(--ease-out) forwards; animation-delay: calc(var(--n, 0) * 90ms + 120ms); }
  .js .hero__sun { transform: scale(0.6); opacity: 0; animation: pop 900ms var(--ease-out) 150ms forwards; }
  .js .hero__cover { opacity: 0; animation: slide-in 800ms var(--ease-out) 420ms forwards; }
  .js .badge { scale: 0; animation: stamp 600ms var(--ease-out) 900ms forwards, wobble 6s ease-in-out 1.6s infinite; }
  .hero__d1 { animation: breathe 5.5s ease-in-out infinite; transform-origin: 50% 100%; }
  .hero__d2 { animation: breathe 6.2s ease-in-out -2s infinite; transform-origin: 50% 100%; }
  .ember__fly { animation: fly 7s ease-in-out infinite; }
  .ember__sleep, .foot__st { animation: breathe 6.5s ease-in-out infinite; transform-origin: 50% 100%; }
  .ribbon__track { animation: ribbon 40s linear infinite; }
  .js [data-reveal] { opacity: 0; translate: 0 28px; transition: opacity 700ms var(--ease-out), translate 900ms var(--ease-out), transform 260ms var(--ease-out), rotate 300ms var(--ease-out); transition-delay: calc(var(--n, 0) * 80ms), calc(var(--n, 0) * 80ms), 0ms, 0ms; }
  .js [data-reveal].is-in { opacity: 1; translate: 0 0; }
}
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes pop { to { transform: none; opacity: 1; } }
@keyframes slide-in { from { opacity: 0; translate: 0 40px; } to { opacity: 1; translate: 0 0; } }
@keyframes stamp { from { scale: 0; } 70% { scale: 1.12; } to { scale: 1; } }
@keyframes wobble { 0%, 100% { rotate: -12deg; } 50% { rotate: -5deg; } }
@keyframes breathe { 0%, 100% { scale: 1 1; } 50% { scale: 1.012 1.03; } }
@keyframes fly { 0%, 100% { translate: 0 0; } 50% { translate: 12px -16px; } }
@keyframes ribbon { to { transform: translateX(-33.333%); } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 1ms !important; }
}

/* ---------- Tablet ---------- */
@media (max-width: 1080px) {
  .nav__links { display: none; }
  .games { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .willow__grid { grid-template-columns: 1fr; }
  .willow__grid > div:first-child { position: static; }
  .willow__pic { max-width: 520px; }
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__art { max-width: 480px; }
}

/* ---------- Phone ---------- */
@media (max-width: 720px) {
  .nav { padding: 8px 8px 8px 18px; gap: 12px; }
  .nav__mark { font-size: 1.0625rem; }
  .nav .btn { white-space: nowrap; padding: 0 16px; }
  .tag { padding: 4px 11px; }
  .ember__map figcaption { max-width: 60%; }
  .ember__kite { width: 96px; transform: translateY(34%); }
  .hero__grid { grid-template-columns: 1fr; padding-top: 36px; }
  .hero__art { max-width: 420px; }
  .hero__btns .btn { flex: 1 1 100%; }
  .head { align-items: flex-start; }
  .steps { grid-template-columns: 1fr; gap: 34px; margin-top: 40px; }
  .step__st { width: 28%; }
  .kit__grid, .draw__grid { grid-template-columns: 1fr; }
  .formats__grid { grid-template-columns: 1fr; gap: 56px; }
  .kit__btns .btn { flex: 1 1 100%; }
  .games, .games--two { gap: 10px; }
  .game { padding: 8px; border-radius: 20px; }
  .game__body { padding: 12px 4px 4px; }
  .game__btns .btn { padding: 0 12px; flex-basis: 100%; }
  .ember .head, .oneoff .head { padding-right: 0; }
  .ember__fly { position: static; width: 120px; flex: none; margin-top: -8px; }
  .oneoff__st { position: static; width: 104px; flex: none; }
  .ember__map > img:first-child { aspect-ratio: 4 / 3; border-width: 6px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile { padding: 8px 8px 14px; border-radius: 20px; }
  .willow .games--two { padding-top: 64px; }
  .tiles, .games--two { row-gap: 52px; }
  .format .btn { width: 68%; }
  .format__st { width: 25%; right: 3%; bottom: 12px; }
  .draw__card { grid-template-columns: 38% 1fr; gap: 14px; }
  .foot__row { flex-direction: column; align-items: flex-start; }
}
