/* Hoink Studios site. Tokens: bark ink, moss, sage ground, sand board tiles, wood, boar orange. */
:root {
  --ink: #33221a;        /* bark brown, the outline colour of the game art */
  --ink-soft: #5c4636;
  --ground: #fff8ec;     /* soft cream */
  --paper: #ffffff;
  --sky: #a9e0f7;        /* icon background sky */
  --sky-deep: #6cc3ea;
  --leaf: #7fbf4a;
  --leaf-soft: #dff0c8;
  --orange: #f2913f;     /* boar orange: ink text on it, never white */
  --orange-deep: #c9661c;
  --tile: #f2e5c6;       /* sand board tile */
  --tile-line: #e2d0a6;
  --moss: #3f6b23;       /* links and focus */
  --moss-deep: #2c4d17;
  --wood: #7a4a2a;
  --wood-dark: #5a3520;
  --boar: #e37b2f;       /* decorative only, never text on light ground */
  --stone: #9aa39a;
  --radius-board: 22px;
  --radius-small: 10px;
  --display: "Jua", "IBM Plex Sans KR", system-ui, sans-serif;
  --body: "IBM Plex Sans KR", system-ui, -apple-system, "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --edge: clamp(20px, 5vw, 72px);
  --max: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.7;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--moss); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--moss-deep); }
:focus-visible { outline: 3px solid var(--moss); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--paper); padding: 8px 14px; border-radius: 8px; z-index: 20; }
.skip:focus { top: 12px; }

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

