/* ============================================================
   The Debrief — Shared Stylesheet
   ============================================================ */

/* Custom Properties */
:root {
  --primary:        #3D2C8D;
  --primary-dark:   #2E2070;
  --accent:         #7C5CBF;
  --highlight:      #F5C518;
  --highlight-dark: #DFB010;
  --success:        #4CAF7D;
  --background:     #F7F5FF;
  --surface:        #FFFFFF;
  --text-primary:   #1A1335;
  --text-secondary: #6B7280;
  --border:         #E5E0F5;

  --nav-height: 64px;
  --radius:     12px;
  --radius-sm:  8px;

  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --max-width: 1120px;
}

/* ============================================================
   Reset & Base
   ============================================================ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; font-family: var(--font); }

/* ============================================================
   Typography
   ============================================================ */

h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
h3 { font-size: 1.25rem; font-weight: 600; line-height: 1.3; }
p  { font-size: 1.0625rem; color: var(--text-secondary); line-height: 1.7; }

/* ============================================================
   Utilities
   ============================================================ */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section--alt {
  background: var(--surface);
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-heading {
  margin-bottom: 16px;
}

.section-sub {
  font-size: 1.125rem;
  max-width: 600px;
  margin-bottom: 48px;
}

/* ============================================================
   Buttons
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  border: 2px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}

.btn:hover  { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,0,0,0.15); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--highlight);
  color: var(--primary);
}
.btn-primary:hover { background: var(--highlight-dark); }

.btn-outline-white {
  background: transparent;
  border-color: rgba(255,255,255,0.5);
  color: #fff;
}
.btn-outline-white:hover { background: rgba(255,255,255,0.1); border-color: #fff; }

.btn-purple {
  background: var(--primary);
  color: #fff;
}
.btn-purple:hover { background: var(--primary-dark); }

.btn-lg {
  padding: 16px 36px;
  font-size: 1.0625rem;
}

/* ============================================================
   Navbar
   ============================================================ */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--primary);
  height: var(--nav-height);
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav-logo img {
  height: 38px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a:not(.nav-cta) {
  color: rgba(255,255,255,0.85);
  font-size: 0.9375rem;
  font-weight: 700;
  transition: color 0.15s;
}

.nav-links a:not(.nav-cta):hover,
.nav-links a:not(.nav-cta).active {
  color: #fff;
}

.nav-cta {
  background: var(--highlight);
  color: var(--primary);
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.9375rem;
  transition: background 0.15s, transform 0.15s;
}

.nav-cta:hover {
  background: var(--highlight-dark);
  transform: translateY(-1px);
  color: var(--primary);
}

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  color: #fff;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: currentColor;
  margin: 5px 0;
  transition: all 0.25s;
  border-radius: 2px;
}

/* ============================================================
   Hero (Homepage — large)
   ============================================================ */

.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #5240A8 60%, var(--accent) 100%);
  padding: 80px 0 72px;
  overflow: hidden;
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.hero-content { color: #fff; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.9);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 24px;
}

.hero h1 { color: #fff; margin-bottom: 20px; }

.hero-sub {
  font-size: 1.125rem;
  color: rgba(255,255,255,0.82);
  margin-bottom: 40px;
  line-height: 1.7;
  max-width: 480px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* App Mockup */
.hero-mockup {
  display: flex;
  justify-content: center;
  align-items: center;
}

.phone-card {
  background: #fff;
  border-radius: 20px;
  padding: 28px;
  width: 300px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.3), 0 4px 16px rgba(0,0,0,0.2);
}

.phone-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.phone-card-logo {
  font-size: 0.875rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.01em;
}

.phone-card-logo span { color: var(--highlight); }

.phone-card-day {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--background);
  padding: 4px 10px;
  border-radius: 999px;
}

.phone-card-question {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  line-height: 1.4;
}

.phone-card-progress {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}

.progress-dot {
  height: 4px;
  flex: 1;
  border-radius: 2px;
  background: var(--border);
}

.progress-dot.done { background: var(--primary); }
.progress-dot.active { background: var(--accent); }

.phone-options { display: flex; flex-direction: column; gap: 10px; }

.phone-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--text-primary);
  transition: border-color 0.15s;
  cursor: default;
}

.phone-option.selected {
  border-color: var(--primary);
  background: #F0ECFF;
}

.radio-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.phone-option.selected .radio-dot {
  border-color: var(--primary);
  background: var(--primary);
}

.phone-option.selected .radio-dot::after {
  content: '';
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
}

/* ============================================================
   Hero (Inner pages — smaller)
   ============================================================ */

.hero-inner-page {
  background: linear-gradient(135deg, var(--primary) 0%, #5240A8 100%);
  padding: 64px 0 56px;
  text-align: center;
}

.hero-inner-page h1 {
  color: #fff;
  margin-bottom: 16px;
}

.hero-inner-page p {
  color: rgba(255,255,255,0.8);
  font-size: 1.125rem;
  max-width: 560px;
  margin: 0 auto;
}

/* ============================================================
   How It Works Cards
   ============================================================ */

.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.how-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 28px;
  text-align: center;
}

.how-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--background);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.how-icon svg { width: 28px; height: 28px; }

.how-card h3 {
  color: var(--text-primary);
  margin-bottom: 10px;
}

.how-card p { font-size: 0.9375rem; }

/* ============================================================
   Split Teaser (For Teachers / For Orgs)
   ============================================================ */

