/* ==========================================================
   Hearth Learning — Beta Tester Page Styles
   "Miyazaki meets Hogwarts meets a warm cabin"
   ========================================================== */

/* ── Google Fonts loaded in beta.html ── */

/* ==========================================================
   DESIGN SYSTEM — CSS Variables
   ========================================================== */

:root {
  /* Colors */
  --hearth-cream: #FDF6EC;
  --hearth-warm-white: #FAF3E8;
  --hearth-deep-navy: #1B2A4A;
  --hearth-rich-brown: #4A3728;
  --hearth-amber: #E8A838;
  --hearth-amber-glow: #F5C563;
  --hearth-sage: #7BA68C;
  --hearth-rose: #D4847C;
  --hearth-border: rgba(75, 55, 40, 0.12);
  --hearth-shadow: rgba(27, 42, 74, 0.08);

  /* Typography */
  --font-display: 'Fraunces', 'Georgia', serif;
  --font-body: 'Outfit', 'Helvetica Neue', sans-serif;
  --font-accent: 'Caveat', cursive;

  /* Spacing */
  --section-padding: clamp(4rem, 8vw, 8rem);
  --container-max: 1200px;
  --container-padding: clamp(1.5rem, 4vw, 3rem);

  /* Layout */
  --nav-height: 70px;
  --radius-card: 16px;
  --radius-btn: 10px;

  /* Shadows */
  --card-shadow: 0 8px 40px rgba(27, 42, 74, 0.08);
  --card-shadow-hover: 0 16px 60px rgba(27, 42, 74, 0.14);

  /* Animation */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-reveal: 0.8s;
}

/* ==========================================================
   RESET & BASE
   ========================================================== */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: var(--font-body);
  color: var(--hearth-deep-navy);
  background: var(--hearth-cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

/* ==========================================================
   UTILITIES
   ========================================================== */

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

.section {
  padding: var(--section-padding) 0;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  margin-bottom: 0.5rem;
}

.section-sub {
  font-family: var(--font-body);
  font-size: 1.05rem;
  text-align: center;
  color: rgba(27, 42, 74, 0.6);
  margin-bottom: 3rem;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--duration-reveal) var(--ease-out-expo),
              transform var(--duration-reveal) var(--ease-out-expo);
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================
   NAVIGATION
   ========================================================== */

#beta-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--container-padding);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

#beta-nav.scrolled {
  background: rgba(253, 246, 236, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 2px 20px rgba(27, 42, 74, 0.06);
}

.nav-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.95);
  transition: color 0.3s;
  display: flex;
  align-items: center;
  gap: 6px;
}

#beta-nav.scrolled .nav-logo {
  color: var(--hearth-amber);
}

.nav-apply {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  background: var(--hearth-amber);
  padding: 8px 22px;
  border-radius: var(--radius-btn);
  box-shadow: 0 4px 16px rgba(232, 168, 56, 0.35);
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.nav-apply:hover {
  background: var(--hearth-amber-glow);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(232, 168, 56, 0.45);
}

/* ==========================================================
   HERO SECTION
   ========================================================== */

#hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Background layers */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-layer {
  position: absolute;
  left: 0; right: 0;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  will-change: transform;
}

.hero-sky {
  inset: 0;
  background-image: url('/assets/landing/hero/hero-sky.jpg');
}

.hero-hills {
  bottom: 0; top: auto;
  height: 65%;
  background-image: url('/assets/landing/hero/hero-midground.jpg');
  background-position: center bottom;
}

.hero-fg {
  bottom: 0; top: auto;
  height: 38%;
  background-image: url('/assets/landing/hero/hero-foreground.jpg');
  background-position: center bottom;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(27, 42, 74, 0.45);
}

/* Hero content */
.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 var(--container-padding);
  max-width: 820px;
}

.hero-badge {
  display: inline-block;
  font-family: var(--font-accent);
  font-size: 1.25rem;
  color: var(--hearth-amber-glow);
  background: rgba(232, 168, 56, 0.15);
  border: 1px solid rgba(245, 197, 99, 0.4);
  border-radius: 50px;
  padding: 5px 22px;
  margin-bottom: 1.5rem;
  text-shadow: 0 0 24px rgba(245, 197, 99, 0.5);
  letter-spacing: 0.01em;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  text-shadow: 0 4px 32px rgba(27, 42, 74, 0.4);
  margin-bottom: 1.25rem;
}

.hero-sub {
  font-family: var(--font-body);
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.92);
  max-width: 600px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: var(--hearth-amber);
  padding: 1rem 2.5rem;
  border-radius: var(--radius-btn);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 24px rgba(232, 168, 56, 0.35);
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
  background: var(--hearth-amber-glow);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(232, 168, 56, 0.45);
}

.btn-secondary {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.75);
  padding: calc(1rem - 2px) calc(2.5rem - 2px);
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn-secondary:hover {
  background: #fff;
  color: var(--hearth-deep-navy);
  border-color: #fff;
}

/* Wave divider */
.hero-wave {
  position: absolute;
  bottom: -1px;
  left: 0; right: 0;
  z-index: 2;
  line-height: 0;
}

