/* =============================================
   AbacusEra – Main Stylesheet
   Mobile-First | Responsive | SEO-Friendly
   ============================================= */

:root {
  --primary: #e85d04;
  --primary-dark: #c44d00;
  --primary-light: #ffeade;
  --accent: #ffbe0b;
  --dark: #0d0d0d;
  --dark-2: #1a1a2e;
  --body-bg: #fafaf8;
  --text: #2c2c2c;
  --text-muted: #666;
  --border: #e5e5e5;
  --white: #ffffff;
  --gradient: linear-gradient(135deg, #e85d04, #ffbe0b);
  --gradient-dark: linear-gradient(135deg, #0d0d0d, #1a1a2e);
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 48px rgba(0,0,0,0.14);
  --radius: 16px;
  --radius-sm: 8px;
  --font-head: 'Sora', sans-serif;
  --font-body: 'Lora', serif;
  --nav-h: 72px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--body-bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section { padding: 80px 0; }
.gradient-text { background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* ===== TOPBAR ===== */
.topbar {
  background: var(--dark-2);
  color: #fff;
  font-size: 0.78rem;
  padding: 7px 0;
  font-family: var(--font-head);
}
.topbar-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px; }
.topbar a { color: var(--accent); }
.topbar a:hover { text-decoration: underline; }

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-icon { font-size: 1.8rem; }
.logo-text {
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text);
}
.logo-text strong { color: var(--primary); font-weight: 800; }
.logo-footer .logo-text { color: rgba(255,255,255,0.9); }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-head);
  font-size: 0.88rem;
  font-weight: 500;
}
.nav-menu > a, .nav-parent {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  color: var(--text);
}
.nav-menu > a:hover, .nav-parent:hover { background: var(--primary-light); color: var(--primary); }
.btn-nav {
  background: var(--primary) !important;
  color: #fff !important;
  padding: 9px 18px !important;
  border-radius: 50px !important;
  font-weight: 700 !important;
}
.btn-nav:hover { background: var(--primary-dark) !important; }

/* Dropdown */
.nav-dropdown { position: relative; }
.dropdown-panel {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 220px;
  padding: 10px;
  border: 1px solid var(--border);
}
.nav-dropdown:hover .dropdown-panel { display: block; }
.dropdown-panel a {
  display: block;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.87rem;
  transition: var(--transition);
}
.dropdown-panel a:hover { background: var(--primary-light); color: var(--primary); }

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

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 24px;
  border-radius: 50px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.9rem;
  transition: var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
}
.btn-lg { padding: 15px 32px; font-size: 1rem; }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(232,93,4,0.3); }
.btn-secondary { background: var(--dark-2); color: #fff; border-color: var(--dark-2); }
.btn-secondary:hover { background: var(--dark); transform: translateY(-2px); }
.btn-accent { background: var(--accent); color: var(--dark); border-color: var(--accent); }
.btn-accent:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(255,190,11,0.4); }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; transform: translateY(-2px); }
.btn-white { background: #fff; color: var(--primary); border-color: #fff; }
.btn-white:hover { background: var(--primary-light); transform: translateY(-2px); }
.btn-outline-white { background: transparent; color: #fff; border-color: rgba(255,255,255,0.7); }
.btn-outline-white:hover { background: rgba(255,255,255,0.15); transform: translateY(-2px); }

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  background: var(--dark-2);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(232,93,4,0.2) 0%, transparent 60%),
              radial-gradient(ellipse at 20% 80%, rgba(255,190,11,0.1) 0%, transparent 50%);
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 100px 20px 60px;
  max-width: 650px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,190,11,0.15);
  border: 1px solid rgba(255,190,11,0.4);
  color: var(--accent);
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 50px;
  margin-bottom: 24px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.hero-title {
  font-family: var(--font-head);
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 20px;
}
.hero-subtitle {
  color: rgba(255,255,255,0.7);
  font-size: clamp(1rem, 2vw, 1.15rem);
  max-width: 540px;
  margin-bottom: 36px;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 56px; }
