/* ==========================================================================
   ELIO Homepage Stylesheet (site/home/home.css)
   Warm watercolor & picture-book paper world
   ========================================================================== */

/* Site document fonts. tools/release/build_web.py subsets them for the text
   the built pages actually show (counts, prices, operator details included). */
@font-face {
  font-family: ElioEN;
  src: url("/discovery-fonts/Nunito-discovery.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: ElioKR;
  src: url("/discovery-fonts/NotoSansKR-discovery.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Color Variables & Theme Tokens - Default is Bright & Warm Paper Tone */
:root {
  color-scheme: light dark;
  --paper-bg: #FAF7F0;
  --paper-surface: #FFFFFF;
  --paper-warm: #F3EFE6;
  --paper-muted: #EAE3D2;
  --ink: #173F36;
  --ink-secondary: #395B52;
  --ink-muted: #5E7A72;
  --border-subtle: #E2DBD0;
  --border-strong: #CEC4B4;

  --forest-green: #245A48;
  --forest-green-hover: #1A4637;
  --forest-light: #EAF5ED;
  --mint-soft: #DDEEE3;
  --gold-warm: #C88318;
  --gold-light: #FFF4D9;
  --terracotta: #B8582C;
  --terracotta-hover: #9E451F;
  --terracotta-light: #FAECE4;

  --card-shadow: 0 4px 16px rgba(23, 63, 54, 0.05);
  --card-shadow-hover: 0 8px 24px rgba(23, 63, 54, 0.09);
  --focus-ring: #C76C32;

  font-family: ElioKR, ElioEN, system-ui, -apple-system, sans-serif;
  line-height: 1.75;
  background-color: var(--paper-bg);
  color: var(--ink);
}

/* Dark Mode - ONLY applied when user specifically prefers dark scheme */
@media (prefers-color-scheme: dark) {
  :root {
    --paper-bg: #18221F;
    --paper-surface: #202D29;
    --paper-warm: #263632;
    --paper-muted: #2E413C;
    --ink: #EDF3ED;
    --ink-secondary: #B2CCC3;
    --ink-muted: #8AA49C;
    --border-subtle: #2D423C;
    --border-strong: #3D5A52;

    --forest-green: #4EA385;
    --forest-green-hover: #63B697;
    --forest-light: #1D3830;
    --mint-soft: #23473D;
    --gold-warm: #FFC54A;
    --gold-light: #332B1A;
    --terracotta: #E8855A;
    --terracotta-hover: #FFA277;
    --terracotta-light: #3A261D;

    --card-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    --card-shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.35);
    --focus-ring: #FF9E66;
  }
}

/* Reset & Base Elements */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  overflow-x: hidden;
  width: 100%;
}

body {
  margin: 0;
  padding: 0;
  font-size: 1.0625rem; /* 17px */
  word-break: keep-all;
  overflow-wrap: break-word;
  background-color: var(--paper-bg);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  width: 100%;
}

::selection {
  background: var(--gold-light);
  color: var(--ink);
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: opacity 0.2s ease, text-decoration-thickness 0.2s ease;
}

a:hover {
  text-decoration-thickness: 2px;
}

button, a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 4px;
  border-radius: 4px;
}

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

/* Accessibility: Skip Link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--paper-surface);
  color: var(--ink);
  padding: 0.75rem 1.25rem;
  font-weight: 700;
  z-index: 1000;
  text-decoration: none;
  border: 2px solid var(--forest-green);
  border-radius: 0.5rem;
}

.skip-link:focus {
  top: 1rem;
}

/* Layout Container */
.container {
  width: 100%;
  max-width: 1160px;
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(1rem, 3.5vw, 2rem);
  padding-right: clamp(1rem, 3.5vw, 2rem);
}

/* Header & Navigation */
.site-header {
  border-bottom: 1px solid var(--border-subtle);
  background: var(--paper-bg);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  min-height: 4.25rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  font-family: ElioEN, ElioKR, sans-serif;
  color: var(--ink);
  flex-shrink: 0;
}

.brand-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background-color: var(--mint-soft);
  border: 1px solid var(--border-subtle);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.brand-tagline {
  font-size: 0.72rem;
  color: var(--ink-muted);
  letter-spacing: 0.05em;
  font-weight: 700;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem clamp(0.5rem, 1.5vw, 1.25rem);
  flex-wrap: wrap;
}