.hero-wave svg {
  display: block;
  width: 100%;
  height: clamp(40px, 6vw, 80px);
}

/* ==========================================================
   BENEFITS SECTION
   ========================================================== */

.benefits {
  background: var(--hearth-cream);
}

.benefits-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 3rem;
}

.benefit-card {
  background: #fff;
  border-radius: var(--radius-card);
  padding: 2.5rem 2rem;
  box-shadow: var(--card-shadow);
  transition: transform 0.25s var(--ease-out-expo), box-shadow 0.25s;
}

.benefit-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
}

.benefit-icon {
  font-size: 2.8rem;
  margin-bottom: 1rem;
  display: block;
  line-height: 1;
}

.benefit-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--hearth-deep-navy);
  margin-bottom: 0.6rem;
}

.benefit-desc {
  font-size: 0.95rem;
  color: rgba(27, 42, 74, 0.7);
  line-height: 1.65;
}

/* ==========================================================
   WHO WE'RE LOOKING FOR
   ========================================================== */

.looking-for {
  background: var(--hearth-warm-white);
}

.looking-inner {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.looking-inner > .section-title { margin-bottom: 1.5rem; }

.looking-intro {
  font-size: 1.05rem;
  color: rgba(27, 42, 74, 0.75);
  margin-bottom: 1.75rem;
}

.looking-list {
  list-style: none;
  text-align: left;
  display: inline-block;
  margin-bottom: 2rem;
}

.looking-list li {
  font-size: 1rem;
  color: var(--hearth-rich-brown);
  padding: 0.45rem 0;
  padding-left: 1.6rem;
  position: relative;
  line-height: 1.55;
}

.looking-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--hearth-amber);
  font-size: 1.2rem;
  line-height: 1.35;
  font-weight: 700;
}

.looking-emphasis {
  display: block;
  font-family: var(--font-accent);
  font-size: 1.45rem;
  color: var(--hearth-amber);
  margin-top: 0.5rem;
}

/* ==========================================================
   HOW IT WORKS
   ========================================================== */

.how-it-works {
  background: var(--hearth-cream);
}

.steps-track {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  margin-top: 3rem;
  position: relative;
}

/* Vertical line on mobile */
.steps-track::before {
  content: '';
  position: absolute;
  left: 2.25rem;
  top: 1rem;
  bottom: 1rem;
  width: 2px;
  background: repeating-linear-gradient(
    180deg,
    var(--hearth-amber) 0, var(--hearth-amber) 8px,
    transparent 8px, transparent 16px
  );
}

.step {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  position: relative;
}

.step-icon-wrap {
  flex-shrink: 0;
  width: 4.5rem;
  height: 4.5rem;
  background: rgba(232, 168, 56, 0.12);
  border: 2px solid rgba(232, 168, 56, 0.3);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.step-num {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--hearth-amber);
  line-height: 1;
  opacity: 0.7;
}

.step-emoji {
  font-size: 1.4rem;
  line-height: 1;
}

.step-body { flex: 1; padding-top: 0.5rem; }

.step-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--hearth-deep-navy);
  margin-bottom: 0.4rem;
}

.step-desc {
  font-size: 0.95rem;
  color: rgba(27, 42, 74, 0.7);
  line-height: 1.65;
}

/* ==========================================================
   APPS PREVIEW
   ========================================================== */

.apps-preview {
  background: var(--hearth-deep-navy);
}

.apps-preview .section-title { color: #fff; }
.apps-preview .section-sub { color: rgba(255,255,255,0.55); }

.apps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 3rem;
  margin-bottom: 2rem;
}

.app-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-card);
  overflow: hidden;
  transition: transform 0.25s var(--ease-out-expo), box-shadow 0.25s;
}

.app-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.app-img-wrap {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.app-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s var(--ease-out-expo);
}

.app-card:hover .app-img-wrap img {
  transform: scale(1.05);
}

.app-body {
  padding: 1.5rem;
}

.app-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}

.app-desc {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.65;
}

.apps-coming {
  text-align: center;
  margin-top: 1rem;
}

.coming-pill {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  background: rgba(232, 168, 56, 0.18);
  border: 1px solid rgba(232, 168, 56, 0.35);
  color: var(--hearth-amber-glow);
  padding: 8px 24px;
  border-radius: 50px;
}

/* ==========================================================
   FORM SECTION
   ========================================================== */

.apply-section {
  background: linear-gradient(180deg, var(--hearth-warm-white) 0%, var(--hearth-cream) 100%);
}

.apply-section .section-title { margin-bottom: 0.4rem; }

.apply-subtitle {
  text-align: center;
  font-size: 0.95rem;
  color: rgba(27, 42, 74, 0.55);
  margin-bottom: 2.5rem;
}

.form-card {
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: var(--card-shadow);
  padding: clamp(1.75rem, 5vw, 2.75rem);
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.4rem;
}

.form-label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--hearth-rich-brown);
  margin-bottom: 6px;
}

