/* ============================================================
   English with Ly — v4 "A letter from your teacher"
   v2's calm editorial base + v3's petals, blur opening
   and big footer line · dusty rose / cream / gold · GSAP + Lenis
   ============================================================ */

:root {
  --paper: #faf6f0;
  --paper-2: #f2eae0;
  --ink: #37292e;
  --ink-soft: #75626a;
  --rose: #a5566b;
  --rose-deep: #6f3648;
  --rose-mist: #f0dfe2;
  --sage: #8fa08a;
  --gold: #c29a5e;
  --line: rgba(55, 41, 46, 0.12);

  --serif: "Fraunces", Georgia, serif;
  --sans: "Karla", -apple-system, sans-serif;
  --hand: "Caveat", "Segoe Script", cursive;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: clip; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--rose); color: var(--paper); }

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

h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; }
p { margin: 0 0 1em; }

em { font-style: italic; }

.center { text-align: center; }

/* ---------- Grain ---------- */
/* Static noise overlay — full-viewport is enough (no animation), keeps the
   composited layer 4x smaller than the old 200% sheet */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 200;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Preloader ---------- */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: var(--paper-2);
  display: grid;
  place-items: center;
}

.preloader-inner { text-align: center; }

.pre-title {
  display: flex;
  gap: 0.35em;
  justify-content: center;
  font-family: var(--serif);
  font-size: clamp(30px, 5vw, 52px);
  color: var(--ink);
  margin: 0 0 22px;
  overflow: hidden;
}

.pre-word { display: inline-block; transform: translateY(120%); }
.pre-italic { font-style: italic; color: var(--rose); }

.pre-line {
  display: block;
  width: 140px;
  height: 1.5px;
  margin: 0 auto 18px;
  background: var(--gold);
  transform: scaleX(0);
}

.pre-tag {
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  color: var(--ink-soft);
  opacity: 0;
  margin: 0;
}

/* ---------- Eyebrow ---------- */
.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--rose);
  margin-bottom: 26px;
}

.eyebrow.center { text-align: center; }

/* ---------- Pills & links ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 32px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  border: 1.5px solid var(--ink);
  color: var(--ink);
  white-space: nowrap;
  transition: background 0.4s var(--ease), color 0.4s var(--ease),
    border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
  will-change: transform;
}

.pill-solid {
  background: var(--ink);
  color: var(--paper);
}

.pill-solid:hover {
  background: var(--rose);
  border-color: var(--rose);
  box-shadow: 0 16px 34px -14px rgba(165, 86, 107, 0.55);
}

.link-arrow {
  font-weight: 700;
  font-size: 15px;
  color: var(--rose-deep);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 3px;
  background: linear-gradient(var(--rose), var(--rose)) left bottom / 0% 1.5px no-repeat;
  transition: background-size 0.5s var(--ease);
}

.link-arrow:hover { background-size: 100% 1.5px; }

.link-arrow span { transition: transform 0.4s var(--ease); }
.link-arrow:hover span { transform: translateX(5px); }

/* ---------- Header ---------- */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: transform 0.55s var(--ease), background 0.4s var(--ease),
    box-shadow 0.4s var(--ease);
}

.header.hidden { transform: translateY(-110%); }

/* While the overlay menu is open the header must sit above it (so the
   close button stays reachable) and must not slide away or paint a bar */
.header.menu-open {
  z-index: 130;
  transform: none;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* Lock the page behind the open overlay menu */
html.menu-open, html.menu-open body { overflow: hidden; }

.header.tinted {
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--line);
}

.header-inner {
  width: min(1240px, 94vw);
  margin-inline: auto;
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.logo-dot {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--rose);
  color: var(--paper);
  font-family: var(--hand);
  font-weight: 600;
  font-size: 23px;
  display: grid;
  place-items: center;
  transition: transform 0.45s var(--ease), background 0.45s var(--ease);
}

.logo:hover .logo-dot { transform: rotate(-8deg) scale(1.06); background: var(--rose-deep); }

.logo-word {
  font-family: var(--hand);
  font-weight: 600;
  font-size: 27px;
  line-height: 1;
}

.logo-word em { color: var(--rose); font-style: normal; }

.nav { display: flex; gap: 30px; }

