/* Minimal, modern, responsive styles */
:root {
  --bg: #0b0f16;
  --bg-soft: #111827;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --accent: #38bdf8;
  --accent-2: #22d3ee;
  --card: #0f172a;
  --shadow: 0 10px 25px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
  background: radial-gradient(120% 120% at 100% 0%, rgba(34,211,238,.18) 0%, rgba(0,0,0,0) 40%),
              radial-gradient(120% 120% at 0% 0%, rgba(56,189,248,.12) 0%, rgba(0,0,0,0) 40%),
              linear-gradient(180deg, #0b0f16 0%, #0b1220 35%, #0c1628 100%);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.container { max-width: 1100px; margin: 0 auto; padding: 20px; }
.header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(11,15,22,.85);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.header .inner { display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .5px; }
.logo .badge { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: rgba(56,189,248,.15); color: #7dd3fc; border: 1px solid rgba(125,211,252,.35); }

.nav a { margin: 0 10px; color: var(--text); opacity: .85; }
.nav a:hover { opacity: 1; }

.hero {
  padding: 64px 0 28px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(28px, 4vw, 48px);
  margin: 0 0 12px;
  line-height: 1.1;
}
.hero p { color: var(--muted); max-width: 780px; margin: 0 auto 20px; }
.cta {
  display: inline-flex; align-items: center; gap: 10px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #001018; font-weight: 700; border-radius: 12px; padding: 14px 18px;
  box-shadow: var(--shadow);
}
.subtext { color: var(--muted); font-size: 14px; margin-top: 8px; }

.section { padding: 32px 0; }
.section h2 { margin: 0 0 16px; font-size: clamp(20px, 3vw, 28px); }
.grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 720px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
}

.feature {
  background: linear-gradient(180deg, rgba(56,189,248,.06), rgba(56,189,248,0) 40%) var(--card);
  padding: 16px; border-radius: 14px; border: 1px solid rgba(255,255,255,.06);
}

.offer-grid {
  display: grid; gap: 14px;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .offer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .offer-grid { grid-template-columns: repeat(3, 1fr); } }

.offer-card {
  background: linear-gradient(180deg, rgba(34,197,94,.05), rgba(34,197,94,.0) 35%) var(--card);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 14px; padding: 14px;
  transition: transform .15s ease, border-color .2s ease;
}
.offer-card:hover { transform: translateY(-2px); border-color: rgba(125,211,252,.35); }
.offer-link { display: block; }
.offer-title { margin: 0 0 6px; font-size: 18px; }
.offer-desc { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.offer-cta {
  display: inline-block; padding: 10px 12px; border-radius: 10px; background: rgba(34,211,238,.15);
  border: 1px solid rgba(125,211,252,.35); color: #7dd3fc; font-weight: 600;
}

.notice { padding: 12px 14px; border-radius: 12px; margin: 10px 0; }
.notice.error { background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.45); }

.faq { margin-top: 10px; }
.faq-item { border-bottom: 1px solid rgba(255,255,255,.08); }
.faq-q { cursor: pointer; display: flex; align-items: center; justify-content: space-between; padding: 10px 0; font-weight: 600; }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .25s ease; color: var(--muted); }
.faq-item.open .faq-a { max-height: 220px; padding-bottom: 12px; }

.footer { border-top: 1px solid rgba(255,255,255,.06); margin-top: 30px; }
.footer .inner { padding: 16px 0; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; color: var(--muted); }

.toast {
  position: fixed; bottom: 16px; right: 16px; z-index: 9999;
  background: #052e1a; color: #bbf7d0; border: 1px solid rgba(34,197,94,.35);
  padding: 10px 12px; border-radius: 12px; box-shadow: var(--shadow);
  max-width: 80vw;
}


/* --- Layout: sticky footer --- */
html, body { height: 100%; }
body { display: flex; flex-direction: column; }
main { flex: 1 0 auto; }
.footer { flex-shrink: 0; }

/* --- Theme system --- */
/* default (dark) stays in :root; add light overrides */
:root {
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f7f8fc;
  --bg-soft: #ffffff;
  --text: #0b0f16;
  --muted: #4b5563;
  --accent: #0ea5e9;
  --accent-2: #06b6d4;
  --card: #ffffff;
  --shadow: 0 10px 25px rgba(0,0,0,.10);
  color-scheme: light;
}
:root[data-theme="light"] body {
  background: radial-gradient(120% 120% at 100% 0%, rgba(56,189,248,.15) 0%, rgba(0,0,0,0) 40%),
              radial-gradient(120% 120% at 0% 0%, rgba(34,211,238,.12) 0%, rgba(0,0,0,0) 40%),
              linear-gradient(180deg, #f7f8fc 0%, #ecf2ff 35%, #e7eefc 100%);
}
:root[data-theme="light"] .header {
  background: rgba(255,255,255,.85);
  border-bottom-color: rgba(0,0,0,.06);
}
:root[data-theme="light"] .feature,
:root[data-theme="light"] .offer-card {
  border-color: rgba(0,0,0,.08);
}
:root[data-theme="light"] .offer-cta {
  background: rgba(14,165,233,.12);
  border-color: rgba(14,165,233,.35);
  color: #0ea5e9;
}
.theme-toggle {
  border: 1px solid rgba(255,255,255,.18);
  padding: 8px 10px;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
}
:root[data-theme="light"] .theme-toggle {
  border-color: rgba(0,0,0,.12);
}
.footer-legal {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.4;
}


/* --- Moving background animation --- */
body {
  background-attachment: fixed;
  background-size: 200% 200%, 180% 180%, cover;
  animation: bgShift 22s ease-in-out infinite alternate;
}
@keyframes bgShift {
  0%   { background-position: 0% 0%, 100% 0%, 50% 0%; }
  50%  { background-position: 50% 30%, 50% 20%, 50% 30%; }
  100% { background-position: 100% 60%, 0% 80%, 50% 100%; }
}
/* Light theme motion */
:root[data-theme="light"] body {
  background-attachment: fixed;
  background-size: 220% 220%, 180% 180%, cover;
  animation: bgShiftLight 26s ease-in-out infinite alternate;
}
@keyframes bgShiftLight {
  0%   { background-position: 0% 0%, 100% 0%, 50% 0%; }
  50%  { background-position: 60% 20%, 20% 40%, 50% 30%; }
  100% { background-position: 100% 60%, 0% 80%, 50% 100%; }
}
/* Respect user's reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  body, :root[data-theme="light"] body {
    animation: none !important;
    background-attachment: scroll;
  }
}

/* --- Simple form styles --- */
.form {
  background: var(--card);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--shadow);
}
:root[data-theme="light"] .form {
  border-color: rgba(0,0,0,.08);
}
.form .row { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 700px) { .form .row { grid-template-columns: 1fr 1fr; } }
.form label { font-weight: 600; display: block; margin: 6px 0 4px; }
.form input, .form select, .form textarea {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,.14); background: var(--bg-soft); color: var(--text);
}
:root[data-theme="light"] .form input, :root[data-theme="light"] .form select, :root[data-theme="light"] .form textarea {
  border-color: rgba(0,0,0,.14); background: #fff; color: #0b0f16;
}
.form .actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 14px; border-radius: 12px; cursor: pointer; font-weight: 700; border: 1px solid rgba(125,211,252,.35);
  background: linear-gradient(90deg, var(--accent), var(--accent-2)); color: #001018;
}
.btn.outline { background: transparent; color: var(--text); border: 1px solid rgba(255,255,255,.25); }
:root[data-theme="light"] .btn.outline { border-color: rgba(0,0,0,.18); }
.small-muted { font-size: 12px; color: var(--muted); }


