/* ============================================
   SHARED STYLES — Variables, Reset, Nav, Footer, Reveal
   Included on every page (landing, TOS, privacy, blog)
============================================ */

/* ============================================
   VARIABLES
============================================ */
:root {
  --blue: #1A88F8;
  --green: #44C67F;
  --purple: #9553F9;
  --orange: #FF5310;
  --yellow: #FFBE4C;
  --fg-1: #111;
  --fg-2: #444;
  --fg-3: #888;
  --fg-4: #bbb;
  --bg-0: #08080C;
  --bg-1: #fff;
  --bg-2: #fafaf9;
  --border: #e8e6e1;
  --spring: cubic-bezier(0.16, 1, 0.3, 1);
  --wa: #25D366;
}

/* ============================================
   RESET
============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  color: var(--fg-2); background: var(--bg-0);
  line-height: 1.6; -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.menu-open { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
h1, h2, h3, h4 {
  font-family: 'DM Sans', sans-serif;
  color: var(--fg-1);
  font-feature-settings: "cv11" on;
}

/* ============================================
   SHARED KEYFRAMES
============================================ */
@keyframes float-gentle {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(24px); filter: blur(10px); }
  to   { opacity: 1; transform: translateY(0); filter: blur(0); }
}

/* ============================================
   NAV — Dynamic Island Pill
============================================ */
.nav {
  position: fixed; top: 16px;
  left: 50%; transform: translateX(-50%);
  display: flex; align-items: center;
  padding: 6px 6px 6px 24px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 100px;
  z-index: 100;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: calc(100% - 32px);
}
.nav--scrolled {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08), 0 0 0 0.5px rgba(0,0,0,0.04);
}
.nav--scrolled .nav__logo { color: var(--fg-1); }
.nav--scrolled .nav__link { color: var(--fg-3); }
.nav--scrolled .nav__link:hover { color: var(--fg-1); }
.nav--scrolled .nav__hamburger span { background: var(--fg-1); }

.nav__logo {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 17px; font-weight: 700;
  color: #fff; letter-spacing: -0.3px;
  white-space: nowrap; flex-shrink: 0;
  transition: color 0.4s ease;
}
.nav__logo-icon {
  width: 22px; height: 22px;
  display: block; flex-shrink: 0;
  border-radius: 5px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12), 0 0 0 0.5px rgba(255, 255, 255, 0.08);
  transition: box-shadow 0.4s ease;
}
.nav--scrolled .nav__logo-icon {
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08), 0 0 0 0.5px rgba(0, 0, 0, 0.04);
}
.nav__logo-text { display: inline-block; }
.nav__links {
  display: flex; align-items: center; gap: 28px;
  margin: 0 32px;
}
.nav__link {
  font-size: 14px; font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
  transition: color 0.2s; white-space: nowrap;
}
.nav__link:hover { color: #fff; }
.nav__cta {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--blue); color: #fff;
  font-size: 13px; font-weight: 600;
  height: 36px; padding: 0 18px; border-radius: 100px;
  transition: opacity 0.15s, transform 0.2s var(--spring);
  white-space: nowrap; flex-shrink: 0;
}
.nav__cta:hover { opacity: 0.88; transform: scale(1.04); }

