/* v3 — the creative, marketing-led look (owner decision, Nov 2026): Aoun's own identity (wine, gold, Almarai /
   Inter) with big type, floating elements, ticket-shaped course cards and motion. Loaded after app.css and only
   overrides it, so the platform's structure is unchanged. No inline styles (CSP); motion stops for reduced motion. */

:root {
  --wine-night: #2A0812;
  --wine-mid: #8A2340;
  --wine-soft: #F3E3E7;
  --wine-mist: #FBF4F6;
  --gold-soft: #F6EAD3;
  --gold-ink: #2A0812;
  --r-card: 22px;
  --r-panel: 28px;
  --r-btn: 999px;
  --r-input: 14px;
  --shadow-1: 0 10px 26px rgba(42, 8, 18, .07);
  --shadow-2: 0 26px 50px rgba(42, 8, 18, .16);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --notch-bg: var(--plaster);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --wine-soft: #2B1F23; --wine-mist: #161113; --gold-soft: #2E2410; --gold-ink: #1A1214;
    --shadow-1: 0 10px 26px rgba(0, 0, 0, .35); --shadow-2: 0 26px 50px rgba(0, 0, 0, .5);
  }
}
:root[data-theme="dark"] {
  --wine-soft: #2B1F23; --wine-mist: #161113; --gold-soft: #2E2410; --gold-ink: #1A1214;
  --shadow-1: 0 10px 26px rgba(0, 0, 0, .35); --shadow-2: 0 26px 50px rgba(0, 0, 0, .5);
}

/* ---------- Buttons: pills that lift, the primary one with a light sweep ---------- */
.btn { transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .2s, color .2s, border-color .2s; position: relative; overflow: hidden; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { box-shadow: 0 10px 22px rgba(107, 23, 45, .22); }
.btn-primary::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .28) 50%, transparent 70%); transform: translateX(-120%); transition: transform .7s var(--ease); pointer-events: none; }
.btn-primary:hover::after { transform: translateX(120%); }
.v3-btn-gold { background: var(--gold); color: var(--wine-night); font-weight: 700; border: 0; }
.v3-btn-gold:hover { background: #E2BF84; color: var(--wine-night); }
.chip-btn { border-radius: var(--r-pill); transition: color .2s, border-color .2s, background-color .2s; }

/* ---------- Header: the current section gets a gold bar that grows in ---------- */
.nav-links a { position: relative; padding-block: 6px; }
.nav-links a::after { content: ""; position: absolute; inset-inline: 0; bottom: -2px; height: 3px; border-radius: 3px; background: var(--gold); transform: scaleX(0); transition: transform .3s var(--ease); }
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { transform: scaleX(1); }
.nav-links a[aria-current="page"] { font-weight: 700; color: var(--on-panel); }

/* Home: the header sits on a light hero (light theme); dark theme keeps the dark header. */
:root:not([data-theme="dark"]) .site-head:has(.v3-hero) { background: linear-gradient(180deg, #FFFFFF 0%, var(--wine-mist) 100%); color: var(--night); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .site-head:has(.v3-hero) { background: var(--head-bg); color: var(--on-panel); } }
:root[data-theme="dark"] .site-head:has(.v3-hero) { background: var(--head-bg); color: var(--on-panel); }
.site-head:has(.v3-hero)::before { content: none; }
/* Header brand: the app-icon tile (brand guidelines), wine with the white mark in every theme (owner: no pink).
   On the wine header a thin light edge keeps the wine tile readable against the same colour. */
.brand-tile { display: block; width: 44px; height: 44px; border-radius: 22%; transition: transform .3s var(--ease); }
.brand:hover .brand-tile { transform: translateY(-2px); }
.site-head:not(:has(.v3-hero)) .brand-tile-primary { box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .45); }
@media (max-width: 420px) { .brand-tile { width: 38px; height: 38px; } }
:root:not([data-theme="dark"]) .site-head:has(.v3-hero) .nav-links a,
:root:not([data-theme="dark"]) .site-head:has(.v3-hero) .brand,
:root:not([data-theme="dark"]) .site-head:has(.v3-hero) .chip-btn { color: var(--night); }
:root:not([data-theme="dark"]) .site-head:has(.v3-hero) .chip-btn { border-color: var(--line); background: #FFFFFF; }
:root:not([data-theme="dark"]) .site-head:has(.v3-hero) .chip-btn:hover { color: var(--wine); border-color: var(--wine); }
:root:not([data-theme="dark"]) .site-head:has(.v3-hero) .nav-links a[aria-current="page"] { color: var(--wine); }
:root:not([data-theme="dark"]) .site-head:has(.v3-hero) :focus-visible { outline-color: var(--wine); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .site-head:has(.v3-hero) .nav-links a,
  :root:not([data-theme="light"]) .site-head:has(.v3-hero) .brand,
  :root:not([data-theme="light"]) .site-head:has(.v3-hero) .chip-btn { color: var(--on-panel); background: transparent; border-color: var(--night-line); }
}

/* ---------- Shared bits ---------- */
.v3-eyebrow { display: inline-flex; align-items: center; gap: 8px; justify-self: start; align-self: start; width: max-content; max-width: 100%;
  background: var(--wine-soft); color: var(--accent-text); font-weight: 700; font-size: 13px; padding: 7px 14px; border-radius: var(--r-pill); }
.v3-eyebrow-dark { background: rgba(212, 173, 106, .16); color: #F1D9A8; }
.v3-hl { position: relative; white-space: nowrap; z-index: 0; }
.v3-hl::after { content: ""; position: absolute; inset-inline: -4px; bottom: .08em; height: .3em; background: var(--gold); opacity: .6; border-radius: 8px; z-index: -1;
  transform: rotate(-1.5deg) scaleX(1); transform-origin: right; animation: v3-draw 1s .55s var(--ease) both; }
[dir="ltr"] .v3-hl::after { transform-origin: left; }
.v3-sec-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: var(--s-4); }
.v3-kick { display: block; color: var(--accent-text); font-weight: 700; font-size: 13px; margin-block-end: 4px; }
.card { border-radius: var(--r-card); }

/* ---------- Home hero ---------- */
.v3-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); align-items: center; gap: var(--s-8);
  padding-block: var(--s-8) var(--s-12); color: var(--night); }
.v3-hero-text { display: grid; gap: var(--s-4); align-content: center; min-width: 0; }
.v3-h1 { font-size: clamp(38px, 5.4vw, 68px); font-weight: 800; line-height: 1.15; letter-spacing: -.01em; color: var(--night); }
.v3-lede { font-size: 18px; color: var(--muted); max-width: 560px; }
.v3-search { max-width: 640px; border-radius: var(--r-pill); padding: 8px; box-shadow: 0 18px 40px rgba(107, 23, 45, .12); border-color: var(--line); }
.v3-search .home-search-btn { border-radius: var(--r-pill); min-height: 54px; padding-inline: 26px; }
.v3-stats { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-8); }
.v3-stats li { display: grid; gap: 0; }
.v3-stats b { font-size: 30px; font-weight: 800; color: var(--accent-text); line-height: 1.1; }
.v3-stats span { font-size: 14px; color: var(--muted); }
.v3-promises { color: var(--muted); font-size: 14px; }
.v3-promises svg { color: var(--gold); }

