@font-face {
  font-family: "Space Grotesk";
  src: url("/assets/fonts/SpaceGrotesk-Variable.ttf") format("truetype");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/Inter-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Outfit";
  src: url("/assets/fonts/Outfit-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #EEF3F1;
  --surface: #FFFFFF;
  --border: #DCE5E2;
  --primary: #16707E;
  --primary-hover: #125B67;
  --flow: #14AFC2;
  --text: #1C2733;
  --muted: #53616C;
  --pill-bg: #E4EFF0;
  --radius-card: 20px;
  --radius-sm: 12px;
  --radius-pill: 999px;
  --max-width: 780px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  display: flex;
  flex-direction: column;
}

h1,
h2,
h3 {
  font-family: "Space Grotesk", "Inter", sans-serif;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

a {
  color: var(--primary);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--primary-hover);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--flow);
  outline-offset: 2px;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Top bar */
.site-header {
  padding: 20px 0 8px;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 12px 0 6px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
}

.back-link:hover {
  background: rgba(22, 112, 126, 0.07);
}

/* Main */
main {
  flex: 1;
  padding: 24px 0 48px;
}

/* Studio Hero */
.hero {
  padding: 20px 0 36px;
}

.studio-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.studio-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--flow);
  flex-shrink: 0;
}

.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 5vw, 2.65rem);
  font-weight: 700;
}

.hero-lead {
  margin: 0;
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 56ch;
}

/* Section */
.section-title {
  margin: 0 0 16px;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* Game Card */
.game-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 28px;
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.game-icon {
  position: relative;
  width: 96px;
  height: 96px;
  flex-shrink: 0;
  border-radius: 22px;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Displays /assets/flipflow-icon.png automatically when present, without JS */
.game-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("/assets/flipflow-icon.png");
  background-size: cover;
  background-position: center;
  border-radius: inherit;
}

.game-icon-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px;
  text-align: center;
}

.game-icon-drop {
  width: 22px;
  height: 22px;
  display: block;
}

.game-icon-wordmark {
  font-family: "Outfit", sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  line-height: 1;
}

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

.wordmark {
  font-family: "Outfit", sans-serif;
  font-weight: 700;
  font-size: 1.65rem;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 4px;
}

.wordmark-flip {
  color: var(--text);
}

.wordmark-flow {
  color: var(--primary);
}

.game-subtitle {
  margin: 0 0 12px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--muted);
}

.game-desc {
  margin: 0 0 20px;
  color: var(--text);
  font-size: 1rem;
  max-width: 54ch;
}

.game-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
}

.badge-soon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--radius-pill);
  background: var(--primary);
  color: #FFFFFF;
  font-weight: 600;
  font-size: 0.92rem;
}

.badge-soon-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--flow);
  flex-shrink: 0;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--radius-pill);
  background: var(--primary);
  color: #FFFFFF;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.94rem;
}

.btn-primary:hover {
  background: var(--primary-hover);
  color: #FFFFFF;
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--primary);
  text-decoration: underline;
}

/* Policy Pages */
.policy-header {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 26px 28px;
  margin-bottom: 20px;
}

.policy-header h1 {
  margin: 0 0 12px;
  font-size: clamp(1.45rem, 4vw, 1.85rem);
  font-weight: 700;
}

.policy-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.75;
}

.policy-meta strong {
  color: var(--text);
}

.policy-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 28px;
}

.policy-card h2 {
  margin: 0 0 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  font-size: 1.3rem;
  color: var(--primary);
}

.policy-card h3 {
  margin: 26px 0 8px;
  font-size: 1.08rem;
}

.policy-card p {
  margin: 0 0 12px;
}

.policy-card ul,
.policy-card ol {
  margin: 0 0 14px;
  padding-left: 22px;
}

.policy-card li {
  margin-bottom: 10px;
}

.policy-card code {
  background: var(--pill-bg);
  color: var(--text);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.88em;
  word-break: break-word;
}

.policy-card a {
  word-break: break-word;
}

/* 404 Page */
.not-found {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 36px 28px;
  margin-top: 24px;
}

.not-found-code {
  margin: 0 0 8px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--primary);
}

.not-found h1 {
  margin: 0 0 10px;
  font-size: 1.6rem;
}

.not-found p {
  margin: 0 0 16px;
  color: var(--muted);
}

.not-found-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0 36px;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 18px;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  text-decoration: underline;
  text-decoration-color: var(--border);
}

.footer-links a:hover {
  color: var(--primary);
  text-decoration-color: var(--primary);
}

.footer-copy {
  margin: 0;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

/* Mobile */
@media (max-width: 560px) {
  .container {
    padding: 0 16px;
  }

  .hero {
    padding: 12px 0 28px;
  }

  .game-card {
    flex-direction: column;
    padding: 22px 20px;
    gap: 18px;
  }

  .game-icon {
    width: 80px;
    height: 80px;
    border-radius: 18px;
  }

  .policy-header,
  .policy-card,
  .not-found {
    padding: 22px 18px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