.nav-links-sub {
  display: flex;
  align-items: center;
  gap: 0.25rem clamp(0.25rem, 1vw, 0.75rem);
  flex-wrap: wrap;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.35rem 0.6rem;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink-secondary);
  border-radius: 0.5rem;
  white-space: nowrap;
}

.nav-link-short {
  display: none;
}

.nav-link:hover {
  color: var(--ink);
  background-color: var(--paper-warm);
  text-decoration: none;
}

.nav-buttons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 40px;
  padding: 0.4rem 0.85rem;
  border-radius: 2rem;
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
  border: 1px solid transparent;
  white-space: nowrap;
}

.nav-btn-book {
  background-color: var(--terracotta-light);
  color: var(--terracotta);
  border-color: var(--terracotta);
}

.nav-btn-book:hover {
  background-color: var(--terracotta);
  color: #FFFFFF;
  text-decoration: none;
}

.nav-btn-play {
  background-color: var(--forest-green);
  color: #FFFFFF;
}

.nav-btn-play:hover {
  background-color: var(--forest-green-hover);
  text-decoration: none;
}

/* ==========================================================================
   Hero Section: Grand Picture Book Art & Direct Entrances
   ========================================================================== */

.hero-section {
  padding-top: clamp(1.5rem, 3.5vw, 3rem);
  padding-bottom: clamp(2rem, 4.5vw, 3.5rem);
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: clamp(1.25rem, 3.5vw, 2.75rem);
  align-items: center;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 0.25rem 0.8rem;
  background-color: var(--forest-light);
  color: var(--forest-green);
  border-radius: 2rem;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
  border: 1px solid var(--border-subtle);
}

.hero-title {
  font-size: clamp(1.85rem, 3.5vw, 2.9rem);
  line-height: 1.25;
  font-weight: 900;
  letter-spacing: -0.035em;
  margin-top: 0;
  margin-bottom: 0.85rem;
  color: var(--ink);
}

.hero-lead {
  font-size: clamp(0.95rem, 1.5vw, 1.12rem);
  line-height: 1.7;
  color: var(--ink-secondary);
  margin-top: 0;
  margin-bottom: 1.25rem;
}

/* Two Direct Portals (Integrated Entry Flow) */
.hero-portals {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.portal-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.2rem;
  border-radius: 1rem;
  background-color: var(--paper-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--card-shadow);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.portal-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--card-shadow-hover);
  text-decoration: none;
}

.portal-book {
  border-left: 5px solid var(--terracotta);
}

.portal-play {
  border-left: 5px solid var(--forest-green);
}

.portal-main {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-width: 0;
}

.portal-tag {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.15rem;
}

.portal-book .portal-tag {
  color: var(--terracotta);
}

.portal-play .portal-tag {
  color: var(--forest-green);
}

.portal-title {
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 0.15rem 0;
  line-height: 1.35;
}

.portal-desc {
  font-size: 0.86rem;
  color: var(--ink-muted);
  margin: 0;
  line-height: 1.45;
}

.portal-action-wrap {
  flex-shrink: 0;
}

.portal-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 40px;
  padding: 0.45rem 1rem;
  border-radius: 2rem;
  font-size: 0.88rem;
  font-weight: 800;
  white-space: nowrap;
}

.portal-btn-book {
  background-color: var(--terracotta);
  color: #FFFFFF;
}

.portal-card:hover .portal-btn-book {
  background-color: var(--terracotta-hover);
}

.portal-btn-play {
  background-color: var(--forest-green);
  color: #FFFFFF;
}

.portal-card:hover .portal-btn-play {
  background-color: var(--forest-green-hover);
}

/* Hero Art Column (Large Real Picture Book Art) */
.hero-art-column {
  width: 100%;
}

.hero-art-figure {
  margin: 0;
  position: relative;
  width: 100%;
}

.hero-image-frame {
  width: 100%;
  border-radius: 1.25rem;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 8px 28px rgba(23, 63, 54, 0.08);
  background-color: var(--paper-warm);
}

.hero-art-img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.hero-art-caption {
  margin-top: 0.65rem;
  padding: 0 0.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.3rem 0.8rem;
  font-size: 0.84rem;
  color: var(--ink-secondary);
}

.caption-quote {
  font-weight: 700;
}

.caption-title {
  font-size: 0.78rem;
  color: var(--ink-muted);
}

/* ==========================================================================
   Common Section Styling
   ========================================================================== */

