/* ============================================================
   TitaGame — shared design tokens & styles
   Plain CSS, no build step, no dependencies.
   ============================================================ */

:root {
  --bg: #0b1120;
  --bg-soft: #0f172a;
  --surface: #161e30;
  --surface-2: #1e293b;
  --border: #263349;
  --text: #f8fafc;
  --text-dim: #a8b3c7;
  --text-dimmer: #6b7893;
  --accent: #38bdf8;
  --accent-2: #c084fc;
  --accent-3: #f472b6;
  --gradient: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 55%, var(--accent-3) 100%);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 26px;
  --shadow: 0 20px 45px -20px rgba(0, 0, 0, 0.55);
  --font-display: "Baloo 2", "Segoe UI", system-ui, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --header-h: 72px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body { overflow-x: hidden; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60vw 40vw at 85% -10%, rgba(192, 132, 252, 0.16), transparent 60%),
    radial-gradient(50vw 35vw at 5% 10%, rgba(56, 189, 248, 0.14), transparent 60%),
    var(--bg);
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, .logo-word {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.2px;
  margin: 0;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.section {
  padding: 96px 0;
}

.section-head {
  max-width: 640px;
  margin: 0 0 48px;
}

.section-head h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin-bottom: 12px;
}

.section-head p {
  color: var(--text-dim);
  font-size: 1.05rem;
  margin: 0;
}

.section-alt {
  background: linear-gradient(180deg, transparent, rgba(30, 41, 59, 0.4) 12%, rgba(30, 41, 59, 0.4) 88%, transparent);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(11, 17, 32, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}
.logo:hover { text-decoration: none; }

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 6px 18px -6px rgba(192, 132, 252, 0.6);
  flex-shrink: 0;
}

.logo-word { font-size: 1.25rem; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-links a {
  color: var(--text-dim);
  font-size: 0.95rem;
  font-weight: 500;
}
.nav-links a:hover { color: var(--text); text-decoration: none; }

.nav-cta {
  color: var(--text) !important;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
}
.nav-cta:hover { border-color: var(--accent); text-decoration: none; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 13px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: default;
}

.btn-primary {
  background: var(--gradient);
  color: #0b1120;
  box-shadow: 0 14px 30px -12px rgba(192, 132, 252, 0.55);
}

.btn-ghost {
  color: var(--text);
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.02);
}
.btn-ghost:hover { text-decoration: none; border-color: var(--accent); }

/* ---------- Hero ---------- */

.hero {
  padding: 84px 0 60px;
  overflow: hidden;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.4rem, 4.4vw, 3.6rem);
  line-height: 1.08;
  background: linear-gradient(135deg, #fff, #d9e3f5 55%, var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 20px;
}

.hero-pitch {
  font-size: 1.15rem;
  color: var(--text-dim);
  max-width: 46ch;
  margin: 0 0 28px;
}

.stat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 34px;
}

.pill {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dim);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 7px 14px;
  border-radius: 999px;
}
.pill strong { color: var(--text); }

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.store-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 20px 10px 16px;
  filter: grayscale(0.5);
  opacity: 0.85;
}

.store-badge .glyph { font-size: 1.6rem; }
.store-badge .lines { display: flex; flex-direction: column; line-height: 1.25; }
.store-badge .lines small { color: var(--text-dimmer); font-size: 0.72rem; }
.store-badge .lines span { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }

.ribbon {
  position: absolute;
  top: -11px;
  right: -10px;
  background: var(--gradient);
  color: #0b1120;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 999px;
  box-shadow: 0 6px 14px -4px rgba(244, 114, 182, 0.55);
  white-space: nowrap;
}

.hero-note {
  color: var(--text-dimmer);
  font-size: 0.88rem;
}

/* Hero screenshot stack */

.hero-visual {
  position: relative;
  height: 460px;
}

.float-shot {
  position: absolute;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--surface);
}

.float-shot img { width: 100%; height: 100%; object-fit: cover; }

.float-shot.f1 {
  width: 62%;
  top: 6%;
  left: 0;
  transform: rotate(-6deg);
  z-index: 1;
}

.float-shot.f2 {
  width: 58%;
  bottom: 4%;
  right: 0;
  transform: rotate(5deg);
  z-index: 2;
}

.float-shot.f3 {
  width: 40%;
  top: 44%;
  left: 30%;
  transform: rotate(-2deg) translateY(-50%);
  z-index: 3;
  box-shadow: 0 25px 60px -18px rgba(0, 0, 0, 0.7);
}

