@font-face {
  font-family: "Luckiest Guy";
  src: url("wordwar/assets/luckiest_guy.ttf") format("truetype");
  font-display: swap;
}

:root {
  --bg: #0a0a0f;
  --bg-2: #11111a;
  --bg-3: #181824;
  --fg: #f5f5f7;
  --fg-2: #c8c8d2;
  --muted: #71717f;
  --hairline: rgba(255, 255, 255, 0.06);
  --hairline-strong: rgba(255, 255, 255, 0.14);
  --accent: #ff6b4a;
  --accent-2: #4da6ff;
  --amber: #ffb44a;
  --gradient: linear-gradient(135deg, #ff6b4a, #ffb44a);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-feature-settings: "ss01", "cv11";
  line-height: 1.5;
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: var(--accent);
  color: #1a0500;
}

/* ── Site header ─────────────────────────────────────────────────── */

.site-header {
  align-items: center;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(10, 10, 15, 0.6);
  border-bottom: 1px solid var(--hairline);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  left: 0;
  padding: 18px clamp(20px, 5vw, 56px);
  position: fixed;
  right: 0;
  top: 0;
  z-index: 50;
}

.brand {
  align-items: center;
  display: inline-flex;
  font-size: 17px;
  font-weight: 800;
  gap: 12px;
  letter-spacing: -0.01em;
}

.brand-mark {
  align-items: center;
  background: var(--gradient);
  border-radius: 8px;
  color: #1a0500;
  display: inline-flex;
  font-family: "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;
  font-size: 19px;
  font-weight: 700;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.site-header nav {
  display: flex;
  gap: 28px;
  font-size: 14px;
  font-weight: 600;
}

.site-header nav a {
  color: var(--fg-2);
  transition: color 180ms ease;
}

.site-header nav a:hover {
  color: var(--fg);
}

/* ── Hero ────────────────────────────────────────────────────────── */

.hero {
  align-items: flex-start;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  overflow: hidden;
  padding: 140px clamp(20px, 6vw, 96px) 96px;
  position: relative;
}

.hero-mesh {
  background:
    radial-gradient(circle at 18% 28%, rgba(255, 107, 74, 0.38), transparent 42%),
    radial-gradient(circle at 78% 18%, rgba(77, 166, 255, 0.28), transparent 38%),
    radial-gradient(circle at 62% 82%, rgba(255, 180, 74, 0.22), transparent 45%);
  filter: blur(48px);
  inset: -10%;
  pointer-events: none;
  position: absolute;
  z-index: 0;
  animation: meshDrift 22s ease-in-out infinite alternate;
}

@keyframes meshDrift {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(40px, -28px) scale(1.06); }
}

.hero-grain {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' seed='5'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.5 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  inset: 0;
  mix-blend-mode: overlay;
  opacity: 0.04;
  pointer-events: none;
  position: absolute;
  z-index: 1;
}

.hero-content {
  max-width: 1100px;
  position: relative;
  z-index: 2;
  animation: fadeUp 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  margin: 0 0 24px;
  text-transform: uppercase;
}

.eyebrow-center {
  text-align: center;
}

.hero h1 {
  font-size: clamp(56px, 11vw, 144px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 0.92;
  margin: 0 0 36px;
}

.hero h1 em {
  background: var(--gradient);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  font-style: normal;
}

.hero .lede {
  color: var(--fg-2);
  font-size: clamp(17px, 1.7vw, 21px);
  line-height: 1.55;
  margin: 0 0 44px;
  max-width: 640px;
}

.hero-cta {
  align-items: center;
  border-bottom: 1px solid var(--accent);
  color: var(--fg);
  display: inline-flex;
  font-size: 15px;
  font-weight: 700;
  gap: 8px;
  padding-bottom: 6px;
  transition: gap 220ms ease;
}

.hero-cta:hover {
  gap: 14px;
}

.hero-scroll-cue {
  bottom: 32px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  left: 50%;
  letter-spacing: 0.3em;
  position: absolute;
  text-transform: uppercase;
  transform: translateX(-50%);
  z-index: 2;
  animation: scrollPulse 2.4s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; transform: translateX(-50%) translateY(0); }
  50% { opacity: 1; transform: translateX(-50%) translateY(-4px); }
}

/* ── Featured app ────────────────────────────────────────────────── */

.featured {
  background: var(--bg-2);
  border-top: 1px solid var(--hairline);
  padding: clamp(96px, 14vw, 180px) clamp(20px, 6vw, 96px);
}

.featured-card {
  align-items: center;
  display: grid;
  gap: clamp(40px, 7vw, 96px);
  grid-template-columns: 1.1fr 1fr;
  margin: 32px auto 0;
  max-width: 1200px;
}

.featured-art {
  align-items: center;
  aspect-ratio: 4 / 5;
  background:
    radial-gradient(at 30% 18%, #51c8f6 0%, transparent 55%),
    radial-gradient(at 78% 82%, #f9a825 0%, transparent 55%),
    linear-gradient(180deg, #0288d1, #29b6f6 60%, #4dd0e1);
  border-radius: 20px;
  box-shadow: 0 50px 100px rgba(2, 41, 93, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  gap: 24px;
  justify-content: center;
  overflow: hidden;
  padding: clamp(28px, 4vw, 48px);
  position: relative;
}

.featured-art::before {
  background-image:
    linear-gradient(45deg, rgba(255, 255, 255, 0.05) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.05) 25%, transparent 25%);
  background-size: 80px 80px;
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.featured-art::after {
  background: repeating-conic-gradient(from 0deg at 50% 30%, rgba(77, 208, 225, 0.18) 0deg 6deg, transparent 6deg 14deg);
  content: "";
  inset: 0;
  opacity: 0.6;
  pointer-events: none;
  position: absolute;
}

.ww-tile-logo {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.ww-tile-logo img {
  animation: tilePop 900ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
  animation-delay: calc(var(--i) * 90ms);
  display: block;
  filter: drop-shadow(0 8px 0 rgba(26, 35, 126, 0.28));
  height: auto;
  width: clamp(54px, 8vw, 84px);
}

.ww-tile-break {
  flex-basis: 100%;
  height: 0;
}

@keyframes tilePop {
  from { opacity: 0; transform: translateY(14px) rotate(-5deg) scale(0.86); }
  to { opacity: 1; transform: translateY(0) rotate(0) scale(1); }
}

.ww-platform {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 8px 16px;
  position: relative;
  text-transform: uppercase;
  z-index: 1;
}

.featured-copy h2 {
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 0 0 14px;
}

.featured-copy .tagline {
  color: var(--accent-2);
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 24px;
}

.featured-copy p:not(.tagline) {
  color: var(--fg-2);
  font-size: 17px;
  line-height: 1.65;
  margin: 0 0 32px;
}

.featured-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.store-link {
  align-items: center;
  background: #fff;
  border-radius: 12px;
  color: #0a0a0f;
  display: inline-flex;
  font-weight: 800;
  gap: 12px;
  padding: 12px 20px;
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.store-link:hover {
  box-shadow: 0 14px 32px rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.store-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.store-copy span {
  color: #555;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.store-copy strong {
  color: #0a0a0f;
  font-size: 18px;
  font-weight: 800;
}

.ghost-link {
  align-items: center;
  border: 1px solid var(--hairline-strong);
  border-radius: 12px;
  color: var(--fg);
  display: inline-flex;
  font-size: 15px;
  font-weight: 700;
  gap: 8px;
  padding: 14px 22px;
  transition: gap 200ms ease, border-color 200ms ease, background 200ms ease;
}

.ghost-link:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.32);
  gap: 14px;
}

/* ── Library ─────────────────────────────────────────────────────── */

.library {
  padding: clamp(96px, 14vw, 180px) clamp(20px, 6vw, 96px);
}

.library-head {
  margin: 0 auto 48px;
  max-width: 1200px;
}

.library-head h2 {
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 8px 0 0;
}

.library-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  margin: 0 auto;
  max-width: 1200px;
}

.app-card {
  align-items: center;
  background: var(--bg-2);
  border: 1px solid var(--hairline);
  border-radius: 18px;
  display: flex;
  gap: 20px;
  padding: 24px;
  transition: transform 240ms ease, border-color 240ms ease, background 240ms ease;
}

.app-card:not(.app-card-empty):hover {
  background: var(--bg-3);
  border-color: var(--hairline-strong);
  transform: translateY(-4px);
}

.app-card-icon {
  align-items: center;
  border-radius: 14px;
  display: flex;
  flex: 0 0 auto;
  font-family: "Luckiest Guy", system-ui;
  font-size: 28px;
  height: 56px;
  justify-content: center;
  width: 56px;
}

img.app-card-icon {
  object-fit: cover;
}

.ww-icon {
  box-shadow: 0 10px 28px rgba(2, 136, 209, 0.4);
}

.empty-icon {
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed var(--hairline-strong);
  color: var(--muted);
}

.app-card-body {
  flex: 1;
  min-width: 0;
}

.app-card-body strong {
  color: var(--fg);
  display: block;
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 4px;
}

.app-card-body span {
  color: var(--muted);
  font-size: 14px;
}

.app-card-arrow {
  color: var(--muted);
  font-size: 18px;
  transition: color 240ms ease, transform 240ms ease;
}

.app-card:hover .app-card-arrow {
  color: var(--fg);
  transform: translateX(4px);
}

.app-card-empty {
  background: transparent;
  border-style: dashed;
}

/* ── Principles ──────────────────────────────────────────────────── */

.principles {
  background: var(--bg-2);
  border-block: 1px solid var(--hairline);
  padding: clamp(96px, 14vw, 180px) clamp(20px, 6vw, 96px);
}

.principles-inner {
  margin: 0 auto;
  max-width: 1200px;
}

.principles h2 {
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 8px 0 48px;
}

.principles-list {
  display: grid;
  gap: 36px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.principles-list li {
  color: var(--fg-2);
  font-size: 16px;
  line-height: 1.65;
  padding-top: 18px;
  position: relative;
}

.principles-list li::before {
  background: var(--gradient);
  border-radius: 2px;
  content: "";
  height: 3px;
  left: 0;
  position: absolute;
  top: 0;
  width: 36px;
}

.principles-list li strong {
  color: var(--fg);
  display: block;
  font-size: 19px;
  font-weight: 800;
  margin-bottom: 8px;
}

/* ── Footer ──────────────────────────────────────────────────────── */

.site-footer {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 14px;
  gap: 24px;
  justify-content: space-between;
  padding: 48px clamp(20px, 6vw, 96px);
}

.site-footer .brand {
  font-size: 16px;
}

.footer-links {
  display: flex;
  gap: 28px;
}

.footer-links a {
  color: var(--fg-2);
  font-weight: 600;
  transition: color 180ms ease;
}

.footer-links a:hover {
  color: var(--fg);
}

/* ── Responsive ──────────────────────────────────────────────────── */

@media (max-width: 880px) {
  .site-header nav {
    display: none;
  }

  .site-header {
    padding: 14px 18px;
  }

  .hero {
    padding-top: 110px;
  }

  .featured-card {
    grid-template-columns: 1fr;
  }

  .featured-art {
    aspect-ratio: 5 / 4;
    max-width: 480px;
    margin: 0 auto;
  }

  .site-footer {
    justify-content: center;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}