.teaser-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.teaser-card {
  border-radius: var(--radius);
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.teaser-card--teachers {
  background: var(--primary);
  color: #fff;
}

.teaser-card--orgs {
  background: var(--highlight);
  color: var(--primary);
}

.teaser-card h2 { color: inherit; }

.teaser-card p {
  color: inherit;
  opacity: 0.85;
  font-size: 1.0625rem;
  margin: 0;
}

.teaser-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.9375rem;
  margin-top: 8px;
  color: inherit;
  opacity: 0.9;
  transition: opacity 0.15s, gap 0.2s;
}

.teaser-link:hover { opacity: 1; gap: 10px; }

/* ============================================================
   Benefits List
   ============================================================ */

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.benefit-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.benefit-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #E8F5EE;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.benefit-icon svg { width: 20px; height: 20px; color: var(--success); }

.benefit-item h3 {
  font-size: 1rem;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.benefit-item p { font-size: 0.9rem; }

/* ============================================================
   FAQ Accordion
   ============================================================ */

.faq-list {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 22px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: color 0.15s;
}

.faq-question:hover { color: var(--primary); }

.faq-question[aria-expanded="true"] { color: var(--primary); }

.faq-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--background);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, transform 0.3s;
}

.faq-question[aria-expanded="true"] .faq-icon {
  background: var(--primary);
  transform: rotate(45deg);
}

.faq-icon svg { width: 14px; height: 14px; }
.faq-question[aria-expanded="true"] .faq-icon svg { color: #fff; }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.faq-answer-inner {
  padding: 0 24px 22px;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ============================================================
   How It Works (Numbered Steps)
   ============================================================ */

.steps-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 640px;
}

.step {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.step-number {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 1.0625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.step h3 { margin-bottom: 6px; }
.step p { font-size: 0.9375rem; }

/* ============================================================
   Feature Cards (What You Get)
   ============================================================ */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
}

.feature-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--background);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.feature-card-icon svg { width: 24px; height: 24px; color: var(--primary); }

.feature-card h3 {
  margin-bottom: 10px;
  color: var(--text-primary);
}

.feature-card p { font-size: 0.9375rem; }

/* ============================================================
   Two-Column Grid (Steps + Panel layout)
   ============================================================ */

.two-col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

/* ============================================================
   App Store Badges
   ============================================================ */

.app-badges {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.app-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border: 2px solid rgba(255,255,255,0.4);
  border-radius: var(--radius-sm);
  color: #fff;
  transition: background 0.15s, border-color 0.15s;
  background: rgba(255,255,255,0.08);
}

.app-badge:hover {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.7);
  color: #fff;
}

.app-badge-text { display: flex; flex-direction: column; line-height: 1.2; }
.app-badge-sub  { font-size: 0.7rem; opacity: 0.8; font-weight: 400; }
.app-badge-name { font-size: 0.9375rem; font-weight: 700; }

.app-badge svg { width: 22px; height: 22px; flex-shrink: 0; }

/* Dark background variant */
.app-badges--dark .app-badge {
  border-color: rgba(61,44,141,0.25);
  background: rgba(61,44,141,0.06);
  color: var(--primary);
}
.app-badges--dark .app-badge:hover {
  background: rgba(61,44,141,0.12);
  border-color: rgba(61,44,141,0.5);
  color: var(--primary);
}

/* ============================================================
   CTA Band
   ============================================================ */

.cta-band {
  background: linear-gradient(135deg, var(--primary) 0%, #5240A8 100%);
  padding: 80px 0;
  text-align: center;
}

.cta-band h2 { color: #fff; margin-bottom: 12px; }
.cta-band p  { color: rgba(255,255,255,0.75); font-size: 1.125rem; margin-bottom: 36px; }

/* ============================================================
   Contact CTA
   ============================================================ */

.contact-cta-box {
  background: var(--primary);
  border-radius: var(--radius);
  padding: 48px;
  text-align: center;
  color: #fff;
  max-width: 640px;
  margin: 0 auto;
}

.contact-cta-box h2 { color: #fff; margin-bottom: 12px; }
.contact-cta-box p  { color: rgba(255,255,255,0.78); margin-bottom: 28px; }

.contact-cta-note {
  margin-top: 20px;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
}

/* ============================================================
   Footer
   ============================================================ */

.footer {
  background: var(--text-primary);
  color: rgba(255,255,255,0.6);
  padding: 48px 0;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-logo img {
  height: 32px;
  width: auto;
  display: block;
}

.footer-nav {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}

.footer-nav a {
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  transition: color 0.15s;
}

.footer-nav a:hover { color: #fff; }

.footer-copy {
  font-size: 0.85rem;
  width: 100%;
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 8px;
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .hero-inner > :first-child { order: 1; }
  .hero-mockup { order: 0; }
  .phone-card { width: 280px; }
  .hero-sub { max-width: 100%; }

  .teaser-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .how-grid { grid-template-columns: 1fr; }
  .benefits-grid { grid-template-columns: 1fr; }
  .two-col-grid { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 640px) {
  .section { padding: 60px 0; }

  .nav-links { display: none; flex-direction: column; align-items: stretch; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: var(--nav-height);
    left: 0; right: 0;
    background: var(--primary-dark);
    padding: 16px 24px 24px;
    gap: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  }
  .nav-links.open a {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: block;
  }
  .nav-links.open .nav-cta {
    margin-top: 8px;
    text-align: center;
    border-bottom: none;
    padding: 12px;
  }

  .nav-toggle { display: block; }
  .nav { position: sticky; }

  .hero { padding: 56px 0 48px; }
  .hero-inner-page { padding: 48px 0 40px; }

  .hero-actions { flex-direction: column; align-items: flex-start; }

  .phone-card { width: 100%; max-width: 300px; }

  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-nav { flex-direction: column; gap: 12px; }

  .contact-cta-box { padding: 36px 24px; }

  .teaser-card { padding: 32px 24px; }
}