.float-shot.f1 { animation: drift1 9s ease-in-out infinite; }
.float-shot.f2 { animation: drift2 10s ease-in-out infinite; }
.float-shot.f3 { animation: drift3 8s ease-in-out infinite; }

@keyframes drift1 {
  0%, 100% { transform: rotate(-6deg) translateY(0); }
  50% { transform: rotate(-8deg) translateY(-10px); }
}
@keyframes drift2 {
  0%, 100% { transform: rotate(5deg) translateY(0); }
  50% { transform: rotate(7deg) translateY(8px); }
}
@keyframes drift3 {
  0%, 100% { transform: rotate(-2deg) translateY(-50%); }
  50% { transform: rotate(0deg) translateY(-56%); }
}

/* ---------- Features ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(192, 132, 252, 0.4);
}

.feature-glyph {
  font-size: 1.8rem;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(56, 189, 248, 0.1);
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.feature-card p {
  color: var(--text-dim);
  font-size: 0.92rem;
  margin: 0;
}

/* ---------- Gallery ---------- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: zoom-in;
  background: var(--surface);
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-item:hover img { transform: scale(1.06); }

.gallery-cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 10px 12px 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(0deg, rgba(0,0,0,0.75), transparent);
}

/* Lightbox */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(5, 8, 16, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.lightbox.open { display: flex; }

.lightbox img {
  max-width: min(900px, 90vw);
  max-height: 82vh;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.lightbox-cap {
  position: absolute;
  bottom: 34px;
  left: 0;
  right: 0;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover { border-color: var(--accent); }

.lightbox-close { top: 24px; right: 24px; }
.lightbox-prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 24px; top: 50%; transform: translateY(-50%); }

/* ---------- Studio ---------- */

.studio-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.studio-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
}

.studio-card p { color: var(--text-dim); }

.studio-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.studio-tags span {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 6px 12px;
  border-radius: 999px;
}

.contact-card {
  border-radius: var(--radius-lg);
  padding: 2px;
  background: var(--gradient);
}

.contact-card-inner {
  background: var(--bg-soft);
  border-radius: calc(var(--radius-lg) - 2px);
  padding: 34px;
}

.contact-card-inner h3 {
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.contact-card-inner p { color: var(--text-dim); margin-bottom: 20px; }

.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 12px 20px;
  border-radius: 12px;
}
.contact-email:hover { border-color: var(--accent); text-decoration: none; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 34px 0;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-links {
  display: flex;
  gap: 22px;
  align-items: center;
}

.footer-links a { color: var(--text-dim); font-size: 0.9rem; }
.footer-links a:hover { color: var(--text); }

.footer-copy {
  color: var(--text-dimmer);
  font-size: 0.85rem;
}

/* ---------- Reveal-on-scroll ---------- */

/* Hidden state is opt-in via JS (.reveal-init), so content stays visible by
   default if JavaScript fails to load or errors out. */
[data-reveal].reveal-init {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
[data-reveal].reveal-init.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Privacy page ---------- */

.legal {
  padding: 64px 0 100px;
}

.legal .wrap { max-width: 760px; }

.legal h1 {
  font-size: clamp(1.9rem, 3.4vw, 2.5rem);
  margin-bottom: 6px;
}

.legal .effective {
  color: var(--text-dimmer);
  font-size: 0.9rem;
  margin-bottom: 32px;
}

.legal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
}

.legal-card h2 {
  font-size: 1.15rem;
  color: var(--accent);
  margin: 32px 0 10px;
}
.legal-card h2:first-child { margin-top: 0; }

.legal-card p, .legal-card li { color: var(--text-dim); }

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 26px;
  font-weight: 600;
  font-size: 0.92rem;
}

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-visual { height: 340px; margin-top: 20px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .studio-grid { grid-template-columns: 1fr; }
  .section { padding: 72px 0; }
}

@media (max-width: 700px) {
  .nav-links {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 24px 20px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }
  .nav-links.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .nav-links a { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .nav-links .nav-cta { text-align: center; margin-top: 14px; }
  .nav-toggle { display: flex; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .lightbox-prev, .lightbox-next { width: 38px; height: 38px; font-size: 1rem; }
  .lightbox { padding: 20px; }
}

@media (max-width: 480px) {
  .feature-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .legal-card { padding: 26px; }
  .studio-card, .contact-card-inner { padding: 26px; }
}
