/* ── Fonts ─────────────────────────────────────── */
/* Nunito is loaded from a <link> in each page's <head> — an @import here
   would queue behind this stylesheet and delay first paint. */

/* ── Design Tokens ─────────────────────────────── */
:root {
  --blue: #7BADC4;
  --blue-light: #B5D5E2;
  --blue-dark: #5A8FA8;
  --blue-deep: #3D7A96;
  --yellow: #F0B840;
  --yellow-light: #F7D57A;
  --yellow-dark: #D9A020;
  --cream: #FFF9F0;
  --cream-dark: #FFF3E0;
  --text: #2C3E50;
  --text-light: #6B7D8D;
  --text-muted: #94A3B3;
  --bg: #FEFCFA;
  --white: #FFFFFF;
  --green: #5A9E4B;
  --green-light: #E8F5E3;
  --purple: #6B4FCF;
  --purple-dark: #3D2B7A;
  --purple-light: #EFEAFB;
  /* Grade accents, matched to each 音訓 app icon */
  --red: #D62828;
  --red-dark: #9E1B1B;
  --brown: #A9743E;
  --brown-dark: #7A4F24;
  --orange: #F07818;
  --orange-dark: #C25608;
  --sky: #2BA8D8;
  --sky-dark: #1B7BA3;
  --royal: #1E63C8;
  --royal-dark: #144490;
  --gold: #E0A81E;
  --gold-dark: #A9761B;
  --radius: 20px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
  --shadow: 0 4px 20px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.08);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.10);
  --transition: 0.3s cubic-bezier(.4,0,.2,1);
  --transition-slow: 0.5s cubic-bezier(.4,0,.2,1);
  --bounce: 0.5s cubic-bezier(.34,1.56,.64,1);
}

/* ── Reset & Base ─────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Nunito', 'Hiragino Sans', 'Noto Sans JP', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ── Shared ───────────────────────────────────── */
.section-title {
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  font-weight: 900;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.section-title--center {
  text-align: center;
  margin-bottom: 48px;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Nav ──────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(254,252,250,0.8);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid rgba(123,173,196,0.1);
}

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 28px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  height: 38px;
  width: auto;
  transition: transform var(--transition);
}
.nav-logo:hover { transform: scale(1.04); }

/* Hamburger button (hidden on desktop) */
.nav-toggle {
  display: none;
}
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  z-index: 110;
}
.nav-hamburger span {
  display: block;
  width: 100%;
  height: 2.5px;
  border-radius: 2px;
  background: var(--text);
  transition: all var(--transition);
}
.nav-toggle:checked ~ .nav-hamburger span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle:checked ~ .nav-hamburger span:nth-child(2) {
  opacity: 0;
}
.nav-toggle:checked ~ .nav-hamburger span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Overlay (hidden on desktop) */
.nav-overlay {
  display: none;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-light);
  transition: color var(--transition);
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--yellow);
  border-radius: 1px;
  transition: width var(--transition);
}
.nav-link:hover { color: var(--blue-deep); }
.nav-link:hover::after { width: 100%; }

/* Language toggle */
.lang-toggle {
  display: flex;
  background: var(--white);
  border: 2px solid rgba(123,173,196,0.15);
  border-radius: 999px;
  overflow: hidden;
  font-size: 0.78rem;
  font-weight: 800;
}

.lang-btn {
  border: none;
  background: none;
  padding: 6px 16px;
  cursor: pointer;
  color: var(--text-muted);
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  transition: all var(--transition);
  letter-spacing: 0.02em;
}
.lang-btn:hover { color: var(--text); }

.lang-btn.active {
  background: linear-gradient(135deg, var(--yellow), var(--yellow-dark));
  color: var(--white);
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* ── Hero ─────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 72px 28px 80px;
  position: relative;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(123,173,196,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 80% 80%, rgba(240,184,64,0.06) 0%, transparent 50%);
  overflow: hidden;
}

/* Floating kana decoration */
.hero::before,
.hero::after {
  position: absolute;
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  opacity: 0.04;
  pointer-events: none;
  animation: float 8s ease-in-out infinite;
}
.hero::before {
  content: 'あ';
  font-size: 14rem;
  top: -20px;
  left: -30px;
  color: var(--blue);
  animation-delay: 0s;
}
.hero::after {
  content: 'カ';
  font-size: 10rem;
  bottom: -10px;
  right: -10px;
  color: var(--yellow);
  animation-delay: -4s;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-16px) rotate(3deg); }
}