.nav a {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink-soft);
  background: linear-gradient(var(--rose), var(--rose)) left bottom / 0% 1.5px no-repeat;
  padding-bottom: 3px;
  transition: color 0.35s var(--ease), background-size 0.45s var(--ease);
}

.nav a:hover { color: var(--rose-deep); background-size: 100% 1.5px; }

.header .pill { padding: 11px 24px; }

.menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: none;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  z-index: 120;
}

.menu-btn span {
  width: 26px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.4s var(--ease);
}

.menu-btn.open span:first-child { transform: translateY(4.5px) rotate(45deg); }
.menu-btn.open span:last-child { transform: translateY(-4.5px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: color-mix(in srgb, var(--paper) 96%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s var(--ease);
}

.mobile-menu.open { opacity: 1; pointer-events: auto; }

.mobile-menu a {
  font-family: var(--serif);
  font-size: 30px;
  color: var(--ink);
}

.mobile-menu a.accent { color: var(--rose); font-style: italic; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 140px 0 80px;
  overflow: hidden;
}

.hero-bloom {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(560px 560px at 82% 18%, rgba(165, 86, 107, 0.1), transparent 65%),
    radial-gradient(480px 480px at 8% 88%, rgba(143, 160, 138, 0.14), transparent 65%),
    radial-gradient(420px 420px at 50% 110%, rgba(194, 154, 94, 0.1), transparent 60%);
}

/* floating petals (from v3) */
.petals {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.petal {
  position: absolute;
  will-change: transform;
  color: var(--rose);
}

.petal i {
  display: block;
  font-style: normal;
  opacity: 0.5;
}

.petal:nth-child(1) { top: 16%; left: 6%;  font-size: 26px; }
.petal:nth-child(2) { top: 68%; left: 12%; font-size: 18px; color: var(--gold); }
.petal:nth-child(3) { top: 10%; left: 44%; font-size: 20px; color: var(--sage); }
.petal:nth-child(4) { top: 26%; right: 6%; font-size: 30px; }
.petal:nth-child(5) { top: 78%; right: 14%; font-size: 16px; color: var(--gold); }
.petal:nth-child(6) { top: 52%; left: 48%; font-size: 14px; }

.hero-inner {
  position: relative;
  width: min(1240px, 94vw);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: clamp(40px, 6vw, 90px);
  align-items: center;
}

.hero-eyebrow { margin-bottom: 30px; }

.hero-title {
  font-size: clamp(46px, 6.4vw, 86px);
  line-height: 1.06;
  letter-spacing: -0.015em;
  margin-bottom: 30px;
}

.hero-title .line { display: block; overflow: hidden; padding-bottom: 0.08em; }

.hero-title em { color: var(--rose); }

/* split chars (blur opening) & split words */
.w { display: inline-block; white-space: nowrap; }
.ch { display: inline-block; will-change: transform, filter; }
/* Horizontal padding + negative margin give italic glyph overhang room inside the mask */
.wl { display: inline-block; overflow: hidden; vertical-align: bottom; padding-inline: 0.12em; margin-inline: -0.12em; }
.wi { display: inline-block; will-change: transform; }

.hero-sub {
  font-size: 18.5px;
  color: var(--ink-soft);
  max-width: 44ch;
  margin-bottom: 38px;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 26px;
  margin-bottom: 54px;
}

.hero-foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.hero-foot i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
}

/* secondary classes: quieter than the IELTS line */
.hero-foot .foot-also {
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0.03em;
  opacity: 0.66;
}

/* hero media */
.hero-media { position: relative; }

.hero-tilt {
  position: relative;
  transform-style: preserve-3d;
  will-change: transform;
}

.hero-photo {
  border-radius: 999px 999px 28px 28px;
  overflow: hidden;
  aspect-ratio: 4 / 5.1;
  box-shadow: 0 34px 80px -30px rgba(111, 54, 72, 0.4);
  clip-path: inset(6% 8% 6% 8% round 999px 999px 28px 28px);
}

.hero-photo img {
  width: 100%;
  height: 112%;
  object-fit: cover;
  object-position: 62% 20%;
  will-change: transform;
}

.hero-badge {
  position: absolute;
  left: -54px;
  bottom: 60px;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--paper);
  box-shadow: 0 18px 44px -18px rgba(55, 41, 46, 0.3);
  transform: translateZ(40px);
}

.hero-badge svg {
  width: 116px;
  height: 116px;
  overflow: visible;
}

/* only the outer ring text spins; the 8.0 core stays still */
.hero-badge .ring-spin {
  transform-origin: 60px 60px;
  animation: spin 22s linear infinite;
}

.hero-badge svg text {
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  fill: var(--rose-deep);
}

.ring-core { fill: var(--rose-mist); }

.ring-score {
  font-family: var(--serif) !important;
  font-style: italic;
  font-size: 20px !important;
  letter-spacing: 0 !important;
  fill: var(--rose-deep) !important;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* scroll hint */
.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.scroll-hint i {
  width: 1.5px;
  height: 44px;
  background: linear-gradient(var(--rose), transparent);
  animation: drip 2.2s var(--ease) infinite;
  transform-origin: top;
}

@keyframes drip {
  0% { transform: scaleY(0); }
  45% { transform: scaleY(1); }
  100% { transform: scaleY(1); opacity: 0; }
}

/* ---------- Marquee ---------- */
.marquee {
  padding: 26px 0;
  border-block: 1px solid var(--line);
  background: var(--paper-2);
  overflow: hidden;
}

.marquee-track {
  display: flex;
  width: max-content;
  will-change: transform;
}

.marquee-inner {
  display: flex;
  align-items: center;
  flex: none;
}

.marquee-inner span {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(22px, 3vw, 34px);
  color: var(--ink);
  padding: 0 28px;
  white-space: nowrap;
}

.marquee-inner b {
  color: var(--rose);
  font-size: 18px;
}

/* ---------- Note (scroll-brighten) ---------- */
.note { padding: clamp(110px, 14vw, 190px) 0; }

.note-inner {
  width: min(880px, 90vw);
  margin-inline: auto;
}

.note-text {
  font-family: var(--serif);
  font-size: clamp(26px, 3.6vw, 44px);
  line-height: 1.42;
  text-align: center;
  color: var(--ink);
  margin-bottom: 40px;
}

.note-text em { color: var(--rose); }

.note-text .bw { opacity: 0.14; display: inline-block; }

.note-sig {
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 26px;
  color: var(--rose-deep);
}

.note-sig .heart { color: var(--rose); }

/* ---------- About ---------- */
.about {
  background: var(--paper-2);
  border-block: 1px solid var(--line);
  padding: clamp(100px, 12vw, 160px) 0;
}

.about-inner {
  width: min(1180px, 92vw);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(50px, 7vw, 110px);
  align-items: center;
}

.about-media { position: relative; }

.about-frame {
  position: relative;
  padding: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: 0 30px 70px -32px rgba(55, 41, 46, 0.35);
  transform: rotate(-2deg);
  transform-style: preserve-3d;
  will-change: transform;
}

.about-photo {
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 4 / 4.7;
}

.about-photo img {
  width: 100%;
  height: 114%;
  object-fit: cover;
  object-position: 55% 22%;
  will-change: transform;
}

.about-stamp {
  position: absolute;
  right: -14px;
  bottom: -18px;
  transform: rotate(3deg);
  background: var(--rose);
  color: var(--paper);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 10px 18px;
  border-radius: 999px;
  box-shadow: 0 14px 30px -14px rgba(111, 54, 72, 0.6);
}

.h2 {
  font-size: clamp(34px, 4.4vw, 56px);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin-bottom: 28px;
}

.h2 em { color: var(--rose); }

.about-copy p { color: var(--ink-soft); max-width: 56ch; }

.stats {
  display: flex;
  gap: clamp(30px, 5vw, 60px);
  margin-top: 42px;
  padding-top: 34px;
  border-top: 1px solid var(--line);
}

.stat-num {
  font-family: var(--serif);
  font-size: clamp(34px, 4vw, 48px);
  color: var(--rose-deep);
  line-height: 1;
  display: block;
  font-variant-numeric: tabular-nums;
}

.stat-cap {
  display: block;
  margin-top: 8px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---------- Courses ---------- */
.courses { padding: clamp(100px, 12vw, 170px) 0; }

.courses-head {
  width: min(1180px, 92vw);
  margin: 0 auto clamp(50px, 6vw, 80px);
}

.course-list {
  list-style: none;
  margin: 0;
  padding: 0;
  width: min(1180px, 92vw);
  margin-inline: auto;
  border-top: 1px solid var(--line);
}

.course-row {
  position: relative;
  display: grid;
  grid-template-columns: 80px 1.1fr 1.3fr 60px;
  align-items: center;
  gap: clamp(18px, 3vw, 44px);
  padding: clamp(30px, 4vw, 46px) clamp(10px, 2vw, 26px);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  cursor: default;
}

.course-row::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--rose-mist);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.55s var(--ease);
  z-index: -1;
}

.course-row:hover::before { transform: scaleY(1); transform-origin: top; }

.course-idx {
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  color: var(--gold);
}

.course-main h3 {
  font-size: clamp(26px, 3.2vw, 40px);
  letter-spacing: -0.01em;
  transition: transform 0.5s var(--ease), color 0.5s var(--ease);
}

.course-row:hover .course-main h3 {
  transform: translateX(10px);
  color: var(--rose-deep);
}

.course-tags {
  margin: 8px 0 0;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.course-desc {
  margin: 0;
  font-size: 15.5px;
  color: var(--ink-soft);
  max-width: 46ch;
}

.course-arrow {
  font-family: var(--serif);
  font-size: 30px;
  color: var(--rose);
  justify-self: end;
  transition: transform 0.5s var(--ease);
}

.course-row:hover .course-arrow { transform: translateX(8px) rotate(-45deg); }

.courses-note {
  width: min(1180px, 92vw);
  margin: 34px auto 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 19px;
  color: var(--ink-soft);
}

/* Secondary classes stay deliberately small: IELTS keeps the stage */
.also-strip {
  width: min(1180px, 92vw);
  margin: 14px auto 0;
  font-size: 13.5px;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  opacity: 0.85;
}

.also-strip b {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ---------- Programs (the IELTS courses) ---------- */
.programs { padding: clamp(10px, 2vw, 30px) 0 clamp(100px, 12vw, 170px); }

.programs-head {
  width: min(1180px, 92vw);
  margin: 0 auto clamp(50px, 6vw, 80px);
}

.program-grid {
  width: min(1180px, 92vw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(18px, 2.4vw, 30px);
}

.program-card {
  display: flex;
  flex-direction: column;
  padding: clamp(28px, 3.4vw, 44px) clamp(24px, 2.8vw, 34px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  transition: transform 0.55s var(--ease), background-color 0.55s var(--ease),
    border-color 0.55s var(--ease), box-shadow 0.55s var(--ease);
}

.program-card:hover {
  transform: translateY(-8px);
  background: var(--rose-mist);
  border-color: transparent;
  box-shadow: 0 24px 50px -30px rgba(111, 54, 72, 0.35);
}

.program-idx {
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  color: var(--gold);
  margin-bottom: 18px;
}

.program-card h3 {
  font-size: clamp(24px, 2.4vw, 30px);
  letter-spacing: -0.01em;
  transition: color 0.5s var(--ease);
}

.program-card:hover h3 { color: var(--rose-deep); }

.program-tags {
  margin: 10px 0 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.program-desc {
  margin: 0;
  font-size: 15.5px;
  color: var(--ink-soft);
}

.program-foot {
  margin-top: auto;
  padding-top: 26px;
  font-size: 13.5px;
  color: var(--ink-soft);
}

.program-foot em {
  font-family: var(--serif);
  color: var(--rose);
}

.programs .also-strip { margin-top: 36px; }

/* ---------- Journey (pinned horizontal) ---------- */
.journey {
  background: var(--ink);
  color: var(--paper);
}

.journey-pin {
  height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.journey-track {
  display: flex;
  align-items: center;
  gap: clamp(30px, 4vw, 64px);
  padding-inline: max(4vw, 40px);
  will-change: transform;
}

.j-card { flex: none; }

.j-intro {
  width: min(480px, 78vw);
}

.j-intro .eyebrow { color: var(--gold); }

.j-intro .h2 {
  color: var(--paper);
  font-size: clamp(38px, 5vw, 64px);
}

.j-intro .h2 em { color: var(--rose-mist); }

.j-hint {
  display: inline-block;
  margin-top: 26px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(250, 246, 240, 0.55);
}

figure.j-card { margin: 0; }

.j-img {
  width: min(400px, 74vw);
  aspect-ratio: 3 / 3.8;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 30px 70px -28px rgba(0, 0, 0, 0.55);
}

.j-tall .j-img { width: min(340px, 66vw); aspect-ratio: 3 / 4.4; }

/* Landscape card: full frame, no parallax overflow, so both subjects stay visible */
.j-wide .j-img { width: min(608px, 90vw); aspect-ratio: 6 / 5; }

.j-wide .j-img img { width: 100%; }

.j-img img {
  width: 118%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
}

figure.j-card:nth-of-type(odd) { transform: rotate(1.4deg); }
figure.j-card:nth-of-type(even) { transform: rotate(-1.6deg); }

.j-card figcaption {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 18px;
}

.j-card figcaption b {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 20px;
  color: var(--gold);
}

.j-card figcaption span {
  font-size: 13.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(250, 246, 240, 0.66);
}

.j-last .j-img { outline: 1.5px solid var(--gold); outline-offset: 10px; }

/* ---------- Words (stacking cards) ---------- */
.words { padding: clamp(100px, 12vw, 160px) 0 clamp(60px, 8vw, 110px); }

.words-head { margin-bottom: clamp(40px, 5vw, 70px); }

.h2.center { text-align: center; }

.stack {
  width: min(760px, 90vw);
  margin-inline: auto;
}

.stack-card {
  position: sticky;
  top: 16vh;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: clamp(34px, 5vw, 56px);
  margin-bottom: 34px;
  box-shadow: 0 24px 60px -30px rgba(55, 41, 46, 0.35);
  will-change: transform;
}

.stack-card:nth-child(1) { background: #fdfaf5; }
.stack-card:nth-child(2) { background: #faf1ee; }
.stack-card:nth-child(3) { background: #f4efe6; }

.stack-quote {
  font-family: var(--serif);
  font-size: clamp(20px, 2.6vw, 27px);
  line-height: 1.5;
  color: var(--ink);
  margin-bottom: 30px;
}

.stack-card footer {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  color: var(--ink-soft);
}

.stack-card footer b { color: var(--ink); font-size: 15px; }

.stack-ava {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--rose-mist);
  color: var(--rose-deep);
  font-weight: 700; /* heaviest weight actually loaded for Karla */
  display: grid;
  place-items: center;
  flex: none;
}

.stack-stars {
  margin-left: auto;
  color: var(--gold);
  letter-spacing: 3px;
}

/* ---------- Hello ---------- */
.hello {
  position: relative;
  padding: clamp(110px, 14vw, 190px) 0;
  background: var(--paper-2);
  border-top: 1px solid var(--line);
  overflow: hidden;
}

.hello::before {
  content: "";
  position: absolute;
  width: 640px;
  height: 640px;
  border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--rose) 25%, transparent);
  left: 50%;
  top: -420px;
  transform: translateX(-50%);
  pointer-events: none;
}

.hello-inner {
  width: min(980px, 92vw);
  margin-inline: auto;
  text-align: center;
}

.hello-title {
  font-size: clamp(52px, 9vw, 120px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 26px;
}

.hello-title em { color: var(--rose); }

.hello-sub {
  color: var(--ink-soft);
  font-size: 18px;
  max-width: 52ch;
  margin: 0 auto 44px;
}

/* JS-off fallback for the runtime-assembled contact links */
.hello-noscript {
  font-family: var(--serif);
  font-style: italic;
  font-size: 19px;
  color: var(--rose-deep);
  margin: 0 0 24px;
}

.hello-mail {
  display: inline-block;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(22px, 3.6vw, 40px);
  color: var(--rose-deep);
  margin-bottom: 60px;
  background: linear-gradient(var(--rose), var(--rose)) left bottom / 100% 2px no-repeat;
  padding-bottom: 6px;
  transition: color 0.4s var(--ease), background-size 0.5s var(--ease);
}

.hello-mail:hover { color: var(--rose); }

.hello-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  text-align: left;
}

.hello-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px 28px;
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}

.hello-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 44px -20px rgba(55, 41, 46, 0.3);
}

.hello-card .lbl {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--rose);
  margin-bottom: 10px;
}

.hello-card .val {
  font-size: 16.5px;
  font-weight: 600;
  line-height: 1.55;
  color: var(--ink);
}

/* ---------- Footer (from v3) ---------- */
.footer {
  background: var(--ink);
  color: rgba(250, 246, 240, 0.72);
  padding: 30px 0 0;
  overflow: hidden;
}

.footer-big {
  border-bottom: 1px solid rgba(250, 246, 240, 0.12);
  padding: 30px 0 36px;
  margin-bottom: 46px;
  overflow: hidden;
}

/* Signature scales via viewBox; stroke-only by default so the
   no-JS/reduced-motion state is the fully "written" mark. */
.footer-sig {
  display: block;
  width: min(1100px, 92vw);
  height: auto;
  margin-inline: auto;
  overflow: visible;
}

.footer-sig-text {
  font-family: var(--hand);
  font-weight: 600;
  font-size: 180px;
  fill: transparent;
  stroke: rgba(250, 246, 240, 0.55);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: fill 1s var(--ease);
}

.footer-big:hover .footer-sig-text { fill: rgba(250, 246, 240, 0.9); }

.footer-inner {
  width: min(1240px, 94vw);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 44px;
}

.footer-col { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }

.footer-brand p { margin: 14px 0 0; font-size: 14.5px; }

.footer .logo-word { color: var(--paper); }
.footer .logo-word em { color: var(--rose-mist); }

.footer-h {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}

.footer-col a {
  font-size: 15px;
  background: linear-gradient(var(--rose-mist), var(--rose-mist)) left bottom / 0% 1px no-repeat;
  padding-bottom: 2px;
  transition: background-size 0.45s var(--ease), color 0.35s var(--ease);
}

.footer-col a:hover { color: var(--paper); background-size: 100% 1px; }

/* Direct children only, so the nested logo spans keep their own sizes */
.footer-col > span { font-size: 15px; }

.footer-bar {
  width: 100%;
  border-top: 1px solid rgba(250, 246, 240, 0.12);
  padding: 20px max(3vw, 24px);
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.footer-bar p { font-size: 13.5px; margin: 0; }

.footer-bar .heart { color: var(--rose); display: inline-block; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  /* The full nav + pill no longer fit next to the logo below ~980px,
     so the overlay menu takes over together with the one-column layout */
  .nav, .header .pill { display: none; }
  .menu-btn { display: flex; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero { padding-top: 120px; }
  .hero-media { max-width: 430px; margin-inline: auto; }
  .hero-badge { left: auto; right: -16px; bottom: -22px; }
  .about-inner { grid-template-columns: 1fr; }
  .course-row { grid-template-columns: 50px 1fr 44px; }
  .course-desc { grid-column: 2 / 3; }
  .program-grid { grid-template-columns: 1fr; }
  .hello-cards { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 30px; }
}

@media (max-width: 760px) {
  .hero-title { font-size: clamp(42px, 11vw, 60px); }
  /* Keep the overhanging accents inside the viewport on narrow screens */
  .hero-badge { right: -4px; }
  .about-stamp { right: 2px; }
  .stats { flex-wrap: wrap; }
  .scroll-hint { display: none; }
  .petal { display: none; }
}

/* Short viewports (landscape phones): size the moments cards by height
   so the photo and its caption both fit inside the pinned screen */
@media (max-height: 560px) {
  .j-img { width: auto; height: min(56svh, 300px); }
  .j-tall .j-img { width: auto; height: min(52svh, 280px); }
  .j-wide .j-img { width: auto; height: min(48svh, 260px); }
}

/* ---------- No-motion fallback ----------
   `html.no-motion` is set by main.js when GSAP is unavailable or the user
   prefers reduced motion. Without the pinned horizontal animation the
   moments track would be clipped, so let it scroll natively instead. */
html.no-motion .journey-pin {
  height: auto;
  overflow-x: auto;
  overflow-y: hidden;
  padding-block: clamp(50px, 8vw, 90px);
  -webkit-overflow-scrolling: touch;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .preloader { display: none; }
  .hero-badge .ring-spin, .scroll-hint i { animation: none; }
  .note-text .bw { opacity: 1; }
  * { transition-duration: 0.01ms !important; }
}
