:root {
  --bg: #0a0908;
  --fg: #f5f4f2;
  --muted: #a39c90;
  --card: #16140f;
  --border: #262320;
  --brand: #facc15;
  --brand-2: #fbbf24;
  --ring: #facc15;
  --max-width: 80rem;
  --ease-expo: cubic-bezier(.16,1,.3,1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, .logo { font-family: "Space Grotesk", Inter, system-ui, sans-serif; }
h1, h2, h3 { font-weight: 600; line-height: 1.15; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.75rem); margin-bottom: 16px; }
h3 { font-size: 1.15rem; margin-bottom: 8px; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

.container-custom {
  margin: 0 auto;
  width: 100%;
  max-width: var(--max-width);
  padding: 0 1rem;
}
@media (min-width: 640px) { .container-custom { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .container-custom { padding: 0 2rem; } }

.eyebrow {
  color: var(--brand);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
  margin-bottom: 12px;
}
.center { text-align: center; }
.accent { color: var(--brand); }
.section-lead { color: var(--muted); font-size: 1.05rem; max-width: 620px; margin: 0 auto 40px; }
.malayalam { font-family: "Noto Sans Malayalam", Inter, sans-serif; }

/* Reveal on scroll — visible by default; JS opts elements into the hidden
   pre-animation state so a failed/blocked script never hides content. */
.reveal { transition: opacity 0.7s var(--ease-expo), transform 0.7s var(--ease-expo); }
.reveal.pre-reveal { opacity: 0; transform: translateY(24px); }
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* Scroll progress bar */
.scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  z-index: 200;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  transform-origin: left;
  transform: scaleX(0);
}

/* BUTTONS */
.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.3s var(--ease-expo), box-shadow 0.3s var(--ease-expo), background 0.3s var(--ease-expo), border-color 0.3s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--brand);
  color: #0a0908;
  box-shadow: 0 0 0 rgba(250,204,21,0);
}
.btn-primary:hover { background: var(--brand-2); transform: translateY(-2px); box-shadow: 0 8px 30px rgba(250,204,21,0.35); }
.btn-ghost {
  border: 1px solid var(--border);
  color: var(--fg);
}
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-2px); }
.btn-sm { padding: 10px 20px; font-size: 0.88rem; }

/* HEADER / NAV */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 150;
  background: rgba(10,9,8,0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 4rem; }
@media (min-width: 640px) { .nav { height: 5rem; } }

.logo { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; }
.logo span { color: var(--brand); }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link {
  position: relative;
  display: block;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.3s;
}
.nav-link:hover { color: var(--fg); }
.nav-link.active { color: var(--fg); background: rgba(250,204,21,0.12); box-shadow: inset 0 0 0 1px rgba(250,204,21,0.25); }

.nav-actions { display: flex; align-items: center; gap: 10px; }

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: none;
  cursor: pointer;
}
.hamburger span { width: 16px; height: 2px; background: var(--fg); margin: 0 auto; border-radius: 2px; transition: transform 0.25s, opacity 0.25s; }
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* HERO */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 140px 0 60px;
  position: relative;
  background:
    radial-gradient(ellipse 900px 500px at 50% 0%, rgba(250,204,21,0.10), transparent 65%);
}
.hero-inner { text-align: center; max-width: 880px; margin: 0 auto; }
.hero h1 { font-size: clamp(2.3rem, 6vw, 4rem); margin-bottom: 22px; }
.word-cycle { position: relative; display: inline-block; color: var(--brand); min-width: 1ch; }
.word-cycle .w {
  position: absolute; left: 0; top: 0;
  opacity: 0;
  white-space: nowrap;
  transition: opacity 0.5s ease;
}
.word-cycle .w.active { position: static; opacity: 1; }
.br-desktop { display: none; }
@media (min-width: 640px) { .br-desktop { display: inline; } }

.hero-lead { font-size: 1.2rem; color: var(--fg); margin-bottom: 8px; font-weight: 500; }
.hero-sub { font-size: 1rem; color: var(--muted); max-width: 560px; margin: 0 auto 36px; }
.hero-ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 44px; }
.hero-ctas.center { margin-top: 8px; }