/* --- v5: Animate background only on Home page --- */
body { animation: none !important; background-attachment: scroll; }
:root[data-theme="light"] body { animation: none !important; background-attachment: scroll; }

body.has-animated-bg {
  background-attachment: fixed;
  background-size: 200% 200%, 180% 180%, cover;
  animation: bgShift 22s ease-in-out infinite alternate;
}
:root[data-theme="light"] body.has-animated-bg {
  background-attachment: fixed;
  background-size: 220% 220%, 180% 180%, cover;
  animation: bgShiftLight 26s ease-in-out infinite alternate;
}


/* --- v6 Offers section polish --- */
.offers-section { position: relative; }
.offers-head { display: grid; gap: 6px; margin-bottom: 8px; }
.offers-head h2 { display: inline-flex; align-items: center; gap: 10px; margin: 0; }
.spark { display: inline-block; transform-origin: center; animation: sparkPulse 2.2s ease-in-out infinite; }
@keyframes sparkPulse { 0%{transform: scale(1);} 50%{transform: scale(1.15);} 100%{transform: scale(1);} }
.offers-sub { color: var(--muted); font-size: 14px; }
.sponsored-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; padding: 2px 8px; border-radius: 999px;
  background: rgba(234,179,8,.12); border: 1px solid rgba(234,179,8,.35); color: #fde68a;
}
:root[data-theme="light"] .sponsored-badge { background: rgba(234,179,8,.12); color: #854d0e; border-color: rgba(234,179,8,.45); }

/* Cards */
.offer-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background:
    radial-gradient(120% 120% at 100% 0%, rgba(56,189,248,.08) 0%, rgba(0,0,0,0) 40%),
    var(--card);
}
.offer-card::after {
  content: ""; position: absolute; inset: -2px;
  background: linear-gradient(120deg, rgba(125,211,252,.4), rgba(34,211,238,.2), transparent 60%);
  filter: blur(14px); opacity: 0; transition: opacity .25s ease;
}
.offer-card:hover::after { opacity: .6; }