.hero-stats { display: flex; gap: 32px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat-num { font-family: var(--font-head); font-size: 1.8rem; font-weight: 800; color: #fff; line-height: 1; }
.stat-label { font-size: 0.78rem; color: rgba(255,255,255,0.5); font-family: var(--font-head); margin-top: 4px; }

/* Hero Abacus Visual */
.hero-abacus-visual {
  position: absolute;
  right: 5%;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  opacity: 0.6;
}
.abacus-frame {
  display: flex;
  gap: 18px;
  padding: 24px;
  border: 3px solid rgba(255,190,11,0.3);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.03);
}
.abacus-rod { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.bead {
  width: 32px; height: 32px; border-radius: 50%;
  transition: transform 0.4s ease;
  animation: beadFloat 3s ease-in-out infinite;
}
.bead.top-bead { background: var(--accent); }
.bead.c2 { background: #e85d04; }
.bead.c3 { background: #8b5cf6; }
.bead.c4 { background: #10b981; }
.bead.c5 { background: #3b82f6; }
.b2,.b3,.b4,.b5,.b6 { background: rgba(255,255,255,0.7); }
.divider-bar { width: 40px; height: 3px; background: rgba(255,255,255,0.3); border-radius: 2px; }
@keyframes beadFloat {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
.b2 { animation-delay: 0.1s; } .b3 { animation-delay: 0.2s; }
.b4 { animation-delay: 0.3s; } .b5 { animation-delay: 0.4s; } .b6 { animation-delay: 0.5s; }

/* ===== TRUST STRIP ===== */
.trust-strip {
  background: var(--dark);
  padding: 18px 0;
  overflow: hidden;
}
.trust-inner {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  justify-content: center;
}
.trust-item {
  font-family: var(--font-head);
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  white-space: nowrap;
}

/* ===== SECTION HEADERS ===== */
.section-header { text-align: center; margin-bottom: 60px; }
.section-tag {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-light);
  padding: 6px 16px;
  border-radius: 50px;
  margin-bottom: 16px;
}
.section-header h2 {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  color: var(--dark);
  line-height: 1.2;
  margin-bottom: 16px;
}
.section-header p {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.05rem;
}
.section-cta { text-align: center; margin-top: 40px; }

/* ===== CARDS ===== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 28px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--gradient);
  transform: scaleX(0);
  transition: var(--transition);
  transform-origin: left;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card:hover::before { transform: scaleX(1); }
.card-featured { border-color: var(--primary); background: var(--primary-light); }
.card-featured::before { transform: scaleX(1); }
.card-highlight { border-color: var(--accent); background: #fffdf0; }
.card-icon { font-size: 2.2rem; margin-bottom: 16px; }
.card h3 { font-family: var(--font-head); font-size: 1.25rem; font-weight: 700; margin-bottom: 6px; }
.card-age { font-family: var(--font-head); font-size: 0.78rem; color: var(--primary); font-weight: 600; margin-bottom: 14px; }
.card p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 20px; }
.card-features { margin-bottom: 24px; }
.card-features li { font-size: 0.87rem; padding: 4px 0; color: var(--text); font-family: var(--font-head); }

/* ===== LAB PROMO ===== */
.lab-promo { background: var(--dark-2); }
.lab-promo-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.lab-promo-text .section-tag { background: rgba(232,93,4,0.2); }
.lab-promo-text h2 { color: #fff; }
.lab-promo-text p { color: rgba(255,255,255,0.7); margin-bottom: 24px; }
.lab-features { margin-bottom: 32px; }
.lab-features li {
  padding: 8px 0;
  color: rgba(255,255,255,0.8);
  font-family: var(--font-head);
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

/* Lab Mockup */
.lab-mockup {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  overflow: hidden;
}
.mockup-header {
  display: flex;
  gap: 8px;
  padding: 14px 18px;
  background: rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.mockup-header span {
  width: 12px; height: 12px; border-radius: 50%;
  background: rgba(255,255,255,0.3);
}
.mockup-body { padding: 28px; }
.mockup-abacus { display: flex; gap: 20px; justify-content: center; margin-bottom: 24px; }
.m-rod { display: flex; flex-direction: column; align-items: center; gap: 6px; animation: rodBounce var(--d, 0s) 1s ease infinite; }
.m-bead { width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,0.15); transition: var(--transition); }
.m-bead.up { background: var(--primary); transform: translateY(-8px); }
.m-sep { width: 36px; height: 2px; background: rgba(255,255,255,0.2); border-radius: 2px; }
.mockup-score { text-align: center; color: rgba(255,255,255,0.7); font-family: var(--font-head); font-size: 1rem; }
.mockup-score strong { color: var(--accent); font-size: 1.3rem; }

/* ===== WHY GRID ===== */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.why-item {
  padding: 28px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--border);
  transition: var(--transition);
}
.why-item:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.why-icon { font-size: 2rem; margin-bottom: 14px; }
.why-item h4 { font-family: var(--font-head); font-weight: 700; font-size: 1rem; margin-bottom: 8px; }
.why-item p { font-size: 0.87rem; color: var(--text-muted); }

/* ===== STEPS ===== */
.steps-section { background: var(--primary-light); }
.steps {
  display: flex;
  align-items: flex-start;
  gap: 0;
  flex-wrap: wrap;
  justify-content: center;
}
.step {
  flex: 1;
  min-width: 180px;
  max-width: 240px;
  text-align: center;
  padding: 28px 20px;
}
.step-num {
  font-family: var(--font-head);
  font-size: 3rem;
  font-weight: 800;
  color: var(--primary);
  opacity: 0.3;
  line-height: 1;
  margin-bottom: 12px;
}
.step h4 { font-family: var(--font-head); font-size: 1.1rem; font-weight: 700; margin-bottom: 10px; }
.step p { font-size: 0.88rem; color: var(--text-muted); }
.step-arrow {
  font-size: 2rem;
  color: var(--primary);
  opacity: 0.4;
  margin-top: 60px;
  display: none;
}

/* ===== TESTIMONIALS ===== */
.testimonials-section { background: var(--dark-2); }
.testimonials-section .section-header h2 { color: #fff; }
.testimonial-slider { position: relative; min-height: 200px; }
.testimonial {
  display: none;
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
  padding: 40px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  animation: fadeIn 0.5s ease;
}
.testimonial.active { display: block; }
.stars { font-size: 1.3rem; color: var(--accent); margin-bottom: 20px; }
.testimonial p { color: rgba(255,255,255,0.8); font-size: 1.05rem; font-style: italic; margin-bottom: 24px; }
.testimonial-author { font-family: var(--font-head); font-weight: 600; color: rgba(255,255,255,0.5); font-size: 0.9rem; }
.testimonial-author strong { color: var(--accent); }
.slider-dots { display: flex; justify-content: center; gap: 10px; margin-top: 28px; }
.dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(255,255,255,0.2);
  transition: var(--transition);
}
.dot.active { background: var(--primary); transform: scale(1.3); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ===== BLOG ===== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.blog-card { background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); transition: var(--transition); }
.blog-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.blog-img { height: 160px; display: flex; align-items: center; justify-content: center; font-size: 3rem; }
.blog-body { padding: 24px; }
.blog-cat { font-family: var(--font-head); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--primary); font-weight: 700; }
.blog-body h4 { font-family: var(--font-head); font-size: 1.05rem; font-weight: 700; margin: 10px 0; }
.blog-body p { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 16px; }
.read-more { font-family: var(--font-head); font-size: 0.85rem; font-weight: 700; color: var(--primary); }
.read-more:hover { text-decoration: underline; }

/* ===== CTA BANNER ===== */
.cta-banner {
  background: var(--gradient);
  padding: 80px 0;
  text-align: center;
}
.cta-inner h2 { font-family: var(--font-head); font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 800; color: #fff; margin-bottom: 16px; }
.cta-inner p { color: rgba(255,255,255,0.85); font-size: 1.05rem; max-width: 580px; margin: 0 auto 36px; }
.cta-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ===== FOOTER ===== */
.site-footer { background: var(--dark); padding: 70px 0 0; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 48px; margin-bottom: 48px; }
.footer-col p { color: rgba(255,255,255,0.5); font-size: 0.88rem; margin: 16px 0; }
.footer-col h4 { font-family: var(--font-head); font-size: 0.88rem; font-weight: 700; color: rgba(255,255,255,0.4); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 18px; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul a { color: rgba(255,255,255,0.6); font-size: 0.9rem; font-family: var(--font-head); transition: var(--transition); }
.footer-col ul a:hover { color: var(--accent); }
.social-links { display: flex; gap: 12px; margin-top: 20px; }
.social-links a {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.6);
  font-family: var(--font-head);
  font-size: 0.85rem;
  transition: var(--transition);
}
.social-links a:hover { background: var(--primary); color: #fff; }

.footer-subscribe { display: flex; gap: 8px; margin-top: 16px; }
.footer-subscribe input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 50px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.07);
  color: #fff;
  font-size: 0.85rem;
  font-family: var(--font-head);
}
.footer-subscribe input::placeholder { color: rgba(255,255,255,0.3); }
.footer-subscribe input:focus { outline: none; border-color: var(--primary); }
.footer-subscribe button {
  background: var(--primary);
  color: #fff;
  padding: 10px 18px;
  border-radius: 50px;
  font-family: var(--font-head);
  font-size: 0.82rem;
  font-weight: 700;
  transition: var(--transition);
}
.footer-subscribe button:hover { background: var(--primary-dark); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.06); padding: 24px 0; }
.footer-bottom p { color: rgba(255,255,255,0.3); font-size: 0.8rem; font-family: var(--font-head); text-align: center; }

/* ===== WHATSAPP FLOAT ===== */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 6px 24px rgba(37,211,102,0.4);
  z-index: 999;
  transition: var(--transition);
  animation: pulse 2s infinite;
}
.whatsapp-float:hover { transform: scale(1.1); }
@keyframes pulse {
  0%, 100% { box-shadow: 0 6px 24px rgba(37,211,102,0.4); }
  50% { box-shadow: 0 6px 32px rgba(37,211,102,0.7); }
}

/* =============================================
   RESPONSIVE BREAKPOINTS
   ============================================= */

/* Tablet */
@media (max-width: 1024px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .lab-promo-inner { grid-template-columns: 1fr; }
  .hero-abacus-visual { opacity: 0.2; }
}

/* Mobile */
@media (max-width: 768px) {
  .topbar-right { display: none; }
  :root { --nav-h: 64px; }

  .nav-toggle { display: flex; }
  .nav-menu {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
    gap: 4px;
    overflow-y: auto;
    z-index: 999;
    border-top: 1px solid var(--border);
  }
  .nav-menu.open { display: flex; }
  .nav-menu > a, .nav-parent { width: 100%; padding: 14px 16px; font-size: 1rem; border-radius: var(--radius-sm); }
  .dropdown-panel { position: static; box-shadow: none; border: none; background: var(--primary-light); margin-top: 4px; }
  .nav-dropdown:hover .dropdown-panel { display: none; }
  .nav-dropdown.open .dropdown-panel { display: block; }
  .btn-nav { text-align: center; margin-top: 12px; }

  .hero { min-height: auto; }
  .hero-content { padding: 80px 20px 60px; }
  .hero-abacus-visual { display: none; }
  .hero-stats { gap: 20px; }

  .section { padding: 60px 0; }
  .section-header { margin-bottom: 40px; }

  .cards-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr 1fr; }
  .blog-grid { grid-template-columns: 1fr; }

  .steps { flex-direction: column; align-items: center; }
  .step-arrow { display: none; }

  .footer-inner { grid-template-columns: 1fr; gap: 32px; }

  .trust-inner { flex-direction: column; align-items: center; gap: 12px; }

  .cta-buttons { flex-direction: column; align-items: center; }
}

@media (max-width: 480px) {
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; justify-content: center; }
  .why-grid { grid-template-columns: 1fr; }
  .footer-subscribe { flex-direction: column; }
}
