/* ============================================================
   ReWorth – Design System  |  Blue · Black · Purple
   ============================================================ */
:root {
  --bg:          #F4F7FC;
  --bg-alt:      #EBF1FB;
  --bg-deep:     #E2EDFA;
  --card:        #FFFFFF;
  --card-soft:   #F8FAFF;
  --border:      #D8E4F5;
  --border-soft: #E8EFF9;

  --ink:         #0E1E36;
  --ink-soft:    #4B6483;
  --ink-faint:   #8298B8;

  /* Blues */
  --blue-900:  #08224E;
  --blue-700:  #0F3A84;
  --blue-600:  #1651B9;
  --blue-500:  #2B6BE0;
  --blue-400:  #5590EE;
  --blue-300:  #7FAEFC;
  --blue-100:  #D6E8FC;
  --blue-50:   #EEF5FF;

  /* Purples */
  --purple-700: #5B2D9B;
  --purple-500: #7C3FCB;
  --purple-300: #AA78E8;
  --purple-100: #EAD9FF;

  /* Grads */
  --grad-primary:   linear-gradient(135deg, #1651B9, #2B6BE0);
  --grad-hero:      linear-gradient(135deg, #0F3A84, #7C3FCB);
  --grad-dark-card: linear-gradient(145deg, #0E1E36, #1A1040);

  --shadow-sm: 0 2px 10px rgba(14,30,54,.07);
  --shadow-md: 0 10px 34px rgba(14,30,54,.11);
  --shadow-lg: 0 24px 60px rgba(14,30,54,.18);
  --shadow-xl: 0 40px 90px rgba(14,30,54,.24);

  --font-display: 'Space Grotesk', sans-serif;
  --font-body:    'Plus Jakarta Sans', sans-serif;

  --radius-sm:   10px;
  --radius-md:   16px;
  --radius-lg:   24px;
  --radius-pill: 999px;

  color-scheme: light;
}

html[data-theme="dark"] {
  --bg:          #080F1C;
  --bg-alt:      #0C1525;
  --bg-deep:     #0A1220;
  --card:        #101D33;
  --card-soft:   #0D1829;
  --border:      #1C2E4A;
  --border-soft: #172540;

  --ink:         #EDF2FC;
  --ink-soft:    #A4BCDD;
  --ink-faint:   #6985A8;

  --blue-900:  #D8E9FD;
  --blue-700:  #A5C7F6;
  --blue-600:  #68A2F0;
  --blue-500:  #4D8FFF;
  --blue-400:  #7FABFF;
  --blue-100:  #192F55;
  --blue-50:   #111E34;

  --purple-700: #C49CF8;
  --purple-500: #9B5FE8;
  --purple-300: #C49CF8;
  --purple-100: #2A1550;

  --shadow-sm: 0 2px 12px rgba(0,0,0,.3);
  --shadow-md: 0 12px 36px rgba(0,0,0,.4);
  --shadow-lg: 0 26px 64px rgba(0,0,0,.55);
  --shadow-xl: 0 40px 90px rgba(0,0,0,.65);

  color-scheme: dark;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; }
html  { scroll-behavior: smooth; }
body  {
  margin: 0; font-family: var(--font-body); background: var(--bg); color: var(--ink);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  transition: background .3s ease, color .3s ease;
}
img  { max-width: 100%; display: block; }
a    { color: inherit; text-decoration: none; }
ul   { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }
.hidden { display: none !important; }

::selection { background: var(--blue-500); color: #fff; }

/* ── Typography ── */
.display {
  font-family: var(--font-display); font-weight: 700; color: var(--ink);
  letter-spacing: -.02em; margin: 0; line-height: 1.1;
}
.gradient-text {
  background: linear-gradient(135deg, #1651B9, #7C3FCB, #2B6BE0, #1651B9);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shine 6s linear infinite;
}
@keyframes shine {
  to { background-position: 200% center; }
}

/* ── Layout ── */
.section       { padding: 72px 24px; position: relative; }
.section-inner { max-width: 1180px; margin: 0 auto; }
.section-head  { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.section-sub   { color: var(--ink-soft); font-size: 16px; margin-top: 12px; line-height: 1.7; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--blue-100); color: var(--blue-600);
  padding: 7px 18px; border-radius: var(--radius-pill);
  font-size: 13px; font-weight: 700; letter-spacing: .03em; margin-bottom: 18px;
}
html[data-theme="dark"] .eyebrow { color: var(--blue-400); }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 26px; border-radius: 14px; font-weight: 700;
  font-size: 14.5px; border: none; transition: all .2s ease; white-space: nowrap;
}
.btn-lg  { padding: 16px 32px; font-size: 16px; }
.btn-sm  { padding: 9px 18px;  font-size: 13px; }
.btn-primary {
  background: var(--grad-primary); color: #fff;
  box-shadow: 0 8px 22px rgba(22,81,185,.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(22,81,185,.42); }
.btn-secondary {
  background: var(--card); color: var(--blue-600); border: 1.5px solid var(--border);
}
.btn-secondary:hover { background: var(--blue-50); border-color: var(--blue-400); }
.btn-ghost {
  background: transparent; color: var(--ink); border: 1.5px solid var(--border);
}
.btn-ghost:hover { background: var(--bg-alt); }
.btn-danger {
  background: #dc2626; color: #fff; border: none;
}
.btn-danger:hover { background: #b91c1c; }

/* ── Preloader ── */
#preloader {
  position: fixed; inset: 0; background: var(--bg); z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  transition: opacity .5s ease, visibility .5s ease;
}
#preloader.done { opacity: 0; visibility: hidden; pointer-events: none; }
.preloader-ring {
  width: 52px; height: 52px; border-radius: 50%;
  border: 4px solid var(--border); border-top-color: var(--blue-500);
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Navbar ── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(244,247,252,.88); backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(216,228,245,.7);
  box-shadow: var(--shadow-sm);
  transition: background .3s ease;
}
html[data-theme="dark"] .site-header {
  background: rgba(8,15,28,.88);
  border-bottom-color: rgba(28,46,74,.7);
}
.nav-inner {
  max-width: 1280px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px;
  background: var(--grad-primary);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 18px; box-shadow: 0 6px 16px rgba(22,81,185,.32);
}
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 20px; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  font-size: 14px; font-weight: 600; color: var(--ink-soft);
  transition: color .15s ease; padding: 4px 0; position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -2px; left: 0; right: 0; height: 2px;
  background: var(--blue-500); border-radius: 2px;
  transform: scaleX(0); transition: transform .2s ease;
}
.nav-links a:hover { color: var(--blue-600); }
.nav-links a:hover::after { transform: scaleX(1); }
html[data-theme="dark"] .nav-links a:hover { color: var(--blue-400); }

.nav-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 11px; border: 1.5px solid var(--border);
  background: var(--card); color: var(--ink); display: flex; align-items: center;
  justify-content: center; font-size: 16px; transition: all .15s ease;
}
.icon-btn:hover { border-color: var(--blue-400); color: var(--blue-600); }
.icon-btn-sm { width: 26px; height: 26px; border-radius: 8px; font-size: 12px; border: none; background: transparent; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: var(--radius-pill);
  border: 1.5px solid var(--border); background: var(--card);
  color: var(--blue-600); font-size: 13px; font-weight: 700;
  cursor: pointer; transition: all .2s ease; white-space: nowrap;
}
.lang-btn:hover { background: var(--blue-50); border-color: var(--blue-400); }
html[data-theme="dark"] .lang-btn { color: var(--blue-400); }

.hamburger {
  display: none; width: 38px; height: 38px; border-radius: 11px;
  border: 1.5px solid var(--border); background: var(--card); color: var(--ink);
  align-items: center; justify-content: center; font-size: 18px;
}
.mobile-drawer {
  display: none; flex-direction: column; gap: 4px;
  padding: 10px 24px 22px; border-top: 1px solid var(--border-soft);
}
.mobile-drawer a { padding: 12px 4px; font-weight: 600; color: var(--ink-soft); border-bottom: 1px solid var(--border-soft); }
.mobile-drawer.open { display: flex; }

/* ── Hero ── */
.hero {
  position: relative; padding: 130px 24px 70px; overflow: hidden;
  background: radial-gradient(900px 500px at 80% 0%, rgba(22,81,185,.12), transparent 60%), var(--bg);
  min-height: 100vh; display: flex; align-items: center;
}
.hero-bg-decor {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image: radial-gradient(circle, var(--border) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 80% 70% at 20% 30%, black, transparent 80%);
  opacity: .5;
}
.hero-inner {
  max-width: 1180px; margin: 0 auto; position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 60px; align-items: center;
}
.hero-copy h1 { font-size: clamp(40px, 5.5vw, 68px); margin-bottom: 22px; }
.hero-sub {
  font-size: 17px; line-height: 1.7; color: var(--ink-soft);
  max-width: 500px; margin-bottom: 36px;
}
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 40px; }
.hero-trust { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.trust-item { display: flex; flex-direction: column; gap: 2px; }
.trust-item strong { font-family: var(--font-display); font-size: 20px; color: var(--blue-600); }
html[data-theme="dark"] .trust-item strong { color: var(--blue-400); }
.trust-item span { font-size: 12px; color: var(--ink-faint); font-weight: 600; }
.trust-divider { width: 1px; height: 28px; background: var(--border); }

/* hero visual */
.hero-visual { display: flex; align-items: center; justify-content: center; }
.hero-card-stack {
  position: relative;
  width: 100%;
  max-width: 440px;
  height: 310px;
}
.hero-scan-card {
  background: var(--card); border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg); padding: 24px;
  box-shadow: var(--shadow-xl);
  transition: transform .4s cubic-bezier(.16,1,.3,1), box-shadow .4s ease, opacity .4s ease;
}
.hero-scan-card.card-first {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 330px;
  z-index: 2;
  animation: float-1 6.5s ease-in-out infinite;
  opacity: 0.9;
}
.hero-scan-card.card-second {
  position: absolute;
  top: 70px;
  left: 110px;
  width: 330px;
  z-index: 4;
  animation: float-2 6s ease-in-out infinite;
  opacity: 1;
}
.hero-card-stack:hover .hero-scan-card.card-first {
  transform: translateY(-12px) rotate(-4deg) scale(1.03);
  box-shadow: var(--shadow-xl);
  z-index: 5;
  opacity: 1;
}
.hero-card-stack:hover .hero-scan-card.card-second {
  opacity: 0.85;
  transform: translateY(10px) rotate(4deg) scale(0.97);
  box-shadow: var(--shadow-md);
  z-index: 3;
}

/* Dark mode glow enhancements */
html[data-theme="dark"] .hero-scan-card {
  box-shadow: 0 25px 60px rgba(124, 63, 203, 0.16), 0 5px 15px rgba(0, 0, 0, 0.5);
  border-color: rgba(124, 63, 203, 0.25);
}

.scan-badge {
  font-size: 12px; font-weight: 700; color: var(--purple-500); background: var(--purple-100);
  padding: 5px 12px; border-radius: var(--radius-pill); display: inline-block; margin-bottom: 16px;
}
.scan-badge.badge-blue {
  color: var(--blue-600); background: var(--blue-100);
}
html[data-theme="dark"] .scan-badge.badge-blue {
  color: var(--blue-400); background: var(--blue-100);
}

.scan-result-preview { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.scan-icon { font-size: 32px; }
.scan-type { font-weight: 700; font-size: 18px; }
.scan-cat  { font-size: 13px; color: var(--blue-600); font-weight: 600; }
.scan-conf { margin-left: auto; font-family: var(--font-display); font-size: 28px; font-weight: 700; color: var(--blue-500); }
.scan-bar-row { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 600; color: var(--ink-soft); }
.scan-bar { flex: 1; height: 6px; background: var(--bg-deep); border-radius: 4px; overflow: hidden; }
.scan-bar-fill { height: 100%; background: var(--grad-hero); border-radius: 4px; animation: barGrow 1.4s ease forwards; }
@keyframes barGrow { from { width: 0; } }

.hero-float-tag {
  position: absolute; background: rgba(255, 255, 255, 0.85); padding: 10px 18px; border-radius: 14px;
  box-shadow: var(--shadow-md); border: 1.5px solid rgba(216, 228, 245, 0.6);
  font-weight: 700; font-size: 13.5px; z-index: 3; display: flex; align-items: center; gap: 8px;
  transition: transform .3s ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.tag-top    { top: -25px; left: -15px; z-index: 5; color: #22c55e; animation: float-tag-1 5s ease-in-out infinite; }
.tag-bottom { bottom: -20px; right: 10px; z-index: 5; color: var(--purple-500); animation: float-tag-2 5.5s ease-in-out infinite; }

/* Dark mode tag styling */
html[data-theme="dark"] .hero-float-tag {
  background: rgba(16, 29, 51, 0.8);
  border-color: rgba(28, 46, 74, 0.6);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

@keyframes float-1 {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-10px) rotate(-1deg); }
}
@keyframes float-2 {
  0%, 100% { transform: translateY(0) rotate(3deg); }
  50% { transform: translateY(-14px) rotate(4deg); }
}
@keyframes float-tag-1 {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  50% { transform: translateY(-7px) rotate(-3deg); }
}
@keyframes float-tag-2 {
  0%, 100% { transform: translateY(0) rotate(4deg); }
  50% { transform: translateY(-6px) rotate(6deg); }
}

@media (max-width: 480px) {
  .hero-card-stack {
    height: 270px;
    max-width: 320px;
  }
  .hero-scan-card.card-first {
    width: 250px;
  }
  .hero-scan-card.card-second {
    width: 250px;
    top: 50px;
    left: 70px;
  }
}

.scroll-cue {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center; font-size: 18px;
  color: var(--ink-faint); animation: bounce 2s infinite; z-index: 10;
}
@keyframes bounce { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, -8px); } }

/* ── AI Detector ── */
.detector-section { background: var(--bg-alt); }
html[data-theme="dark"] .detector-section { background: var(--bg-alt); }
.detector-card {
  background: var(--card); border: 1.5px solid var(--border);
  border-radius: var(--radius-lg); padding: 36px;
  box-shadow: var(--shadow-lg);
  display: grid; grid-template-columns: 1fr 1fr; gap: 36px;
}
.detector-col { display: flex; flex-direction: column; }
.detector-frame {
  aspect-ratio: 4/3; width: 100%; background: var(--bg); border: 2px dashed var(--border);
  border-radius: var(--radius-md); overflow: hidden; position: relative;
  display: flex; align-items: center; justify-content: center; margin-bottom: 20px;
}
.detector-frame video,
.detector-frame img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; z-index: 1; }
.detector-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; color: var(--ink-faint); font-weight: 600; font-size: 14px; text-align: center; padding: 24px;
}
.detector-empty-icon { font-size: 48px; filter: grayscale(.2); }
.detector-analyzing {
  position: absolute; inset: 0; background: rgba(14,30,54,.7); color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  z-index: 10; font-weight: 700; font-size: 15px; backdrop-filter: blur(4px);
}
.spinner {
  width: 32px; height: 32px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.25); border-top-color: #fff;
  animation: spin .7s linear infinite;
}
.scan-overlay { position: absolute; inset: 0; pointer-events: none; z-index: 5; border: 2px solid var(--blue-500); border-radius: var(--radius-md); }
.scan-line-ai {
  position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(180deg, var(--blue-500), rgba(43,107,224,0));
  animation: scanEffect 2s linear infinite;
}
@keyframes scanEffect { 0% { top: 0; } 50% { top: 100%; } 100% { top: 0; } }

