/* ============================================================
   Supafine studio site — v1
   Palette + type tokens from art-direction (Artie), locked
   2026-06-17. Live font stack is Nunito until the Gaps
   web-embed license clears (art-direction msg 0005).
   ============================================================ */

/* Self-hosted fonts (art-direction + game-business call, 2026-07-06):
   latin subsets only — CJK locales use system faces. Nunito file is the
   variable font; declared per-weight to mirror Google's own CSS. */
@font-face {
  font-family: 'Nunito'; font-style: normal; font-weight: 400;
  font-display: swap; src: url('/fonts/nunito-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2013-2014, U+2018-201A, U+201C-201E, U+2026, U+2605;
}
@font-face {
  font-family: 'Nunito'; font-style: normal; font-weight: 700;
  font-display: swap; src: url('/fonts/nunito-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2013-2014, U+2018-201A, U+201C-201E, U+2026, U+2605;
}
@font-face {
  font-family: 'Nunito'; font-style: normal; font-weight: 900;
  font-display: swap; src: url('/fonts/nunito-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2013-2014, U+2018-201A, U+201C-201E, U+2026, U+2605;
}
@font-face {
  font-family: 'Pacifico'; font-style: normal; font-weight: 400;
  font-display: swap; src: url('/fonts/pacifico-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF;
}

:root {
  /* ── Nature / World ── */
  --ts-grass-bright:   #86CC3C;
  --ts-grass-mid:      #5CAA2A;
  --ts-grass-dark:     #3D7A22;
  --ts-sky-blue:       #8DC8E8;
  --ts-sky-pale:       #C8E6F8;
  --ts-cloud-cream:    #F2EAD8;
  --ts-earth-tan:      #C49654;
  --ts-wood-brown:     #8B5A28;

  /* ── Brand / Logo ── */
  --ts-wool-white:     #F4ECD8;
  --ts-logo-outline:   #C49654;
  --ts-heart-red:      #E03040;

  /* ── UI / Currency ── */
  --ts-gold:           #F5C840;
  --ts-ui-blue:        #4A9CC8;
  --ts-ui-blue-dark:   #2E7AAA;

  /* ── Page / Surface ── */
  --site-bg:           #FDFAF4;
  --site-surface:      #FFFFFF;
  --site-surface-alt:  #F5F0E4;
  --site-divider:      #E8E0D0;

  /* ── Text ── */
  --text-primary:      #2A1A08;
  --text-secondary:    #6B5038;
  --text-muted:        #9B8060;
  --text-on-dark:      #F4ECD8;

  /* ── CTA ── */
  --cta-green:         #5AAA28;
  --cta-green-hover:   #4A8E20;
  --cta-green-shadow:  #2E6010;

  /* ── Supafine brand (sampled from the corgi logo; AA rules per
        art-direction msg 0009: #FF0000 is a FIELD color only — filled
        buttons/wordmark text use #C40000) ── */
  --brand-red:         #FF0000;   /* logo field — footer bg, accent bars only */
  --brand-red-deep:    #C40000;   /* button fills, wordmark, text red */
  --brand-red-hover:   #A80000;   /* button hover */
  --brand-red-shadow:  #7A0000;   /* button pressed-edge shadow */
  --brand-orange:      #F9973B;   /* corgi coat — gradient accents */
  --brand-pink:        #FF7BAC;   /* tongue — rare playful accent */

  --font-body: 'Nunito', 'Comic Neue', system-ui, sans-serif;
  --radius: 16px;
  --shadow-card: 0 4px 16px rgba(42, 26, 8, 0.08);
  --wrap: 1080px;
}

/* Per-locale font stacks — Nunito has no CJK glyphs; fall through
   to the platform's native CJK faces (flagged to art-direction). */
html[lang="ja"]      { --font-body: 'Nunito', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', Meiryo, system-ui, sans-serif; }
html[lang="ko"]      { --font-body: 'Nunito', 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif; }
html[lang="zh-Hant"] { --font-body: 'Nunito', 'PingFang TC', 'Microsoft JhengHei', system-ui, sans-serif; }

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

body {
  font: 400 18px/1.65 var(--font-body);
  color: var(--text-primary);
  background: var(--site-bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--ts-ui-blue-dark); }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--ts-ui-blue);
  outline-offset: 2px;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* ── Header ─────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(253, 250, 244, 0.92);
  backdrop-filter: blur(8px);
  border-top: 4px solid var(--brand-red);
  border-bottom: 1px solid var(--site-divider);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 24px;
  min-height: 72px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand .mark {
  height: 56px; width: 56px; border-radius: 0;
  filter: drop-shadow(0 1px 3px rgba(42, 26, 8, 0.30));
}
.brand .name {
  font: 400 32px/1 'Pacifico', 'Brush Script MT', 'Segoe Script', cursive;
  color: var(--brand-red-deep);
}
.site-nav { margin-left: auto; }
.site-nav ul { display: flex; gap: 20px; list-style: none; }
.site-nav a {
  position: relative;
  color: var(--text-secondary); text-decoration: none;
  font-weight: 700; font-size: 15px;
}
.site-nav a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -6px;
  height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, var(--brand-red), var(--brand-orange));
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.15s ease-out;
}
.site-nav a:hover { color: var(--text-primary); }
.site-nav a:hover::after { transform: scaleX(1); }

.lang-switch { display: flex; gap: 2px; font-size: 13px; }
.lang-switch a, .lang-switch span {
  padding: 4px 8px; border-radius: 8px;
  text-decoration: none; color: var(--text-secondary); font-weight: 700;
  white-space: nowrap;
}
.lang-switch [aria-current="true"] {
  background: var(--brand-red-deep); color: #fff;
}
.lang-switch a:hover { background: var(--site-surface-alt); }

@media (max-width: 720px) {
  .site-nav { display: none; }
  .lang-switch { margin-left: auto; }
}
@media (max-width: 480px) {
  .site-header .wrap { gap: 12px; }
  .brand { gap: 8px; }
  .brand .mark { height: 44px; width: 44px; }
  .brand .name { font-size: 24px; }
  .lang-switch { font-size: 12px; }
  .lang-switch a, .lang-switch span { padding: 4px 6px; }
}

/* ── Hero ───────────────────────────────────────── */
.hero {
  position: relative;
  background:
    radial-gradient(ellipse 320px 90px at 12% 24%, rgba(255, 255, 255, 0.55), transparent 70%),
    radial-gradient(ellipse 420px 110px at 82% 14%, rgba(255, 255, 255, 0.45), transparent 70%),
    radial-gradient(ellipse 260px 70px at 55% 38%, rgba(255, 255, 255, 0.3), transparent 70%),
    linear-gradient(var(--ts-sky-pale), var(--ts-sky-blue));
}
.hero::after {
  /* curved seam into the features section */
  content: ''; position: absolute; left: -6%; right: -6%; bottom: -1px;
  height: 52px; background: var(--site-bg);
  border-top-left-radius: 50% 100%;
  border-top-right-radius: 50% 100%;
}
.hero .wrap {
  display: grid; grid-template-columns: 1.05fr 1fr;
  gap: 56px; align-items: center;
  padding-top: 64px; padding-bottom: 104px;
}
.hero h1 {
  font-size: clamp(38px, 5.5vw, 60px); line-height: 1.1;
  font-weight: 900; letter-spacing: -0.01em;
  color: var(--text-primary);
  margin-bottom: 16px;
}
.hero .subhead {
  font-size: clamp(18px, 2.2vw, 21px);
  color: var(--text-secondary); font-weight: 700;
  max-width: 26em; margin-bottom: 26px;
}
.hero-key-art {
  width: 100%; height: auto;
  border-radius: 24px;
  transform: rotate(-2deg);
  box-shadow: 0 24px 56px rgba(42, 26, 8, 0.35);
}
@media (max-width: 880px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 36px; padding-top: 40px; }
}

/* ── Store buttons ──────────────────────────────── */
.store-buttons { display: flex; flex-wrap: wrap; gap: 12px; align-items: stretch; }
.btn-store {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--brand-red-deep); color: #fff;
  font: 700 17px/1 var(--font-body); letter-spacing: 0.02em;
  padding: 15px 26px; border-radius: 14px;
  text-decoration: none;
  box-shadow: 0 4px 0 var(--brand-red-shadow);
  transition: background 0.15s ease-out, transform 0.15s ease-out, box-shadow 0.15s ease-out;
}
.btn-store:hover { background: var(--brand-red-hover); transform: translateY(-1px); box-shadow: 0 5px 0 var(--brand-red-shadow); }
.btn-store:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--brand-red-shadow); }
.btn-store svg { width: 20px; height: 20px; fill: currentColor; flex: none; }

