/* LearnWithLucky — Responsive, Clean Design */
:root {
  --bg: #fff;
  --text: #000;
  --text-dim: #666;
  --text-light: #999;
  --green: #c4ee87;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --border: #e5e5e5;
  --radius: 8px;
  --accent: #2563eb;
  --accent-light: #dbeafe;
}

/* ─── Dark Mode ──────────────────────────── */
[data-theme="dark"] {
  --bg: #0f172a;
  --text: #e2e8f0;
  --text-dim: #94a3b8;
  --text-light: #64748b;
  --green: #4a7c1e;
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --primary-light: #1e3a5f;
  --border: #1e293b;
}
[data-theme="dark"] .btn-primary{background:var(--primary);color:#fff;}
[data-theme="dark"] .btn-primary:hover{background:var(--primary-dark);}
[data-theme="dark"] .cta-btn-green{background:var(--green);color:#fff;}
[data-theme="dark"] .highlight{background:#1a2332;}
[data-theme="dark"] .nav a.active, [data-theme="dark"] .nav a:hover{background:#1e293b;}
[data-theme="dark"] .card{background:#111827;}
[data-theme="dark"] .mockup-arrow{background:#1e293b;border-color:#334155;}
[data-theme="dark"] .video-placeholder{background:#1a2332;}
*{margin:0;padding:0;box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  font-family:'Inter',system-ui,-apple-system,sans-serif;
  background:var(--bg);color:var(--text);
  font-size:14px;line-height:1.6;
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3{font-family:'Plus Jakarta Sans','Inter',sans-serif;letter-spacing:-0.03em;font-weight:700;line-height:1.15;}

/* HEADER — responsive, two-row layout */
.header{
  border-bottom:1px solid var(--border);
  background:var(--bg);
  position:relative;
}
.header::before{
  content:'';
  position:absolute;top:0;left:0;right:0;
  height:3px;
  background:linear-gradient(90deg,#009739,#FFD200,#C8102E,#000000);
  background-size:400% 100%;
  animation:headerShimmer 6s ease-in-out infinite;
  z-index:2;
}
@keyframes headerShimmer{
  0%,100%{background-position:0% 50%;}
  50%{background-position:100% 50%;}
}
.header-inner{
  max-width:1000px;margin:0 auto;
  display:flex;flex-direction:column;align-items:center;
  padding:12px 16px 8px;
}
.header-logo-row{width:100%;text-align:center;margin-bottom:6px;}
.header-logo{display:inline-flex;align-items:center;}
.header-logo img{display:block;height:70px;width:auto;animation:logoFloat 3s ease-in-out infinite;}
@keyframes logoFloat{
  0%,100%{transform:translateY(0);}
  50%{transform:translateY(-4px);}
}

/* NAV — centered on second row */
.header-nav-row{width:100%;display:flex;align-items:center;gap:8px;}
.nav{
  flex:1;display:flex;justify-content:center;gap:2px;
  flex-wrap:wrap;
}
.nav a{
  padding:5px 10px;font-size:13px;font-weight:500;
  color:var(--text-dim);text-decoration:none;transition:color .15s;
  border-radius:6px;white-space:nowrap;
}
.nav a:hover{color:var(--text);background:#f5f5f5;}
.nav a.active{color:var(--text);font-weight:600;background:#f5f5f5;}
.header-actions{flex-shrink:0;display:flex;gap:6px;align-items:center;}
.cta-btn{
  font-size:13px;font-weight:600;text-decoration:none;
  padding:7px 14px;border-radius:var(--radius);transition:all .15s;
  white-space:nowrap;
}
.cta-btn-green{background:var(--green);color:var(--text);}
.cta-btn-green:hover{opacity:0.85;}

/* CONTENT */
.wrap{max-width:1000px;margin:0 auto;padding:32px 16px 16px;}

/* Section labels */
.label{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:1.5px;color:var(--text-light);margin-bottom:10px;}

/* HERO — responsive */
.section-label{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:0.08em;color:var(--text-light);margin-bottom:8px;}
.hero{text-align:center;padding:28px 0 36px;}
.hero h2{font-size:clamp(1.5rem,4.5vw,2.4rem);font-weight:700;letter-spacing:-0.04em;margin-bottom:10px;max-width:650px;margin-left:auto;margin-right:auto;}
.hero .sub{font-size:15px;color:var(--text-dim);max-width:560px;margin:0 auto 18px;line-height:1.5;}
.hero-actions{display:flex;gap:8px;justify-content:center;flex-wrap:wrap;}

/* BUTTONS */
.btn{
  display:inline-flex;align-items:center;gap:4px;
  font-size:14px;padding:9px 20px;border-radius:var(--radius);
  text-decoration:none;font-weight:500;transition:all .15s;
}
.btn-primary{background:var(--primary);color:#fff;font-weight:600;}
.btn-primary:hover{background:var(--primary-dark);opacity:1;}
.btn-outline{border:1px solid var(--border);color:var(--text);}
.btn-outline:hover{background:#f5f5f5;}

/* CARDS */
.card{
  background:var(--bg);border-radius:var(--radius);
  padding:18px 20px;border:1px solid var(--border);
}
.card p{font-size:14px;color:var(--text-dim);margin-top:6px;line-height:1.6;}
.card h3{font-size:17px;font-weight:700;}

/* GRID — mobile-first */
.grid{display:grid;grid-template-columns:1fr;gap:12px;}
@media(min-width:600px){.grid{grid-template-columns:1fr 1fr;}}
@media(min-width:800px){.g2{grid-template-columns:1fr 1fr;}.g3{grid-template-columns:1fr 1fr 1fr;}.g4{grid-template-columns:1fr 1fr 1fr 1fr;}}
@media(max-width:799px){.g4{grid-template-columns:1fr 1fr;}}

/* Highlight */
.highlight{background:#f8f8f8;border-color:transparent;text-align:center;padding:24px 20px;}
.highlight h3{font-size:17px;}

/* Sections */
.section{margin-bottom:32px;}
.section-header h2{font-size:1.4rem;font-weight:700;}

/* FOOTER */
.footer{border-top:1px solid var(--border);margin-top:48px;padding:28px 16px;}
.footer-inner{max-width:1000px;margin:0 auto;display:grid;grid-template-columns:2fr 1fr 1fr;gap:24px;}
@media(max-width:600px){.footer-inner{grid-template-columns:1fr;gap:16px;}}
.footer h4{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:1.2px;color:var(--text-light);margin-bottom:8px;}
.footer a{color:var(--text-dim);text-decoration:none;font-size:14px;display:block;margin-bottom:5px;}
.footer a:hover{color:var(--text);}
.footer-brand{font-family:'Plus Jakarta Sans',sans-serif;font-size:1.1rem;font-weight:800;letter-spacing:-0.03em;margin-bottom:3px;}
.footer-tag{font-size:12px;color:var(--text-light);margin-bottom:10px;}
.footer .copyright{font-size:12px;color:var(--text-light);margin-top:12px;}

/* Photo strip — responsive */
.photo-strip{
  display:flex;gap:6px;overflow-x:auto;
  padding:0 0 10px;margin:0 -16px;padding-left:16px;padding-right:16px;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none;
}
.photo-strip::-webkit-scrollbar{display:none;}
.photo-strip img{height:clamp(80px,15vw,120px);border-radius:var(--radius);object-fit:cover;flex-shrink:0;}

/* Newsletter */
.newsletter-form{display:flex;gap:8px;max-width:360px;margin:10px auto 0;}
.newsletter-form input[type=email]{
  flex:1;min-width:0;padding:9px 12px;
  border:1px solid var(--border);border-radius:var(--radius);
  font-size:14px;font-family:'Inter',sans-serif;outline:none;
}
.newsletter-form input[type=email]:focus{border-color:var(--text-dim);}
@media(max-width:400px){.newsletter-form{flex-direction:column;}}

/* ─── 480px breakpoint ─────────────────── */
@media(max-width:480px){
  .hero{padding:20px 0 28px;}
  .hero h2{font-size:1.3rem;}
  .hero .sub{font-size:14px;}
  .nav a{padding:4px 7px;font-size:12px;}
  .header-logo img{height:50px;}
  .header-inner{padding:8px 12px 6px;}
  .header-actions{gap:4px;}
  .wrap{padding:20px 12px 12px;}
  .card{padding:14px 16px;}
  .card h3{font-size:15px;}
  .card p{font-size:13px;}
  .photo-strip img{height:70px;}
  .mockup-slide img.mockup-phone{max-width:220px;}
  .mockup-track{min-height:320px;}
  .footer{padding:20px 12px;}
}

/* ─── Theme Toggle — Custom Animated SVG ─── */
.theme-btn{
  background:var(--bg);border:1.5px solid var(--border);cursor:pointer;
  width:40px;height:40px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  transition:all .3s ease;position:relative;overflow:hidden;
  color:var(--text-dim);
}
.theme-btn:hover{
  border-color:var(--primary);color:var(--primary);
  transform:scale(1.12);box-shadow:0 0 20px color-mix(in srgb,var(--primary) 20%,transparent);
}
.theme-btn .theme-icon{
  display:flex;align-items:center;justify-content:center;
  width:24px;height:24px;transition:transform .5s cubic-bezier(.34,1.56,.64,1);
}
.theme-btn .theme-icon svg{width:24px;height:24px;}
.theme-btn .theme-icon svg.icon-sun{display:none !important;}
.theme-btn .theme-icon svg.icon-moon{display:block !important;}
[data-theme="dark"] .theme-btn .theme-icon svg.icon-sun{display:block !important;}
[data-theme="dark"] .theme-btn .theme-icon svg.icon-moon{display:none !important;}
.theme-btn.spin .theme-icon{animation:themePop .45s cubic-bezier(.34,1.56,.64,1);}
@keyframes themePop{
  0%{transform:scale(1) rotate(0deg);}
  40%{transform:scale(1.35) rotate(200deg);}
  100%{transform:scale(1) rotate(360deg);}
}

/* Floating logo */
@keyframes logoFloat{
  0%,100%{transform:translateY(0);}
  50%{transform:translateY(-4px);}
}

/* Reduced motion */
@media (prefers-reduced-motion:reduce){
  .header-logo img{animation:none;}
  .header::before{animation:none;}
}

/* Video placeholder */
.video-placeholder{background:#f8f8f8;border-radius:var(--radius);padding:36px 20px;text-align:center;border:1px solid var(--border);}
.video-placeholder p{font-size:14px;color:var(--text-light);}

/* Article content typography */
.wrap h2{font-size:1.4rem;font-weight:700;margin-bottom:8px;}
.wrap h3{font-size:1.1rem;font-weight:700;margin-bottom:6px;}
.wrap p{margin-bottom:14px;}
.wrap ul{margin-bottom:14px;padding-left:20px;}
.wrap li{margin-bottom:4px;}
.article-meta{font-size:12px;color:var(--text-light);margin-bottom:16px;}

/* Utility */
.text-center{text-align:center;}
.mt-8{margin-top:8px;}
.mt-16{margin-top:16px;}
.wrap{text-align:center;}
.wrap .section{text-align:left;width:100%;max-width:1000px;}
.wrap .hero{text-align:center;}
.wrap .card.highlight{text-align:center;}
.wrap .footer{text-align:left;}

/* App mockup slideshow — animated */
.mockup-slideshow{max-width:360px;margin:0 auto 8px;position:relative;}
.mockup-track{position:relative;width:100%;overflow:hidden;min-height:360px;}
.mockup-arrow{
  position:absolute;top:50%;z-index:10;
  width:40px;height:40px;border-radius:50%;
  background:var(--bg-card,#fff);color:var(--text);
  border:2px solid var(--border);font-size:24px;font-weight:300;
  cursor:pointer;display:flex;align-items:center;justify-content:center;
  transform:translateY(-50%);transition:all 0.2s cubic-bezier(.34,1.56,.64,1);
  box-shadow:0 4px 16px rgba(0,0,0,0.15);line-height:1;padding:0;
  font-family:Georgia,serif;backdrop-filter:blur(4px);
}
.mockup-arrow:hover{background:var(--primary);color:#fff;border-color:var(--primary);transform:translateY(-50%) scale(1.1);box-shadow:0 6px 24px rgba(37,99,235,0.3);}
.mockup-arrow:active{transform:translateY(-50%) scale(0.95);}
.mockup-arrow-prev{left:-16px;}
.mockup-arrow-next{right:-16px;}
@media(max-width:480px){
  .mockup-arrow{width:32px;height:32px;font-size:18px;}
  .mockup-arrow-prev{left:-10px;}
  .mockup-arrow-next{right:-10px;}
}
.mockup-slide{
  position:absolute;inset:0;
  opacity:0;pointer-events:none;
  text-align:center;transition:opacity 0.45s ease;
}
.mockup-slide.active{
  position:relative;
  opacity:1;pointer-events:auto;
}
.mockup-slide.active .mockup-phone{display:block;margin:0 auto;}
.mockup-slide img.mockup-phone{width:100%;height:auto;max-width:280px;border-radius:24px;box-shadow:0 8px 40px rgba(0,0,0,0.15);display:block;margin:0 auto;}
.mockup-slideshow{min-height:440px;}
@media(max-width:600px){.mockup-slideshow{min-height:360px;}}
.mockup-label{font-size:14px;color:var(--text);margin-top:10px;line-height:1.5;}
.mockup-dots{display:flex;justify-content:center;gap:8px;margin-top:8px;}
.dot{width:12px;height:12px;border-radius:50%;background:#cbd5e1;cursor:pointer;transition:all 0.3s cubic-bezier(.34,1.56,.64,1);border:none;padding:0;}
.dot.active{background:var(--primary);width:28px;border-radius:6px;transform:scaleY(1);}
.dot:hover{background:var(--text-dim);transform:scale(1.2);}
.dot.active:hover{transform:scaleY(1);}

/* ─── Reduced Motion ───────────────────── */
@media (prefers-reduced-motion: reduce) {
  html{scroll-behavior:auto;}
  *,
  *::before,
  *::after {
    animation-duration:0.01ms !important;
    animation-iteration-count:1 !important;
    transition-duration:0.01ms !important;
  }
}

/* Newsletter inline success */
.newsletter-success{text-align:center;padding:20px 10px;}
.newsletter-success .success-icon{display:inline-flex;width:44px;height:44px;border-radius:50%;background:linear-gradient(135deg,#2563eb,#1d4ed8);color:#fff;font-size:20px;align-items:center;justify-content:center;margin-bottom:10px;font-weight:700;}
.newsletter-success strong{display:block;font-size:15px;margin-bottom:4px;}
.newsletter-success p{font-size:13px;color:var(--text-dim);margin:0;}