.detector-buttons { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.detector-error { font-size: 13px; color: #dc2626; font-weight: 600; text-align: center; margin: -10px 0 16px; }

/* detector right */
.result-empty {
  height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--ink-faint); text-align: center; padding: 24px; font-weight: 500; font-size: 14px;
}
.result-panel {
  background: var(--card-soft); border: 1.5px solid var(--border-soft);
  border-radius: var(--radius-md); padding: 24px; height: 100%;
}
.result-head { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.result-icon {
  width: 48px; height: 48px; border-radius: 12px; background: var(--blue-100);
  display: flex; align-items: center; justify-content: center; font-size: 24px;
  box-shadow: 0 4px 12px rgba(22,81,185,.1);
}
html[data-theme="dark"] .result-icon { background: var(--blue-50); color: var(--blue-500); }
.result-title-block { display: flex; flex-direction: column; gap: 2px; }
.result-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; font-weight: 800; color: var(--ink-faint); }
.result-value { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--ink); }
.result-cat   { font-size: 13px; color: var(--blue-600); font-weight: 700; }
html[data-theme="dark"] .result-cat { color: var(--blue-400); }
.result-badge {
  margin-left: auto; background: var(--purple-100); color: var(--purple-700);
  font-size: 12px; font-weight: 700; padding: 6px 14px; border-radius: var(--radius-pill);
}
.result-rows { display: flex; flex-direction: column; gap: 18px; }
.result-row  { display: flex; gap: 14px; align-items: flex-start; }
.rr-icon {
  width: 32px; height: 32px; border-radius: 8px; background: var(--card);
  border: 1px solid var(--border-soft); display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0; box-shadow: var(--shadow-sm);
}
.rr-label { font-size: 11px; font-weight: 700; color: var(--ink-faint); text-transform: uppercase; margin-bottom: 2px; }
.rr-val   { font-size: 13.5px; color: var(--ink-soft); line-height: 1.55; }
.rr-val strong { color: var(--ink); }