.btn-soon {
  background: rgba(255, 255, 255, 0.85); color: var(--text-secondary);
  border: 2px solid var(--site-divider);
  padding: 13px 24px;
  box-shadow: none; cursor: default;
}
.btn-soon:hover { background: rgba(255, 255, 255, 0.85); transform: none; box-shadow: none; }
.btn-soon:active { transform: none; box-shadow: none; }

/* ── Rating badge ───────────────────────────────── */
.trust-line {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 18px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--site-divider);
  padding: 10px 18px; border-radius: 999px;
  font-size: 15px; font-weight: 700;
  color: var(--text-primary);
  box-shadow: var(--shadow-card);
}
.trust-line .stars {
  color: var(--ts-gold); font-size: 17px; letter-spacing: 2px;
  text-shadow: 0 1px 0 rgba(139, 90, 40, 0.35);
}
.trust-line strong { font-weight: 900; }

/* ── Sections ───────────────────────────────────── */
section { padding: 72px 0; }
.section-alt { background: var(--site-surface-alt); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
h2 {
  font-size: clamp(28px, 5vw, 48px); line-height: 1.2;
  font-weight: 900; margin-bottom: 12px;
}
.section-head h2::after {
  content: ''; display: block;
  width: 56px; height: 5px; border-radius: 3px;
  margin: 14px auto 0;
  background: linear-gradient(90deg, var(--brand-red), var(--brand-orange));
}
.section-head p { color: var(--text-secondary); font-weight: 700; }

/* ── Feature cards ──────────────────────────────── */
.cards {
  display: grid; gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.card {
  background: var(--site-surface);
  border: 1px solid var(--site-divider);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-card);
  transition: transform 0.15s ease-out, box-shadow 0.15s ease-out;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(42, 26, 8, 0.14); }
.card .icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 72px; height: 72px; border-radius: 16px;
  background: var(--ts-cloud-cream);
  margin-bottom: 14px;
}
.card img.icon { object-fit: contain; padding: 6px; }