.section {
  padding-top: clamp(2.25rem, 4.5vw, 4rem);
  padding-bottom: clamp(2.25rem, 4.5vw, 4rem);
}

.section-warm {
  background-color: var(--paper-warm);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.section-header {
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.section-eyebrow {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--forest-green);
  margin-bottom: 0.35rem;
}

.section-title {
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  line-height: 1.3;
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-top: 0;
  margin-bottom: 0.65rem;
  color: var(--ink);
}

.section-lead {
  font-size: clamp(0.95rem, 1.4vw, 1.1rem);
  line-height: 1.7;
  color: var(--ink-secondary);
  max-width: 46rem;
  margin-top: 0;
  margin-bottom: 0;
}

/* Daily Steps Grid */
.daily-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.daily-step-item {
  background-color: var(--paper-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 1rem;
  padding: 1.25rem 1.15rem;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
}

.step-num {
  font-size: 0.78rem;
  font-weight: 900;
  color: var(--terracotta);
  letter-spacing: 0.08em;
  margin-bottom: 0.45rem;
}

.step-title {
  font-size: 1.08rem;
  font-weight: 800;
  margin-top: 0;
  margin-bottom: 0.45rem;
  line-height: 1.35;
}

.step-desc {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--ink-secondary);
  margin: 0;
}

/* Fact Box (Exact factual values from daily.json) */
.fact-box {
  background-color: var(--paper-surface);
  border: 1px solid var(--border-subtle);
  border-left: 5px solid var(--forest-green);
  border-radius: 0.85rem;
  padding: 1.15rem 1.35rem;
  box-shadow: var(--card-shadow);
}

.fact-content {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.fact-label {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--forest-green);
}

.fact-text {
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--ink-secondary);
  margin: 0;
}

/* Books Showcase Grid */
.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}

.book-card {
  background-color: var(--paper-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.book-card-cover {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background-color: var(--paper-warm);
}

.book-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.book-card:hover .book-card-cover img {
  transform: scale(1.02);
}

.book-card-body {
  padding: 1.15rem 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.book-badge {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--terracotta);
  background-color: var(--terracotta-light);
  align-self: flex-start;
  padding: 0.2rem 0.55rem;
  border-radius: 0.4rem;
  margin-bottom: 0.55rem;
}

.book-card-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin-top: 0;
  margin-bottom: 0.2rem;
  line-height: 1.3;
}

.book-card-korean {
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin-top: 0;
  margin-bottom: 0.55rem;
  font-weight: 700;
}

.book-card-desc {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--ink-secondary);
  margin-top: 0;
  margin-bottom: 1.15rem;
  flex-grow: 1;
}

.book-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--terracotta);
  text-decoration: none;
}

.book-card-link:hover {
  text-decoration: underline;
}

.books-cta {
  background-color: var(--paper-warm);
  border: 1px solid var(--border-subtle);
  border-radius: 1rem;
  padding: 1.15rem 1.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.books-cta p {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 42px;
  padding: 0.45rem 1.15rem;
  background-color: var(--paper-surface);
  color: var(--terracotta);
  border: 1px solid var(--terracotta);
  border-radius: 2rem;
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.btn-secondary:hover {
  background-color: var(--terracotta);
  color: #FFFFFF;
  text-decoration: none;
}

/* Interactive Subjects Grid */
.subjects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 1.5rem;
}

.subject-card {
  background-color: var(--paper-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 1.25rem;
  padding: 1.35rem 1.25rem;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.subject-tag {
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.6rem;
  border-radius: 0.4rem;
  align-self: flex-start;
  margin-bottom: 0.75rem;
}

.subject-card-english .subject-tag {
  background-color: var(--forest-light);
  color: var(--forest-green);
}

.subject-card-math .subject-tag {
  background-color: var(--gold-light);
  color: var(--gold-warm);
}

.subject-card-hangul .subject-tag {
  background-color: var(--terracotta-light);
  color: var(--terracotta);
}

.subject-title {
  font-size: 1.2rem;
  font-weight: 800;
  margin-top: 0;
  margin-bottom: 0.45rem;
}

.subject-desc {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--ink-secondary);
  margin-top: 0;
  margin-bottom: 0.85rem;
  flex-grow: 1;
}

.subject-sample {
  font-size: 0.8rem;
  color: var(--ink-muted);
  background-color: var(--paper-warm);
  border-radius: 0.5rem;
  padding: 0.4rem 0.7rem;
  margin-bottom: 1.15rem;
  font-weight: 700;
}

.subject-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--forest-green);
  text-decoration: none;
}