/* ── Recycling Guide ── */
.guide-section { background: var(--bg); }
.guide-filters { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-bottom: 36px; }
.filter-btn {
  padding: 8px 16px; border-radius: var(--radius-pill); border: 1.5px solid var(--border);
  background: var(--card); color: var(--ink-soft); font-weight: 600; font-size: 13.5px;
  transition: all .15s ease;
}
.filter-btn:hover { border-color: var(--blue-400); color: var(--blue-600); }
.filter-btn.active {
  background: var(--blue-600); border-color: var(--blue-600); color: #fff;
  box-shadow: 0 4px 12px rgba(22,81,185,.2);
}
.guide-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 24px;
}
.guide-card {
  background: var(--card); border: 1.5px solid var(--border-soft);
  border-radius: var(--radius-md); padding: 24px; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 16px; transition: transform .2s ease, box-shadow .2s ease;
}
.guide-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.guide-card-head { display: flex; align-items: center; gap: 14px; }
.gc-icon {
  width: 44px; height: 44px; border-radius: 10px; background: var(--bg-alt);
  display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.gc-name { font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.gc-desc { font-size: 13.5px; color: var(--ink-soft); line-height: 1.6; }
.gc-section-title { font-size: 11px; font-weight: 800; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 8px; }
.gc-steps { display: flex; flex-direction: column; gap: 6px; }
.gc-step { font-size: 13px; color: var(--ink-soft); display: flex; gap: 8px; align-items: flex-start; }
.gc-step::before { content: '•'; color: var(--blue-500); font-weight: 700; }
.gc-tips {
  background: var(--card-soft); border-radius: 10px; padding: 12px 14px;
  border: 1px solid var(--border-soft); font-size: 12.5px; color: var(--ink-soft); line-height: 1.5;
}

/* ── Stats Banner ── */
.stats-banner {
  background: var(--grad-dark-card); color: #fff; margin: 0 24px; padding: 48px 32px;
  border-radius: 28px; border: 1px solid var(--border); box-shadow: var(--shadow-lg);
}
html[data-theme="dark"] .stats-banner { border-color: var(--border-soft); }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 32px; text-align: center; }
.stat-item  { display: flex; flex-direction: column; gap: 6px; }
.stat-num   { font-family: var(--font-display); font-size: clamp(32px, 4vw, 44px); font-weight: 700; color: var(--blue-400); }
.stat-label { font-size: 13px; color: #8099b8; font-weight: 600; }

/* ── CTA ── */
.cta-banner { padding: 72px 24px; }
.cta-inner {
  background: var(--grad-dark-card); border-radius: 28px; padding: 56px 32px;
  text-align: center; border: 1px solid var(--border);
}
html[data-theme="dark"] .cta-inner { border-color: var(--border); }
.cta-inner h3 { color: #fff; font-size: clamp(24px,3.5vw,36px); max-width: 600px; margin: 0 auto 32px; line-height: 1.35; }

/* ── Footer ── */
.site-footer { background: var(--ink); color: #b0c4de; padding: 60px 24px 0; }
html[data-theme="dark"] .site-footer { background: #050b15; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; padding-bottom: 40px; }
.footer-tagline { font-size: 13.5px; color: #8099b8; line-height: 1.65; max-width: 280px; margin: 14px 0 20px; }
.footer-heading { color: #fff; font-weight: 700; font-size: 14px; margin-bottom: 16px; }
.footer-grid > div { display: flex; flex-direction: column; gap: 11px; font-size: 13.5px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); text-align: center; padding: 22px 24px; font-size: 12.5px; color: #697a94; }

/* ── Scroll to top ── */
.scroll-top {
  position: fixed; bottom: 88px; right: 24px; width: 46px; height: 46px; border-radius: 50%;
  background: var(--grad-primary); color: #fff; border: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; box-shadow: var(--shadow-md); z-index: 60;
  transition: transform .15s ease;
}
.scroll-top:hover { transform: translateY(-3px); }

/* ── Modals ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(8,15,28,.6);
  backdrop-filter: blur(6px); z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal {
  background: var(--card); border-radius: var(--radius-lg); padding: 32px;
  width: 100%; max-width: 440px; box-shadow: var(--shadow-xl);
  position: relative; border: 1px solid var(--border-soft);
  max-height: 90vh; overflow-y: auto;
}
.modal-close {
  position: absolute; top: 18px; right: 18px; width: 32px; height: 32px;
  border-radius: 10px; border: none; background: var(--bg-alt);
  color: var(--ink-soft); display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 14px;
}
.auth-error {
  padding: 10px 14px; border-radius: 10px; background: #fde8e8;
  color: #dc2626; font-size: 13px; font-weight: 600; margin-top: 10px;
}
html[data-theme="dark"] .auth-error { background: #3b1111; color: #f87171; }

.form-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.form-field label { font-size: 12.5px; font-weight: 700; color: var(--ink-soft); }
.form-field input,
.form-field textarea {
  width: 100%; padding: 12px 15px; border-radius: 12px; border: 1.5px solid var(--border);
  font-size: 14px; font-family: inherit; background: var(--bg); color: var(--ink); outline: none;
  transition: border-color .15s ease;
}
.form-field input:focus,
.form-field textarea:focus { border-color: var(--blue-500); }
.field-hint { font-size: 11.5px; color: var(--ink-faint); margin: 0; }

/* ── Gemini FAB & Settings ── */
.gemini-fab {
  position: fixed; bottom: 24px; right: 24px; width: 52px; height: 52px; border-radius: 50%;
  background: var(--grad-hero); color: #fff; border: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; box-shadow: var(--shadow-lg); z-index: 140;
  transition: transform .2s ease;
}
.gemini-fab:hover { transform: scale(1.1); }
.gemini-fab.needs-key {
  animation: fabPulse 1.8s ease-in-out infinite;
}
@keyframes fabPulse {
  0%, 100% { box-shadow: var(--shadow-lg); }
  50%       { box-shadow: 0 0 0 10px rgba(124,63,203,.25), var(--shadow-lg); }
}

/* ── Toast ── */
.toast {
  position: fixed; bottom: 88px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 13px 24px;
  border-radius: var(--radius-pill); font-size: 13.5px; font-weight: 600;
  box-shadow: var(--shadow-lg); z-index: 300;
}
.toast.hidden { display: none; }

/* ── Reveal ── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ── Responsive ── */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 360px; margin: 0 auto; }
  .detector-card { grid-template-columns: 1fr; }
  .footer-grid  { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .nav-links   { display: none; }
  .hamburger   { display: flex; }
}
@media (max-width: 600px) {
  .section { padding: 48px 18px; }
  .hero    { padding-top: 110px; }
  .stats-banner { margin: 0 14px; padding: 28px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
