/* =========================================================
   TeachFlow — Marketing landing page design system
   Inspired by Stripe / Linear / Notion / Vercel conventions:
   generous whitespace, restrained color, soft depth, fast motion.
   ========================================================= */

:root {
  /* Brand (kept from app's tint color #0a7ea4 for consistency) */
  --brand: #0a7ea4;
  --brand-strong: #076b8a;
  --brand-light: #e6f1f5;

  /* Neutrals */
  --ink-900: #0b1418;
  --ink-700: #253238;
  --ink-500: #4a5a65;
  --ink-300: #8c9aa2;
  --ink-100: #dce3e8;
  --surface: #ffffff;
  --surface-muted: #f6f9fb;
  --surface-alt: #0f1b21;

  /* Semantic */
  --success: #1e9e6a;
  --border: rgba(11, 20, 24, 0.08);
  --border-strong: rgba(11, 20, 24, 0.14);
  --shadow-sm: 0 1px 2px rgba(11, 20, 24, 0.06), 0 1px 1px rgba(11, 20, 24, 0.04);
  --shadow-md: 0 8px 24px rgba(11, 20, 24, 0.08), 0 2px 6px rgba(11, 20, 24, 0.04);
  --shadow-lg: 0 24px 64px rgba(11, 20, 24, 0.12), 0 8px 24px rgba(11, 20, 24, 0.06);

  /* Layout */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --container: 1160px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;

  --font-sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink-900);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-5);
}

section { position: relative; }

/* ---------- Typography scale (fluid, avoids "app-stretched" feel) ---------- */
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -0.02em; color: var(--ink-900); }
h1 {
  font-size: clamp(2.2rem, 3.2vw + 1rem, 3.75rem);
  line-height: 1.1;
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
}
h2 { font-size: clamp(1.75rem, 2.2vw + 1rem, 2.75rem); line-height: 1.15; }
h3 { font-size: clamp(1.15rem, 0.6vw + 1rem, 1.4rem); line-height: 1.3; }
p { margin: 0; color: var(--ink-500); }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--brand-strong);
  background: var(--brand-light);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  height: 48px;
  padding: 0 24px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease, border-color 160ms ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: linear-gradient(180deg, #0d92bd, var(--brand));
  color: #ffffff;
  box-shadow: var(--shadow-md);
}
.btn-primary:hover { box-shadow: var(--shadow-lg); transform: translateY(-1px); }

.btn-secondary {
  background: var(--surface);
  color: var(--ink-900);
  border-color: var(--border-strong);
}
.btn-secondary:hover { border-color: var(--brand); color: var(--brand-strong); }

.btn-ghost {
  background: transparent;
  color: var(--ink-700);
  height: 40px;
  padding: 0 16px;
}
.btn-ghost:hover { color: var(--brand-strong); }

.btn-lg { height: 56px; padding: 0 30px; font-size: 1.02rem; }

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink-900);
}
.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, #0d92bd, var(--brand-strong));
  box-shadow: var(--shadow-sm);
}
.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  object-fit: cover;
  box-shadow: var(--shadow-sm);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}
.nav-links a {
  font-size: 0.95rem;
  color: var(--ink-700);
  transition: color 150ms ease;
}
.nav-links a:hover { color: var(--brand-strong); }
.nav-cta { display: flex; align-items: center; gap: var(--space-3); }
.nav-toggle {
  display: none;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink-900);
  margin: 4px 0;
  border-radius: 2px;
}

/* ---------- Hero ---------- */
.hero {
  padding-top: var(--space-7);
  padding-bottom: var(--space-6);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: -10% -10% auto -10%;
  height: 640px;
  background:
    radial-gradient(60% 60% at 20% 20%, rgba(10, 126, 164, 0.16), transparent 60%),
    radial-gradient(50% 50% at 85% 10%, rgba(13, 146, 189, 0.14), transparent 60%);
  filter: blur(10px);
  z-index: -1;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: var(--space-8);
  align-items: center;
}
.hero-copy { max-width: 560px; min-width: 0; }
.hero-copy .eyebrow { margin-bottom: var(--space-5); }
.hero-copy h1 { margin-bottom: var(--space-5); }
.hero-copy p.lead {
  font-size: 1.125rem;
  color: var(--ink-500);
  max-width: 46ch;
  margin-bottom: var(--space-6);
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-5);
}
.hero-note {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.85rem;
  color: var(--ink-300);
}
.hero-note svg { color: var(--success); }

.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 18px;
  border-radius: var(--radius-md);
  background: var(--ink-900);
  color: #fff;
  font-weight: 600;
  transition: transform 160ms ease, opacity 160ms ease;
}
.store-badge:hover { transform: translateY(-1px); opacity: 0.92; }
.store-badge span {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  font-size: 0.95rem;
}
.store-badge small {
  font-size: 0.68rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
}

/* Floating app preview card — the ONE place we use glassmorphism,
   because it visually anchors the product without feeling "flat app screenshot". */