.offer-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.badge {
  font-size: 11px; padding: 4px 8px; border-radius: 999px;
  background: rgba(125,211,252,.15); border: 1px solid rgba(125,211,252,.35); color: #7dd3fc;
}
.badge.warn { background: rgba(234,179,8,.15); border-color: rgba(234,179,8,.35); color: #fde68a; }
:root[data-theme="light"] .badge { color: #0369a1; }
:root[data-theme="light"] .badge.warn { color: #854d0e; }

/* CTA with subtle shimmer */
.offer-cta {
  position: relative; overflow: hidden;
  display: inline-block; padding: 12px 14px; border-radius: 12px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border: 0;
  color: #001018; font-weight: 800;
}
.offer-cta::before {
  content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, rgba(255,255,255,.2), rgba(255,255,255,0) 40%);
  transform: translateX(-100%);
  animation: ctaShine 3.4s linear infinite;
}
@keyframes ctaShine { 0%{ transform: translateX(-100%);} 40%{ transform: translateX(100%);} 100%{ transform: translateX(100%);} }

/* Entrance animation */
.offer-card { opacity: 0; transform: translateY(8px); animation: floatIn .5s ease forwards; }
.offer-card:nth-child(2) { animation-delay: .06s; }
.offer-card:nth-child(3) { animation-delay: .12s; }
.offer-card:nth-child(4) { animation-delay: .18s; }
@keyframes floatIn { to { opacity: 1; transform: translateY(0); } }

/* Footer note inside offers */
.offers-note { margin-top: 8px; font-size: 12px; color: var(--muted); }


/* --- v8: ensure offer cards are fully clickable --- */
.offer-card { cursor: pointer; }
.offer-card::after { pointer-events: none; } /* don't block clicks */
.offer-link { display: block; position: relative; z-index: 1; height: 100%; }


/* Desktop layout */
@media (min-width: 860px) {
  .nav-toggle { display: none; }
  .nav-menu {
    position: static; display: flex !important; flex-direction: row; align-items: center;
    gap: 10px; background: transparent; border: 0; padding: 0; box-shadow: none; min-width: 0;
  }
  .nav-menu a, .nav-menu button.theme-toggle {
    padding: 8px 10px; border: 0; border-radius: 10px;
  }
}

/* Prevent layout jump when menu opens */
.header {  }


/* Mobile: drawer */
.nav-menu {
  position: fixed; top: 0; right: 0; bottom: 0; width: 86vw; max-width: 360px;
  display: flex; flex-direction: column; gap: 8px;
  background: var(--bg); border-left: 1px solid rgba(255,255,255,.1);
  padding: 16px; box-shadow: var(--shadow);
  transform: translateX(100%); transition: transform .2s ease; z-index: 9999;
}
:root[data-theme="light"] .nav-menu { border-left-color: rgba(0,0,0,.08); }
.nav-menu.open { transform: translateX(0); }
.nav-menu a, .nav-menu button.theme-toggle {
  text-align: left; padding: 10px 12px; border-radius: 10px; border: 1px solid transparent;
}
.nav-menu a:hover, .nav-menu button.theme-toggle:hover {
  background: rgba(125,211,252,.12); border-color: rgba(125,211,252,.28);
}

/* Desktop reflow */
@media (min-width: 860px) {
  .nav-backdrop { display: none !important; }
  .nav-menu {
    position: static; transform: none !important; transition: none;
    flex-direction: row; align-items: center; gap: 10px; width: auto; max-width: none; height: auto;
    background: transparent; border: 0; padding: 0; box-shadow: none;
  }
}


/* Burger button */
.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,.18);
  background: transparent; color: var(--text); cursor: pointer;
}
:root[data-theme="light"] .nav-toggle { border-color: rgba(0,0,0,.12); }
.nav-toggle .bars { position: relative; width: 20px; height: 14px; }
.nav-toggle .bars span {
  position: absolute; left: 0; right: 0; height: 2px; background: currentColor; border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease, top .2s ease;
}
.nav-toggle .bars span:nth-child(1) { top: 0; }
.nav-toggle .bars span:nth-child(2) { top: 6px; }
.nav-toggle .bars span:nth-child(3) { top: 12px; }
.nav-toggle[aria-expanded="true"] .bars span:nth-child(1) { top: 6px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bars span:nth-child(3) { top: 6px; transform: rotate(-45deg); }

/* Desktop layout */
@media (min-width: 860px) {
  .nav-backdrop { display: none !important; }
  .nav-menu {
    position: static; transform: none !important; transition: none;
    flex-direction: row; align-items: center; gap: 10px;
    width: auto; max-width: none; height: auto;
    background: transparent; border: 0; padding: 0; box-shadow: none;
  }
  .nav-toggle { display: none; }
}

/* Prevent background scroll when menu open */
body.nav-open { overflow: hidden; touch-action: none; }


/* Overlay */
.nav-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.45); backdrop-filter: blur(2px); display: none; z-index: 9998; }
.nav-backdrop.open { display: block; }