.form-label .optional {
  font-weight: 400;
  opacity: 0.5;
  font-size: 0.82em;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  background: #FDFAF3;
  border: 1.5px solid rgba(75, 55, 40, 0.18);
  border-radius: var(--radius-btn);
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--hearth-deep-navy);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--hearth-amber);
  box-shadow: 0 0 0 3px rgba(232, 168, 56, 0.12);
}

.form-input::placeholder,
.form-textarea::placeholder { color: #B0A090; }

.form-select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%234A3728' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }

.form-textarea {
  min-height: 90px;
  resize: vertical;
}

/* Grades checkboxes */
.grades-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.grade-check {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
}

.grade-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--hearth-amber);
  cursor: pointer;
  flex-shrink: 0;
}

.grade-check span {
  font-size: 0.9rem;
  color: var(--hearth-rich-brown);
  font-weight: 500;
}

/* Agreement */
.agreement-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 0.88rem;
  color: rgba(27, 42, 74, 0.7);
  line-height: 1.5;
}

.agreement-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--hearth-amber);
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Inline errors */
.field-error {
  display: none;
  font-size: 0.82rem;
  color: var(--hearth-rose);
  margin-top: 5px;
}

.field-error.visible { display: block; }

.form-input.error,
.form-select.error,
.form-textarea.error {
  border-color: var(--hearth-rose);
}

/* Submit button */
.btn-submit {
  width: 100%;
  background: var(--hearth-amber);
  color: #fff;
  border: none;
  border-radius: var(--radius-btn);
  padding: 1rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(232, 168, 56, 0.3);
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  margin-top: 0.5rem;
}

.btn-submit:hover {
  background: var(--hearth-amber-glow);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(232, 168, 56, 0.4);
}

.btn-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

/* Success state */
.apply-success {
  text-align: center;
  padding: 2rem 1rem;
}

.success-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 1.25rem;
}

.success-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--hearth-deep-navy);
  margin-bottom: 1rem;
}

.success-msg {
  font-size: 1rem;
  color: rgba(27, 42, 74, 0.7);
  line-height: 1.7;
  max-width: 480px;
  margin: 0 auto 1rem;
}

.success-share-text {
  font-size: 0.9rem;
  color: rgba(27, 42, 74, 0.5);
  margin-bottom: 1.25rem;
}

.btn-share {
  background: var(--hearth-deep-navy);
  color: #fff;
  border: none;
  border-radius: var(--radius-btn);
  padding: 0.85rem 2rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.btn-share:hover {
  background: #2B3A5E;
  transform: translateY(-1px);
}

/* ==========================================================
   FAQ SECTION
   ========================================================== */

.faq {
  background: var(--hearth-warm-white);
}

.faq-list {
  max-width: 720px;
  margin: 2.5rem auto 0;
}

.faq-item {
  border-bottom: 1.5px solid var(--hearth-border);
}

.faq-item:first-child { border-top: 1.5px solid var(--hearth-border); }

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: none;
  border: none;
  padding: 1.25rem 0;
  cursor: pointer;
  text-align: left;
}

.faq-q-text {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--hearth-deep-navy);
  line-height: 1.4;
}

.faq-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  color: var(--hearth-amber);
  transition: transform 0.3s var(--ease-out-expo);
}

.faq-item.open .faq-icon { transform: rotate(90deg); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s var(--ease-out-expo);
}

.faq-item.open .faq-answer { max-height: 200px; }

.faq-answer p {
  font-size: 0.95rem;
  color: rgba(27, 42, 74, 0.7);
  line-height: 1.7;
  padding-bottom: 1.25rem;
}

/* ==========================================================
   FOOTER
   ========================================================== */

.beta-footer {
  background: var(--hearth-deep-navy);
  padding: 3rem var(--container-padding);
  text-align: center;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--hearth-amber);
  margin-bottom: 1rem;
}

.footer-tagline {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 1.25rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.footer-links a {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.45);
  transition: color 0.2s;
}

.footer-links a:hover { color: rgba(255, 255, 255, 0.85); }

.footer-copy {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.3);
}

/* ==========================================================
   TABLET (768px+)
   ========================================================== */

@media (min-width: 768px) {

  .benefits-grid {
    grid-template-columns: 1fr 1fr;
  }

  .apps-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* Horizontal timeline */
  .steps-track {
    flex-direction: row;
    gap: 0;
    align-items: flex-start;
  }

  .steps-track::before {
    /* Horizontal connecting line */
    left: calc(4.5rem / 2);
    right: calc(4.5rem / 2);
    top: 2.25rem;
    bottom: auto;
    width: auto;
    height: 2px;
    background: repeating-linear-gradient(
      90deg,
      var(--hearth-amber) 0, var(--hearth-amber) 8px,
      transparent 8px, transparent 16px
    );
  }

  .step {
    flex: 1;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    padding: 0 1rem;
  }

  .step-body { padding-top: 0; }
}

/* ==========================================================
   DESKTOP (1024px+)
   ========================================================== */

@media (min-width: 1024px) {

  .benefit-card { padding: 2.5rem; }

  .app-body { padding: 2rem; }

  .step { padding: 0 1.5rem; }
}

/* ==========================================================
   REDUCED MOTION
   ========================================================== */

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hero-hills, .hero-fg { will-change: auto; }
}