.hero-stats { display: flex; align-items: center; justify-content: center; gap: 22px; }
.hero-stat { display: flex; flex-direction: column; align-items: center; }
.hero-stat strong { font-family: "Space Grotesk", sans-serif; font-size: 1.4rem; }
.hero-stat span { font-size: 0.82rem; color: var(--muted); }
.dot { color: var(--border); }

.scroll-hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* APPROACH */
.approach { padding: 90px 0; border-top: 1px solid var(--border); }
.approach-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.approach-copy p { color: var(--muted); margin: 18px 0 28px; font-size: 1.05rem; }
.approach-copy h2 { }

.counter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.counter-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px 20px;
  text-align: center;
}
.counter-number { font-family: "Space Grotesk", sans-serif; font-size: 2.1rem; font-weight: 700; color: var(--brand); }
.counter-card span { display: block; margin-top: 6px; font-size: 0.85rem; color: var(--muted); }

/* AUDIENCE */
.audience { padding: 90px 0; }
.tag-cloud { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; max-width: 800px; margin: 0 auto; }
.tag-cloud span {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 0.9rem;
  color: var(--fg);
  transition: border-color 0.25s, color 0.25s;
}
.tag-cloud span:hover { border-color: var(--brand); color: var(--brand); }
.tag-label {
  background: rgba(250,204,21,0.12) !important;
  border-color: rgba(250,204,21,0.3) !important;
  color: var(--brand) !important;
  font-size: 0.78rem !important;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: default;
  pointer-events: none;
}

/* STUCK / VS */
.stuck { padding: 90px 0; border-top: 1px solid var(--border); background: var(--card); }
.vs-panel {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: center;
  max-width: 900px;
  margin: 50px auto 0;
}
.vs-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px 28px;
}
.vs-tag { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.vs-before h3 { color: var(--muted); }
.vs-after h3 { color: var(--brand); }
.vs-caption { color: var(--muted); font-size: 0.88rem; margin-bottom: 16px; }
.vs-card ul { display: flex; flex-direction: column; gap: 10px; }
.vs-card li { font-size: 0.92rem; padding-left: 20px; position: relative; color: var(--fg); }
.vs-before li::before { content: "×"; position: absolute; left: 0; color: var(--muted); font-weight: 700; }
.vs-after li::before { content: "✓"; position: absolute; left: 0; color: var(--brand); font-weight: 700; }
.vs-badge {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--brand);
  color: #0a0908;
  display: flex; align-items: center; justify-content: center;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  justify-self: center;
}

/* JOURNEY */
.journey { padding: 90px 0 0; border-top: 1px solid var(--border); }
.phase-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 60px; }
.phase-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 30px 26px;
}
.phase-num { color: var(--brand); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.phase-card h3 { margin-top: 10px; font-size: 1.3rem; }
.phase-card p { color: var(--muted); font-size: 0.92rem; }

.outcome-grid { display: flex; justify-content: center; gap: 60px; margin-bottom: 60px; flex-wrap: wrap; }
.outcome-card { text-align: center; }
.outcome-number { font-family: "Space Grotesk", sans-serif; font-size: 2.6rem; font-weight: 700; color: var(--brand); }
.outcome-number span { font-size: 1.4rem; }
.outcome-card span:last-child { display: block; color: var(--muted); font-size: 0.88rem; margin-top: 4px; }

.marquee {
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
  background: var(--card);
}
.marquee-track {
  display: flex;
  gap: 14px;
  width: max-content;
  animation: marquee 28s linear infinite;
}
.marquee-track span { font-size: 0.92rem; color: var(--muted); font-weight: 500; white-space: nowrap; }
.marquee-track span:nth-child(odd) { color: var(--brand); }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* SERVICES / MODULES */
.services { padding: 90px 0; }
.module-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.module-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 30px 26px;
  transition: border-color 0.3s var(--ease-expo), transform 0.3s var(--ease-expo);
}
.module-card:hover { border-color: var(--brand); transform: translateY(-4px); }
.module-num { color: var(--brand); font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 0.85rem; }
.module-card h3 { margin-top: 10px; }
.module-card p { color: var(--muted); font-size: 0.92rem; }