/* Language toggle */
.lang-toggle {
  display: flex; align-items: center;
  background: rgba(255,255,255,0.06);
  border-radius: 100px;
  padding: 2px;
  margin-right: 8px;
  flex-shrink: 0;
}
.nav--scrolled .lang-toggle { background: rgba(0,0,0,0.04); }
.lang-toggle__btn {
  font-size: 12px; font-weight: 600;
  padding: 4px 10px; border-radius: 100px;
  color: rgba(255,255,255,0.4);
  transition: all 0.2s ease;
  letter-spacing: 0.3px;
}
.nav--scrolled .lang-toggle__btn { color: var(--fg-3); }
.lang-toggle__btn.is-active {
  background: rgba(255,255,255,0.15);
  color: #fff;
}
.nav--scrolled .lang-toggle__btn.is-active {
  background: rgba(0,0,0,0.07);
  color: var(--fg-1);
}
.lang-toggle__btn:hover { color: #fff; }
.nav--scrolled .lang-toggle__btn:hover { color: var(--fg-1); }

/* Hamburger */
.nav__hamburger {
  display: none; flex-direction: column; gap: 5px;
  padding: 6px; position: relative;
  width: 32px; height: 32px; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.nav__hamburger span {
  display: block; width: 20px; height: 1.5px;
  background: #fff; border-radius: 2px;
  transition: all 0.3s var(--spring); transform-origin: center;
}
.nav__hamburger.is-active span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav__hamburger.is-active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav__hamburger.is-active span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile overlay — z-index below nav so hamburger stays clickable */
.nav-overlay {
  position: fixed; inset: 0;
  background: rgba(8, 8, 12, 0.88);
  z-index: 90;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 16px;
  padding: 100px 32px 160px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.4s ease;
  overflow: hidden;
}
.nav-overlay__bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center top;
  opacity: 0.3;
}
.nav-overlay__bg-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(8,8,12,0.7) 0%, rgba(8,8,12,0.85) 100%);
}
.nav-overlay.is-open { opacity: 1; pointer-events: auto; }
.nav-overlay__link {
  position: relative; z-index: 2;
  font-family: 'DM Sans', sans-serif;
  font-size: 36px; font-weight: 700; color: #fff;
  letter-spacing: -0.8px;
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.5s var(--spring), transform 0.5s var(--spring), color 0.15s;
}
.nav-overlay__link:hover { color: var(--blue); }
.nav-overlay.is-open .nav-overlay__link { opacity: 1; transform: translateY(0); }
.nav-overlay.is-open .nav-overlay__link:nth-child(3) { transition-delay: 0.05s; }
.nav-overlay.is-open .nav-overlay__link:nth-child(4) { transition-delay: 0.1s; }
.nav-overlay.is-open .nav-overlay__link:nth-child(5) { transition-delay: 0.15s; }
.nav-overlay__lang {
  position: relative; z-index: 2;
  display: flex; align-items: center;
  background: rgba(255,255,255,0.06);
  border-radius: 100px;
  padding: 3px;
  margin-top: 16px;
}
.nav-overlay__lang .lang-toggle__btn {
  font-size: 16px;
  padding: 8px 20px;
  color: rgba(255,255,255,0.4);
}
.nav-overlay__lang .lang-toggle__btn.is-active {
  background: rgba(255,255,255,0.12);
  color: #fff;
}
.nav-overlay__cta {
  position: absolute; bottom: 80px; left: 32px; right: 32px;
  z-index: 2;
  display: flex; align-items: center; justify-content: center;
  background: var(--blue); color: #fff;
  font-size: 16px; font-weight: 600; height: 54px; border-radius: 100px;
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.4s var(--spring), transform 0.4s var(--spring);
}
.nav-overlay.is-open .nav-overlay__cta { opacity: 1; transform: translateY(0); transition-delay: 0.2s; }
.nav-overlay__footer {
  position: absolute; bottom: 32px; left: 32px; right: 32px;
  z-index: 2;
  text-align: center;
  font-size: 12px; color: rgba(255,255,255,0.25);
  opacity: 0; transform: translateY(10px);
  transition: opacity 0.4s var(--spring), transform 0.4s var(--spring);
}
.nav-overlay.is-open .nav-overlay__footer { opacity: 1; transform: translateY(0); transition-delay: 0.25s; }

