/* ===========================================
   IntentMesh v3 - Shared Styles
   Timeless. Simple. Authoritative.
   =========================================== */

:root {
  --white: #ffffff;
  --off-white: #fafafa;
  --ink: #09090b;
  --ink2: #27272a;
  --ink3: #52525b;
  --ink4: #737378;
  --ink5: #d4d4d8;
  --line: #f4f4f5;
  --line2: #e4e4e7;
  --accent: #2563eb;
}

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

html {
  background: var(--white);
  scroll-behavior: smooth;
}

body {
  background: var(--white);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  font-size: 16px;
  line-height: 1.6;
  opacity: 0;
  animation: enter 0.5s ease 0.05s forwards;
}

@keyframes enter { to { opacity: 1; } }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ===========================================
   Skip to Content (Accessibility)
   =========================================== */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 200;
  padding: 0.75rem 1.5rem;
  background: var(--ink);
  color: var(--white);
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 0 0 6px 6px;
  text-decoration: none;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
}

/* ===========================================
   Focus Visible (Accessibility)
   =========================================== */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ===========================================
   Layout
   =========================================== */
.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ===========================================
   Reveal Animation
   =========================================== */
.rv {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.rv.vis {
  opacity: 1;
  transform: translateY(0);
}
.rv-d1 { transition-delay: 0.08s; }
.rv-d2 { transition-delay: 0.16s; }
.rv-d3 { transition-delay: 0.24s; }
.rv-d4 { transition-delay: 0.32s; }

/* ===========================================
   Header
   =========================================== */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.25rem 0;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: all 0.3s ease;
}

header.scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line2);
  padding: 0.75rem 0;
}

.hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wordmark {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--ink);
  text-decoration: none;
  transition: opacity 0.2s;
}

.wordmark:hover { opacity: 0.6; }

.hd-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.hd-links a {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink3);
  text-decoration: none;
  transition: color 0.2s;
}

.hd-links a:hover { color: var(--accent); }
.hd-links a.active { color: var(--ink); font-weight: 600; }

/* ===========================================
   Mobile Hamburger Menu
   =========================================== */
.hamburger {
  display: none;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
  z-index: 110;
  position: relative;
}

.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  transition: all 0.3s ease;
  position: relative;
}

.hamburger span::before,
.hamburger span::after {
  content: '';
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: var(--ink);
  transition: all 0.3s ease;
}

.hamburger span::before { top: -6px; }
.hamburger span::after { top: 6px; }

.hamburger[aria-expanded="true"] span {
  background: transparent;
}

.hamburger[aria-expanded="true"] span::before {
  top: 0;
  transform: rotate(45deg);
}

.hamburger[aria-expanded="true"] span::after {
  top: 0;
  transform: rotate(-45deg);
}

.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 105;
  background: var(--white);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-nav.open {
  display: flex;
  opacity: 1;
}

.mobile-nav a {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
  transition: color 0.2s;
}

.mobile-nav a:hover { color: var(--accent); }

.mobile-nav-close {
  position: absolute;
  top: 1.25rem;
  right: 2rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  color: var(--ink);
  line-height: 1;
}

/* ===========================================
   Section Label
   =========================================== */
.section-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink4);
  margin-bottom: 2.5rem;
}

/* ===========================================
   Footer
   =========================================== */
footer {
  border-top: 1px solid var(--line2);
  padding: 4rem 0 3rem;
  margin-top: 2rem;
}

.ft-top {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, auto);
  gap: 4rem;
  margin-bottom: 3rem;
}

.ft-brand {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 0.75rem;
}

.ft-tagline {
  font-size: 0.82rem;
  color: var(--ink4);
  line-height: 1.6;
  max-width: 280px;
}

.ft-col h4 {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 1rem;
}

.ft-col a {
  display: block;
  font-size: 0.82rem;
  color: var(--ink3);
  text-decoration: none;
  margin-bottom: 0.6rem;
  transition: color 0.2s;
}

.ft-col a:hover { color: var(--accent); }

.ft-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
  gap: 1rem;
}

.ft-copy {
  font-size: 0.72rem;
  color: var(--ink4);
}