.hero-logo {
  height: 140px;
  width: auto;
  margin: 0 auto 36px;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.06));
  animation: heroEntrance 0.8s ease-out both;
}

@keyframes heroEntrance {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.hero-title {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 18px;
  color: var(--text);
  letter-spacing: -0.03em;
  animation: heroEntrance 0.8s ease-out 0.15s both;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-light);
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.8;
  font-weight: 600;
  animation: heroEntrance 0.8s ease-out 0.3s both;
}

/* ── About ────────────────────────────────────── */
.about {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 28px 100px;
}

.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.about-text .section-title {
  background: linear-gradient(135deg, var(--blue-deep), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.about-desc {
  font-size: 1.02rem;
  color: var(--text-light);
  line-height: 1.9;
  font-weight: 600;
}

/* Flashcard stack illustration */
.about-illustration {
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 600px;
}

.card-stack {
  position: relative;
  width: 220px;
  height: 160px;
}

.card-stack-item {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  box-shadow: 0 8px 30px rgba(0,0,0,0.08);
  transition: transform var(--transition-slow);
}

.card-stack-item:nth-child(1) {
  background: linear-gradient(145deg, #e8f4f8, var(--blue-light));
  transform: rotate(-8deg) translateX(-16px);
  z-index: 1;
}
.card-stack-item:nth-child(2) {
  background: linear-gradient(145deg, #fef3d0, var(--yellow-light));
  transform: rotate(5deg) translateX(12px) translateY(-8px);
  z-index: 2;
}
.card-stack-item:nth-child(3) {
  background: var(--white);
  border: 2.5px solid var(--blue-light);
  z-index: 3;
  font-size: 3.5rem;
  color: var(--blue-deep);
  transform: rotate(-1deg);
}

.card-stack:hover .card-stack-item:nth-child(1) {
  transform: rotate(-14deg) translateX(-28px) translateY(4px);
}
.card-stack:hover .card-stack-item:nth-child(2) {
  transform: rotate(10deg) translateX(24px) translateY(-14px);
}
.card-stack:hover .card-stack-item:nth-child(3) {
  transform: rotate(0deg) scale(1.04);
}

/* Floating dots decoration */
.about-illustration::before,
.about-illustration::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  animation: bobble 6s ease-in-out infinite;
}
.about-illustration {
  position: relative;
}
.about-illustration::before {
  width: 48px;
  height: 48px;
  background: var(--yellow-light);
  opacity: 0.5;
  top: -10px;
  right: 20px;
  animation-delay: -2s;
}
.about-illustration::after {
  width: 28px;
  height: 28px;
  background: var(--blue-light);
  opacity: 0.5;
  bottom: -5px;
  left: 30px;
  animation-delay: -4s;
}

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

/* ── Features ─────────────────────────────────── */
.features {
  background:
    linear-gradient(180deg, var(--white) 0%, var(--cream) 100%);
  padding: 88px 28px;
  position: relative;
}

.features::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--blue-light), transparent);
}

