:root {
  --maroon: #A90D22;
  --gray: #D9D9D9;
  --text: #111111;
  --muted: rgba(0,0,0,.6);
  --link: #0004FF;
  --font-heading: "Source Serif 4", "Georgia", "Times New Roman", serif;
  --font-body: "DM Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: #fff;
}

/* ===== STICKY NAV ===== */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid rgba(0,0,0,.06);
}

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
  height: 64px;
}

.nav-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo {
  height: 28px;
  width: auto;
  filter: brightness(0);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: 40px;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color .15s;
}

.nav-links a:hover {
  color: var(--text);
  text-decoration: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.nav-login {
  background: none;
  border: none;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  border-radius: 8px;
  transition: background .15s;
  width: auto;
  margin: 0;
}

.nav-login:hover {
  background: rgba(0,0,0,.05);
  filter: none;
}

.nav-cta {
  background: var(--maroon);
  color: #fff;
  border: none;
  padding: 9px 20px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  transition: filter .15s;
  width: auto;
  margin: 0;
}

.nav-cta:hover {
  filter: brightness(.9);
}

.nav-menu {
  display: none;
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: var(--text);
  margin-left: auto;
  width: auto;
  margin-top: 0;
}

.nav-menu:hover {
  filter: none;
  background: none;
}

/* Mobile nav dropdown */
.nav-mobile {
  padding: 8px 24px 16px;
  border-top: 1px solid rgba(0,0,0,.06);
  background: #fff;
}

.nav-mobile-link {
  display: block;
  padding: 10px 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
}

.nav-mobile-link:hover {
  text-decoration: none;
  color: var(--maroon);
}

.nav-mobile-divider {
  height: 1px;
  background: rgba(0,0,0,.08);
  margin: 8px 0;
}

.nav-mobile-login {
  width: 100%;
  margin-top: 4px;
  padding: 11px 16px;
  background: #fff;
  color: var(--text);
  border: 1px solid rgba(0,0,0,.15);
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.nav-mobile-login:hover {
  background: #f7f7f7;
  filter: none;
}

.nav-mobile-cta {
  width: 100%;
  margin-top: 8px;
  padding: 11px 16px;
  background: var(--maroon);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

/* ===== AUTH OVERLAY ===== */

.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  opacity: 1;
  visibility: visible;
  transition: opacity .3s, visibility .3s;
}

.auth-overlay.hidden {
  display: flex !important;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.auth-overlay-scroll {
  position: relative;
  z-index: 1;
  width: 100%;
  overflow-y: auto;
  display: flex;
  justify-content: center;
  padding: 60px 24px;
}

.auth-overlay-center {
  position: relative;
  width: 100%;
  max-width: 440px;
}

.auth-close {
  position: absolute;
  top: -44px;
  right: 0;
  background: none;
  border: none;
  color: rgba(255,255,255,.8);
  cursor: pointer;
  padding: 4px;
  width: auto;
  margin: 0;
  transition: color .15s;
  display: flex;
  align-items: center;
}

.auth-close:hover {
  color: #fff;
  filter: none;
  background: none;
}

/* ===== AUTH CARD ===== */

.auth-card {
  width: 100%;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  padding: 36px 32px;
}

.auth-title {
  margin: 0 0 4px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.auth-subtitle {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 15px;
}

/* ===== FORM ELEMENTS ===== */

.field { margin-bottom: 6px; }

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 14px 0 5px;
  color: var(--text);
}

input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid rgba(0,0,0,.18);
  border-radius: 10px;
  font-size: 15px;
  outline: none;
  background: #fff;
}

input:focus {
  border-color: var(--maroon);
  box-shadow: 0 0 0 3px rgba(169,13,34,.18);
}

/* Password toggle */
.field-password {
  position: relative;
}

.field-password input {
  padding-right: 44px;
}

button.pw-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  border-radius: 0;
  padding: 4px;
  margin: 0;
  width: auto;
  cursor: pointer;
  color: rgba(0,0,0,.35);
  transition: color .15s;
  display: flex;
  align-items: center;
  box-shadow: none;
}

button.pw-toggle:hover {
  color: rgba(0,0,0,.6);
  filter: none;
  background: none;
}

/* Primary button (maroon) */
button {
  width: 100%;
  margin-top: 20px;
  padding: 12px 16px;
  border: 0;
  border-radius: 12px;
  background: var(--maroon);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: filter .15s;
}

button:hover { filter: brightness(.92); }

/* Google sign-in button */
.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 0;
  background: #fff;
  color: var(--text);
  border: 1px solid rgba(0,0,0,.18);
  font-weight: 600;
  font-size: 15px;
  border-radius: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background .15s, box-shadow .15s;
}

