/* =========================================================================
   Wakuya Studios — Marketing Site v1
   Design tokens, type scale, and section styles per:
     team/requirements/studio-website-v1.md §5 (design system inputs)
     design/home-mockup-v7.html (Yui, homepage spec + parallax contract §05)
   Values below are copied verbatim from those sources — no re-picked colors.
   ========================================================================= */

/* ---- Self-hosted fonts (2026-09-26) ----
   Per Makoto's (Legal) finding + founder decision: loading fonts directly
   from fonts.googleapis.com/fonts.gstatic.com sends every visitor's IP to
   Google, which is a third-party data flow. Founder chose removal over
   disclosure, so the exact files Google was serving for this page are
   downloaded once at build time and served from this origin instead —
   same families/weights/glyphs, zero third-party request at runtime.
   WOFF2 only: it covers all evergreen browsers (Chrome/Edge/Firefox/Safari
   since ~2016) and this site doesn't need to support browsers old enough
   to lack it, so a WOFF fallback would only add payload with no real reach
   benefit. Only the "latin" subset was pulled (covers ASCII + the em dashes
   used in copy) since no other subset's characters appear on this page.
   Noto Sans JP 700 — previously requested alongside these but never applied
   via any --font-* token or class here — was dropped rather than
   self-hosted; it's only referenced inside standalone SVG assets
   (assets/og-image.svg, the unused legacy assets/wolf-lockup-v8a.svg) that
   don't inherit page-level @font-face anyway, so removing it changes
   nothing rendered and avoids self-hosting an unused CJK weight. */
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/unbounded-v12-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Big Shoulders Display';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../assets/fonts/big-shoulders-display-v24-800.woff2') format('woff2');
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/plus-jakarta-sans-v12-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/plus-jakarta-sans-v12-600.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/jetbrains-mono-v24-500.woff2') format('woff2');
}

:root {
  /* ---- Palette (requirements §5.1 — exact hex, exact token names) ---- */
  --bg: #0B0A08;
  --surface: #16110E;
  --surface-2: #1F1815;
  --border: rgba(240, 205, 180, 0.09);

  --text: #F5EDE6;
  --text-muted: #BFAEA2;
  --text-faint: #908074;

  --accent: #E0A17A;
  --accent-hover: #F2BE9C;
  --accent-deep: #B06A45;
  --on-accent: #1A0E08;

  --seal: #C2352B;
  --seal-ink: #F5EDE6;

  --trading: #35C79C;
  --games: #DE4C90;
  --apps: #4FA3F0;
  --mobile: #9B7BF0;

  /* copper ramp, used for logo/frame strokes only */
  --cu-300: #DE9A72;

  /* ---- Type ---- */
  --font-wordmark: 'Unbounded', ui-sans-serif, sans-serif;
  --font-display: 'Big Shoulders Display', ui-sans-serif, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* ---- Shape ---- */
  --r-card: 16px;
  --r-btn: 8px;

  /* ---- Grain texture (hero + footer only, per §5.4) ---- */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240' viewBox='0 0 240 240'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23g)'/%3E%3C/svg%3E");
}

/* ---------------------------------------------------------------------- */
/* Reset / base                                                           */
/* ---------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--bg);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; }

h1, h2, h3 { margin: 0; }

/* Visible focus state on every interactive element (requirements §5.5) */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Skip link — off-screen until focused */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--on-accent);
  padding: 10px 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  z-index: 100;
}
.skip-link:focus {
  left: 12px;
  top: 12px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 14px;
}

/* ---------------------------------------------------------------------- */
/* Buttons                                                                */
/* ---------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  border-radius: var(--r-btn);
  padding: 12px 22px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}
.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--accent-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--accent);
  background: rgba(224, 161, 122, 0.08);
}

.btn-outline-accent {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  transition: color 0.2s ease, border-color 0.2s ease;
}
.btn-outline-accent:hover,
.btn-outline-accent:focus-visible {
  color: var(--accent-hover);
  border-color: var(--accent-hover);
}

/* ---------------------------------------------------------------------- */
/* Nav                                                                    */
/* ---------------------------------------------------------------------- */