/* Header: a strip of wood plank, the same material as the game's signboards */
.site-head {
  position: sticky; top: 0; z-index: 10;
  background: var(--wood);
  background-image: repeating-linear-gradient(0deg, rgba(0,0,0,.05) 0 2px, transparent 2px 9px);
  border-bottom: 4px solid var(--wood-dark);
  color: #fff7ea;
}
.doc-head { background: linear-gradient(180deg, var(--sky) 0%, var(--ground) 100%); }
.doc-head .wrap { display: flex; align-items: center; gap: 20px; }
.doc-head .mascot { width: 84px; flex: none; }
.site-head .wrap { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-family: var(--display); font-size: 1.35rem; letter-spacing: .01em; }
.brand img { width: 40px; height: 40px; border-radius: 11px; box-shadow: 0 0 0 2px var(--wood-dark); }
.site-nav { margin-left: auto; display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: center; }
.site-nav a { color: #fff7ea; text-decoration: none; font-weight: 500; font-size: .98rem; padding: 6px 2px; }
.site-nav a:hover { text-decoration: underline; color: #fff; }
.site-nav a[aria-current="page"] { text-decoration: underline; }
.site-nav .lang { border: 2px solid rgba(255,247,234,.55); border-radius: 999px; padding: 3px 12px; }
.site-nav a:focus-visible, .brand:focus-visible { outline-color: #fff7ea; }

/* ---------- Landing ---------- */
.hero { padding: clamp(28px, 6vw, 72px) 0 clamp(70px, 9vw, 120px); background: linear-gradient(180deg, var(--sky) 0%, #cdeefb 62%, var(--ground) 100%); position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; left: -5%; right: -5%; bottom: -60px; height: 120px; background: var(--leaf); border-radius: 50% 50% 0 0 / 100% 100% 0 0; box-shadow: 0 -12px 0 var(--leaf-soft); }
.hero .wrap { position: relative; z-index: 1; }
.cloud { position: absolute; background: #fff; border-radius: 999px; opacity: .85; z-index: 0; }
.cloud::before, .cloud::after { content: ""; position: absolute; background: #fff; border-radius: 50%; }
.cloud.c1 { width: 150px; height: 44px; top: 70px; left: 6%; animation: drift 38s linear infinite alternate; }
.cloud.c1::before { width: 64px; height: 64px; left: 24px; top: -30px; }
.cloud.c1::after { width: 48px; height: 48px; left: 78px; top: -20px; }
.cloud.c2 { width: 110px; height: 34px; top: 40px; right: 8%; animation: drift 46s linear infinite alternate-reverse; }
.cloud.c2::before { width: 46px; height: 46px; left: 20px; top: -22px; }
.cloud.c2::after { width: 36px; height: 36px; left: 58px; top: -14px; }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(60px); } }
@media (prefers-reduced-motion: reduce) { .cloud { animation: none !important; } }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.hero h1 { margin: 0; }
.hero h1 img { width: min(520px, 100%); }
.hero .pitch { font-size: 1.22rem; line-height: 1.6; max-width: 34ch; margin: 22px 0 26px; color: var(--ink); }
.status { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 18px; padding: 0; list-style: none; }
.status li { background: var(--paper); border: 2px solid var(--ink); border-radius: 999px; padding: 6px 16px; font-weight: 600; font-size: .95rem; }
.status li span { font-weight: 400; color: var(--ink-soft); }
.cta { display: inline-block; background: var(--orange); color: var(--ink); font-family: var(--display); font-size: 1.2rem; text-decoration: none; padding: 13px 24px; border-radius: 999px; border: 3px solid var(--ink); box-shadow: 0 5px 0 var(--ink); transition: transform .12s, box-shadow .12s; }
.cta:hover { color: var(--ink); background: #f6a35c; transform: translateY(-2px); box-shadow: 0 7px 0 var(--ink); }
.cta:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--ink); }
@media (prefers-reduced-motion: reduce) { .cta { transition: none; } }

/* The signature: a sand puzzle board with a boar that slides across once */
.board {
  position: relative;
  background-color: var(--tile);
  background-image:
    linear-gradient(var(--tile-line) 2px, transparent 2px),
    linear-gradient(90deg, var(--tile-line) 2px, transparent 2px);
  background-size: 64px 64px;
  background-position: -2px -2px;
  border: 10px solid var(--wood);
  border-radius: var(--radius-board);
  box-shadow: inset 0 0 0 3px var(--wood-dark), 0 18px 0 -6px rgba(51,34,26,.18);
  padding: 34px 28px 30px;
  min-height: 520px;
  display: grid; place-items: center;
  overflow: hidden;
}
.board .phone { width: min(300px, 74%); border-radius: 26px; border: 6px solid var(--ink); box-shadow: 0 10px 0 rgba(51,34,26,.25); transform: rotate(-2.5deg); position: relative; z-index: 1; }
.board .slider { position: absolute; width: 132px; bottom: 18px; right: 14px; z-index: 2; filter: drop-shadow(0 6px 0 rgba(51,34,26,.2)); animation: slide 1.1s cubic-bezier(.22,.9,.3,1) .35s both; }
.board .gate { position: absolute; right: 6px; bottom: 40px; width: 22px; height: 80px; border-radius: 12px; background: var(--stone); box-shadow: inset 0 0 0 4px #7d867d; }
@keyframes slide { from { transform: translateX(-340px); } to { transform: translateX(0); } }
@media (prefers-reduced-motion: reduce) { .board .slider { animation: none; } }

.section { padding: clamp(48px, 7vw, 96px) 0; }
.section h2 { font-family: var(--display); font-weight: 400; font-size: clamp(1.9rem, 3.4vw, 2.6rem); line-height: 1.2; margin: 0 0 14px; }
.section .lede { max-width: 58ch; margin: 0 0 32px; color: var(--ink-soft); font-size: 1.1rem; }

.how { background: var(--leaf-soft); }
.gallery { background: linear-gradient(180deg, var(--ground), #e9f6fd); }
.how .wrap { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.how img { width: min(340px, 100%); border-radius: 22px; border: 5px solid var(--ink); justify-self: center; }
.steps { list-style: none; counter-reset: step; margin: 24px 0 0; padding: 0; display: grid; gap: 18px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 52px 1fr; gap: 16px; align-items: start; }
.steps li::before { content: counter(step); font-family: var(--display); font-size: 1.5rem; width: 52px; height: 52px; display: grid; place-items: center; background: var(--orange); color: var(--ink); border: 3px solid var(--ink); border-radius: 50%; }
.steps strong { display: block; font-family: var(--display); font-weight: 400; font-size: 1.3rem; }

.shots { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 4px 18px; margin: 0; list-style: none; }
.shots li { flex: 0 0 min(250px, 68vw); scroll-snap-align: start; }
.shots img { border-radius: 18px; border: 4px solid var(--ink); background: var(--tile); }
.shots:focus-visible { outline-offset: 6px; }

.facts .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.facts dl { margin: 0; display: grid; gap: 12px; }
.facts dl div { display: grid; grid-template-columns: 9.5rem 1fr; gap: 16px; padding: 14px 20px; border-radius: 18px; background: var(--paper); border: 3px solid var(--ink); }
.facts dl div:nth-child(5n+1) { background: #e3f4fc; }
.facts dl div:nth-child(5n+2) { background: #fde7d3; }
.facts dl div:nth-child(5n+3) { background: var(--leaf-soft); }
.facts dl div:nth-child(5n+4) { background: #fff3c9; }
.facts dl div:nth-child(5n+5) { background: #efe6fb; }
.facts dt { font-family: var(--display); font-size: 1.35rem; line-height: 1.3; }
.facts dd { margin: 0; color: var(--ink-soft); }
.facts figure { margin: 0; position: relative; }
.facts figure img.village { border-radius: 22px; border: 5px solid var(--ink); width: min(360px, 100%); margin-inline: auto; }
.facts figure img.pal { position: absolute; width: 120px; left: 0; bottom: -10px; filter: drop-shadow(0 6px 0 rgba(51,34,26,.2)); }

/* ---------- Footer ---------- */
.site-foot { background: var(--ink); color: #f3ead9; padding: 48px 0 40px; margin-top: 0; font-size: .97rem; }
.site-foot .wrap { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 32px; }
.site-foot h2 { font-family: var(--display); font-weight: 400; font-size: 1.2rem; margin: 0 0 10px; color: #fff; }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-foot a { color: #f3ead9; }
.site-foot a:hover { color: #fff; }
.site-foot a:focus-visible { outline-color: #f3ead9; }
.site-foot .operator { grid-column: 1 / -1; border-top: 1px solid rgba(243,234,217,.25); padding-top: 18px; color: #d9ccb6; font-size: .9rem; }

/* ---------- Document pages (legal, FAQ, press, testers) ---------- */
.doc-head { padding: clamp(32px, 5vw, 56px) 0 8px; }
.doc-head h1 { font-family: var(--display); font-weight: 400; font-size: clamp(2.1rem, 4.6vw, 3.1rem); line-height: 1.15; margin: 0 0 10px; }
.doc-head .alt { margin: 0; }
.doc { display: grid; grid-template-columns: 15rem minmax(0, 46rem); gap: clamp(28px, 4vw, 64px); padding-bottom: 72px; align-items: start; }
.doc.no-toc { grid-template-columns: minmax(0, 46rem); }
.toc { position: sticky; top: 92px; font-size: .93rem; max-height: calc(100vh - 110px); overflow: auto; padding: 4px 2px; }
.toc h2 { font-family: var(--display); font-weight: 400; font-size: 1.05rem; margin: 0 0 8px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; border-left: 3px solid var(--tile-line); }
.toc a { display: block; padding: 4px 0 4px 12px; color: var(--ink-soft); text-decoration: none; line-height: 1.4; }
.toc a:hover { color: var(--moss-deep); text-decoration: underline; }
.prose { background: var(--paper); border: 3px solid #eadfc8; border-radius: var(--radius-board); padding: clamp(22px, 4vw, 44px); min-width: 0; }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-family: var(--display); font-weight: 400; font-size: 1.6rem; line-height: 1.3; margin: 2.2em 0 .5em; }
.prose h3 { font-size: 1.15rem; margin: 1.8em 0 .4em; }
.prose h2 .anchor, .prose h3 .anchor { margin-left: 8px; color: var(--stone); text-decoration: none; font-family: var(--body); font-size: .8em; opacity: 0; }
.prose h2:hover .anchor, .prose h3:hover .anchor, .prose .anchor:focus-visible { opacity: 1; }
.prose p, .prose li { max-width: 68ch; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .3em; }
.prose hr { border: 0; border-top: 3px dashed var(--tile-line); margin: 2.6em 0; }
.prose code { background: var(--tile); padding: 1px 6px; border-radius: 6px; font-size: .92em; }
.prose .meta { background: var(--tile); border-radius: var(--radius-small); padding: 14px 18px; }
.prose figure { margin: 1.4em 0; }
.prose figure img { border-radius: 16px; border: 4px solid var(--ink); }
.table-scroll { overflow-x: auto; margin: 1.2em 0; border: 2px solid var(--tile-line); border-radius: var(--radius-small); }
.table-scroll:focus-visible { outline-offset: 2px; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; line-height: 1.5; }
th, td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--tile-line); }
th { background: var(--tile); font-weight: 600; }
tbody tr:nth-child(even) td { background: #f7f3e7; }
tbody tr:last-child td { border-bottom: 0; }
td, th { overflow-wrap: break-word; }
td a { overflow-wrap: anywhere; }
.press-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin: 1.2em 0; padding: 0; list-style: none; }
.press-thumbs a { display: block; text-decoration: none; color: var(--ink); font-size: .9rem; }
.press-thumbs img { border-radius: 12px; border: 3px solid var(--tile-line); background: var(--tile); aspect-ratio: 1.6; object-fit: contain; width: 100%; }

@media (max-width: 1023px) {
  .doc { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; max-height: none; background: var(--paper); border: 3px solid var(--tile-line); border-radius: var(--radius-small); padding: 14px 16px; }
}
@media (max-width: 820px) {
  .hero .wrap, .how .wrap, .facts .wrap { grid-template-columns: minmax(0, 1fr); }
  .board { min-height: 420px; }
  .facts figure { order: -1; }
  .site-foot .wrap { grid-template-columns: 1fr 1fr; }
  .site-foot .wrap > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  body { font-size: 1rem; }
  .site-head .wrap { flex-wrap: wrap; gap: 4px 12px; padding: 8px 0; }
  .site-nav { margin-left: 0; gap: 2px 14px; }
  .brand { font-size: 1.2rem; }
  .facts dl div { grid-template-columns: 1fr; gap: 2px; }
  .board { padding: 22px 14px; border-width: 8px; }
  .board .slider { width: 96px; }
}
@media print {
  .site-head, .site-foot, .toc { display: none; }
  .doc { display: block; }
  .prose { border: 0; padding: 0; }
}

@media (max-width: 560px) {
  table.wide { min-width: 540px; }
  .press-thumbs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

:lang(ko) { word-break: keep-all; overflow-wrap: break-word; }
@media (max-width: 560px) {
  html { scroll-padding-top: 16px; }
  .site-head { position: static; }
  .site-nav .lang { padding: 1px 10px; }
}