.google-btn:hover {
  background: #f7f7f7;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  filter: none;
}

.google-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Divider */
.divider {
  display: flex;
  align-items: center;
  margin: 20px 0 6px;
  gap: 14px;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(0,0,0,.12);
}

.divider span {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

/* Forgot password link */
.forgot-link {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
}

.forgot-link:hover {
  color: var(--maroon);
  text-decoration: underline;
}

.auth-foot {
  margin-top: 16px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

.auth-consent {
  margin: 14px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  text-align: center;
}

.auth-consent a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-consent a:hover { color: var(--maroon); }

.status {
  margin-top: 12px;
  min-height: 1.2em;
  font-size: 14px;
  color: var(--muted);
}

.hidden { display: none !important; }

/* ===== HERO ===== */

.hero {
  padding: 80px 24px 100px;
  background: linear-gradient(170deg, #fff 0%, #faf8f5 100%);
}

.hero-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 60px;
  align-items: center;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--maroon);
  margin: 0 0 16px;
  padding: 5px 12px;
  background: rgba(169,13,34,.08);
  border-radius: 20px;
}

.hero-headline {
  font-family: var(--font-heading);
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--text);
  margin: 0 0 20px;
}

.hero-sub {
  font-size: 17px;
  line-height: 1.65;
  color: var(--muted);
  margin: 0 0 32px;
  max-width: 480px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.hero-cta {
  padding: 14px 32px;
  background: var(--maroon);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: filter .15s, transform .15s;
  width: auto;
  margin: 0;
}

.hero-cta:hover {
  filter: brightness(.9);
  transform: translateY(-1px);
}

.hero-learn {
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  transition: color .15s;
}

.hero-learn:hover {
  color: var(--text);
  text-decoration: none;
}

.hero-learn span {
  display: inline-block;
  transition: transform .2s;
}

.hero-learn:hover span {
  transform: translateY(2px);
}

.hero-visual {
  position: relative;
}

.hero-video-wrap {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,.12), 0 4px 16px rgba(0,0,0,.06);
  border: 1px solid rgba(0,0,0,.08);
}

.hero-video-wrap video {
  display: block;
  width: 100%;
  height: auto;
}

/* ===== HOW IT WORKS (STEPS) ===== */

.steps-header {
  text-align: center;
  margin-bottom: 48px;
}

.steps-header .landing-heading {
  margin-bottom: 8px;
}

.steps-header .landing-subtext {
  margin: 0 auto;
}

.steps-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.step {
  text-align: center;
  padding: 36px 24px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,.04);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--maroon);
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  margin-bottom: 16px;
}

.step-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--text);
}

.step-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}

/* ===== LANDING SECTIONS ===== */

.landing-section {
  padding: 80px 24px;
}

.landing-section-alt {
  background: #FAFAFA;
}

.landing-inner {
  max-width: 1040px;
  margin: 0 auto;
}

.landing-heading {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  color: var(--text);
}

.landing-subtext {
  font-size: 17px;
  line-height: 1.65;
  color: var(--muted);
  margin: 0 0 36px;
  max-width: 640px;
}

/* Metrics row */
.landing-metrics-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.landing-metric {
  text-align: center;
  padding: 28px 16px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,.04);
}

.landing-metric-icon {
  margin-bottom: 12px;
}

.landing-metric-label {
  font-size: 16px;
  font-weight: 700;
  color: var(--maroon);
  margin-bottom: 4px;
}

.landing-metric-desc {
  font-size: 13px;
  color: var(--muted);
}

/* Feature sections (alternating image/text) */
.landing-feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.landing-feature-reverse .landing-feature-text {
  order: 2;
}
.landing-feature-reverse .landing-feature-visual {
  order: 1;
}

.landing-eyebrow {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--maroon);
  margin-bottom: 8px;
}

.landing-feature-list {
  margin: 0;
  padding: 0 0 0 20px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--muted);
}

.landing-feature-list li {
  margin-bottom: 4px;
}

/* Screenshots & videos */
.landing-screenshot {
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 8px 30px rgba(0,0,0,.1);
}

.landing-video {
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 8px 30px rgba(0,0,0,.1);
  display: block;
}

/* CTA */
.landing-cta {
  text-align: center;
  background: var(--text);
  padding: 80px 24px;
}

.landing-cta .landing-heading {
  color: #fff;
}

.landing-cta .landing-subtext {
  color: rgba(255,255,255,.6);
  margin-left: auto;
  margin-right: auto;
}