.features-grid {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

.feature {
  text-align: center;
  padding: 32px 20px;
  border-radius: var(--radius);
  background: var(--white);
  border: 1.5px solid transparent;
  transition: all var(--transition);
  position: relative;
}

.feature:hover {
  border-color: var(--blue-light);
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.feature-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  position: relative;
}

.feature:nth-child(1) .feature-icon { background: linear-gradient(135deg, #e8f4f8, #d0eaf4); }
.feature:nth-child(2) .feature-icon { background: linear-gradient(135deg, #fef3d0, #fce8b2); }
.feature:nth-child(3) .feature-icon { background: linear-gradient(135deg, var(--green-light), #d4edce); }
.feature:nth-child(4) .feature-icon { background: linear-gradient(135deg, #f0e8f8, #e4d8f0); }

.feature-title {
  font-size: 0.95rem;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.feature-desc {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.65;
  font-weight: 600;
}

/* ── Apps Section ─────────────────────────────── */
.apps-section {
  padding: 88px 28px 0;
  position: relative;
}

.apps-section .section-title--center {
  position: relative;
}

.apps-section .section-title--center::after {
  content: '';
  display: block;
  width: 48px;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--yellow), var(--blue));
  margin: 14px auto 0;
}

/* A named family of apps — flashcards, worksheets, … */
.app-group {
  max-width: 1040px;
  margin: 0 auto;
  padding-bottom: 76px;
}

.app-group-head {
  text-align: center;
  margin-bottom: 30px;
}

.app-group-title {
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.app-group-title::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 10px;
  vertical-align: 0.08em;
  background: var(--blue);
}

.app-group--drill .app-group-title::before { background: var(--purple); }
.app-group--kana .app-group-title::before  { background: var(--green); }
.app-group--kanji .app-group-title::before { background: var(--yellow); }
.app-group--books .app-group-title::before { background: var(--orange); }

.app-group-desc {
  font-size: 0.92rem;
  color: var(--text-light);
  font-weight: 600;
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto;
}

.app-group-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--purple);
}
.app-group-link:hover { text-decoration: underline; }

.apps {
  max-width: 1040px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* A family with one app in it — keep the card card-sized, not full-width */
.apps--single {
  grid-template-columns: minmax(0, 340px);
  justify-content: center;
}

.app-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 44px 28px 32px;
  text-align: center;
  border: 1.5px solid rgba(0,0,0,0.04);
  box-shadow: var(--shadow);
  transition: transform var(--bounce), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.app-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: 2px 2px 0 0;
  opacity: 0;
  transition: opacity var(--transition);
}

/* Accent per app, set explicitly so regrouping the cards can't shuffle them */
.app-card--purple::before { background: linear-gradient(90deg, var(--purple-dark), var(--purple)); }
.app-card--green::before  { background: linear-gradient(90deg, #4a8c3a, var(--green)); }
.app-card--yellow::before { background: linear-gradient(90deg, var(--yellow-dark), var(--yellow)); }
.app-card--blue::before   { background: linear-gradient(90deg, #3a7aaa, var(--blue)); }
.app-card--red::before    { background: linear-gradient(90deg, var(--red-dark), var(--red)); }
.app-card--brown::before  { background: linear-gradient(90deg, var(--brown-dark), var(--brown)); }
.app-card--orange::before { background: linear-gradient(90deg, var(--orange-dark), var(--orange)); }
.app-card--sky::before    { background: linear-gradient(90deg, var(--sky-dark), var(--sky)); }
.app-card--royal::before  { background: linear-gradient(90deg, var(--royal-dark), var(--royal)); }

.app-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
}
.app-card:hover::before { opacity: 1; }
.app-card--purple:hover { border-color: var(--purple); }
.app-card--green:hover  { border-color: var(--green); }
.app-card--yellow:hover { border-color: var(--yellow); }
.app-card--blue:hover   { border-color: var(--blue); }
.app-card--red:hover    { border-color: var(--red); }
.app-card--brown:hover  { border-color: var(--brown); }
.app-card--orange:hover { border-color: var(--orange); }
.app-card--sky:hover    { border-color: var(--sky); }
.app-card--royal:hover  { border-color: var(--royal); }

/* "New" ribbon on a freshly announced app */
.app-flag {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white);
  background: linear-gradient(135deg, var(--purple), var(--purple-dark));
  box-shadow: 0 3px 10px rgba(107,79,207,0.3);
}

.app-logo {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-bottom: 22px;
  border-radius: 22px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.12);
  transition: transform var(--bounce);
}

.app-card:hover .app-logo {
  transform: scale(1.06) rotate(-2deg);
}

/* Transparent icon — give it a tile so it matches the opaque logos.
   The tint comes from the card's accent (--tile), set just below. */
.app-logo--plain {
  background: var(--tile, var(--purple-light));
  padding: 8px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.10);
}

.app-card--purple { --tile: var(--purple-light); }
.app-card--red    { --tile: #FCE7E7; }
.app-card--brown  { --tile: #F4EADD; }
.app-card--orange { --tile: #FDEDDC; }
.app-card--sky    { --tile: #E2F3FA; }
.app-card--royal  { --tile: #E4EEFC; }
.app-card--yellow { --tile: #FCF1D8; }
.app-card--green  { --tile: var(--green-light); }

.app-name {
  font-size: 1.3rem;
  font-weight: 900;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.app-desc {
  font-size: 0.88rem;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 22px;
  flex-grow: 1;
  font-weight: 600;
}

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

.app-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--bg);
  color: var(--text-light);
  border: 1.5px solid rgba(0,0,0,0.06);
  transition: all var(--transition);
}

.app-badge:hover {
  border-color: var(--blue);
  color: var(--blue-deep);
  background: rgba(123,173,196,0.06);
  transform: translateY(-1px);
}

.app-badge--soon {
  background: var(--cream-dark);
  color: var(--yellow-dark);
  border-color: rgba(240,184,64,0.2);
  cursor: default;
}
.app-badge--soon:hover {
  background: var(--cream-dark);
  color: var(--yellow-dark);
  border-color: rgba(240,184,64,0.2);
  transform: none;
}

/* ── What's New ───────────────────────────────── */
.whats-new {
  padding: 0 28px 96px;
}

.whats-new-inner {
  max-width: 800px;
  margin: 0 auto;
}

.whats-new .section-title--center {
  position: relative;
  margin-bottom: 48px;
}

.whats-new .section-title--center::after {
  content: '';
  display: block;
  width: 48px;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--purple), var(--blue));
  margin: 14px auto 0;
}

.news-list {
  list-style: none;
  position: relative;
  padding-left: 34px;
}

/* Vertical rail linking the entries */
.news-list::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  border-radius: 1px;
  background: linear-gradient(180deg, var(--purple-light), rgba(123,173,196,0.28), transparent);
}

.news-item {
  position: relative;
  padding-bottom: 34px;
}

.news-item:last-child {
  padding-bottom: 0;
}

/* Dot on the rail */
.news-item::before {
  content: '';
  position: absolute;
  left: -34px;
  top: 5px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--white);
  border: 3px solid var(--blue-light);
  box-sizing: border-box;
}

.news-item--highlight::before {
  border-color: var(--purple);
  box-shadow: 0 0 0 5px rgba(107,79,207,0.12);
}

.news-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.news-date {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.news-tag {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--blue-deep);
  background: rgba(123,173,196,0.14);
}

.news-tag--new {
  color: var(--purple-dark);
  background: var(--purple-light);
}

.news-headline {
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.news-body {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.75;
  font-weight: 600;
}

/* ── Demo / How it works ──────────────────────── */
.demo {
  padding: 0 28px 100px;
}

.demo-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.demo-illustration {
  display: flex;
  justify-content: center;
  align-items: center;
}

.demo-phones {
  position: relative;
  width: 320px;
  height: 420px;
}

.demo-phone {
  position: absolute;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  background: var(--white);
  transition: transform var(--transition-slow);
}

.demo-phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.demo-phone--front {
  width: 220px;
  bottom: 0;
  left: 0;
  z-index: 2;
  border: 3px solid rgba(0,0,0,0.08);
}

.demo-phone--back {
  width: 200px;
  top: 0;
  right: 0;
  z-index: 1;
  border: 3px solid rgba(0,0,0,0.06);
  opacity: 0.85;
}

.demo-phones:hover .demo-phone--front {
  transform: translateX(-8px) rotate(-2deg);
}
.demo-phones:hover .demo-phone--back {
  transform: translateX(8px) rotate(2deg);
}

.demo-text .section-title {
  background: linear-gradient(135deg, var(--yellow-dark), var(--yellow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.demo-desc {
  font-size: 1rem;
  color: var(--text-light);
  line-height: 1.9;
  margin-bottom: 14px;
  font-weight: 600;
}

/* ── Contact ──────────────────────────────────── */
.contact {
  padding: 88px 28px;
  background:
    linear-gradient(180deg, var(--bg) 0%, var(--cream) 100%);
}

.contact-inner {
  max-width: 560px;
  margin: 0 auto;
}

.contact-subtitle {
  text-align: center;
  color: var(--text-light);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 40px;
  margin-top: -8px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 0.01em;
}

.form-group input,
.form-group textarea {
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  background: var(--white);
  border: 2px solid rgba(123,173,196,0.15);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(123,173,196,0.12);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
  font-weight: 600;
}

.form-submit {
  align-self: center;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--white);
  background: linear-gradient(135deg, var(--blue), var(--blue-deep));
  border: none;
  border-radius: 999px;
  padding: 14px 36px;
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: 0.01em;
  box-shadow: 0 4px 16px rgba(90,143,168,0.25);
}

.form-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(90,143,168,0.35);
}

.form-submit:active {
  transform: translateY(0);
}

/* ── Go to top ────────────────────────────────── */
.go-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--blue-deep));
  color: var(--white);
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(90,143,168,0.3);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity var(--transition), transform var(--transition), box-shadow var(--transition);
  z-index: 90;
}

.go-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.go-top:hover {
  box-shadow: 0 6px 24px rgba(90,143,168,0.45);
  transform: translateY(-2px);
}

/* ── Footer ───────────────────────────────────── */
.footer {
  margin-top: auto;
  border-top: 1px solid rgba(123,173,196,0.1);
  padding: 28px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  background: var(--white);
}

.footer a {
  color: var(--blue-dark);
  font-weight: 700;
  transition: color var(--transition);
}
.footer a:hover {
  color: var(--blue-deep);
  text-decoration: underline;
}
.footer-sep { margin: 0 10px; opacity: 0.4; }

/* ── Privacy Policy ───────────────────────────── */
.policy {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 28px 88px;
}

.policy h1 {
  font-size: 2rem;
  font-weight: 900;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.policy-date {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 44px;
  font-weight: 600;
}

.policy h2 {
  font-size: 1.15rem;
  font-weight: 800;
  margin-top: 36px;
  margin-bottom: 10px;
  color: var(--blue-deep);
}

.policy p,
.policy ul {
  font-size: 0.95rem;
  color: var(--text-light);
  margin-bottom: 14px;
  line-height: 1.8;
  font-weight: 600;
}

.policy ul {
  padding-left: 22px;
}

.policy li {
  margin-bottom: 8px;
}

/* ── Responsive ───────────────────────────────── */
@media (max-width: 1100px) {
  .app-group { max-width: 760px; }
  .apps {
    grid-template-columns: repeat(2, 1fr);
    max-width: 760px;
  }
  .apps--single { grid-template-columns: minmax(0, 340px); }
}

@media (max-width: 900px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 768px) {
  /* Mobile nav */
  .nav-hamburger {
    display: flex;
  }

  .nav-right {
    position: fixed;
    top: 0;
    right: 0;
    width: 260px;
    height: 100dvh;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 80px 28px 32px;
    background: var(--white);
    box-shadow: -4px 0 24px rgba(0,0,0,0.1);
    transform: translateX(100%);
    transition: transform var(--transition);
    z-index: 105;
  }

  .nav-toggle:checked ~ .nav-right {
    transform: translateX(0);
  }

  /* Overlay behind menu */
  .nav-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    z-index: 104;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
  }
  .nav-toggle:checked ~ .nav-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  .nav-link {
    font-size: 1rem;
    padding: 10px 0;
    width: 100%;
  }
  .nav-link::after { display: none; }

  .lang-toggle {
    margin-top: 8px;
  }

  .app-group { max-width: 400px; padding-bottom: 60px; }
  .apps,
  .apps--single {
    grid-template-columns: 1fr;
    max-width: 400px;
  }
  .app-group-title { font-size: 1.25rem; }

  .about-inner,
  .demo-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-illustration { order: -1; }

  .hero {
    padding: 56px 24px 60px;
  }
  .hero::before { font-size: 8rem; }
  .hero::after { font-size: 6rem; }
  .hero-logo { height: 100px; }

  .features { padding: 64px 24px; }
  .apps-section { padding-top: 64px; }
  .demo { padding-bottom: 64px; }
  .whats-new { padding-bottom: 72px; }
  .whats-new .section-title--center { margin-bottom: 36px; }

  .demo-phones {
    width: 260px;
    height: 340px;
  }
  .demo-phone--front { width: 180px; }
  .demo-phone--back { width: 160px; }
}

@media (max-width: 480px) {
  .features-grid { grid-template-columns: 1fr; }

  .hero-title { font-size: 1.6rem; }

  .card-stack {
    width: 180px;
    height: 130px;
  }
  .card-stack-item:nth-child(3) { font-size: 2.5rem; }
}

/* ── Free Worksheets (/worksheets/) ───────────── */
.hero--compact { padding: 64px 28px 56px; }
.hero--compact .hero-subtitle { max-width: 640px; }
.ws-kicker {
  display: inline-block;
  margin-bottom: 18px;
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--green-light);
  color: var(--green);
  font-size: 0.85rem;
  font-weight: 800;
}

.ws-section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 28px 40px;
}
.ws-group { margin-bottom: 56px; }
.ws-group-title { margin-bottom: 24px; }
.ws-group-title::before { background: var(--yellow); }
.ws-group:nth-child(2) .ws-group-title::before { background: var(--green); }

.ws-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.ws-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 2px solid rgba(0,0,0,0.04);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.ws-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--c);
}
.ws-thumb {
  display: block;
  aspect-ratio: 794 / 560;
  overflow: hidden;
  background: var(--cream);
  border-bottom: 3px solid var(--c);
}
.ws-thumb img {
  width: 100%;
  height: auto;
  transition: transform var(--transition-slow);
}
.ws-card:hover .ws-thumb img { transform: scale(1.03); }

.ws-card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.ws-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 800;
}
.ws-chip {
  background: var(--c);
  color: var(--white);
  border-radius: var(--radius-xs);
  padding: 2px 10px;
  font-size: 0.95rem;
}
.ws-meta { color: var(--text-light); font-size: 0.9rem; font-weight: 600; }

.ws-actions { display: flex; align-items: center; gap: 16px; margin-top: 4px; }
.ws-btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--c);
  color: var(--white);
  font-weight: 800;
  font-size: 0.9rem;
  transition: transform var(--transition), filter var(--transition);
}
.ws-btn:hover { transform: translateY(-1px); filter: brightness(0.94); }
.ws-link { font-weight: 700; font-size: 0.9rem; color: var(--blue-deep); }
.ws-link:hover { text-decoration: underline; }