/* Hover emote pops (art-direction 0014 §3) — pointer contexts only */
.card { position: relative; }
.card .emote {
  position: absolute; top: 12px; left: 78px;
  width: 44px; height: 44px;
  opacity: 0; transform: scale(0);
  transform-origin: bottom left;
  pointer-events: none;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.1s ease-out;
}
@media (hover: hover) {
  .card:hover .emote, .card:focus-within .emote { opacity: 1; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .card:hover .emote { opacity: 1; transform: scale(1); }
}
.card h3 { font-size: 22px; line-height: 1.3; font-weight: 900; margin-bottom: 8px; }
.card p { color: var(--text-secondary); font-size: 16px; }

/* ── How it plays ───────────────────────────────── */
.steps { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); counter-reset: step; }
.step {
  background: var(--ts-cloud-cream);
  border-radius: var(--radius);
  padding: 28px; position: relative;
}
.step::before {
  counter-increment: step; content: counter(step);
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--ts-grass-mid); color: var(--ts-wool-white);
  font-weight: 900; font-size: 20px;
  margin-bottom: 14px;
  box-shadow: 0 3px 0 var(--ts-grass-dark);
}
.step p { font-weight: 700; }

/* ── Screenshots ────────────────────────────────── */
.shots { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.shot { margin: 0; }
.shot img {
  width: 100%; height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.shot figcaption {
  margin-top: 10px; text-align: center;
  font-size: 14px; font-weight: 700; color: var(--text-secondary);
}

/* ── Portfolio ──────────────────────────────────── */
.portfolio { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.game-card {
  background: var(--site-surface);
  border: 1px solid var(--site-divider);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  text-decoration: none; color: inherit;
  display: flex; flex-direction: column;
  transition: transform 0.15s ease-out, box-shadow 0.15s ease-out;
}
.game-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(42, 26, 8, 0.14); }

/* ── Review cards ───────────────────────────────── */
.review { margin: 0; }
.review-title {
  font-size: 18px; font-weight: 900; margin-bottom: 8px;
  color: var(--text-primary);
}
.review-em { border: 2px solid var(--ts-gold); background: #FFFBEE; }
.review blockquote { margin: 0; }
.review blockquote p { color: var(--text-primary); font-size: 17px; font-weight: 700; }
.review strong { color: var(--brand-red-deep); }
.review figcaption { margin-top: 12px; color: var(--text-muted); font-size: 14px; font-weight: 700; }
.game-card img { aspect-ratio: 1 / 1; object-fit: cover; width: 100%; height: auto; }
.game-card .meta { padding: 18px 20px 20px; }
.game-card h3 { font-size: 19px; font-weight: 900; }
.game-card .tagline { color: var(--text-secondary); font-size: 15px; margin-top: 4px; }
.game-card .store { margin-top: 12px; font-size: 14px; font-weight: 700; color: var(--ts-ui-blue-dark); }

/* ── Footer delight: grazing sheep + periodic wolf-chase gag
      (art-direction 0011 §5 upgraded by 0014 §2; /js/gag.js drives the
      chase — pure local animation, no data, no third parties) ── */
.graze-strip {
  position: relative; height: 76px;
  max-width: var(--wrap); margin: 16px auto -4px; padding: 0 24px;
  overflow: hidden;
}
.gag-sheep {
  position: absolute; left: 8%; bottom: 0; z-index: 2;
  width: 52px; height: 52px;
  background: url('/assets/sheep-graze-strip.png') 0 0 no-repeat;
  background-size: 520px 52px;
  animation: sheep-eat 1.2s steps(10) infinite;
}
.gag-sheep.jumping {
  background: url('/assets/sheep-jump-strip.png') 0 0 no-repeat;
  background-size: 364px 52px;
  animation: sheep-jump 0.8s steps(7) infinite;
}
.gag-wolf {
  position: absolute; left: -90px; bottom: 0; z-index: 1;
  width: 72px; height: 72px; visibility: hidden;
  background: url('/assets/wolf-run-strip.png') 0 0 no-repeat;
  background-size: 576px 72px;
  animation: wolf-run 0.7s steps(8) infinite;
}
.gag-dog {
  position: absolute; left: -70px; bottom: 0; z-index: 3;
  width: 56px; height: 56px; visibility: hidden;
  background: url('/assets/dog-run-strip.png') 0 0 no-repeat;
  background-size: 448px 56px;
  animation: dog-run 0.6s steps(8) infinite;
}
.gag-emote {
  position: absolute; bottom: 54px; z-index: 4;
  width: 32px; height: 32px; visibility: hidden;
  background: url('/assets/emoticons/emote-scared.png') center / contain no-repeat;
}
@keyframes sheep-eat  { to { background-position: -520px 0; } }
@keyframes sheep-jump { to { background-position: -364px 0; } }
@keyframes wolf-run   { to { background-position: -576px 0; } }
@keyframes dog-run    { to { background-position: -448px 0; } }
@media (prefers-reduced-motion: reduce) {
  .gag-sheep, .gag-sheep.jumping { animation: none; background: url('/assets/sheep-graze-strip.png') 0 0 no-repeat; background-size: 520px 52px; }
  .gag-wolf, .gag-dog, .gag-emote { display: none; }
}

/* ── Press page ─────────────────────────────────── */
.press-wrap { max-width: 760px; }
.press-wrap .section-head { margin-bottom: 32px; }
.press-pitch { font-size: 19px; margin-bottom: 40px; }
.press-wrap h3 { font-size: 24px; font-weight: 900; margin: 36px 0 16px; }
.press-wrap h4 { font-size: 19px; font-weight: 900; margin: 24px 0 10px; }
.press-wrap p { margin-bottom: 14px; }
.fact-sheet {
  display: grid; grid-template-columns: max-content 1fr; gap: 10px 28px;
  background: var(--site-surface);
  border: 1px solid var(--site-divider); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow-card);
}
.fact-sheet dt { font-weight: 900; color: var(--text-secondary); }
.fact-sheet dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 560px) { .fact-sheet { grid-template-columns: 1fr; gap: 2px; } .fact-sheet dd { margin-bottom: 12px; } }
.press-features { padding-left: 22px; }
.press-features li { margin-bottom: 10px; }
.press-downloads { color: var(--text-muted); font-weight: 700; }

/* ── Footer — Supafine brand field (transparent logo unlocked the
      switch from #FF0000 to the AA-friendly deep red; art-direction 0011) ── */
.site-footer {
  background: var(--brand-red-deep);
  color: #fff;
  padding: 56px 0 40px;
  text-align: center;
}
.site-footer .brand { display: flex; justify-content: center; margin-bottom: 6px; }
.site-footer .logo-big { height: 140px; width: 140px; }
.site-footer .one-liner { font-weight: 700; margin-bottom: 28px; }
.site-footer .btn-store {
  margin-bottom: 36px;
  background: #fff; color: var(--brand-red-deep);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.28);
}
.site-footer .btn-store:hover { background: var(--ts-wool-white); }
.footer-links {
  display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: center;
  font-size: 15px; margin-bottom: 20px;
}
.footer-links a { color: #fff; font-weight: 700; }
.site-footer .fine {
  font-size: 13px; color: rgba(255, 255, 255, 0.85);
}