/* Mobile drawer (outside header) */
.nav-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 86vw; max-width: 360px;
  display: flex; flex-direction: column; gap: 8px;
  background: var(--bg); border-left: 1px solid rgba(255,255,255,.1);
  padding: 16px; box-shadow: var(--shadow);
  transform: translateX(100%); transition: transform .25s ease; z-index: 9999;
}
:root[data-theme="light"] .nav-drawer { border-left-color: rgba(0,0,0,.08); }
.nav-drawer.open { transform: translateX(0); }
.nav-drawer a, .nav-drawer button.theme-toggle { text-align: left; padding: 10px 12px; border-radius: 10px; border: 1px solid transparent; }
.nav-drawer a:hover, .nav-drawer button.theme-toggle:hover { background: rgba(125,211,252,.12); border-color: rgba(125,211,252,.28); }

/* Desktop inline nav inside header */
.nav-inline { display: none; gap: 10px; align-items: center; }
.nav-inline a, .nav-inline button.theme-toggle { padding: 8px 10px; border-radius: 10px; }

/* Burger button */
.nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 10px; border: 1px solid rgba(255,255,255,.18); background: transparent; color: var(--text); cursor: pointer; }
:root[data-theme="light"] .nav-toggle { border-color: rgba(0,0,0,.12); }
.nav-toggle .bars { position: relative; width: 20px; height: 14px; }
.nav-toggle .bars span { position: absolute; left: 0; right: 0; height: 2px; background: currentColor; border-radius: 2px; transition: transform .2s ease, opacity .2s ease, top .2s ease; }
.nav-toggle .bars span:nth-child(1) { top: 0; }
.nav-toggle .bars span:nth-child(2) { top: 6px; }
.nav-toggle .bars span:nth-child(3) { top: 12px; }
.nav-toggle[aria-expanded="true"] .bars span:nth-child(1) { top: 6px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bars span:nth-child(3) { top: 6px; transform: rotate(-45deg); }

/* Desktop breakpoint */
@media (min-width: 860px) {
  .nav-backdrop { display: none !important; }
  .nav-drawer { display: none !important; }
  .nav-toggle { display: none; }
  .nav-inline { display: flex; }
}

/* Lock scroll when drawer open */
body.nav-open { overflow: hidden; touch-action: none; }





/* --- v14: Rock-solid mobile drawer via .is-nav-open on <html> --- */
.header { position: sticky; top: 0; z-index: 1000; }
.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,.18);
  background: transparent; color: var(--text); cursor: pointer;
}
:root[data-theme="light"] .nav-toggle { border-color: rgba(0,0,0,.12); }
.nav-toggle .bars { position: relative; width: 20px; height: 14px; }
.nav-toggle .bars span {
  position: absolute; left: 0; right: 0; height: 2px; background: currentColor; border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease, top .2s ease;
}
.nav-toggle .bars span:nth-child(1) { top: 0; }
.nav-toggle .bars span:nth-child(2) { top: 6px; }
.nav-toggle .bars span:nth-child(3) { top: 12px; }
/* X state driven by .is-nav-open on <html> */
.is-nav-open .nav-toggle .bars span:nth-child(1) { top: 6px; transform: rotate(45deg); }
.is-nav-open .nav-toggle .bars span:nth-child(2) { opacity: 0; }
.is-nav-open .nav-toggle .bars span:nth-child(3) { top: 6px; transform: rotate(-45deg); }