/* ============================================
   FOOTER
============================================ */
.footer {
  position: relative;
  overflow: hidden;
  padding: 80px 0 48px;
}
.footer__bg {
  position: absolute; inset: 0;
  background-image: url('/assets/optimized/footer.webp');
  background-size: cover;
  background-position: center top;
  opacity: 0.55;
}
.footer__bg-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(8,8,12,0.35) 0%, rgba(8,8,12,0.55) 100%);
}
.footer__inner {
  position: relative; z-index: 2;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 48px;
}
.footer__top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 48px;
}
.footer__brand-name {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 20px; font-weight: 700;
  color: #fff;
}
.footer__brand-icon {
  width: 24px; height: 24px;
  display: block; flex-shrink: 0;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.24), 0 0 0 0.5px rgba(255, 255, 255, 0.08);
}
.footer__tagline {
  font-size: 14px; color: rgba(255,255,255,0.4);
  margin-top: 12px; line-height: 1.65;
}
.footer__parent {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: rgba(255,255,255,0.3);
  margin-top: 16px;
  padding: 6px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 100px;
}
.footer__col h4 {
  font-size: 12px; font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: rgba(255,255,255,0.3);
  margin-bottom: 18px;
}
.footer__col ul { list-style: none; }
.footer__col ul li { margin-bottom: 10px; }
.footer__col ul li a {
  font-size: 14px; color: rgba(255,255,255,0.5);
  transition: color 0.2s;
}
.footer__col ul li a:hover { color: #fff; }
.footer__bottom {
  margin-top: 56px; padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex; align-items: center;
  justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
}
.footer__copy {
  font-size: 13px; color: rgba(255,255,255,0.25);
}
.footer__dots {
  display: flex; gap: 6px;
}
.footer__dot {
  width: 6px; height: 6px; border-radius: 50%;
  opacity: 0.6;
}

/* ============================================
   SCROLL REVEAL — Progressive enhancement
   Only hide elements when JS is confirmed working
============================================ */
html.js-ready .reveal {
  opacity: 0;
  transform: translateY(30px);
  filter: blur(10px);
  transition: opacity 0.9s var(--spring), transform 0.9s var(--spring), filter 0.9s var(--spring);
  will-change: opacity, transform, filter;
}
html.js-ready .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}
html.js-ready .reveal-d1 { transition-delay: 0.1s; }
html.js-ready .reveal-d2 { transition-delay: 0.2s; }
html.js-ready .reveal-d3 { transition-delay: 0.3s; }

/* i18n text swap — fade through blur */
[data-i18n] {
  transition: opacity 0.25s ease, filter 0.25s ease;
}
[data-i18n].i18n-fading {
  opacity: 0;
  filter: blur(4px);
}

/* ============================================
   LEGAL CONTENT — TOS / Privacy pages
============================================ */
.legal-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 140px 48px 80px;
}
.legal-content h1 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -1.5px;
  margin-bottom: 8px;
}
.legal-content .legal-date {
  font-size: 14px;
  color: var(--fg-3);
  margin-bottom: 48px;
}
.legal-content h2 {
  font-size: 20px;
  font-weight: 600;
  margin-top: 40px;
  margin-bottom: 12px;
  letter-spacing: -0.3px;
}
.legal-content p, .legal-content li {
  font-size: 15px;
  line-height: 1.7;
  color: var(--fg-2);
  margin-bottom: 16px;
}
.legal-content ul {
  padding-left: 20px;
  margin-bottom: 16px;
}
.legal-content a {
  color: var(--blue);
  text-decoration: underline;
}

/* ============================================
   RESPONSIVE — Shared rules (nav, footer, legal)
============================================ */
@media (max-width: 768px) {
  .nav__links { display: none; }
  .nav__cta { display: none; }
  .nav .lang-toggle { display: none; }
  .nav__hamburger { display: flex; }
  .nav { padding: 6px 8px 6px 18px; }
  .nav-overlay__bg { background-image: url('/assets/optimized/footer.webp'); }

  .footer__top { grid-template-columns: 1fr; gap: 32px; }
  .footer__inner { padding: 0 24px; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }

  .legal-content { padding: 120px 24px 60px; }
}