.nav {
  position: relative;
  /* backdrop-filter below makes .nav its own stacking context, which traps
     the mobile panel's z-index inside it; without an explicit z-index here
     the hero's positioned layers (z-index 1-2) painted over the open menu.
     Stays below .skip-link (100). */
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 40px;
  height: 76px;
  border-bottom: 1px solid var(--border);
  background: rgba(6, 5, 4, 0.75);
  backdrop-filter: blur(6px);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}
/* v9: img replaces the old square inline-SVG wolf mark; the founder's jpg
   isn't square, so it's height-constrained with auto width instead of a
   forced 44x44 box, to avoid stretching it. */
.nav-brand-logo { height: 44px; width: auto; flex: none; object-fit: contain; }
.nav-brand .wordmark {
  font-family: var(--font-wordmark);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--text);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
  color: var(--text-muted);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
}
.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--text);
}
.nav-cta { margin-left: 8px; }

/* Mobile disclosure nav (native <details>/<summary> — works with JS off) */
.nav-mobile-toggle { display: none; }

.hamburger-icon {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 20px;
}
.hamburger-icon span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-mobile-toggle[open] .hamburger-icon span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-mobile-toggle[open] .hamburger-icon span:nth-child(2) {
  opacity: 0;
}
.nav-mobile-toggle[open] .hamburger-icon span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-mobile-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  list-style: none;
  cursor: pointer;
}
.nav-mobile-summary::-webkit-details-marker { display: none; }
.nav-mobile-summary:hover { background: rgba(224, 161, 122, 0.08); }

.nav-mobile-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 8px 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 40;
  /* Never taller than the viewport below the nav; scrolls internally
     instead of running off-screen (page scroll is locked while open).
     62px = the mobile nav height set in the <768px block below. */
  max-height: calc(100vh - 62px);
  max-height: calc(100dvh - 62px);
  overflow-y: auto;
  overscroll-behavior: contain;
  /* Dim scrim over the page below the panel (a shadow, so no extra markup
     and nothing painted over the nav bar itself). */
  box-shadow: 0 100vh 0 100vh rgba(0, 0, 0, 0.6);
}
.nav-mobile-panel a {
  display: block;
  padding: 12px 4px;
  text-decoration: none;
  color: var(--text);
  font-size: 15px;
  border-bottom: 1px solid var(--border);
}
.nav-mobile-panel a:last-of-type { border-bottom: none; }
.nav-mobile-panel .btn { margin-top: 12px; width: 100%; }

/* ---------------------------------------------------------------------- */
/* Hero + parallax layers                                                 */
/* ---------------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: 80px 24px;
}

.hero-grain {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image: var(--grain);
  background-size: 240px 240px;
  opacity: 0.05;
}

.hero-blob {
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(90px);
  will-change: transform;
}
.hero-blob-1 { background: var(--accent); opacity: 0.35; top: -160px; left: -120px; }
.hero-blob-2 { background: var(--apps); opacity: 0.25; bottom: -200px; right: -140px; }

.hero-dotgrid {
  position: absolute;
  inset: -40px;
  background-image: radial-gradient(rgba(245, 237, 230, 0.07) 1px, transparent 1px);
  background-size: 26px 26px;
  opacity: 0.5;
  will-change: transform;
}

.hero-glyph {
  position: absolute;
  opacity: 0.35;
  will-change: transform;
}
.hero-glyph svg { width: 34px; height: 34px; }
.hero-glyph-trading { top: 18%; left: 12%; color: var(--trading); }
.hero-glyph-games { top: 24%; right: 14%; color: var(--games); }
.hero-glyph-apps { bottom: 20%; left: 18%; color: var(--apps); }
.hero-glyph-mobile { bottom: 16%; right: 10%; color: var(--mobile); }

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 760px;
}
.hero-inner h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 56px;
  line-height: 1.08;
  margin: 0 0 22px;
}
.hero-inner .sub {
  font-size: 18px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0 auto 34px;
  max-width: 600px;
}
.hero-cta-row {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.scroll-cue {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  z-index: 2;
}

/* ---------------------------------------------------------------------- */
/* Generic section shell                                                  */
/* ---------------------------------------------------------------------- */