/* 2-service layout */
.module-grid-2 { grid-template-columns: repeat(2, 1fr); }
.module-card-large { padding: 36px 30px; }
.module-card-large h3 { font-size: 1.3rem; margin-bottom: 10px; }
.module-card-large h3 em { font-style: normal; color: var(--muted); font-size: 0.95rem; font-weight: 500; }
.module-oneliner { color: var(--muted); font-size: 0.97rem; margin-bottom: 20px; }
.module-list { display: flex; flex-direction: column; gap: 12px; }
.module-list li { font-size: 0.92rem; color: var(--fg); padding-left: 22px; position: relative; }
.module-list li::before { content: "→"; position: absolute; left: 0; color: var(--brand); font-weight: 700; }
.module-list strong { color: var(--fg); font-weight: 600; }

/* WHY */
.why { padding: 90px 0; border-top: 1px solid var(--border); background: var(--card); }
.why-inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; }
.why-copy p { color: var(--muted); font-size: 1.05rem; margin: 16px 0 26px; }
.why-list { display: flex; flex-direction: column; gap: 14px; margin-bottom: 30px; }
.why-list li { padding-left: 26px; position: relative; color: var(--fg); font-size: 0.98rem; }
.why-list li::before { content: "✓"; position: absolute; left: 0; color: var(--brand); font-weight: 700; }
.why-tags { display: flex; flex-direction: column; gap: 14px; }
.why-tags span {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 22px;
  font-weight: 600;
  font-size: 0.95rem;
  text-align: center;
}

/* RESULTS */
.results { padding: 90px 0; }
.result-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.result-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px 24px;
  transition: border-color 0.3s var(--ease-expo), transform 0.3s var(--ease-expo);
}
.result-card:hover { border-color: var(--brand); transform: translateY(-4px); }
.result-role { display: block; color: var(--brand); font-weight: 600; font-size: 0.85rem; margin-bottom: 12px; }
.result-card p { font-size: 0.93rem; color: var(--fg); }

/* FINAL CTA */
.final-cta {
  padding: 100px 0;
  border-top: 1px solid var(--border);
  background: radial-gradient(ellipse 700px 400px at 50% 0%, rgba(250,204,21,0.10), transparent 65%);
}
.final-note { color: var(--muted); font-size: 0.85rem; margin-top: 22px; }

/* FAQ */
.faq { padding: 90px 0; border-top: 1px solid var(--border); }
.faq-list { max-width: 700px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-question {
  width: 100%;
  background: none;
  border: none;
  color: var(--fg);
  font-size: 1.02rem;
  font-weight: 600;
  text-align: left;
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-family: inherit;
}
.faq-question span { color: var(--brand); font-size: 1.3rem; transition: transform 0.25s; flex-shrink: 0; margin-left: 16px; }
.faq-item.open .faq-question span { transform: rotate(45deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq-answer p { padding-bottom: 22px; font-size: 0.95rem; color: var(--muted); }

/* FOOTER */
.footer { padding: 60px 0 24px; border-top: 1px solid var(--border); background: var(--card); }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 40px; }
.footer-brand p { margin-top: 14px; font-size: 0.9rem; color: var(--muted); max-width: 300px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h4 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--fg); margin-bottom: 6px; font-family: Inter, sans-serif; font-weight: 700; }
.footer-col a { color: var(--muted); font-size: 0.92rem; transition: color 0.25s; }
.footer-col a:hover { color: var(--brand); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 24px; text-align: center; }
.footer-bottom p { font-size: 0.8rem; color: var(--muted); }

/* RESPONSIVE */
@media (max-width: 900px) {
  .approach-inner, .why-inner { grid-template-columns: 1fr; }
  .phase-grid, .module-grid, .result-grid { grid-template-columns: repeat(2, 1fr); }
  .module-grid-2 { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .vs-panel { grid-template-columns: 1fr; }
  .vs-badge { justify-self: center; }
}

@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-actions .btn-sm { display: none; }
  .hamburger { display: flex; }

  .nav-links.mobile-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 4rem;
    left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 16px 1rem 24px;
    gap: 6px;
  }
  .nav-links.mobile-open .nav-link { padding: 12px 18px; }
}