.subject-link:hover {
  text-decoration: underline;
}

.subject-link-more {
  display: flex;
  margin-top: 0.5rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Elio Story & Principles */
.story-box {
  display: grid;
  grid-template-columns: 1.2fr 0.95fr;
  gap: clamp(1.5rem, 3.5vw, 2.75rem);
  align-items: start;
}

.story-content {
  font-size: 0.98rem;
  line-height: 1.75;
  color: var(--ink-secondary);
}

.story-lead {
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 0.85rem;
}

.story-points {
  list-style: none;
  padding-left: 0;
  margin-top: 1.15rem;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.story-point-item {
  position: relative;
  padding-left: 1.2rem;
}

.story-point-item::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--forest-green);
  font-size: 1.2rem;
  line-height: 1.2;
}

.story-aside {
  background-color: var(--paper-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 1.25rem;
  padding: 1.35rem 1.3rem;
  box-shadow: var(--card-shadow);
}

.story-aside-title {
  font-size: 1.12rem;
  font-weight: 800;
  margin-top: 0;
  margin-bottom: 0.85rem;
  color: var(--ink);
}

.story-aside p {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--ink-secondary);
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.story-aside p:last-child {
  margin-bottom: 0;
}

/* FAQ Details */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-width: 52rem;
}

.faq-item {
  background-color: var(--paper-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 0.85rem;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.faq-question {
  padding: 0.95rem 1.2rem;
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: "+";
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--forest-green);
}

.faq-item[open] .faq-question::after {
  content: "−";
}

.faq-answer {
  padding: 0 1.2rem 1.15rem 1.2rem;
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--ink-secondary);
}

.faq-answer p {
  margin: 0;
}

/* Footer */
.site-footer {
  background-color: var(--paper-warm);
  border-top: 1px solid var(--border-subtle);
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
  margin-top: auto;
}

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

.footer-brand-title {
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 0.45rem;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--ink-muted);
  margin: 0;
}