.section {
  padding: 88px 40px;
}
.section-head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 56px;
}
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 36px;
  margin: 0 0 14px;
}
.section-head p {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
}

/* ---------------------------------------------------------------------- */
/* Pillar grid ("What We Do") — no parallax here, ever (spec §5.4)        */
/* ---------------------------------------------------------------------- */

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.pillar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 28px 22px 26px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.pillar-card.in-view {
  opacity: 1;
  transform: none;
}
/* No-JS / reduced-motion fallback: never hide content behind a transition */
.no-js .pillar-card,
.pillar-card.no-anim {
  opacity: 1;
  transform: none;
}

.pillar-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.pillar-icon svg { width: 26px; height: 26px; }

.pillar-card[data-pillar="trading"] .pillar-icon { background: rgba(53, 199, 156, 0.16); color: var(--trading); }
.pillar-card[data-pillar="games"] .pillar-icon { background: rgba(222, 76, 144, 0.16); color: var(--games); }
.pillar-card[data-pillar="applications"] .pillar-icon { background: rgba(79, 163, 240, 0.16); color: var(--apps); }
.pillar-card[data-pillar="mobile"] .pillar-icon { background: rgba(155, 123, 240, 0.16); color: var(--mobile); }

.pillar-card h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  margin: 0 0 8px;
}
.pillar-card p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.55;
  margin: 0;
}

/* ---------------------------------------------------------------------- */
/* About — no parallax (spec §5.4)                                       */
/* ---------------------------------------------------------------------- */

.about {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}
.about h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 34px;
  margin: 0 0 18px;
}
.about p {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.7;
  margin: 0;
}

/* ---------------------------------------------------------------------- */
/* Contact — no parallax (spec §5.4)                                     */
/* ---------------------------------------------------------------------- */

.contact {
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}
.contact h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 32px;
  margin: 0 0 14px;
}
.contact p {
  color: var(--text-muted);
  font-size: 16px;
  margin: 0 0 28px;
  line-height: 1.6;
}

/* Social links: intentionally empty until the real, live account list is
   confirmed (requirements §4.5/§9). Do NOT add placeholder icons here that
   point to accounts that don't exist yet — drop real <a> links into
   #social-links when the list lands. */
.social-links {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 28px;
}
.social-links:empty { display: none; }

/* ---------------------------------------------------------------------- */
/* Footer — no parallax, grain only, pinned (spec §5.4)                   */
/* ---------------------------------------------------------------------- */

.footer {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--border);
  padding: 48px 40px 30px;
  font-size: 13px;
  color: var(--text-muted);
  background: var(--bg);
}
.footer::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: var(--grain);
  background-size: 240px 240px;
  opacity: 0.035;
}

.footer-lockup {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-bottom: 30px;
}
/* v9: img replaces the old portrait-ratio inline-SVG emblem. Height-
   constrained with auto width, matching the nav logo pattern (requirements
   §5.3: 104px desktop / 96px mobile) — the founder's jpg is landscape
   (340x281), and letting height drive the box (auto width) keeps it
   correctly proportioned without stretching. */
.footer-lockup-logo { height: 104px; width: auto; }
.footer-lockup .wordmark-stack { text-align: center; }
.footer-lockup .wordmark-stack .w1 {
  font-family: var(--font-wordmark);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: 0.05em;
  color: var(--text);
  line-height: 1;
}
.footer-lockup .wordmark-stack .w2 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.4em;
  color: var(--text-muted);
  margin-top: 6px;
  padding-left: 0.4em;
}