/* Desktop inline menu */
.nav-inline { display: none; gap: 10px; align-items: center; }

/* Backdrop + Drawer (live at top-level, after header) */
.nav-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.5); backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none; transition: opacity .2s ease; z-index: 10000;
}
.nav-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 86vw; max-width: 360px;
  display: flex; flex-direction: column; gap: 8px;
  background: var(--bg); border-left: 1px solid rgba(255,255,255,.1);
  padding: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.5);
  transform: translateX(100%); transition: transform .25s ease; z-index: 10001;
}
:root[data-theme="light"] .nav-drawer { border-left-color: rgba(0,0,0,.08); }
.nav-drawer a, .nav-drawer button.theme-toggle { text-align: left; padding: 10px 12px; border-radius: 10px; border: 1px solid transparent; }
.nav-drawer a:hover, .nav-drawer button.theme-toggle:hover { background: rgba(125,211,252,.12); border-color: rgba(125,211,252,.28); }

/* Open state controlled by <html>.is-nav-open */
.is-nav-open .nav-backdrop { opacity: 1; pointer-events: auto; }
.is-nav-open .nav-drawer { transform: translateX(0); }
/* Prevent background scroll */
.is-nav-open, .is-nav-open body { overflow: hidden; touch-action: none; }

/* Desktop breakpoint */
@media (min-width: 860px) {
  .nav-backdrop, .nav-drawer { display: none; }
  .nav-inline { display: flex; }
  .nav-toggle { display: none; }
}