.ft-legal {
  display: flex;
  gap: 1.5rem;
}

.ft-legal a {
  font-size: 0.72rem;
  color: var(--ink4);
  text-decoration: none;
  transition: color 0.2s;
}

.ft-legal a:hover { color: var(--accent); }

/* ===========================================
   Page Hero (shared across inner pages)
   =========================================== */
.page-hero {
  padding: 10rem 0 4rem;
  max-width: 780px;
}

.page-hero h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 1.25rem;
}

.page-hero .sub {
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--ink3);
  line-height: 1.7;
  max-width: 600px;
}

.page-hero .sub-sm {
  font-size: 0.88rem;
  color: var(--ink4);
  line-height: 1.7;
  max-width: 600px;
}

.page-hero .subtitle {
  font-size: 1rem;
  color: var(--ink3);
  line-height: 1.7;
  max-width: 620px;
}

.page-hero .detail {
  font-size: 0.88rem;
  color: var(--ink4);
  line-height: 1.7;
  max-width: 620px;
}

/* ===========================================
   Legal Content (privacy, terms, account-deletion)
   =========================================== */
.legal-content {
  padding: 2rem 0 4rem;
  max-width: 680px;
}

.legal-content section {
  padding: 2rem 0;
  border-top: 1px solid var(--line);
}

.legal-content section:first-child {
  border-top: none;
  padding-top: 0;
}

.legal-content h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
}

.legal-content p {
  font-size: 0.88rem;
  color: var(--ink3);
  line-height: 1.8;
  margin-bottom: 0.75rem;
}

.legal-content p:last-child {
  margin-bottom: 0;
}

.legal-content strong {
  color: var(--ink2);
  font-weight: 600;
}

.legal-content ul {
  list-style: none;
  padding: 0;
  margin-top: 0.5rem;
}

.legal-content li {
  font-size: 0.88rem;
  color: var(--ink3);
  line-height: 1.8;
  padding: 0.25rem 0;
  padding-left: 1.25rem;
  position: relative;
}

.legal-content li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.85rem;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ink5);
}

.legal-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-content a:hover {
  color: var(--ink);
}

.legal-date {
  font-size: 0.72rem;
  color: var(--ink4);
  margin-top: 1rem;
}

/* ===========================================
   Status Dots (use accent color)
   =========================================== */
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
}

.game-card-status.live,
.game-status.live,
.deploy-status.available,
.badge-live {
  color: #22c55e;
}

/* ===========================================
   Responsive
   =========================================== */
@media (max-width: 768px) {
  .wrap { padding: 0 1.5rem; }

  .hd-links { display: none; }
  .hamburger { display: flex; }

  .page-hero { padding: 8rem 0 3rem; }
  .page-hero h1 { font-size: 2rem; }

  .ft-top {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }

  .ft-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .mobile-nav-close {
    right: 1.5rem;
  }
}

@media (max-width: 480px) {
  .page-hero h1 { font-size: 1.75rem; }

  .ft-top {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media print {
  header { display: none; }
  .skip-link { display: none; }
  body { padding: 0; }
  .wrap { max-width: 100%; padding: 0 1cm; }
}

/* ===========================================
   Dark Mode (auto)
   =========================================== */
@media (prefers-color-scheme: dark) {
  :root {
    --white: #09090b;
    --off-white: #111113;
    --ink: #f4f4f5;
    --ink2: #d4d4d8;
    --ink3: #a1a1aa;
    --ink4: #71717a;
    --ink5: #3f3f46;
    --line: #1c1c1e;
    --line2: #27272a;
    --accent: #60a5fa;
  }

  html { background: #09090b; }
  body { background: #09090b; color: #f4f4f5; }

  header { background: rgba(9, 9, 11, 0.97); }
  header.scrolled {
    background: rgba(9, 9, 11, 0.92);
    border-bottom-color: #27272a;
  }

  .skip-link {
    background: #f4f4f5;
    color: #09090b;
  }

  .mobile-nav {
    background: #09090b;
  }

  .hamburger span,
  .hamburger span::before,
  .hamburger span::after {
    background: #f4f4f5;
  }

  .mobile-nav-close {
    color: #f4f4f5;
  }
}