/* =====================================================================
   Eduvalle — premium visual + motion layer (replaces eduvelle-motion.css)
   Load AFTER the main stylesheet. Scoped to the homepage through the
   [data-sec] hooks / .hero classes added in home.php, so other pages are
   untouched. All movement is gated on prefers-reduced-motion: no-preference.
   ===================================================================== */

:root {
  --ev-green: #002e24;
  --ev-emerald: #0e7a5c;
  --ev-mint: #d9f3e7;
  --ev-lav: #ece9fb;
  --ev-blue: #e1edfb;
  --ev-cream: #faf4e8;
  --ev-cyan: #dcf3f3;
  --ev-ease: cubic-bezier(.22, 1, .36, 1);
  --ev-line: rgba(0, 46, 36, .09);
  --ev-shadow-1: 0 1px 2px rgba(0, 46, 36, .04), 0 10px 26px -14px rgba(0, 46, 36, .16);
  --ev-shadow-2: 0 2px 4px rgba(0, 46, 36, .05), 0 26px 48px -20px rgba(0, 46, 36, .32);
}
@property --ev-ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

body { overflow-x: clip; } /* full-bleed section washes below use 100vw */

/* ---------- Tones used by category / subject marks ---------- */
[data-tone="0"] { --t: var(--ev-mint); --tc: #0b6a50; }
[data-tone="1"] { --t: var(--ev-lav);  --tc: #5b4bb5; }
[data-tone="2"] { --t: var(--ev-blue); --tc: #1f5fa8; }
[data-tone="3"] { --t: var(--ev-cream); --tc: #8a6414; }
[data-tone="4"] { --t: var(--ev-cyan); --tc: #0f6d73; }
.mark {
  display: inline-grid; place-items: center; flex: none;
  width: 36px; height: 36px; border-radius: 12px;
  background: var(--t, var(--ev-mint)); color: var(--tc, #0b6a50);
  font-weight: 700; font-size: .95rem; text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), inset 0 0 0 1px rgba(0, 46, 36, .05);
}

/* =====================================================================
   SITEWIDE BASE — every public page (body.ev-site, set in public.php).
   Admin pages never get this class, so they are untouched.
   Placed before the hero rules so the hero/search overrides win ties.
   ===================================================================== */
body.ev-site { position: relative; isolation: isolate; }
body.ev-site::before { /* soft ambient wash behind the top of every inner page */
  content: ""; position: absolute; z-index: -1; top: 0; left: 0; right: 0; height: 460px; pointer-events: none;
  background: radial-gradient(520px 320px at 12% 0%, rgba(31, 174, 133, .10), transparent 70%),
              radial-gradient(520px 320px at 88% 0%, rgba(99, 150, 235, .09), transparent 70%);
  -webkit-mask-image: linear-gradient(#000 40%, transparent); mask-image: linear-gradient(#000 40%, transparent);
}
body.ev-site:has(.hero)::before { display: none; } /* the homepage hero draws its own background */

/* Header: glass bar, soft shadow once scrolled */
.ev-site .site-header { background: rgba(255, 255, 255, .72); border-bottom-color: transparent; box-shadow: 0 1px 0 var(--ev-line);
  -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px); }
.ev-site .site-header.is-scrolled { background: rgba(255, 255, 255, .9); box-shadow: 0 1px 0 var(--ev-line), 0 14px 32px -20px rgba(0, 46, 36, .35); }
.ev-site .nav-link { position: relative; }
.ev-site .nav-link::after { content: ""; position: absolute; left: .875rem; right: .875rem; bottom: .9rem; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, #1fae85, #6aa8f0); transform: scaleX(0); transform-origin: left; }
.ev-site .nav-item:hover > .nav-link::after, .ev-site .nav-item:focus-within > .nav-link::after,
.ev-site .nav-item.is-open > .nav-link::after, .ev-site .nav-link.is-active::after { transform: scaleX(1); }
.ev-site .nav-link.is-active { color: var(--ev-green); font-weight: 600; }

/* Mega menu */
.ev-site .mega { background: linear-gradient(180deg, #fff, #f4fbf8);
  border-bottom-color: var(--ev-line); box-shadow: 0 34px 60px -30px rgba(0, 46, 36, .38); }
.ev-site .mega-link { border-radius: 12px; }
.ev-site .mega-link:hover { background: rgba(217, 243, 231, .55); }
.ev-site .mega-link .ico { border-radius: 10px; border-color: transparent; background: var(--ev-mint); color: var(--ev-emerald); }
.ev-site .mega-link:hover .ico { background: var(--ev-green); color: #fff; }
.ev-site .mega-group-title { color: var(--ev-emerald); }

/* Buttons */
.ev-site .btn { border-radius: 12px; }
.ev-site .btn-sm { border-radius: 10px; }
.ev-site .btn-primary { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 6px 16px -8px rgba(0, 46, 36, .55); }
.ev-site .btn-primary:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 12px 24px -10px rgba(0, 46, 36, .65); }
.ev-site .btn-secondary { border-color: rgba(0, 46, 36, .14); }
.ev-site .btn-secondary:hover { background: rgba(217, 243, 231, .5); }

/* Form fields */
.ev-site .input, .ev-site .select, .ev-site .textarea { border-radius: 12px; border-color: rgba(0, 46, 36, .14); }
.ev-site .input:focus, .ev-site .select:focus, .ev-site .textarea:focus {
  border-color: var(--ev-emerald); box-shadow: 0 0 0 4px rgba(14, 122, 92, .14); }

/* Cards: every .card in <main> gets the softer radius + layered shadow
   (zero specificity so the homepage's own card rules still win) */
:where(.ev-site main) .card { border-radius: 20px; border-color: var(--ev-line); box-shadow: var(--ev-shadow-1), inset 0 1px 0 #fff; }

/* Other shared components */
.ev-site .stat { border-radius: 18px; border-color: var(--ev-line); background: linear-gradient(180deg, #fff, rgba(255, 255, 255, .72));
  box-shadow: var(--ev-shadow-1), inset 0 1px 0 #fff; }
.ev-site .pill-tabs { border-radius: 14px; border-color: var(--ev-line); background: rgba(255, 255, 255, .75); box-shadow: var(--ev-shadow-1); }
.ev-site .pill-tabs button { border-radius: 10px; }
.ev-site .pill-tabs button.on { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 6px 14px -8px rgba(0, 46, 36, .6); }
.ev-site .tbl th { background: rgba(217, 243, 231, .35); }
.ev-site .tbl tr:hover td { background: rgba(217, 243, 231, .28); }
.ev-site .flash { border-radius: 14px; box-shadow: var(--ev-shadow-1); }
.ev-site .prose-edu img { border-radius: 16px; box-shadow: var(--ev-shadow-1); }
.ev-site .prose-edu blockquote { border-left-color: var(--ev-emerald); background: rgba(217, 243, 231, .4); border-radius: 0 14px 14px 0; padding: .9rem 1rem .9rem 1.1rem; }
.ev-site .prose-edu a { text-decoration-color: rgba(14, 122, 92, .45); }
.ev-site .prose-edu pre, .ev-site .prose-edu code { background: #f3f8f6; }
.ev-site .prose-edu pre { border-radius: 16px; }
.ev-site .link { text-decoration-color: rgba(14, 122, 92, .35); }

/* Footer */
.site-footer { position: relative; isolation: isolate; border-top-color: transparent;
  background: linear-gradient(180deg, transparent, rgba(217, 243, 231, .38) 45%, rgba(250, 244, 232, .55)); }
.site-footer::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(14, 122, 92, .35), rgba(99, 150, 235, .3), transparent); }
.site-footer .border-t { border-color: var(--ev-line); }
.site-footer ul a { display: inline-block; }
.site-footer ul a:hover { color: var(--ev-emerald); }

/* =====================================================================
   HERO
   ===================================================================== */
.hero { position: relative; isolation: isolate; text-align: center; }
.hero-copy { margin-inline: auto; }
.hero .eyebrow { display: inline-flex; align-items: center; gap: .55rem; padding: .4rem .95rem; border-radius: 999px;
  background: rgba(255, 255, 255, .75); border: 1px solid var(--ev-line); box-shadow: var(--ev-shadow-1); }
.hero .eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ev-emerald);
  box-shadow: 0 0 0 4px rgba(14, 122, 92, .15); }

.hero .hero-title { font-size: clamp(2.35rem, 6.4vw, 4.7rem); line-height: 1.04; letter-spacing: -.035em; color: var(--ev-green); text-wrap: balance; }
html[lang^="bn"] .hero .hero-title { letter-spacing: 0; line-height: 1.25; }
.hero-title .w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 .04em .14em; margin-bottom: -.14em; }
.hero-title .w > span { display: inline-block; }
.hero-title .w.hl > span {
  background: linear-gradient(100deg, #0e7a5c 0%, #1fae85 38%, #2f7fd0 68%, #0e7a5c 100%);
  background-size: 220% 100%; -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero .hero-copy > p { margin-inline: auto; max-width: 40rem; }

/* Glass search (shared with the newsletter form) */
.ev-search, .ev-pill {
  position: relative; padding: .4rem; border-radius: 22px;
  background: rgba(255, 255, 255, .78); border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: 0 0 0 1px rgba(0, 46, 36, .08), 0 24px 56px -26px rgba(0, 46, 36, .38), inset 0 1px 0 #fff;
  -webkit-backdrop-filter: blur(12px) saturate(1.3); backdrop-filter: blur(12px) saturate(1.3);
  transition: box-shadow .3s ease;
}
.ev-search { max-width: 44rem; margin-inline: auto; }
.ev-search:focus-within, .ev-pill:focus-within {
  box-shadow: 0 0 0 2px var(--ev-emerald), 0 0 0 8px rgba(14, 122, 92, .14), 0 24px 56px -26px rgba(0, 46, 36, .38), inset 0 1px 0 #fff;
}
.ev-search .input, .ev-pill .input {
  background: transparent; border-color: transparent; box-shadow: none; outline: none; border-radius: 16px;
}
.ev-search .input:focus, .ev-pill .input:focus { border-color: transparent; box-shadow: none; outline: none; }
.hero .ev-search .input { height: 3.5rem !important; padding-left: 3rem; font-size: 1.05rem; }
.ev-search-ic { position: absolute; left: 1.4rem; top: 50%; transform: translateY(-50%); color: var(--ev-emerald); display: grid; pointer-events: none; }
.hero .ev-search .btn { height: 3.5rem; border-radius: 16px; background: var(--ev-green); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 10px 22px -10px rgba(0, 46, 36, .7); }
.hero .ev-search .btn:hover { background: #07463a; }
.ev-pill .btn { border-radius: 16px; }

.hero .cta { justify-content: center; }
.hero .cta .btn { border-radius: 14px; background: rgba(255, 255, 255, .8); border: 1px solid var(--ev-line); color: var(--ev-green);
  box-shadow: var(--ev-shadow-1); }
.hero .cta .btn:hover { background: var(--ev-green); color: #fff; border-color: var(--ev-green); }

.hero .stats { margin-inline: auto; }
.hero .stat { text-align: center; background: rgba(255, 255, 255, .7); border: 1px solid var(--ev-line); border-radius: 18px;
  padding: 1rem .75rem; box-shadow: var(--ev-shadow-1), inset 0 1px 0 #fff; }
.hero .stat b { display: block; font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -.02em; color: var(--ev-green); font-variant-numeric: tabular-nums; }
.hero .stat span { font-size: .82rem; opacity: .7; }

/* Background: radial-gradient orbs (no blur filters), fine grid, grain */
.hero-bg { position: absolute; z-index: -1; top: -90px; bottom: 0; left: 50%; width: 100vw; transform: translateX(-50%);
  overflow: hidden; pointer-events: none;
  -webkit-mask-image: linear-gradient(#000 78%, transparent); mask-image: linear-gradient(#000 78%, transparent); }
.hero-bg .orb { position: absolute; border-radius: 50%; }
.hero-bg .o1 { width: 760px; height: 760px; left: 50%; top: -240px; margin-left: -620px;
  background: radial-gradient(closest-side, rgba(31, 174, 133, .30), transparent); }
.hero-bg .o2 { width: 680px; height: 680px; right: 50%; top: -120px; margin-right: -700px;
  background: radial-gradient(closest-side, rgba(99, 150, 235, .24), transparent); }
.hero-bg .o3 { width: 520px; height: 520px; left: 50%; top: 120px; margin-left: -260px;
  background: radial-gradient(closest-side, rgba(160, 140, 240, .20), transparent); }
.hero-bg .hero-grid { position: absolute; inset: 0;
  background-image: linear-gradient(var(--ev-line) 1px, transparent 1px), linear-gradient(90deg, var(--ev-line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 38%, #000, transparent 75%);
          mask-image: radial-gradient(ellipse 60% 55% at 50% 38%, #000, transparent 75%); opacity: .55; }
.hero-bg::after { content: ""; position: absolute; inset: 0; opacity: .05; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }

/* =====================================================================
   SECTIONS — full-bleed washes give each one its own personality
   ===================================================================== */
[data-sec]:not([data-sec="hero"]) { position: relative; isolation: isolate; }
[data-sec]:not([data-sec="hero"])::before {
  content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: 50%; width: 100vw; transform: translateX(-50%);
  background: linear-gradient(180deg, transparent, var(--wash, transparent) 22%, var(--wash, transparent) 78%, transparent);
  pointer-events: none;
}
[data-sec="tools"]     { --wash: rgba(217, 243, 231, .55); }
[data-sec="subjects"]  { --wash: rgba(250, 244, 232, .75); }
[data-sec="quiz"]      { --wash: rgba(236, 233, 251, .6); }
[data-sec="community"] { --wash: rgba(225, 237, 251, .55); }
[data-sec="notes"]     { --wash: rgba(220, 243, 243, .5); }
[data-sec="books"]     { --wash: rgba(250, 244, 232, .65); }
[data-sec="tuition"]   { --wash: rgba(217, 243, 231, .4); }
html:not([lang^="bn"]) [data-sec] h2 { letter-spacing: -.025em; }

/* =====================================================================
   CARD FAMILY — layered surface, inner highlight, animated gradient
   border, cursor light. Applies to every card in a homepage grid
   (including the article / tool / quiz / product components).
   ===================================================================== */
.ev-site a.card, .ev-site .card-hover {
  position: relative; overflow: hidden; border-radius: 20px;
  background: linear-gradient(180deg, #fff, rgba(255, 255, 255, .78));
  border: 1px solid var(--ev-line);
  box-shadow: var(--ev-shadow-1), inset 0 1px 0 #fff;
}
.ev-site a.card::before, .ev-site .card-hover::before { /* gradient border */
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; opacity: 0; transition: opacity .4s ease;
  background: conic-gradient(from var(--ev-ang), transparent 0 62%, #1fae85 78%, #6aa8f0 90%, transparent);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.ev-site a.card::after, .ev-site .card-hover::after { /* cursor light */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .4s ease;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 0%), rgba(31, 174, 133, .11), transparent 60%);
}
.ev-site a.card:hover::before, .ev-site .card-hover:hover::before,
.ev-site a.card:hover::after,  .ev-site .card-hover:hover::after,
.ev-site .card-hover:focus-visible::before { opacity: 1; }
.ev-site .card-hover:focus-visible { outline: 2px solid var(--ev-emerald); outline-offset: 3px; }
.ev-site a.card img, .ev-site .card-hover img { transition: transform .9s var(--ev-ease); }
@media (hover: hover) {
  .ev-site a.card:hover, .ev-site .card-hover:hover { box-shadow: var(--ev-shadow-2), inset 0 1px 0 #fff; border-color: transparent; }
}

/* Category: compact chip with a tinted letter mark */
.cat .cat-in { display: inline-flex; align-items: center; gap: .7rem; min-width: 0; }
.cat .count { padding: .15rem .55rem; border-radius: 999px; background: rgba(0, 46, 36, .05); font-variant-numeric: tabular-nums; }

/* Subject: library tile with big mark + arrow */
.subj { background: linear-gradient(160deg, color-mix(in srgb, var(--t) 70%, #fff) -10%, #fff 55%) !important; }
.subj-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.1rem; }
.subj .mark { width: 44px; height: 44px; border-radius: 14px; font-size: 1.1rem; }
.subj-arrow { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, .8);
  border: 1px solid var(--ev-line); color: var(--ev-green); opacity: 0; transform: translate(-6px, 6px); transition: opacity .3s ease, transform .4s var(--ev-ease); }
.subj:hover .subj-arrow, .subj:focus-visible .subj-arrow { opacity: 1; transform: none; }

/* Notes: icon tile */
.note-ic { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: var(--ev-cyan);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7); transition: transform .4s var(--ev-ease), background-color .3s ease; }

/* Tuition: tidy, slightly warm surface */
[data-sec="tuition"] .card-hover { background: linear-gradient(180deg, #fff, var(--ev-cream)); }
[data-sec="tuition"] .badge { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25); }

/* Community: one calm panel with "?" markers */
[data-sec="community"] > .card { border-radius: 24px; overflow: hidden; background: rgba(255, 255, 255, .85); border-color: var(--ev-line);
  box-shadow: var(--ev-shadow-1), inset 0 1px 0 #fff; }
[data-sec="community"] > .card > a { transition: background-color .25s ease; }
[data-sec="community"] > .card > a:hover { background: rgba(225, 237, 251, .55); }
.q-title { display: inline-flex; align-items: center; gap: .8rem; transition: color .25s ease; }
.q-title::before { content: "?"; flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px;
  background: var(--ev-blue); color: #1f5fa8; font-weight: 700; font-size: .9rem; }
[data-sec="community"] > .card > a:hover .q-title { color: var(--ev-emerald); }
[data-sec="community"] > .card > a > span:last-child { padding: .2rem .65rem; border-radius: 999px; background: var(--ev-mint); color: #0b6a50; }

/* =====================================================================
   GIVEAWAY
   ===================================================================== */
.giveaway { position: relative; overflow: hidden; isolation: isolate; border-radius: 28px; border: 1px solid var(--ev-line);
  background: linear-gradient(135deg, var(--ev-mint) 0%, #fff 48%, var(--ev-cream) 100%);
  box-shadow: var(--ev-shadow-2), inset 0 1px 0 #fff; }
.gv-glow { position: absolute; z-index: -1; width: 520px; height: 520px; right: -140px; top: -200px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(31, 174, 133, .28), transparent); }
.gv-item { background: rgba(255, 255, 255, .85); border-color: var(--ev-line) !important; border-radius: 18px !important;
  box-shadow: var(--ev-shadow-1), inset 0 1px 0 #fff; transition: transform .5s var(--ev-ease), box-shadow .4s ease; }
.gv-item:nth-child(1) { transform: rotate(-3deg); }
.gv-item:nth-child(3) { transform: rotate(3deg) translateY(10px); }
.gv-item img { transition: transform .8s var(--ev-ease); }
.gv-item:hover { box-shadow: var(--ev-shadow-2); }

/* =====================================================================
   STUDY ROOM — immersive dark surface
   ===================================================================== */
a.room { position: relative; overflow: hidden; isolation: isolate; border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 34px 70px -34px rgba(0, 46, 36, .75), inset 0 1px 0 rgba(255, 255, 255, .12); }
a.room::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(520px 360px at 82% 18%, rgba(52, 211, 153, .22), transparent 70%),
    radial-gradient(420px 320px at 8% 100%, rgba(99, 150, 235, .16), transparent 70%),
    radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1.2px) 0 0 / 22px 22px; }
a.room .timer { position: relative; background: radial-gradient(circle at 30% 22%, rgba(255, 255, 255, .12), rgba(255, 255, 255, .02) 65%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 0 70px rgba(52, 211, 153, .16); border-color: rgba(255, 255, 255, .08); }
a.room .timer::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; pointer-events: none;
  background: conic-gradient(transparent 0 68%, rgba(52, 211, 153, .95));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 5px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 5px)); }
a.room .btn { box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .5); }

/* =====================================================================
   NEWSLETTER
   ===================================================================== */
.nl { position: relative; overflow: hidden; isolation: isolate; border-radius: 28px; border: 1px solid var(--ev-line);
  background: linear-gradient(135deg, var(--ev-lav) 0%, #fff 50%, var(--ev-mint) 100%); box-shadow: var(--ev-shadow-2), inset 0 1px 0 #fff; }
.nl-glow { position: absolute; z-index: -1; width: 460px; height: 460px; left: 50%; top: -260px; margin-left: -230px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(160, 140, 240, .26), transparent); }
.ev-pill .input { height: 3rem; }
.ev-pill .btn { background: var(--ev-green); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16); }
.ev-pill .btn:hover { background: #07463a; }

/* =====================================================================
   MOTION (everything below only runs when the user allows motion)
   ===================================================================== */
@media (prefers-reduced-motion: no-preference) {

  :where(.btn) { transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .25s ease, transform .2s var(--ev-ease); }
  :where(.nudge) { transition: transform .3s var(--ev-ease); }
  .btn:active { transform: scale(.97); }
  .ev-site a.card, .ev-site .card-hover { transition: transform .45s var(--ev-ease), box-shadow .4s ease, border-color .3s ease; }

  /* ----- Hero entrance ----- */
  @keyframes ev-rise { from { opacity: 0; transform: translate3d(0, 16px, 0); } }
  @keyframes ev-word { from { transform: translate3d(0, 112%, 0) rotate(3deg); } }
  @keyframes ev-sheen { to { background-position: -220% 0; } }
  @keyframes ev-pop { from { opacity: 0; transform: translate3d(0, 14px, 0) scale(.97); } }
  .hero .eyebrow      { animation: ev-rise .8s var(--ev-ease) backwards; }
  .hero-title .w > span { animation: ev-word 1s var(--ev-ease) calc(.12s + var(--i) * .075s) backwards; }
  .hero-title .w.hl > span { animation: ev-word 1s var(--ev-ease) calc(.12s + var(--i) * .075s) backwards, ev-sheen 9s linear 1.6s infinite; }
  .hero .hero-copy > p { animation: ev-rise .9s var(--ev-ease) .5s backwards; }
  .hero .ev-search    { animation: ev-pop .9s var(--ev-ease) .62s backwards; }
  .hero .cta          { animation: ev-rise .9s var(--ev-ease) .74s backwards; }
  .hero .stat         { animation: ev-rise .9s var(--ev-ease) backwards; }
  .hero .stat:nth-child(1) { animation-delay: .85s; } .hero .stat:nth-child(2) { animation-delay: .92s; }
  .hero .stat:nth-child(3) { animation-delay: .99s; } .hero .stat:nth-child(4) { animation-delay: 1.06s; }

  /* ----- Hero ambient background ----- */
  @keyframes ev-drift-a { to { transform: translate3d(70px, 40px, 0) scale(1.08); } }
  @keyframes ev-drift-b { to { transform: translate3d(-60px, 50px, 0) scale(1.1); } }
  @keyframes ev-drift-c { to { transform: translate3d(40px, -40px, 0) scale(.94); } }
  .hero-bg .o1 { animation: ev-drift-a 26s ease-in-out infinite alternate; }
  .hero-bg .o2 { animation: ev-drift-b 32s ease-in-out infinite alternate; }
  .hero-bg .o3 { animation: ev-drift-c 28s ease-in-out infinite alternate; }
  .hero.ev-idle .orb, .hero.ev-idle .hl > span { animation-play-state: paused; }

  /* ----- Scroll reveals ----- */
  html .ev-pre { opacity: 0; transform: translate3d(0, 20px, 0); }
  html .ev-pre.ev-soft { transform: translate3d(0, 24px, 0) scale(.98); }
  html .ev-pre.ev-in { opacity: 1; transform: none; transition: opacity .75s var(--ev-ease), transform .75s var(--ev-ease); }

  /* ----- Card hover ----- */
  @keyframes ev-spin { to { --ev-ang: 360deg; } }
  @media (hover: hover) {
    .ev-site a.card:hover, .ev-site .card-hover:hover { transform: translate3d(0, -4px, 0); }
    .ev-site a.card:hover::before, .ev-site .card-hover:hover::before { animation: ev-spin 3.2s linear infinite; }
    .ev-site a.card:hover img, .ev-site .card-hover:hover img { transform: scale(1.06); }
    .cat:hover .mark, .subj:hover .mark { transform: scale(1.1) rotate(-4deg); }
    .card-hover:hover .note-ic { transform: rotate(-7deg) scale(1.08); }
    :where(.btn, .group, .card-hover, .card):hover .nudge { transform: translate3d(4px, 0, 0); }
    .gv-item:hover { transform: rotate(0deg) translateY(-6px) scale(1.04); }
    .gv-item:hover img { transform: scale(1.08); }
    /* gentle 3D tilt (set by JS on quiz / product / tool cards) */
    [data-tilt]:hover { transform: perspective(900px) rotateX(var(--ev-ry, 0deg)) rotateY(var(--ev-rx, 0deg)) translate3d(0, -4px, 0); transition-duration: .12s, .4s, .3s; }
    a.room:hover .timer { transform: scale(1.04); }
  }
  .mark { transition: transform .45s var(--ev-ease); }
  a.room .timer { transition: transform .7s var(--ev-ease), box-shadow .7s ease; }

  /* ----- Study room ----- */
  @keyframes ev-rotate { to { transform: rotate(360deg); } }
  @keyframes ev-breathe { from { opacity: .55; } to { opacity: 1; } }
  @keyframes ev-live { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
  a.room .timer::after { animation: ev-rotate 18s linear infinite; }
  a.room::before { animation: ev-breathe 8s ease-in-out infinite alternate; }
  a.room .bg-green-400 { animation: ev-live 2.4s ease-in-out infinite; }
  a.room.ev-idle .timer::after, a.room.ev-idle::before, a.room.ev-idle .bg-green-400 { animation-play-state: paused; }

  /* ----- Giveaway / newsletter glows ----- */
  @keyframes ev-glow { to { transform: translate3d(-40px, 30px, 0) scale(1.1); } }
  .gv-glow, .nl-glow { animation: ev-glow 14s ease-in-out infinite alternate; }
}

@media (max-width: 640px) {
  .hero-bg .o1, .hero-bg .o2 { width: 460px; height: 460px; }
  .hero .ev-search .input { padding-left: 2.8rem; font-size: 1rem; }
  .ev-search-ic { left: 1.2rem; }
  .gv-item:nth-child(1), .gv-item:nth-child(3) { transform: none; }
}

/* Sitewide motion (header, mega menu, footer links) */
@media (prefers-reduced-motion: no-preference) {
  @keyframes ev-mega { from { opacity: 0; transform: translate3d(0, -8px, 0); } }
  .ev-site .site-header { transition: box-shadow .3s ease, background-color .3s ease; }
  .ev-site .nav-link::after { transition: transform .4s var(--ev-ease); }
  .ev-site .nav-item:hover > .mega, .ev-site .nav-item:focus-within > .mega, .ev-site .nav-item.is-open > .mega { animation: ev-mega .3s var(--ev-ease); }
  .ev-site .mega-link, .ev-site .mega-link .ico { transition: background-color .25s ease, color .25s ease; }
  .site-footer ul a { transition: color .2s ease, transform .35s var(--ev-ease); }
  .site-footer ul a:hover { transform: translate3d(3px, 0, 0); }
}