.ws-chars { margin-top: auto; padding-top: 6px; font-size: 0.85rem; color: var(--text-light); }
.ws-chars summary { cursor: pointer; font-weight: 700; }
.ws-chars p {
  margin-top: 8px;
  font-size: 1.05rem;
  line-height: 1.7;
  letter-spacing: 0.08em;
  word-break: break-all;
  color: var(--text);
}

.ws-how { background: var(--cream); padding: 80px 28px; }
.ws-how-inner { max-width: 1000px; margin: 0 auto; }
.ws-steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 36px;
}
.ws-steps li {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
}
.ws-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--white);
  font-weight: 900;
  margin-bottom: 14px;
}
.ws-steps h3 { font-size: 1.1rem; font-weight: 800; margin-bottom: 6px; }
.ws-steps p { color: var(--text-light); font-size: 0.95rem; line-height: 1.7; }
.ws-note { margin-top: 28px; text-align: center; color: var(--text-light); font-size: 0.9rem; }

.ws-more { padding: 80px 28px 24px; }
.ws-more-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.ws-more-card {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 24px;
  background: var(--white);
  border-radius: var(--radius);
  border: 2px solid rgba(0,0,0,0.04);
  box-shadow: var(--shadow);
  transition: transform var(--transition), border-color var(--transition);
}
.ws-more-card img { width: 64px; height: 64px; border-radius: 16px; flex-shrink: 0; }
.ws-more-card h3 { font-size: 1.05rem; font-weight: 800; margin-bottom: 4px; }
.ws-more-card p { color: var(--text-light); font-size: 0.92rem; line-height: 1.6; }
.ws-more-card:hover { transform: translateY(-3px); }
.ws-more-card--yellow:hover { border-color: var(--yellow); }
.ws-more-card--purple:hover { border-color: var(--purple); }

.ws-license {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 28px 72px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.7;
}

@media (max-width: 1000px) {
  .ws-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .ws-steps, .ws-more-inner { grid-template-columns: 1fr; }
  .ws-how, .ws-more { padding-left: 16px; padding-right: 16px; }
  .ws-section { padding: 0 16px 24px; }
}
@media (max-width: 560px) {
  .ws-grid { grid-template-columns: minmax(0, 1fr); }
}