/* The stage: a morphing wine blob with floating course tickets, a spinning badge, a live notice and a sticker. */
.v3-stage { position: relative; height: 540px; min-width: 0; --px: 0; --py: 0; }
.v3-blob { position: absolute; inset: 40px 30px 40px 40px; border-radius: 48% 52% 44% 56% / 52% 44% 56% 48%;
  background: radial-gradient(circle at 30% 30%, var(--wine-mid), var(--wine) 45%, var(--wine-night));
  box-shadow: 0 40px 80px rgba(107, 23, 45, .25); animation: v3-morph 14s ease-in-out infinite alternate; }
.v3-blob::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: repeating-radial-gradient(circle at 70% 80%, rgba(255, 255, 255, .07) 0 2px, transparent 2px 22px); }
.v3-blob-ring { position: absolute; inset: 10px; border-radius: 50%; border: 1.5px dashed rgba(212, 173, 106, .55); animation: v3-spin 60s linear infinite; }
.v3-float { position: absolute; width: 240px; translate: calc(var(--px) * 14px) calc(var(--py) * 14px); transition: translate .6s var(--ease); }
/* Entrance on the wrapper, endless float on the card inside: two animations never fight over one transform. */
.v3-float-0 { inset-inline-end: 30px; top: 50px; animation: v3-in .9s .3s var(--ease) both; }
.v3-float-1 { inset-inline-start: 20px; top: 250px; animation: v3-in .9s .5s var(--ease) both; translate: calc(var(--px) * -18px) calc(var(--py) * -18px); }
.v3-float-0 .v3-mini-ticket { --rot: -6deg; animation: v3-bob 6s ease-in-out infinite; }
.v3-float-1 .v3-mini-ticket { --rot: 5deg; animation: v3-bob 7s 1s ease-in-out infinite; }
.v3-mini-ticket { background: var(--surface); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow-2); border: 1px solid var(--line); }
.v3-mini-cover { position: relative; height: 110px; background: linear-gradient(135deg, var(--wine), var(--wine-night)); }
.v3-mini-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.v3-mini-cover.tone-1, .v3-mini-cover.tone-4 { background: linear-gradient(135deg, var(--gold), #A07A3A); }
.v3-mini-cover.tone-2, .v3-mini-cover.tone-5 { background: linear-gradient(135deg, #C2566F, var(--wine-mid)); }
.v3-mini-body { padding: 12px 14px; display: grid; gap: 2px; }
.v3-mini-body small { font-size: 11px; color: var(--muted); }
.v3-mini-body strong { font-size: 15px; color: var(--night); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.v3-mini-foot { display: flex; justify-content: space-between; align-items: center; margin-block-start: 6px; font-weight: 800; color: var(--night); }
.v3-go { width: 32px; height: 32px; border-radius: 50%; background: var(--wine); color: #FFFFFF; display: grid; place-items: center; font-size: 14px; }
.v3-badge { position: absolute; inset-inline-end: 6px; top: 330px; width: 134px; height: 134px; animation: v3-in .9s .8s var(--ease) both; }
.v3-badge svg { width: 100%; height: 100%; animation: v3-spin 18s linear infinite; }
.v3-badge-disc { fill: var(--gold); }
/* direction: ltr keeps the text on the circle (RTL text on a path starts past its end); Arabic still shapes right-to-left. */
.v3-badge-text { direction: ltr; font-size: 12.5px; font-weight: 700; fill: var(--wine-night); letter-spacing: 1px; font-family: var(--font-body); }
.v3-badge-core { position: absolute; inset: 0; display: grid; place-items: center; font-size: 26px; font-weight: 800; color: var(--wine); }
.v3-toast { position: absolute; inset-inline-start: 50px; top: 40px; max-width: 260px; display: flex; gap: 10px; align-items: flex-start; background: var(--surface);
  border-radius: 18px; padding: 12px 14px; box-shadow: var(--shadow-2); font-size: 12px; color: var(--night); line-height: 1.5; animation: v3-toast 1s 1.2s var(--ease) both; }
.v3-toast span { color: var(--muted); }
.v3-toast-dot { flex: none; width: 9px; height: 9px; margin-block-start: 5px; border-radius: 50%; background: #2BB673; box-shadow: 0 0 0 0 rgba(43, 182, 115, .5); animation: v3-ping 2s 2s ease-out infinite; }
.v3-sticker { position: absolute; inset-inline-start: 34%; bottom: 30px; background: var(--surface); color: var(--accent-text); font-weight: 700; font-size: 13px;
  border-radius: 16px; padding: 10px 14px; box-shadow: var(--shadow-2); rotate: -4deg; animation: v3-in .9s 1s var(--ease) both; }

/* Moving strip of academy names */
.v3-marquee { position: relative; background: var(--wine); color: #FFFFFF; overflow: hidden; height: 56px; display: flex; align-items: center; }
.v3-marquee-track { display: flex; align-items: center; gap: 28px; width: max-content; padding-inline: 14px; white-space: nowrap; font-weight: 600; font-size: 15px;
  animation: v3-marquee-rtl 40s linear infinite; }
[dir="ltr"] .v3-marquee-track { animation-name: v3-marquee-ltr; }
.v3-marquee:hover .v3-marquee-track { animation-play-state: paused; }
.v3-marquee i { color: var(--gold); font-style: normal; }

/* ---------- Home sections ---------- */
.v3-home { gap: clamp(48px, 7vw, 88px); }
.v3-bento { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: 1.4fr repeat(3, 1fr); grid-auto-rows: 132px; }
.v3-bento > li { display: grid; min-width: 0; }
.v3-tile-hot { grid-row: span 2; }
.v3-tile { position: relative; overflow: hidden; display: grid; align-content: start; gap: 4px; padding: 16px 18px; padding-inline-end: 68px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line);
  color: var(--night); text-decoration: none; transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s; }
.v3-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-1); border-color: var(--accent-text); color: var(--night); }
.v3-tile strong { font-size: 17px; line-height: 1.35; }
.v3-tile small { font-size: 12px; color: var(--muted); }
.v3-tile-ico { position: absolute; inset-inline-end: 14px; top: 14px; width: 44px; height: 44px; border-radius: 14px; background: var(--wine-soft); color: var(--accent-text);
  display: grid; place-items: center; font-size: 18px; transition: transform .3s var(--ease); }
.v3-tile:hover .v3-tile-ico { transform: rotate(-8deg) scale(1.08); }
.v3-bento > li:nth-child(3n+3) .v3-tile:not(.v3-tile-big) { background: var(--gold-soft); border-color: transparent; }
.v3-bento > li:nth-child(4n+5) .v3-tile:not(.v3-tile-big) { background: var(--wine-mist); }
.v3-tile-big { background: var(--wine); color: #FFFFFF; border: 0; padding: 22px; }
.v3-tile-all { align-content: end; }
.v3-tile-big:hover { color: #FFFFFF; }
.v3-tile-big strong { font-size: clamp(24px, 2.4vw, 32px); margin-block-start: 8px; }
.v3-tile-flame { color: var(--gold); font-weight: 700; font-size: 12px; }
.v3-tile-foot { position: absolute; inset-inline: 22px; bottom: 18px; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; color: var(--on-dark-muted); font-size: 13px; }
.v3-tile-foot b { font-size: 38px; font-weight: 800; color: #FFFFFF; line-height: 1; }
.v3-tile-all { background: var(--wine-night); color: #FFFFFF; border: 0; }
.v3-tile-all:hover { color: #FFFFFF; }
.v3-tile-all small { color: var(--on-dark-subtle); }
.v3-tile-all .v3-tile-ico { background: var(--gold); color: var(--wine-night); }

/* How it works: numbered steps in gold */
.how-panel { border-radius: 32px; background: radial-gradient(circle at 85% 0%, rgba(138, 35, 64, .9), transparent 55%), var(--wine-night); }
.how-panel::before { opacity: .05; }
.how-num { background: var(--gold); color: var(--wine-night); border-radius: 18px; clip-path: none; }

/* For academies: dark marketing block with a phone preview */
.v3-academy { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: var(--s-8); align-items: center;
  padding: clamp(28px, 5vw, 64px); border-radius: 32px; color: #EAD7DC;
  background: radial-gradient(circle at 90% -10%, rgba(138, 35, 64, .95), transparent 50%), radial-gradient(circle at 20% 120%, rgba(212, 173, 106, .3), transparent 45%), var(--wine-night); }
.v3-academy-text { display: grid; gap: var(--s-4); }
.v3-academy-title { color: #FFFFFF; font-size: clamp(30px, 4vw, 52px); font-weight: 800; line-height: 1.2; }
.v3-academy-text p { max-width: 560px; font-size: 16px; }
.v3-academy-points { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.v3-academy-points li { display: grid; gap: 4px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); border-radius: 20px; padding: 16px; }
.v3-academy-points b { color: #FFFFFF; font-size: 16px; }
.v3-academy-points span { font-size: 13px; color: #CDB3BA; line-height: 1.6; }
.v3-academy .academy-cta-btn { justify-self: start; min-height: 54px; }
.v3-phone { justify-self: center; width: 250px; height: 470px; border-radius: 40px; background: #FFFFFF; border: 10px solid #140409; box-shadow: 0 40px 80px rgba(0, 0, 0, .5);
  overflow: hidden; rotate: -5deg; animation: v3-bob 7s ease-in-out infinite; --rot: 0deg; }
.v3-phone-notch { width: 90px; height: 20px; background: #140409; border-radius: 0 0 14px 14px; margin: 0 auto; }
.v3-phone-screen { padding: 14px; display: grid; gap: 12px; color: #5E5558; font-size: 12px; }
.v3-phone-row { display: flex; justify-content: space-between; align-items: center; }
.v3-phone-row b { color: var(--wine); font-size: 15px; }
.v3-phone-card { display: grid; gap: 4px; border: 1px solid #ECE1E4; border-radius: 18px; overflow: hidden; padding-block-end: 12px; }
.v3-phone-card strong, .v3-phone-card small { padding-inline: 12px; }
.v3-phone-card strong { color: #1A1214; font-size: 14px; }
.v3-phone-cover { display: block; height: 110px; background: radial-gradient(circle at 20% 20%, #B4475F 0, transparent 55%), linear-gradient(135deg, #6B172D, #2A0812); }
.v3-phone-stats { display: grid; gap: 8px; background: #FBF4F6; border-radius: 16px; padding: 12px; }
.v3-phone-stats b { color: #1A1214; }
.v3-phone-stats div { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 8px; }
.v3-bar { display: block; height: 8px; border-radius: 8px; background: linear-gradient(90deg, var(--gold), var(--wine)); transform-origin: right; transform: scaleX(.08); transition: transform 1.4s .3s var(--ease); }
[dir="ltr"] .v3-bar { transform-origin: left; }
.v3-bar-1 { --w: .92; } .v3-bar-2 { --w: .6; } .v3-bar-3 { --w: .34; }
.is-in .v3-bar, .v3-academy:not(.pre) .v3-bar { transform: scaleX(var(--w)); }

/* ---------- Course cards as event tickets ---------- */
.course-grid { gap: 22px; }
.ticket-card { padding: 0; gap: 0; overflow: visible; border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow-1);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.ticket-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-2); }
.ticket-card .course-cover { height: 172px; border-radius: var(--r-card) var(--r-card) 0 0; }
.ticket-card .course-cover img { transition: transform .8s var(--ease); }
.ticket-card:hover .course-cover img { transform: scale(1.06); }
.ticket-mode { position: absolute; top: 12px; inset-inline-end: 12px; z-index: 2; background: rgba(255, 255, 255, .95); color: var(--wine); font-size: 11px; font-weight: 700;
  padding: 5px 11px; border-radius: var(--r-pill); }
.ticket-cal { position: absolute; bottom: 12px; inset-inline-start: 12px; z-index: 2; width: 54px; overflow: hidden; border-radius: 14px; background: #FFFFFF; text-align: center;
  box-shadow: 0 8px 18px rgba(42, 8, 18, .2); line-height: 1.2; transition: transform .35s var(--ease); }
.ticket-card:hover .ticket-cal { transform: rotate(-6deg) translateY(-2px); }
.ticket-cal small { display: block; background: var(--wine); color: #FFFFFF; font-size: 10px; padding: 3px 0; font-weight: 600; }
.ticket-cal b { display: block; font-size: 20px; color: #1A1214; padding: 2px 0 5px; }
.ticket-flag { position: absolute; top: 50px; inset-inline-end: -6px; z-index: 3; background: var(--gold); color: var(--wine-night); font-size: 11px; font-weight: 800;
  padding: 4px 12px; border-radius: 8px 0 0 8px; rotate: 4deg; box-shadow: 0 6px 14px rgba(42, 8, 18, .18); }
[dir="ltr"] .ticket-flag { border-radius: 0 8px 8px 0; rotate: -4deg; }
.ticket-card .course-cover .ad-tag, .ticket-card .course-cover .pick-tag { position: absolute; top: 12px; inset-inline-start: 12px; inset-block-end: auto; z-index: 2; }
.ticket-card .course-card-body { padding: 14px 18px 8px; gap: 8px; }
.ticket-card .course-academy { font-size: 12px; color: var(--muted); }
.ticket-card .h-card { font-size: 18px; }
.ticket-cut { position: relative; height: 0; border-top: 2px dashed var(--line); margin: 6px 18px 0; }
.ticket-cut::before, .ticket-cut::after { content: ""; position: absolute; top: -12px; width: 22px; height: 22px; border-radius: 50%; background: var(--notch-bg); border: 1px solid var(--line); }
.ticket-cut::before { inset-inline-start: -30px; clip-path: inset(0 0 0 50%); }
.ticket-cut::after { inset-inline-end: -30px; clip-path: inset(0 50% 0 0); }
[dir="rtl"] .ticket-cut::before { clip-path: inset(0 50% 0 0); }
[dir="rtl"] .ticket-cut::after { clip-path: inset(0 0 0 50%); }
.ticket-card .course-card-foot { border: 0; margin: 0; padding: 12px 18px 16px; }
.round-link { transition: transform .3s var(--ease), background-color .2s; }
.ticket-card:hover .round-link { transform: scale(1.08); }

/* ---------- Listing band ---------- */
.site-head:has(.v3-band) { background: radial-gradient(circle at 10% -40%, rgba(212, 173, 106, .35), transparent 45%), var(--wine); }
.v3-band { display: grid; gap: var(--s-3); padding-block: var(--s-6) var(--s-12); }
.v3-band-title { color: #FFFFFF; font-size: clamp(32px, 4.4vw, 52px); font-weight: 800; line-height: 1.15; }
.v3-listing .results-filters { border-radius: 24px; box-shadow: var(--shadow-1); }
.subcat-chip.is-active { background: var(--wine); color: #FFFFFF; }

/* ---------- Course page ---------- */
.site-head:has(.course-hero) { background: radial-gradient(circle at 90% -20%, rgba(138, 35, 64, .95), transparent 50%), var(--wine-night); }
.course-hero .course-title { font-weight: 800; }
.book-card { border-radius: 30px; border-top: 5px solid var(--gold); box-shadow: var(--shadow-2); }
.offer-opt { border-radius: 18px; transition: border-color .2s, background-color .2s, transform .2s var(--ease); }
.offer-opt:hover { transform: translateY(-2px); }

/* ---------- Checkout ---------- */
.co-page .card, .co-page .card-lg { border-radius: 24px; box-shadow: var(--shadow-1); }
.co-pay { border-radius: var(--r-pill); }
.co-method { border-radius: 20px; transition: border-color .2s, background-color .2s, transform .2s var(--ease); }
.co-method:hover { transform: translateY(-2px); }

/* ---------- Academy and admin shells ---------- */
.shell-nav { background: radial-gradient(circle at 100% 0%, rgba(138, 35, 64, .7), transparent 50%), var(--wine-night); }
.shell-nav nav a { border-radius: 14px; transition: background-color .2s, color .2s; }
.shell-nav nav a[aria-current="page"] { background: var(--wine); color: #FFFFFF; box-shadow: inset -3px 0 0 var(--gold); }
[dir="ltr"] .shell-nav nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--gold); }
.shell-main .card, .admin-main .card { border-radius: var(--r-card); }

/* ---------- Footer ---------- */
.site-foot { background: radial-gradient(circle at 15% 120%, rgba(212, 173, 106, .18), transparent 40%), var(--foot-bg); }

/* ---------- Motion ---------- */
[data-anim] { animation: v3-rise .8s var(--ease) both; }
[data-anim="2"] { animation-delay: .08s; } [data-anim="3"] { animation-delay: .16s; } [data-anim="4"] { animation-delay: .24s; }
[data-anim="5"] { animation-delay: .32s; } [data-anim="6"] { animation-delay: .4s; }
/* Sections below the fold rise in as they scroll into view (motion.js marks them; content stays visible without script). */
[data-reveal].pre { opacity: 0; transform: translateY(28px); }
[data-reveal].pre.is-in { opacity: 1; transform: none; transition: opacity .8s var(--ease), transform .8s var(--ease); }
[data-reveal].pre .course-grid > li, [data-reveal].pre .v3-bento > li { opacity: 0; transform: translateY(18px); }
[data-reveal].pre.is-in .course-grid > li, [data-reveal].pre.is-in .v3-bento > li { opacity: 1; transform: none; transition: opacity .6s var(--ease), transform .6s var(--ease); }
.is-in .course-grid > li:nth-child(2), .is-in .v3-bento > li:nth-child(2) { transition-delay: .07s; }
.is-in .course-grid > li:nth-child(3), .is-in .v3-bento > li:nth-child(3) { transition-delay: .14s; }
.is-in .course-grid > li:nth-child(4), .is-in .v3-bento > li:nth-child(4) { transition-delay: .21s; }
.is-in .course-grid > li:nth-child(5), .is-in .v3-bento > li:nth-child(5) { transition-delay: .28s; }
.is-in .course-grid > li:nth-child(6), .is-in .v3-bento > li:nth-child(6) { transition-delay: .35s; }
.is-in .course-grid > li:nth-child(7), .is-in .v3-bento > li:nth-child(7) { transition-delay: .42s; }
.is-in .course-grid > li:nth-child(n+8), .is-in .v3-bento > li:nth-child(n+8) { transition-delay: .49s; }

@keyframes v3-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes v3-in { from { opacity: 0; transform: translateY(24px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes v3-bob { 0%, 100% { transform: rotate(var(--rot, 0deg)) translateY(0); } 50% { transform: rotate(var(--rot, 0deg)) translateY(-12px); } }
@keyframes v3-spin { to { transform: rotate(360deg); } }
@keyframes v3-morph {
  0% { border-radius: 48% 52% 44% 56% / 52% 44% 56% 48%; }
  50% { border-radius: 56% 44% 52% 48% / 44% 56% 48% 52%; }
  100% { border-radius: 44% 56% 48% 52% / 56% 48% 52% 44%; }
}
@keyframes v3-toast { from { opacity: 0; transform: translateY(-14px) scale(.95); } to { opacity: 1; transform: none; } }
@keyframes v3-ping { 0% { box-shadow: 0 0 0 0 rgba(43, 182, 115, .5); } 80%, 100% { box-shadow: 0 0 0 10px rgba(43, 182, 115, 0); } }
@keyframes v3-draw { from { transform: rotate(-1.5deg) scaleX(0); } to { transform: rotate(-1.5deg) scaleX(1); } }
@keyframes v3-marquee-rtl { from { transform: translateX(0); } to { transform: translateX(50%); } }
@keyframes v3-marquee-ltr { from { transform: translateX(0); } to { transform: translateX(-50%); } }


/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .v3-hero { grid-template-columns: 1fr; padding-block-end: var(--s-8); }
  .v3-stage { height: 400px; max-width: 520px; width: 100%; justify-self: center; }
  .v3-float { width: 200px; }
  .v3-float-1 { top: 190px; }
  .v3-badge { width: 104px; height: 104px; top: 250px; }
  .v3-academy { grid-template-columns: 1fr; }
  .v3-phone { display: none; }
  .v3-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v3-tile-hot { grid-column: span 2; grid-row: span 1; }
  .v3-tile-big { min-height: 150px; }
}
@media (max-width: 640px) {
  .v3-stage { height: 340px; }
  .v3-float { width: 170px; }
  .v3-float-0 { inset-inline-end: 6px; top: 30px; }
  .v3-float-1 { inset-inline-start: 0; top: 160px; }
  .v3-mini-cover { height: 80px; }
  .v3-toast { inset-inline-start: 10px; top: 0; max-width: 200px; }
  .v3-badge { width: 88px; height: 88px; top: 220px; inset-inline-end: 0; }
  .v3-badge-core { font-size: 18px; }
  .v3-sticker { bottom: 6px; inset-inline-start: 20%; font-size: 12px; }
  .v3-stats { gap: var(--s-5); }
  .v3-stats b { font-size: 24px; }
  .v3-search { border-radius: 24px; }
  .v3-academy-points { grid-template-columns: 1fr; }
  .v3-bento { grid-auto-rows: 120px; gap: 10px; }
}

/* ======================================================================================================
   Interaction layer (motion.js): word-by-word headline, rotating notices, 3D tilt with glare, spotlight,
   pointer glow, magnetic buttons, click ripple, reading progress, back-to-top, a second moving strip.
   ====================================================================================================== */

/* Headline words rise one after another */
.v3-words .v3-word { display: inline-block; animation: v3-word .75s calc(var(--i, 0) * 80ms + .15s) var(--ease) both; }
@keyframes v3-word { from { opacity: 0; transform: translateY(.55em) rotate(4deg); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }

/* Rotating "starting soon" notices */
.v3-toast-item { display: none; }
.v3-toast-item.is-on { display: block; animation: v3-swap .55s var(--ease) both; }
@keyframes v3-swap { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* 3D tilt + glare */
[data-tilt] { position: relative; }
.ticket-card.is-tilting { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-6px); transition: transform .08s linear, box-shadow .3s var(--ease); }
.v3-tile.is-tilting { transform: perspective(700px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-4px); transition: transform .08s linear, box-shadow .3s var(--ease), border-color .3s; }
[data-tilt]::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 4; opacity: 0; transition: opacity .3s;
  background: radial-gradient(360px circle at var(--gx, 50%) var(--gy, 0%), rgba(255, 255, 255, .28), transparent 55%); mix-blend-mode: soft-light; }
[data-tilt].is-tilting::after { opacity: 1; }

/* Spotlight that follows the pointer inside tiles */
[data-spot]::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(240px circle at var(--mx, -300px) var(--my, -300px), rgba(212, 173, 106, .26), transparent 60%); }
[data-spot]:hover::before { opacity: 1; }
.v3-tile > * { position: relative; z-index: 1; }
.v3-tile > .v3-tile-ico, .v3-tile > .v3-tile-foot { position: absolute; }

/* Soft gold glow following the pointer in dark sections */
[data-glow]::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0; opacity: 0; transition: opacity .5s;
  background: radial-gradient(460px circle at var(--mx, 50%) var(--my, -40%), rgba(212, 173, 106, .18), transparent 60%); }
[data-glow]:hover::after { opacity: 1; }
.v3-academy > *, .how-panel > * { position: relative; z-index: 1; }

/* Magnetic buttons lean toward the pointer */
.btn-primary, .v3-btn-gold, .round-link, .home-search-btn { translate: var(--tx, 0) var(--ty, 0); }
.btn { transition: transform .25s var(--ease), translate .3s var(--ease), box-shadow .25s var(--ease), background-color .2s, color .2s, border-color .2s; }
.round-link { position: relative; overflow: hidden; transition: transform .3s var(--ease), translate .3s var(--ease), background-color .2s; }
.chip-btn { position: relative; overflow: hidden; }

/* Click ripple */
.v3-ripple { position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s); margin-left: calc(var(--s) / -2); margin-top: calc(var(--s) / -2);
  border-radius: 50%; background: currentColor; opacity: .22; transform: scale(0); pointer-events: none; animation: v3-ripple .65s ease-out forwards; z-index: 5; }
@keyframes v3-ripple { to { transform: scale(1); opacity: 0; } }

/* Reading progress */
.v3-progress { position: fixed; top: 0; inset-inline: 0; height: 3px; z-index: 60; pointer-events: none; }
.v3-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--wine-mid)); transform-origin: right; transform: scaleX(var(--p, 0)); }
[dir="ltr"] .v3-progress span { transform-origin: left; }

/* Back to top with a progress ring */
.v3-top { position: fixed; bottom: 22px; inset-inline-end: 22px; z-index: 55; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); color: var(--accent-text); font-size: 20px; font-weight: 700; text-decoration: none; box-shadow: var(--shadow-2);
  opacity: 0; transform: translateY(18px) scale(.9); pointer-events: none; transition: opacity .35s var(--ease), transform .35s var(--ease); }
.v3-top.is-on { opacity: 1; transform: none; pointer-events: auto; }
.v3-top:hover { color: var(--accent-text); transform: translateY(-3px); }
.v3-top svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.v3-top-track { fill: none; stroke: var(--line); stroke-width: 3; }
.v3-top-ring { fill: none; stroke: var(--gold); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 132; stroke-dashoffset: calc(132 * (1 - var(--p, 0))); }


/* Section highlights draw when their section scrolls in */
[data-reveal].pre .v3-hl::after { animation: none; transform: rotate(-1.5deg) scaleX(0); transition: transform .9s .35s var(--ease); }
[data-reveal].pre.is-in .v3-hl::after { transform: rotate(-1.5deg) scaleX(1); }

/* Search box comes alive on focus */
.v3-search { transition: box-shadow .3s var(--ease), border-color .3s, transform .3s var(--ease); }
.v3-search:focus-within { border-color: var(--wine); box-shadow: 0 0 0 4px rgba(107, 23, 45, .12), 0 22px 46px rgba(107, 23, 45, .16); transform: translateY(-2px); }

/* Blob speeds up under the pointer */
.v3-stage:hover .v3-blob { animation-duration: 6s; }

/* ---------- Reduced motion (owner decision): motion for everyone, gentler for people whose device asks for less.
   Continuous movement is slower and smaller; the 3D tilt, leaning buttons and pointer parallax are off (motion.js). */
@media (prefers-reduced-motion: reduce) {
  .v3-blob { animation-duration: 30s; }
  .v3-blob-ring { animation-duration: 140s; }
  .v3-float-0 .v3-mini-ticket, .v3-float-1 .v3-mini-ticket, .v3-phone { animation-name: v3-bob-soft; animation-duration: 10s; }
  .v3-badge svg { animation-duration: 45s; }
  .v3-marquee-track { animation-duration: 90s; }
  .v3-words .v3-word { animation-name: v3-word-soft; }
  .v3-float { translate: none; }
  .v3-stage:hover .v3-blob { animation-duration: 30s; }
}
@keyframes v3-bob-soft { 0%, 100% { transform: rotate(var(--rot, 0deg)) translateY(0); } 50% { transform: rotate(var(--rot, 0deg)) translateY(-5px); } }
@keyframes v3-word-soft { from { opacity: 0; transform: translateY(.25em); } to { opacity: 1; transform: none; } }
@keyframes v3-fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Live numbers ---------- */
.v3-stats li { position: relative; }
.v3-stats b { display: inline-block; transform-origin: center bottom; }
.v3-pop { animation: v3-pop .6s var(--ease); }
@keyframes v3-pop { 0% { transform: scale(1); } 40% { transform: scale(1.28); color: var(--gold); } 100% { transform: scale(1); } }
.v3-plus { position: absolute; top: -6px; inset-inline-end: -14px; background: var(--gold); color: var(--wine-night); font-size: 12px; font-weight: 800;
  padding: 2px 8px; border-radius: 99px; pointer-events: none; animation: v3-plus 2.6s var(--ease) forwards; }
@keyframes v3-plus { 0% { opacity: 0; transform: translateY(8px) scale(.8); } 15% { opacity: 1; transform: none; } 75% { opacity: 1; } 100% { opacity: 0; transform: translateY(-16px); } }
.v3-live { display: inline-flex; align-self: center; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--accent-text);
  background: var(--wine-soft); padding: 5px 11px; border-radius: 99px; }
.v3-live i { width: 8px; height: 8px; border-radius: 50%; background: #2BB673; animation: v3-ping 2s ease-out infinite; }


.field-strip { margin-block-end: var(--s-1); }
.field-chip { gap: 8px; font-weight: 700; }
.field-chip img { width: 20px; height: 20px; flex: none; }
@media (prefers-reduced-motion: reduce) { .v3-field:hover { transform: none; } }

/* Field bar under the home header: "all fields" button + the three busiest fields; the button opens every field. */
.v3-fieldbar { position: relative; z-index: 20; border-block-end: 1px solid var(--line); }
.v3-fieldbar-in { display: flex; align-items: center; gap: 8px; padding-block: 10px; }
.v3-fieldbar-top { display: flex; gap: 8px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.v3-fieldbar-top::-webkit-scrollbar { display: none; }
.v3-fieldchip { flex: none; display: inline-flex; align-items: center; gap: 8px; min-block-size: 40px; padding: 6px 14px; border-radius: var(--r-pill);
  border: 1px solid var(--line); background: var(--surface); color: var(--night); font-size: 14px; font-weight: 700; text-decoration: none; white-space: nowrap;
  transition: border-color .2s, color .2s, background-color .2s; }
.v3-fieldchip:hover { border-color: var(--accent-text); color: var(--accent-text); background: var(--wine-mist); }
.v3-fieldchip img { width: 20px; height: 20px; flex: none; }
.v3-fieldchip b { min-width: 22px; padding: 1px 7px; border-radius: var(--r-pill); background: var(--wine); color: #FFFFFF; font-size: 12px; text-align: center; }
.v3-fieldchip-all { background: var(--wine); border-color: var(--wine); color: #FFFFFF; cursor: pointer; list-style: none; }
.v3-fieldchip-all::-webkit-details-marker { display: none; }
.v3-fieldchip-all:hover { background: var(--wine-night); border-color: var(--wine-night); color: #FFFFFF; }
.v3-fieldmenu { flex: none; }
.v3-fieldmenu-caret { width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .25s var(--ease); }
.v3-fieldmenu[open] .v3-fieldmenu-caret { transform: rotate(-135deg) translateY(-2px); }
.v3-fieldmenu-panel { position: absolute; inset-inline: 16px; top: calc(100% - 4px); max-width: 1200px; margin-inline: auto; max-height: min(70vh, 560px); overflow-y: auto;
  display: grid; gap: 14px; padding: 18px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-2);
  animation: v3-swap .3s var(--ease) both; }
.v3-fieldmenu-more { justify-self: start; }
.v3-fields { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.v3-fields > li { display: grid; min-width: 0; }
.v3-field { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "ico name" "ico count"; column-gap: 12px; align-items: center;
  padding: 10px 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); color: var(--night); text-decoration: none;
  transition: border-color .2s, background-color .2s, color .2s; }
.v3-field:hover { border-color: var(--accent-text); background: var(--wine-mist); color: var(--accent-text); }
.v3-field-ico { grid-area: ico; width: 40px; height: 40px; border-radius: 12px; background: var(--wine-soft); color: var(--accent-text); display: grid; place-items: center; }
.v3-field-ico img { width: 22px; height: 22px; }
.v3-field-name { grid-area: name; font-weight: 700; font-size: 15px; line-height: 1.35; min-width: 0; }
.v3-field-count { grid-area: count; font-size: 12px; color: var(--muted); }
@media (max-width: 640px) {
  .v3-fieldmenu-panel { inset-inline: 8px; padding: 12px; }
  .v3-fields { grid-template-columns: 1fr 1fr; }
  .v3-field { grid-template-columns: 1fr; grid-template-areas: "name" "count"; }
  .v3-field-ico { display: none; }
}