.landing-cta-btn {
  display: inline-block;
  padding: 14px 40px;
  background: var(--maroon);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  border-radius: 12px;
  text-decoration: none;
  transition: filter .15s, transform .15s;
}

.landing-cta-btn:hover {
  filter: brightness(.9);
  transform: translateY(-1px);
  text-decoration: none;
}

/* Footer */
.landing-footer {
  padding: 20px 24px;
  background: #fafafa;
  border-top: 1px solid rgba(0,0,0,.06);
}

.landing-footer-inner {
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 13px;
  color: var(--muted);
}

.landing-footer a {
  color: var(--muted);
  text-decoration: none;
}

.landing-footer a:hover {
  color: var(--maroon);
  text-decoration: underline;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 900px) {
  /* Nav */
  .nav-links { display: none; }
  .nav-actions { display: none; }
  .nav-menu { display: flex; }

  /* Hero */
  .hero {
    padding: 48px 20px 64px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .hero-sub {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  /* Steps */
  .steps-row {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Metrics */
  .landing-metrics-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  /* Features */
  .landing-feature {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .landing-feature-reverse .landing-feature-text {
    order: 1;
  }
  .landing-feature-reverse .landing-feature-visual {
    order: 2;
  }

  .landing-heading {
    font-size: 26px;
  }

  .landing-subtext {
    font-size: 16px;
  }

  /* Auth overlay */
  .auth-overlay-scroll {
    padding: 40px 16px;
  }

  .auth-close {
    top: -36px;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 32px 16px 48px;
  }

  .hero-headline {
    font-size: 32px;
  }

  .hero-sub {
    font-size: 15px;
  }

  .auth-card {
    padding: 28px 20px;
    border-radius: 14px;
  }

  input[type="date"] {
    height: 44px;
    padding: 8px 10px;
    font-size: 14px;
    -webkit-appearance: none;
  }

  .landing-metrics-row {
    grid-template-columns: 1fr 1fr;
  }

  .landing-section {
    padding: 48px 16px;
  }

  .steps-row {
    gap: 16px;
  }

  .step {
    padding: 28px 16px;
  }
}

/* ============================================================
   Camera CTA section (between hero and "How it works")
   Mobile/tablet: direct "Mark Your Essay" button
   Desktop: QR code with invite to try on phone
   ============================================================ */

.camera-cta {
  padding: 48px 20px;
  background: #fff;
}

.camera-cta-inner {
  max-width: 700px;
  margin: 0 auto;
}

/* ── Mobile version (hidden on desktop) ── */
.camera-cta-mobile {
  display: none;
  text-align: center;
  padding: 32px 24px;
  background: linear-gradient(135deg, #fdf2f3 0%, #fff 100%);
  border: 1px solid rgba(169, 13, 34, 0.12);
  border-radius: 16px;
}

.camera-cta-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--maroon);
  color: #fff;
  margin-bottom: 16px;
}

.camera-cta-heading {
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 800;
  font-size: 22px;
  color: #111;
  margin: 0 0 6px;
}

.camera-cta-sub {
  font-size: 15px;
  color: #555;
  margin: 0 0 20px;
  line-height: 1.5;
}

.camera-cta-btn {
  display: inline-block;
  padding: 14px 36px;
  background: var(--maroon);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  border-radius: 10px;
  text-decoration: none;
  transition: filter 0.15s, transform 0.15s;
}

.camera-cta-btn:hover {
  filter: brightness(0.9);
  transform: translateY(-1px);
}

/* ── Desktop version (hidden on mobile) ── */
.camera-cta-desktop {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 28px 32px;
  background: linear-gradient(135deg, #fdf2f3 0%, #fff 100%);
  border: 1px solid rgba(169, 13, 34, 0.10);
  border-radius: 16px;
}

.camera-cta-qr-wrap {
  flex-shrink: 0;
}

.camera-cta-qr {
  border-radius: 10px;
  border: 1px solid #e8e8e8;
}

.camera-cta-qr-text {
  flex: 1;
}

.camera-cta-desktop .camera-cta-heading {
  font-size: 20px;
  margin-bottom: 8px;
}

.camera-cta-desktop .camera-cta-sub {
  margin-bottom: 0;
  font-size: 14px;
}

/* ── Responsive: show mobile version, hide desktop ── */
@media (max-width: 900px) {
  .camera-cta-mobile {
    display: block;
  }
  .camera-cta-desktop {
    display: none;
  }
}

@media (max-width: 480px) {
  .camera-cta {
    padding: 0 16px 36px;
  }

  .camera-cta-mobile {
    padding: 24px 20px;
  }

  .camera-cta-heading {
    font-size: 20px;
  }
}