:root {
  --green: #1F7A4D;
  --green-dark: #145C38;
  --green-soft: #E3F2E6;
  --green-mid: #2E8F5C;
  --leaf: #9FD3A9;
  --yellow: #FFC93C;
  --yellow-soft: #FFF1C7;
  --yellow-light: #FFE08A;
  --pink: #F7C9D7;
  --pink-soft: #FDE7EE;
  --pink-text: #A3214F;
  --ink: #17322A;
  --ink-2: #3E574C;
  --ink-3: #4A6358;
  --cream: #FFFCF3;
  --line: #ECE5CF;
  --error: #B42318;
  --font-head: 'Mitr', sans-serif;
  --font-body: 'IBM Plex Sans Thai Looped', system-ui, sans-serif;
  --ease-soft: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { color: var(--green); }
a:hover { color: var(--green-dark); }
h1, h2, h3 { font-family: var(--font-head); font-weight: 500; margin: 0; }
p { margin: 0; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
section[id], footer[id] { scroll-margin-top: 84px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: 1200px; margin: 0 auto; padding-inline: 24px; }
.wrap-narrow { max-width: 1000px; margin: 0 auto; padding-inline: 24px; }
.eyebrow { font-size: 15px; font-weight: 600; letter-spacing: 1px; color: var(--green); }
.h2 { font-size: clamp(30px, 4vw, 46px); line-height: 1.3; }
.lead { font-size: clamp(17px, 2vw, 20px); line-height: 1.75; color: var(--ink-2); }
.muted { color: var(--ink-2); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 13px 26px; border-radius: 999px;
  text-decoration: none; font-weight: 600; font-size: 16px; border: 1.5px solid transparent;
  cursor: pointer; transition: transform .2s var(--ease-soft), background-color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: var(--green-dark); color: #fff; }
.btn-yellow { background: var(--yellow); color: var(--ink); }
.btn-yellow:hover { color: var(--ink); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { color: #fff; }
.btn-white { background: #fff; color: var(--ink); border-color: #CFE0D4; }
.btn-white:hover { color: var(--ink); }
.btn-cream { background: var(--cream); color: var(--ink); }
.btn-cream:hover { color: var(--ink); }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255, 252, 243, .9);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid #E8E1CB;
}
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; padding-block: 10px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); margin-right: auto; flex: 1 1 0; min-width: 0; }
.brand img { flex-shrink: 0; }
.nav-cta { flex: none; }
.nw { white-space: nowrap; display: inline-block; }
.brand:hover { color: var(--ink); }
.brand img { width: 48px; height: 48px; border-radius: 50%; }
.brand-name { display: flex; flex-direction: column; line-height: 1.25; }
.brand-name b { font-family: var(--font-head); font-weight: 500; font-size: 19px; }
.brand-name small { font-size: 12.5px; color: var(--ink-3); }
.nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.nav::-webkit-scrollbar { display: none; }
.nav a { padding: 10px 12px; border-radius: 999px; text-decoration: none; color: var(--ink); font-size: 15px; white-space: nowrap; transition: background-color .2s ease; }
.nav a:hover { background: var(--green-soft); }
.nav-cta { padding: 11px 20px; min-height: 44px; }
.nav a.lang-switch { border: 1.5px solid #CFE0D4; font-weight: 600; margin-left: 4px; }
.nav a.lang-switch:hover { background: #fff; border-color: var(--green); }
@media (max-width: 640px) {
  .site-header .wrap { padding-block: 8px; gap: 8px 12px; }
  .nav-cta { padding: 8px 13px; font-size: 14px; min-height: 42px; }
  .nav { order: 3; width: 100%; margin-inline: -8px; }
  .brand { gap: 10px; }
  .brand img { width: 38px; height: 38px; }
  .brand-name b { font-size: 15.5px; white-space: nowrap; }
  .brand-name small { display: none; }
}

/* photo placeholder (replace with real images later) */
.ph { position: relative; overflow: hidden; display: flex; align-items: flex-end; padding: 16px; }
.ph > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ph-label { position: relative; padding: 6px 12px; border-radius: 10px; background: rgba(255,255,255,.92); font-size: 13px; color: var(--ink-2); }

/* hero */
.hero { position: relative; padding: 72px 0 40px; }
.hero-text { position: relative; max-width: 920px; margin: 0 auto; padding-inline: 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 16px; border-radius: 999px; font-size: 14.5px; font-weight: 500; }
.chip-green { background: var(--green-soft); color: var(--green-dark); }
.chip-pink { background: var(--pink-soft); color: var(--pink-text); font-weight: 600; }
.hero h1 { font-size: clamp(32px, 6.4vw, 78px); line-height: 1.18; letter-spacing: -.5px; }
.hero h1 span { color: var(--green); }
.hero .lead { max-width: 620px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .btn-row { justify-content: center; margin-top: 6px; }
.hero-media { position: relative; width: 100%; margin: 56px 0 0; height: clamp(300px, 56vw, 720px); overflow: hidden; background: #CFE8D6; clip-path: inset(0 0 round 0px); }
.hero-media svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-media .ph-label { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); white-space: nowrap; }
.hero-media svg { transform-origin: center bottom; }
.deco { position: absolute; pointer-events: none; }

/* announcement */
.announce { background: var(--green); color: #fff; }
.announce .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding-block: 14px; }
.announce-tag { padding: 4px 12px; border-radius: 999px; background: var(--yellow); color: var(--ink); font-size: 13.5px; font-weight: 600; }
.announce a { margin-left: auto; color: var(--yellow-light); font-weight: 500; }

/* about */
.about { padding: clamp(80px, 12vw, 160px) 0; }
.statement { font-family: var(--font-head); font-weight: 500; font-size: clamp(28px, 4.2vw, 50px); line-height: 1.45; margin-top: 18px; }
.fill-text { color: transparent; -webkit-background-clip: text; background-clip: text; background-image: linear-gradient(var(--ink), var(--ink)); background-color: #B7CBBF; background-repeat: no-repeat; background-size: 100% 100%; }
.values { margin-top: 48px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.value { padding: 24px; border-radius: 24px; background: #fff; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.value span { font-size: 14px; font-weight: 600; color: var(--green); }
.value b { font-family: var(--font-head); font-weight: 500; font-size: 21px; line-height: 1.5; }
.value.pink { background: var(--pink-soft); border-color: #F6C9D6; }
.value.pink span { color: var(--pink-text); }
.vision { margin-top: 16px; padding: clamp(24px, 4vw, 40px); border-radius: 28px; background: var(--green); color: #fff; display: flex; flex-direction: column; gap: 12px; }
.vision span { font-size: 14px; font-weight: 600; color: var(--yellow); }
.vision p { font-size: clamp(17px, 2vw, 20px); line-height: 1.85; }

/* stats */
.stats { margin-top: 16px; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; }
.stats > div, .stats > a { padding: 22px 24px; border-radius: 24px; background: #fff; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.stats b { font-family: var(--font-head); font-weight: 500; font-size: clamp(36px, 4.4vw, 48px); line-height: 1.1; color: var(--green); font-variant-numeric: tabular-nums; }
.stats > div:nth-child(2) b { color: #B07A00; }
.stats > div:nth-child(3) b { color: var(--pink-text); }
.stats span { font-size: 15px; color: var(--ink-2); }
/* จำนวนบุคลากร กดเข้าทำเนียบได้ */
.stat-link { text-decoration: none; color: inherit; transition: transform .25s var(--ease-soft), box-shadow .25s ease, border-color .25s ease; }
.stat-link:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(23,50,42,.10); border-color: var(--green); color: inherit; }
.stat-link em { margin-top: 6px; font-style: normal; font-size: 14px; font-weight: 600; color: var(--green); }
.about-foot { margin-top: 16px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }

/* calendar */
.cal-sec { padding: 100px 0; background: var(--cream); }
.cal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px; align-items: start; }
.days { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.days li { display: flex; gap: 16px; align-items: center; padding: 14px 16px; border-radius: 20px; background: #fff; border: 1px solid var(--line); }
.days li[hidden] { display: none; }
.dbox { width: 60px; height: 60px; flex-shrink: 0; border-radius: 16px; background: var(--green-soft); color: var(--green-dark); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; }
.days li:nth-child(even) .dbox { background: var(--pink-soft); color: var(--pink-text); }
.dbox b { font-family: var(--font-head); font-weight: 500; font-size: 22px; }
.dbox small { font-size: 12.5px; }
.days li > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.days strong { font-family: var(--font-head); font-weight: 500; font-size: 17px; }
.days li small { font-size: 14px; color: var(--ink-3); }

/* fees */
.fee-sec { padding: 110px 0 40px; }
.fee-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; align-items: start; }
.fee { padding: 26px; border-radius: 28px; background: #fff; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.fee-0 { background: var(--pink-soft); border-color: #F6C9D6; }
.fee-1 { background: var(--yellow-soft); border-color: #F5E2A8; }
.fee-2 { background: var(--green-soft); border-color: #CDE6D4; }
.fee-level { font-family: var(--font-head); font-size: 20px; }
.fee-total { font-size: 16px; color: var(--ink-2); }
.fee-total b { font-family: var(--font-head); font-weight: 500; font-size: 40px; color: var(--ink); font-variant-numeric: tabular-nums; }
.fee details { margin-top: 4px; }
.fee summary { cursor: pointer; font-weight: 600; color: var(--green); min-height: 44px; display: flex; align-items: center; list-style: none; }
.fee summary::-webkit-details-marker { display: none; }
.fee summary::after { content: '+'; margin-left: 8px; font-size: 20px; transition: transform .25s var(--ease-soft); }
.fee details[open] summary::after { transform: rotate(45deg); }
.fee ul { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.fee li { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 8px; border-bottom: 1px dashed rgba(23,50,42,.15); }
.fee li span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.fee details[open] ul { animation: enter .35s var(--ease-soft) both; }
.fee-note { margin-top: 18px; font-size: 15px; line-height: 1.8; color: var(--ink-2); }

/* map */
.map-box { display: flex; flex-direction: column; gap: 10px; }
.map-frame { width: 100%; height: 240px; border: 0; border-radius: 22px; background: var(--green-mid); }

/* levels (stacked sticky cards) */
.levels { padding: 40px 0 120px; }
.stack { display: flex; flex-direction: column; gap: 28px; margin-top: 40px; }
.level-card {
  position: sticky; min-height: 380px; padding: clamp(28px, 4vw, 52px); border-radius: 36px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 32px; align-items: center;
  box-shadow: 0 -8px 30px rgba(23, 50, 42, .08);
}
.stack::after { content: ''; height: 140px; margin-top: -28px; }  /* room so the last card settles before the stack releases */
.level-card:nth-child(1) { top: 100px; background: var(--green-soft); }
.level-card:nth-child(2) { top: 124px; background: var(--yellow-soft); }
.level-card:nth-child(3) { top: 148px; background: var(--green); color: #fff; }
.level-card > div:first-child { display: flex; flex-direction: column; gap: 14px; }
.level-card h3 { font-size: clamp(28px, 3.4vw, 40px); }
.level-card p { font-size: 17px; line-height: 1.75; color: var(--ink-2); }
.level-card:nth-child(3) p { color: var(--green-soft); }
.level-card .note { font-size: 15px; color: var(--ink-3); }
.level-card:nth-child(3) .note { color: #CFE8D6; }
.level-tag { align-self: flex-start; padding: 6px 14px; border-radius: 999px; background: #fff; color: var(--green-dark); font-size: 14px; font-weight: 600; }
.level-card:nth-child(2) .level-tag { color: #7A5300; }
.level-card:nth-child(3) .level-tag { background: var(--yellow); color: var(--ink); }
.level-card .ph { height: 260px; border-radius: 26px; }
@media (max-width: 640px) {
  .stack { gap: 20px; }
  .stack::after { content: ''; height: 180px; margin-top: -20px; }  /* room so the last card settles before the stack releases */
  .level-card { min-height: 0; padding: 24px 22px; gap: 18px; border-radius: 28px; box-shadow: 0 -10px 28px rgba(23, 50, 42, .12); }
  .level-card:nth-child(1) { top: calc(var(--header-h, 110px) + 12px); }
  .level-card:nth-child(2) { top: calc(var(--header-h, 110px) + 26px); }
  .level-card:nth-child(3) { top: calc(var(--header-h, 110px) + 40px); }
  .level-card > div:first-child { gap: 10px; }
  .level-card p { font-size: 16px; line-height: 1.7; }
  .level-card .ph { height: 170px; border-radius: 20px; }
}

/* a day at school (sticky media + steps) */
.day-sec { padding: 120px 0; background: #F1F8F1; }
.day { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px; timeline-scope: --d1, --d2, --d3, --d4, --d5; margin-top: 48px; }
.day-media { position: sticky; top: calc(var(--header-h, 72px) + 32px); height: min(560px, calc(100vh - var(--header-h, 72px) - 64px)); }
.dm { position: absolute; inset: 0; opacity: 0; border-radius: 32px; padding: 20px; }
.dm1 { opacity: 1; }
.dstep { min-height: 62vh; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.dstep span { font-family: var(--font-head); font-size: 16px; color: var(--green); }
.dstep h3 { font-size: clamp(24px, 2.8vw, 34px); }
.dstep p { font-size: 17px; line-height: 1.8; color: var(--ink-2); }
@media (max-width: 820px) {
  .day { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  /* phone: photo sticks just under the menu; the story scrolls up beneath it */
  .day-media { top: var(--header-h, 110px); height: calc(min(46vh, 380px) + 24px); z-index: 2; background: #F1F8F1; padding: 12px 0; margin-inline: -24px; padding-inline: 24px; }
  .day-media .dm { inset: 12px 24px; border-radius: 26px; }
  .day-media::after { content: ''; position: absolute; left: 0; right: 0; bottom: -28px; height: 28px; background: linear-gradient(#F1F8F1, rgba(241, 248, 241, 0)); pointer-events: none; }
  .dstep { min-height: calc(100vh - var(--header-h, 110px) - min(46vh, 380px) - 24px); padding-block: 32px; justify-content: center; }
  .dstep:last-child { min-height: 0; padding-bottom: 48px; }
}

/* news */
.news-sec { padding: 120px 0; }
.sec-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 36px; }
.sec-head > div { display: flex; flex-direction: column; gap: 10px; }
.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.news-card { display: flex; flex-direction: column; border-radius: 28px; background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--ink); overflow: hidden; }
.news-card:hover { color: var(--ink); }
.news-card .ph { height: 280px; }
.news-card .body { padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.news-meta { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--ink-3); }
.news-meta b { padding: 4px 10px; border-radius: 999px; background: var(--yellow-soft); color: #7A5300; font-weight: 600; }
.news-card h3 { font-size: 22px; line-height: 1.45; }
.zoom { overflow: hidden; }
.zoom > * { transition: transform .6s var(--ease-soft); }
.zoom:hover > *, a:hover .zoom > * { transform: scale(1.05); }

/* gallery mosaic */
.gal-sec { padding: 120px 0; background: var(--ink); color: #fff; }
.gal-sec .eyebrow { color: var(--yellow); }
.gal-sec .sub { font-size: 15.5px; color: #CFE0D4; }
.mosaic { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 190px; gap: 14px; }
.mosaic a { position: relative; border-radius: 24px; display: block; overflow: hidden; }
.mosaic a > div { width: 100%; height: 100%; transition: transform .6s var(--ease-soft); }
.mosaic a:hover > div { transform: scale(1.05); }
.mosaic .ph-label { position: absolute; left: 14px; bottom: 14px; }
.t-big { grid-column: span 2; grid-row: span 2; }
.t-wide { grid-column: span 2; }
.t-tall { grid-row: span 2; }
@media (max-width: 820px) { .mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 150px; } }

/* admission */
.adm-sec { padding: 120px 0; background: var(--yellow); }
.adm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 48px; align-items: start; }
.adm-grid > div { display: flex; flex-direction: column; gap: 16px; }
.adm-sec .eyebrow { color: #5C3F00; }
.adm-sec h2 { font-size: clamp(32px, 4.4vw, 52px); line-height: 1.25; }
.adm-sec .lead { color: #3B2E0A; font-size: 17px; }
.call-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
.call { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 10px 14px; border-radius: 14px; background: rgba(255,252,243,.7); color: var(--ink); text-decoration: none; font-size: 15px; transition: background-color .2s ease; }
.call:hover { background: var(--cream); color: var(--ink); }
.call span { display: flex; flex-direction: column; line-height: 1.35; }
.call b { font-weight: 600; }
.call small { font-size: 13px; color: #5C3F00; }
.checks { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; font-size: 15.5px; }
.checks span { display: flex; gap: 8px; align-items: flex-start; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.steps li { display: flex; gap: 18px; align-items: flex-start; padding: 22px; border-radius: 24px; background: var(--cream); }
.steps .num { width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; background: var(--green); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--font-head); font-size: 19px; }
.steps li > span:last-child { display: flex; flex-direction: column; gap: 4px; }
.steps strong { font-family: var(--font-head); font-weight: 500; font-size: 19px; }
.steps small { font-size: 15.5px; line-height: 1.7; color: var(--ink-2); }

/* services */
.svc-sec { padding: 100px 0; }
.svc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.svc { padding: 28px; border-radius: 28px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 10px; transition: transform .25s var(--ease-soft); }
.svc:hover { color: var(--ink); transform: translateY(-4px); }
.svc strong { font-family: var(--font-head); font-weight: 500; font-size: 20px; }
.svc small { font-size: 15.5px; line-height: 1.7; color: var(--ink-2); }

/* footer */
.site-footer { padding: 80px 0 40px; background: var(--green-dark); color: #fff; }
.foot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 40px; }
.foot-grid > div { display: flex; flex-direction: column; gap: 10px; }
.foot-title { font-family: var(--font-head); font-size: 24px; }
.foot-addr { font-size: 15.5px; line-height: 1.8; color: #D6EBDD; }
.foot-head { font-family: var(--font-head); font-size: 18px; color: var(--yellow); }
.pill { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 16px; border-radius: 14px; background: rgba(255,255,255,.1); color: #fff; text-decoration: none; font-size: 15.5px; transition: background-color .2s ease; }
.pill:hover { background: rgba(255,255,255,.18); color: #fff; }
.map-card { min-height: 200px; border-radius: 22px; background: var(--green-mid); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-decoration: none; color: #fff; text-align: center; padding: 20px; transition: transform .25s var(--ease-soft); }
.map-card:hover { color: #fff; transform: translateY(-3px); }
.map-card .pin { width: 56px; height: 56px; border-radius: 50%; background: var(--yellow); color: var(--ink); display: flex; align-items: center; justify-content: center; }
.map-card b { font-family: var(--font-head); font-weight: 500; font-size: 19px; }
.map-card small { font-size: 14px; color: #D6EBDD; }
.foot-bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--green-mid); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 14px; color: #CFE8D6; }
.foot-bottom a { color: var(--yellow-light); }

/* ---------- scroll effects (progressive enhancement) ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(48px); } to { opacity: 1; transform: none; } }
@keyframes grow { from { clip-path: inset(0 11% round 40px); } to { clip-path: inset(0 0% round 0px); } }
@keyframes settle { from { transform: scale(1.12); } to { transform: none; } }
@keyframes driftS { to { transform: translateY(-110px) rotate(8deg); } }
@keyframes driftF { to { transform: translateY(-260px) rotate(-14deg); } }
@keyframes fillText { to { background-size: 100% 100%; } }
@keyframes showM { 0% { opacity: 0; transform: scale(.95); } 22%, 78% { opacity: 1; transform: none; } 100% { opacity: 0; transform: scale(1.02); } }
@keyframes enter { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
@keyframes popBig { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: no-preference) {
  .enter { animation: enter .55s var(--ease-soft) both; }
  .fade { animation: fade .3s ease both; }
  .pop { animation: pop .45s var(--ease-soft) both; }
  .pop-big { animation: popBig .6s cubic-bezier(.34, 1.56, .64, 1) both; }
  @supports (animation-timeline: view()) {
    .reveal { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 90%; }
    .hero-media { animation: grow linear both; animation-timeline: view(); animation-range: entry 10% cover 50%; }
    .hero-media svg, .hero-media img { animation: settle linear both; animation-timeline: view(); animation-range: entry 10% cover 50%; }
    .drift-slow { animation: driftS linear both; animation-timeline: scroll(root); animation-range: 0 110vh; }
    .drift-fast { animation: driftF linear both; animation-timeline: scroll(root); animation-range: 0 110vh; }
    .fill-text { background-size: 0% 100%; animation: fillText linear both; animation-timeline: view(); animation-range: cover 18% cover 62%; }
  }
  @supports (timeline-scope: --x) {
    .dstep1 { view-timeline-name: --d1; } .dstep2 { view-timeline-name: --d2; } .dstep3 { view-timeline-name: --d3; } .dstep4 { view-timeline-name: --d4; } .dstep5 { view-timeline-name: --d5; }
    .dm { animation: showM linear both; animation-range: cover 22% cover 78%; }
    .dm1 { animation-timeline: --d1; } .dm2 { animation-timeline: --d2; } .dm3 { animation-timeline: --d3; } .dm4 { animation-timeline: --d4; } .dm5 { animation-timeline: --d5; }
  }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