.hero-visual {
  position: relative;
  min-height: 420px;
}
.preview-card {
  position: relative;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #ffffff, #f3f8fa);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.preview-toolbar { display: flex; gap: 6px; margin-bottom: var(--space-2); }
.preview-toolbar span { width: 10px; height: 10px; border-radius: 50%; background: var(--ink-100); }

/* Realistic app preview (mimics the actual "today" screen) with example data. */
.preview-app-header {
  background: var(--brand-light);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.preview-app-title {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink-900);
}
.preview-app-date {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink-700);
}
.preview-app-week {
  margin-top: 6px;
  background: var(--surface);
  border-radius: var(--radius-sm, 10px);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--ink-500);
}
.preview-app-week strong { color: var(--ink-900); }
.preview-section-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-500);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-top: 2px;
}
.preview-dot-clock,
.preview-dot-emoji,
.preview-dot-check {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  background: var(--surface);
}
.preview-dot-check { color: var(--success); font-weight: 700; }
.preview-line-title {
  font-weight: 650;
  font-size: 0.92rem;
  color: var(--ink-900);
}
.preview-line-sub {
  font-size: 0.8rem;
  color: var(--ink-500);
  margin-top: 2px;
}
.preview-row-muted {
  background: transparent;
  border-style: dashed;
}
.preview-section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.preview-see-all {
  color: var(--brand-strong);
  text-transform: none;
  letter-spacing: normal;
  font-weight: 600;
}
.preview-quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}
.preview-quick-card {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.preview-quick-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  margin-bottom: 2px;
}
.preview-quick-title {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--ink-900);
}
.preview-quick-sub {
  font-size: 0.72rem;
  color: var(--ink-500);
}
.preview-quick-value {
  font-size: 0.78rem;
  color: var(--ink-700);
  font-weight: 600;
}
.preview-tabbar {
  margin-top: 4px;
  border-top: 1px solid var(--border);
  padding-top: var(--space-3);
  display: flex;
  justify-content: space-between;
  gap: 4px;
}
.preview-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  color: var(--ink-500);
  font-weight: 600;
}
.preview-tab-icon {
  font-size: 1.05rem;
}
.preview-tab-active {
  color: var(--brand-strong);
}
.preview-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
}
.preview-dot {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--brand-light), #ffffff);
  border: 1px solid var(--border);
}
.preview-lines { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.preview-lines .l1, .preview-lines .l2 {
  height: 8px;
  border-radius: 4px;
  background: var(--ink-100);
}
.preview-lines .l1 { width: 70%; }
.preview-lines .l2 { width: 45%; opacity: 0.7; }
.preview-badge {
  position: absolute;
  right: -16px;
  top: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.85rem;
  font-weight: 600;
  animation: float 6s ease-in-out infinite;
}
.preview-badge .badge-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ---------- Trust bar ---------- */
.trust {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface-muted);
  padding-block: var(--space-6);
}
.trust-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-7);
}
.trust-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--ink-500);
  font-size: 0.9rem;
  font-weight: 600;
}
.trust-item svg { color: var(--brand-strong); flex-shrink: 0; }

/* ---------- Section shell ---------- */
/* Reduced from space-9/space-8 to space-7/space-5: the previous spacing made the
   page feel like a long stack of full-height cards (same problem as the app UI).
   Tighter rhythm reads more like a real marketing site, less like a scrolled app. */
.section { padding-block: var(--space-7); }
.section-head {
  max-width: 640px;
  margin-inline: auto;
  text-align: center;
  margin-bottom: var(--space-5);
}
.section-head .eyebrow { margin-bottom: var(--space-3); }
.section-head p { margin-top: var(--space-3); font-size: 1.05rem; }

/* ---------- Feature grid ---------- */
.grid-features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}
.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--brand-light);
  color: var(--brand-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
}
.feature-card h3 { margin-bottom: var(--space-2); }
.feature-card p { font-size: 0.925rem; }

/* ---------- How it works ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  counter-reset: step;
}
.step {
  position: relative;
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
}
.step::before {
  counter-increment: step;
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ink-900);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: var(--space-4);
}
.step h3 { margin-bottom: var(--space-2); }
.step p { font-size: 0.925rem; }

/* ---------- Value props (replaces unverifiable testimonials with honest proof points) ---------- */
.values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}
.value-card {
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  background: var(--surface-alt);
  color: #ffffff;
  box-shadow: var(--shadow-md);
}
.value-card h3 { color: #ffffff; margin-bottom: var(--space-2); }
.value-card p { color: rgba(255, 255, 255, 0.72); font-size: 0.925rem; }
.value-card .value-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--space-4);
  color: #8fd6ea;
}

/* ---------- CTA banner ---------- */
.cta-banner {
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #0b3a49, #0a7ea4 60%, #0d92bd);
  padding: var(--space-8);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  flex-wrap: wrap;
  box-shadow: var(--shadow-lg);
}
.cta-banner h2 { color: #fff; margin-bottom: var(--space-2); }
.cta-banner p { color: rgba(255, 255, 255, 0.78); }
.cta-banner .btn-primary {
  background: #ffffff;
  color: var(--brand-strong);
}
.cta-banner .btn-primary:hover { box-shadow: none; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding-block: var(--space-8) var(--space-6);
  background: var(--surface-muted);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: var(--space-6);
  margin-bottom: var(--space-7);
}
.footer-brand p { max-width: 32ch; margin-top: var(--space-3); font-size: 0.9rem; }
.footer-col h4 {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-300);
  margin-bottom: var(--space-4);
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.footer-col a { font-size: 0.9rem; color: var(--ink-700); transition: color 150ms ease; }
.footer-col a:hover { color: var(--brand-strong); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--ink-300);
}

/* ---------- Scroll reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms ease, transform 600ms ease;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { min-height: 340px; order: -1; }
  .grid-features { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .values { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav-links, .nav-cta .btn-secondary { display: none; }
  .nav-toggle { display: inline-flex; flex-direction: column; }
  .nav.is-open .nav-links {
    display: flex;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: var(--space-5);
    gap: var(--space-4);
  }
  .grid-features { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .cta-banner { flex-direction: column; text-align: center; }
  .preview-badge { right: 8px; }
}