@media (max-width: 560px) {
  .phase-grid, .module-grid, .result-grid, .counter-grid { grid-template-columns: 1fr; }
  .outcome-grid { gap: 36px; }
  .hero { padding: 120px 0 50px; }
}

/* ScalEd Marketing logo */
.logo img.logo-img{height:40px;width:auto;display:block;}
@media (max-width:768px){.logo img.logo-img{height:32px;}}

/* LEAD FORM */
.contact { padding: 80px 0; }
.lead-form { max-width: 720px; margin: 40px auto 0; background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 32px; }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; } }
.form-field { display: flex; flex-direction: column; gap: 6px; margin-top: 18px; }
.form-grid .form-field { margin-top: 0; }
.form-field-full { width: 100%; }
.form-field label { font-size: 0.85rem; color: var(--muted); font-weight: 600; }
.form-field input, .form-field select, .form-field textarea {
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; color: var(--fg); font-family: inherit; font-size: 0.95rem;
  transition: border-color 0.3s var(--ease-expo), box-shadow 0.3s var(--ease-expo);
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none; border-color: var(--ring); box-shadow: 0 0 0 3px rgba(250,204,21,0.15);
}
.form-field textarea { resize: vertical; }
.lead-form .btn { margin-top: 24px; width: 100%; border: none; cursor: pointer; }
.lead-form .btn:disabled { opacity: 0.6; cursor: not-allowed; }
.form-status { margin-top: 14px; font-size: 0.9rem; min-height: 1.2em; }
.form-status.success { color: #4ade80; }
.form-status.error { color: #f87171; }

/* WHATSAPP FLOAT BUTTON */
.whatsapp-float {
  position: fixed; bottom: 24px; right: 24px; z-index: 999;
  width: 58px; height: 58px; border-radius: 50%;
  background: #25D366; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(0,0,0,0.35);
  transition: transform 0.3s var(--ease-expo), box-shadow 0.3s var(--ease-expo);
}
.whatsapp-float:hover { transform: scale(1.08); box-shadow: 0 8px 26px rgba(0,0,0,0.45); }
.whatsapp-float svg { width: 30px; height: 30px; }
@media (max-width: 480px) {
  .whatsapp-float { bottom: 16px; right: 16px; width: 52px; height: 52px; }
  .whatsapp-float svg { width: 26px; height: 26px; }
}

/* LEAD FORM MODAL */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  overflow-y: auto;
}
.modal-overlay.active { display: flex; }
.modal-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  max-width: 640px;
  width: 100%;
  padding: 40px 36px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalIn 0.35s var(--ease-expo);
  margin: auto;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.9rem;
  line-height: 1;
  cursor: pointer;
  padding: 6px 10px;
  transition: color 0.2s;
}
.modal-close:hover { color: var(--fg); }
body.modal-open { overflow: hidden; }
.modal-box .lead-form { max-width: none; margin: 24px 0 0; background: none; border: none; padding: 0; }
@media (max-width: 600px) {
  .modal-box { padding: 32px 22px; }
}

/* ============================================================
   PREMIUM MOBILE TYPOGRAPHY (appended)
   Smaller, tighter hero + section type on phones, with balanced
   line-wrapping so headings don't orphan words. Matches the
   compact, premium feel of the reference site.
   ============================================================ */

/* Balanced wrapping everywhere it matters (ignored by old browsers) */
h1, h2, h3,
.hero h1, .hero-lead, .hero-sub { text-wrap: balance; }

/* Phones */
@media (max-width: 640px) {
  .hero h1 {
    font-size: clamp(1.7rem, 7.3vw, 2.4rem);
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
  }
  .hero-lead { font-size: 1rem;   line-height: 1.5; }
  .hero-sub  { font-size: 0.9rem; }

  h2 { font-size: clamp(1.5rem, 5.8vw, 2rem); line-height: 1.16; }
  h3 { font-size: 1.05rem; }
}

/* Small phones */
@media (max-width: 380px) {
  .hero h1   { font-size: 1.7rem; }
  .hero-lead { font-size: 0.95rem; }
  .hero-sub  { font-size: 0.85rem; }
}
