/* ==========================================================================
   ClassAI ERP - Public Site Stylesheet
   ========================================================================== */

:root {
  --indigo-900: #1e1b4b;
  --indigo-800: #312e81;
  --indigo-700: #3730a3;
  --indigo-600: #4338ca;
  --indigo-500: #4f46e5;
  --indigo-400: #818cf8;
  --indigo-100: #e0e7ff;
  --indigo-50: #eef2ff;
  --slate-900: #0f172a;
  --slate-700: #334155;
  --slate-500: #64748b;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --green-600: #16a34a;
  --red-600: #dc2626;
  --red-300: #fca5a5;
  --amber-500: #f59e0b;
  --white: #ffffff;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --shadow-md: 0 10px 30px rgba(30, 27, 75, 0.08);
  --shadow-lg: 0 20px 50px rgba(30, 27, 75, 0.14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--slate-900);
  background: var(--white);
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

h1, h2, h3, h4 { margin: 0 0 12px; line-height: 1.2; font-weight: 800; }
p { margin: 0 0 16px; color: var(--slate-700); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 10px; font-weight: 600; font-size: 15px;
  border: 1px solid transparent; cursor: pointer; transition: all .15s ease;
}
.btn--primary { background: var(--indigo-600); color: #fff; }
.btn--primary:hover { background: var(--indigo-700); }
.btn--ghost { background: transparent; border-color: var(--indigo-600); color: var(--indigo-600); }
.btn--ghost:hover { background: var(--indigo-50); }
.btn--block { width: 100%; }
.btn--sm { padding: 8px 14px; font-size: 13px; border-radius: 8px; }
.btn--danger { background: #dc2626; color: #fff; }
.btn--danger:hover { background: #b91c1c; }

/* ---- Flash messages ---- */
.site-flash { padding: 12px 0; text-align: center; font-weight: 600; }
.site-flash--success { background: #dcfce7; color: #166534; }
.site-flash--error { background: #fee2e2; color: #991b1b; }

/* ---- Header ---- */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--slate-200); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand__mark { width: 34px; height: 34px; border-radius: 8px; }
.brand__text { font-weight: 800; font-size: 20px; color: var(--indigo-800); }
.brand__text--light { color: #fff; }
.brand-part--class { color: var(--indigo-600); }
.brand-part--ai { color: var(--red-600); }
.brand__text--light .brand-part--class { color: var(--indigo-400); }
.brand__text--light .brand-part--ai { color: var(--red-300); }
.main-nav { display: flex; gap: 28px; }
.main-nav a { font-weight: 600; font-size: 15px; color: var(--slate-700); }
.main-nav a:hover { color: var(--indigo-600); }
.site-header__actions { display: flex; align-items: center; gap: 14px; }
.header-phone { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; color: var(--slate-700); }
.nav-toggle { display: none; flex-direction: column; gap: 4px; background: none; border: none; cursor: pointer; }
.nav-toggle span { width: 22px; height: 2px; background: var(--slate-900); }

/* ---- Hero ---- */
.hero { padding: 60px 0 40px; background: linear-gradient(180deg, var(--indigo-50) 0%, #fff 100%); }
.hero-grid { display: grid; grid-template-columns: 1.1fr 1.4fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-flex; gap: 8px; align-items: center; background: var(--indigo-100); color: var(--indigo-700); font-weight: 700; font-size: 13px; padding: 6px 14px; border-radius: 999px; margin-bottom: 16px; }
.hero h1 { font-size: 44px; color: var(--indigo-900); }
.hero h1 span { color: var(--indigo-500); }
.hero-lead { font-size: 17px; max-width: 520px; }
.hero-actions { display: flex; gap: 14px; margin-top: 22px; flex-wrap: wrap; }
.hero-badges { display: flex; gap: 26px; margin-top: 32px; flex-wrap: wrap; }
.hero-badge { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; color: var(--slate-700); }
.hero-badge .icon-chip { width: 38px; height: 38px; border-radius: 10px; background: var(--indigo-100); display: flex; align-items: center; justify-content: center; }

/* Dashboard mock preview in hero */
.dash-mock { background: var(--indigo-900); border-radius: var(--radius-lg); padding: 18px; box-shadow: var(--shadow-lg); }
.dash-mock__top { display: flex; justify-content: space-between; align-items: center; color: #fff; padding: 6px 8px 16px; font-weight: 700; }
.dash-mock__cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.dash-mock__card { background: #fff; border-radius: 12px; padding: 12px; }
.dash-mock__card small { color: var(--slate-500); font-weight: 600; font-size: 11px; }
.dash-mock__card strong { display: block; font-size: 18px; color: var(--slate-900); margin-top: 4px; }
.dash-mock__panel { background: #fff; border-radius: 12px; padding: 14px; height: 130px; }

/* ---- Sections generic ---- */
.section { padding: 72px 0; }
.section--muted { background: var(--slate-50); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.section-head h2 { font-size: 32px; color: var(--indigo-900); }
.section-tag { color: var(--indigo-600); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }

/* ---- Core Modules ---- */
.modules-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.module-card { background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius-md); padding: 24px; box-shadow: var(--shadow-md); transition: transform .15s ease, box-shadow .15s ease; }
.module-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.module-card img { width: 48px; height: 48px; margin-bottom: 14px; }
.module-card h3 { font-size: 17px; color: var(--slate-900); }
.module-card p { font-size: 14px; margin-bottom: 0; }

/* ---- Complete Module Suite (clickable cards + modal) ---- */
.suite-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.suite-card {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px;
  background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius-md);
  padding: 20px 12px; cursor: pointer; font-family: inherit; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.suite-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--indigo-100); }
.suite-card img { width: 40px; height: 40px; margin-bottom: 6px; }
.suite-card__title { font-weight: 700; font-size: 14px; color: var(--slate-900); }
.suite-card__subtitle { font-size: 12px; color: var(--slate-500); }

.module-modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 20px; }
.module-modal.is-open { display: flex; }
.module-modal__backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .55); }
.module-modal__panel {
  position: relative; background: #fff; border-radius: var(--radius-lg); padding: 32px;
  max-width: 480px; width: 100%; max-height: 85vh; overflow-y: auto; box-shadow: var(--shadow-lg);
}
.module-modal__close { position: absolute; top: 14px; right: 16px; background: var(--slate-100); border: none; width: 32px; height: 32px; border-radius: 50%; font-size: 18px; cursor: pointer; color: var(--slate-700); line-height: 1; }
.module-modal__close:hover { background: var(--slate-200); }
.module-modal__icon { width: 56px; height: 56px; margin-bottom: 14px; }
.module-modal__panel h3 { font-size: 24px; color: var(--indigo-900); margin: 6px 0 12px; }

/* ---- Feature list ---- */
.features-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.feature-list { list-style: none; margin: 0; padding: 0; }
.feature-list li { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; font-weight: 600; color: var(--slate-800); }
.feature-list .tick { width: 22px; height: 22px; border-radius: 50%; background: var(--green-600); color: #fff; flex: none; display: flex; align-items: center; justify-content: center; font-size: 13px; margin-top: 1px; }

/* ---- Screenshots section ---- */
.screens-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.screen-box { background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--slate-200); box-shadow: var(--shadow-md); overflow: hidden; }
.screen-box__label { padding: 16px 20px 0; }
.screen-box__label h3 { font-size: 17px; margin-bottom: 2px; }
.screen-box__label span { font-size: 13px; color: var(--slate-500); }

.placeholder { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 8px; color: var(--slate-400); font-size: 13px; font-weight: 600; text-align: center; padding: 20px; height: 100%; width: 100%; }
.placeholder svg { opacity: .5; }

/* Web Dashboard: two frames stacked vertically, each auto-sliding left/right */
.web-dual-gallery { display: flex; flex-direction: column; gap: 14px; margin: 16px 20px 20px; }
.slide-carousel { border-radius: 12px; overflow: hidden; background: var(--slate-100); touch-action: pan-y; }
.slide-carousel__track { display: flex; aspect-ratio: 16/10; transition: transform .6s ease; }
.slide-carousel__slide { flex: 0 0 100%; height: 100%; }
.slide-carousel__slide img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Parent App / Teacher App: one-at-a-time horizontal swipe carousel */
.h-carousel { margin: 16px 20px 20px; }
.h-carousel__track {
  position: relative; aspect-ratio: 9/16; border-radius: 12px; overflow: hidden; background: var(--slate-100);
  touch-action: pan-y;
}
.h-carousel__slide { position: absolute; inset: 0; opacity: 0; transition: opacity .5s ease; }
.h-carousel__slide.is-active { opacity: 1; }
.h-carousel__slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.h-carousel__dots { display: flex; gap: 6px; justify-content: center; padding: 10px 0 0; flex-wrap: wrap; }
.h-carousel__dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--slate-200); transition: background .2s; cursor: pointer; }
.h-carousel__dots span.is-active { background: var(--indigo-600); }

/* ---- Awards ---- */
.awards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.award-card { background: #fff; border-radius: var(--radius-md); border: 1px solid var(--slate-200); box-shadow: var(--shadow-md); overflow: hidden; text-align: center; padding-bottom: 20px; }
.award-card__img { width: 100%; aspect-ratio: 4/3; object-fit: cover; background: var(--indigo-50); }
.award-card__img.placeholder { display: flex; align-items: center; justify-content: center; color: var(--indigo-300); }
.award-card h3 { font-size: 16px; margin: 16px 16px 4px; }
.award-card .award-year { display: inline-block; background: var(--amber-500); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; margin-bottom: 8px; }
.award-card p { font-size: 13px; padding: 0 16px; margin-bottom: 0; }
.empty-note { text-align: center; color: var(--slate-500); font-style: italic; padding: 20px; }

/* ---- Testimonials ---- */
.testimonials-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.testimonial-card { background: #fff; border-radius: var(--radius-md); border: 1px solid var(--slate-200); box-shadow: var(--shadow-md); padding: 24px; }
.testimonial-card .quote-mark { font-size: 36px; color: var(--indigo-200); font-weight: 900; line-height: 1; }
.testimonial-card p.quote { font-style: italic; color: var(--slate-700); }
.testimonial-person { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.testimonial-person img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; }
.testimonial-person .avatar-fallback { width: 46px; height: 46px; border-radius: 50%; background: var(--indigo-100); color: var(--indigo-600); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.testimonial-person strong { display: block; font-size: 14px; }
.testimonial-person span { font-size: 12px; color: var(--slate-500); }

/* ---- Stats bar ---- */
.stats-bar { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; padding: 40px 0; border-top: 1px solid var(--slate-200); }
.stat { text-align: center; }
.stat strong { display: block; font-size: 26px; color: var(--indigo-700); }
.stat span { font-size: 13px; color: var(--slate-500); font-weight: 600; }

/* ---- Lead forms (Demo + Enquiry) ---- */
.forms-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.form-card { background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--slate-200); box-shadow: var(--shadow-md); padding: 30px; }
.form-card h3 { font-size: 20px; color: var(--indigo-900); }
.form-card p.form-sub { font-size: 14px; margin-bottom: 20px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; color: var(--slate-700); }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 14px; border: 1px solid var(--slate-200); border-radius: 9px;
  font-size: 14px; font-family: inherit; background: var(--slate-50);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--indigo-500); background: #fff; }
.field textarea { resize: vertical; min-height: 90px; }
.field input.is-invalid { border-color: #dc2626; background: #fef2f2; }
.field-error { display: none; color: #dc2626; font-size: 12px; font-weight: 600; margin-top: 5px; }
.field-error.show { display: block; }
.form-success-note { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--green-600); font-weight: 600; margin-top: 10px; justify-content: center; }
.form-msg { padding: 10px 14px; border-radius: 8px; font-size: 13px; font-weight: 600; margin-bottom: 14px; }
.form-msg--success { background: #dcfce7; color: #166534; }
.form-msg--error { background: #fee2e2; color: #991b1b; }

/* ---- Footer ---- */
.site-footer { background: var(--indigo-900); color: #cbd5e1; padding: 56px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 40px; }
.footer-col h4 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.footer-col a, .footer-col p { display: block; color: #a5b4cf; font-size: 14px; margin-bottom: 10px; }
.footer-col a:hover { color: #fff; }
.footer-tagline { font-size: 13px; margin-top: 10px; color: #94a3c9; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 18px 0; text-align: center; font-size: 13px; color: #94a3c9; }

/* ---- Responsive ---- */
@media (max-width: 960px) {
  .hero-grid, .features-grid { grid-template-columns: 1fr; }
  .modules-grid { grid-template-columns: repeat(2, 1fr); }
  .suite-grid { grid-template-columns: repeat(3, 1fr); }
  .screens-grid, .awards-grid, .testimonials-grid { grid-template-columns: 1fr; }
  .forms-grid { grid-template-columns: 1fr; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 780px) {
  .main-nav, .header-phone { display: none; }
  .nav-toggle { display: flex; }
  .site-header__inner.is-open .main-nav { display: flex; position: absolute; top: 64px; left: 0; right: 0; background: #fff; flex-direction: column; padding: 16px 24px; border-bottom: 1px solid var(--slate-200); }
  .field-row { grid-template-columns: 1fr; }
  .suite-grid { grid-template-columns: repeat(2, 1fr); }
}