.footer-col-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--ink);
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.footer-links {
  list-style: none;
  padding-left: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.footer-link-item a {
  font-size: 0.88rem;
  color: var(--ink-secondary);
  text-decoration: none;
}

.footer-link-item a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.footer-bottom {
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.footer-bottom p {
  margin: 0;
}

/* ==========================================================================
   App Section, Store Badge Slots, Legal Footer
   ========================================================================== */

.section-app {
  background-color: var(--forest-light);
  border-bottom: 1px solid var(--border-subtle);
}

.app-box {
  display: grid;
  grid-template-columns: 1.2fr 0.95fr;
  gap: clamp(1.5rem, 3.5vw, 2.75rem);
  align-items: center;
}

.app-lead {
  font-size: clamp(0.95rem, 1.4vw, 1.1rem);
  line-height: 1.7;
  color: var(--ink-secondary);
  max-width: 40rem;
  margin: 0 0 0.75rem;
}

.app-note {
  font-size: 0.92rem;
  color: var(--ink-secondary);
  margin: 0;
}

.hero-lead a,
.app-note a,
.faq-answer a {
  color: var(--forest-green);
  font-weight: 800;
}

.app-stores {
  background-color: var(--paper-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 1rem;
  padding: 1.25rem 1.35rem;
  box-shadow: var(--card-shadow);
}

.app-stores-title {
  font-size: 1rem;
  font-weight: 900;
  color: var(--ink);
  margin: 0 0 0.85rem;
}

.store-badges {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.store-badge {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.1rem;
  min-height: 56px;
  padding: 0.6rem 1.1rem;
  border-radius: 0.85rem;
  border: 1px solid var(--forest-green);
  background-color: var(--forest-green);
  color: #FFFFFF;
  text-decoration: none;
  line-height: 1.35;
}

a.store-badge:hover {
  background-color: var(--forest-green-hover);
  text-decoration: none;
}

.store-badge-kicker {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  opacity: 0.85;
}

.store-badge-name {
  font-size: 1rem;
  font-weight: 900;
}

.store-badge-pending {
  background-color: transparent;
  border-style: dashed;
  border-color: var(--border-strong);
  color: var(--ink-secondary);
}

.faq-answer p + p {
  margin-top: 0.6rem;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin-bottom: 0.5rem;
}

.footer-legal a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--ink-secondary);
}

.operator-info {
  margin-bottom: 0.5rem;
}

.operator-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem 1rem;
  overflow-wrap: anywhere;
}

/* ==========================================================================
   Responsive Adaptations & Layout Tweaks
   ========================================================================== */

/* Tablet & Mobile Landscape */
@media (max-width: 900px) {
  .app-box {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .hero-art-column {
    order: -1;
  }

  .story-box {
    grid-template-columns: 1fr;
  }

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

/* Landscape Phones specifically (e.g. 844x390, max-height 500px) */
@media (max-height: 520px) and (orientation: landscape) {
  .site-header {
    position: static;
  }

  .header-container {
    min-height: 2.75rem;
    padding-top: 0.2rem;
    padding-bottom: 0.2rem;
  }

  .brand-avatar {
    width: 28px;
    height: 28px;
  }

  .brand-name {
    font-size: 1.1rem;
  }

  .nav-links-sub {
    display: none;
  }

  .nav-btn {
    min-height: 32px;
    padding: 0.25rem 0.6rem;
    font-size: 0.8rem;
  }

  .hero-section {
    padding-top: 0.5rem;
    padding-bottom: 1rem;
  }

  .hero-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
    align-items: center;
  }

  .hero-art-column {
    order: 0;
  }

  .hero-badge {
    display: none;
  }

  .hero-title {
    font-size: 1.3rem;
    margin-bottom: 0.25rem;
    line-height: 1.2;
  }

  .hero-lead {
    font-size: 0.82rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
  }

  .hero-portals {
    gap: 0.4rem;
  }

  .portal-card {
    padding: 0.45rem 0.75rem;
    gap: 0.5rem;
  }

  .portal-tag {
    display: none;
  }

  .portal-desc {
    display: none;
  }

  .portal-title {
    font-size: 0.9rem;
    margin: 0;
  }

  .portal-btn {
    min-height: 30px;
    padding: 0.25rem 0.65rem;
    font-size: 0.78rem;
  }

  .hero-art-caption {
    font-size: 0.72rem;
    margin-top: 0.25rem;
  }

  .section {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
  }
}

/* Phone Portrait (e.g. 390x844 & sub-500px devices) */
@media (max-width: 650px) {
  .container {
    width: 100%;
    max-width: 390px;
    margin-left: 0;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .header-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
    min-height: 3rem;
  }

  .brand-bar {
    width: auto;
  }

  .brand-avatar {
    width: 30px;
    height: 30px;
  }

  .brand-name {
    font-size: 1.15rem;
  }

  .brand-tagline {
    display: none;
  }

  .primary-nav {
    width: auto;
  }

  .nav-links-sub {
    display: none;
  }

  .nav-buttons {
    display: flex;
    gap: 0.35rem;
  }

  .nav-btn {
    min-width: 0;
    font-size: 0.78rem;
    padding: 0.3rem 0.6rem;
    min-height: 34px;
    justify-content: center;
  }

  .hero-section {
    padding-top: 0.65rem;
    padding-bottom: 1.5rem;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .hero-art-column {
    order: -1;
  }

  .hero-art-img {
    max-height: 180px;
  }

  .hero-art-caption {
    margin-top: 0.35rem;
    font-size: 0.76rem;
    gap: 0.15rem;
  }

  .hero-badge {
    margin-bottom: 0.4rem;
    font-size: 0.74rem;
    padding: 0.15rem 0.6rem;
  }

  .hero-title {
    font-size: 1.38rem;
    line-height: 1.25;
    margin-bottom: 0.4rem;
  }

  .hero-lead {
    font-size: 0.88rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
  }

  .hero-portals {
    gap: 0.55rem;
  }

  .portal-card {
    padding: 0.7rem 0.9rem;
    gap: 0.5rem;
    flex-direction: row;
    align-items: center;
  }

  .portal-tag {
    display: none;
  }

  .portal-title {
    font-size: 0.96rem;
    margin: 0;
    line-height: 1.3;
  }

  .portal-desc {
    font-size: 0.78rem;
    margin: 0.15rem 0 0 0;
    line-height: 1.35;
  }

  .portal-btn {
    min-height: 34px;
    padding: 0.3rem 0.7rem;
    font-size: 0.8rem;
    flex-shrink: 0;
  }

  .daily-steps {
    grid-template-columns: 1fr;
  }

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

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

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