.footer-rule {
  position: relative;
  z-index: 1;
  height: 1px;
  background: var(--accent-deep);
  opacity: 0.45;
  max-width: 1080px;
  margin: 0 auto 22px;
}

.footer-bottom {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1080px;
  margin: 0 auto;
  flex-wrap: wrap;
}
.footer-links {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}
.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--text);
}

/* ---------------------------------------------------------------------- */
/* Legal pages (privacy, terms, etc.) — plain long-form text inside the   */
/* generic .section shell. This block styles the page template only; the */
/* legal text itself is reproduced verbatim from Makoto's (Legal) source  */
/* files and is not to be reworded here.                                 */
/* ---------------------------------------------------------------------- */

.legal-content {
  max-width: 720px;
  margin: 0 auto;
  text-align: left;
}
.legal-content .eyebrow { text-align: left; }
.legal-content h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 40px;
  margin: 0 0 10px;
}
.legal-updated {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 0 36px;
}
.legal-content p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  margin: 0 0 22px;
}
.legal-content strong { color: var(--text); font-weight: 600; }

.legal-back {
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.legal-back a {
  color: var(--accent);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}
.legal-back a:hover,
.legal-back a:focus-visible {
  color: var(--accent-hover);
}

/* ---------------------------------------------------------------------- */
/* Tablet (768–1023px): pillar grid steps to 2 columns before collapsing  */
/* ---------------------------------------------------------------------- */

@media (max-width: 1023px) {
  .pillar-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-inner h1 { font-size: 44px; }
}

/* ---------------------------------------------------------------------- */
/* Mobile (<768px)                                                        */
/* ---------------------------------------------------------------------- */

@media (max-width: 767px) {
  .nav { padding: 0 18px; height: 62px; }
  .nav-brand-logo { height: 40px; width: auto; }
  .nav-links { display: none; }
  .nav-mobile-toggle { display: block; }
  /* Page scroll lock while the mobile menu is open (class set by js/main.js;
     scoped to this breakpoint so it can never stick on desktop). */
  html.nav-open,
  html.nav-open body { overflow: hidden; }

  .hero { min-height: auto; padding: 56px 22px 46px; }
  .hero-inner h1 { font-size: 32px; }
  .hero-inner .sub { font-size: 15px; }
  .hero-cta-row { flex-direction: column; width: 100%; }
  .hero-cta-row .btn { width: 100%; }
  .hero-blob-1 { width: 280px; height: 280px; }
  .hero-blob-2, .hero-glyph { display: none; }

  .section { padding: 52px 20px; }
  .section-head h2 { font-size: 25px; }
  .section-head p { font-size: 14px; }

  .pillar-grid { grid-template-columns: 1fr; gap: 16px; }

  .about h2 { font-size: 25px; }
  .contact h2 { font-size: 23px; }
  .contact .btn { width: 100%; }

  .legal-content h1 { font-size: 27px; }

  .footer { padding: 36px 20px 24px; text-align: center; }
  .footer-lockup-logo { height: 96px; width: auto; }
  .footer-bottom { flex-direction: column; gap: 14px; }
  .footer-links { justify-content: center; }
}

/* ---------------------------------------------------------------------- */
/* Accessibility: prefers-reduced-motion — zero scroll-linked transform   */
/* anywhere on the page (requirements §5.4/§5.5/§8). Belt-and-suspenders  */
/* alongside the JS guard in js/main.js, which also refuses to attach a   */
/* scroll listener under this media query.                               */
/* ---------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .hero-blob,
  .hero-dotgrid,
  .hero-glyph {
    transform: none !important;
  }
  .pillar-card {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Below 768px, parallax is disabled outright regardless of JS (requirements
   §5.4/§8) — hard CSS guarantee in addition to the JS viewport check. */
@media (max-width: 767px) {
  .hero-blob,
  .hero-dotgrid,
  .hero-glyph {
    transform: none !important;
  }
}
