/* ===== Theme (dark + elegant green accent) ===== */
:root {
  --bg: #0b0f0c;
  --panel: #101413;
  --text: #f4f7f5;
  --muted: #a8b5ad;
  --brand: #22c55e;
  --brand-2: #16a34a;
  --ring: rgba(34,197,94,.35);
  --card: #121816;
  --shadow: 0 12px 30px rgba(0,0,0,.30);
  --radius: 16px;
  --radius-lg: 22px;
  --speed: 220ms;
  --header-h: 72px;
}

:root.light {
  --bg: #f6faf7;
  --panel: #ffffff;
  --text: #111814;
  --muted: #5b6b62;
  --card: #ffffff;
  --shadow: 0 12px 24px rgba(16,24,20,.08);
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  /* FIX: removed generic fallback fonts (Inter/Roboto/Arial) per design guidelines */
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 800px at 80% -10%, rgba(34,197,94,.12), transparent 60%),
    radial-gradient(1200px 800px at 20% 110%, rgba(16,163,74,.10), transparent 60%),
    var(--bg);
  /* FIX: scroll-padding accounts for fixed header */
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

a { color: inherit; text-decoration: none; transition: color var(--speed); }
img { max-width: 100%; display: block; }

/* FIX: removed blanket ul reset — breaks semantic lists; scoped to nav only */
nav ul { list-style: none; padding: 0; }

li { transition: transform var(--speed), color var(--speed); }

/* ===== Utilities ===== */
.container { width: min(1200px, calc(100% - 2rem)); margin: 0 auto; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  justify-content: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #061109;
  font-weight: 700;
  padding: .85rem 1.2rem;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform var(--speed), filter var(--speed), box-shadow var(--speed);
  position: relative;
  overflow: hidden;
  /* FIX: ensure text is always readable */
  text-decoration: none;
  white-space: nowrap;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(255,255,255,.35), transparent 70%);
  opacity: 0;
  transition: opacity var(--speed);
}

.btn:hover { transform: translateY(-2px); filter: saturate(1.05); box-shadow: 0 16px 40px rgba(34,197,94,.3); }
.btn:hover::before { opacity: 1; }
.btn:active:not(:disabled) { transform: translateY(-1px); }
.btn:disabled { opacity: .6; cursor: not-allowed; pointer-events: none; }
/* FIX: focus-visible outline for keyboard accessibility */
.btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

.btn.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255,255,255,.12);
  transition: transform var(--speed), background var(--speed), border-color var(--speed);
}
.btn.ghost:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.2); }

.pill {
  display: inline-flex;
  align-items: center;
  padding: .35rem .7rem;
  border-radius: 999px;
  background: rgba(34,197,94,.18);
  color: var(--text);
  font-weight: 600;
  font-size: .85rem;
  animation: pulse-glow 2s ease-in-out infinite;
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34,197,94,.35); }
  50%       { box-shadow: 0 0 8px 4px rgba(34,197,94,.18); }
}

.card {
  background: var(--card);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.grid   { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.row   { display: flex; gap: .6rem; flex-wrap: wrap; }
.muted { color: var(--muted); }
.tiny  { font-size: .9rem; }

/* ===== Header / Nav ===== */
/* FIX: removed duplicate header block that was overriding sticky with fixed.
   Single source of truth here; fixed + glass effect + scrolled variant. */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  background: linear-gradient(to bottom, rgba(10,18,14,.92), rgba(10,18,14,.64));
  border-bottom: 1px solid rgba(255,255,255,.06);
  transition: background var(--speed), box-shadow var(--speed);
}

header.scrolled {
  background: linear-gradient(to bottom, rgba(10,18,14,.98), rgba(10,18,14,.82));
  box-shadow: 0 6px 24px rgba(0,0,0,.25);
}

/* Light mode header */
.light header {
  background: linear-gradient(to bottom, rgba(255,255,255,.96), rgba(255,255,255,.88));
  border-bottom: 1px solid rgba(16,24,20,.10);
  box-shadow: 0 6px 22px rgba(16,24,20,.08);
}
.light header.scrolled {
  background: linear-gradient(to bottom, rgba(255,255,255,.98), rgba(255,255,255,.94));
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 0;
}

.brand { display: flex; align-items: center; gap: .8rem; font-weight: 800; }

.brand-logo {
  width: 38px; height: 38px;
  border-radius: 10px;
  /* 15% Y position crops to the face rather than the chest */
  background: url("assets/cb449cb0-95a9-40dd-b512-0945b4a47d23.JPEG") center 15% / cover no-repeat,
              conic-gradient(from 0deg, var(--brand), var(--brand-2), var(--brand));
  box-shadow: 0 0 0 4px rgba(34,197,94,.15);
  transition: transform 600ms ease, box-shadow var(--speed);
}
.brand:hover .brand-logo {
  transform: rotate(90deg);
  box-shadow: 0 0 0 6px rgba(34,197,94,.25);
}

.brand-name { font-weight: 800; letter-spacing: .2px; }

.nav-links { display: flex; gap: 1rem; align-items: center; }

.nav-links a {
  padding: .55rem .8rem;
  border-radius: 10px;
  font-weight: 600;
  color: var(--muted);
  transition: color var(--speed), background var(--speed);
  position: relative;
}
/* FIX: underline indicator */
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 4px; left: 50%;
  width: 0; height: 2px;
  background: var(--brand);
  border-radius: 999px;
  transition: width 300ms ease-out, left 300ms ease-out;
}
.nav-links a:hover::after,
.nav-links a.active::after {
  width: calc(100% - 1.6rem);
  left: .8rem;
}
.nav-links a.active,
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,.06); }
/* FIX: active underline in light mode */
.light .nav-links a { color: var(--text); }
.light .nav-links a:hover,
.light .nav-links a.active {
  color: var(--text);
  background: rgba(16,24,20,.08);
}

/* FIX: focus-visible for keyboard nav */
.nav-links a:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.theme-toggle {
  background: transparent;
  border: 1px solid rgba(255,255,255,.15);
  color: var(--text);
  padding: .5rem .8rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--speed), border-color var(--speed), transform var(--speed);
}
.theme-toggle:hover {
  background: rgba(255,255,255,.08);
  border-color: var(--brand);
  /* IMPROVEMENT: spin on toggle */
  transform: rotate(20deg) scale(1.1);
}
.theme-toggle:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.hamburger {
  display: none;
  background: transparent;
  border: 1px solid rgba(255,255,255,.25);
  color: var(--text);
  padding: .5rem .7rem;
  border-radius: 10px;
  cursor: pointer;
  transition: background var(--speed), border-color var(--speed);
}
.hamburger:hover { background: rgba(255,255,255,.08); border-color: var(--brand); }
.hamburger:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

@media (max-width: 900px) {
  .hamburger { display: inline-flex; }
  .nav-links {
    position: fixed;
    top: calc(var(--header-h) + 8px);
    right: 16px;
    left: auto;
    z-index: 1001;
    display: none;
    flex-direction: column;
    gap: .35rem;
    background: var(--panel);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 16px;
    padding: .6rem;
    box-shadow: var(--shadow);
    /* IMPROVEMENT: slide-in from top */
    transform: translateY(-8px);
    opacity: 0;
    transition: opacity var(--speed), transform var(--speed);
    pointer-events: none;
  }
  .nav-links.open {
    display: flex;
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .light .nav-links {
    background: #fff;
    border-color: rgba(16,24,20,.12);
    box-shadow: 0 18px 32px rgba(16,24,20,.10);
  }
}

/* ===== Hero ===== */
.hero {
  position: relative;
  /* FIX: top padding accounts for fixed header */
  padding: calc(var(--header-h) + 3.5rem) 0 4rem;
  overflow: hidden;
  background:
    radial-gradient(600px 240px at 20% -10%, rgba(34,197,94,.22), transparent 60%),
    radial-gradient(700px 260px at 90% 10%, rgba(16,163,74,.18), transparent 60%);
}

.hero-wrap {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 2rem;
  align-items: center;
}
@media (max-width: 900px) { .hero-wrap { grid-template-columns: 1fr; } }

.kicker { display: inline-flex; gap: .6rem; align-items: center; }

.hero h1 { font-size: clamp(1.9rem, 3.8vw, 3.2rem); margin: .6rem 0; }
.hero p  { color: var(--muted); max-width: 60ch; }

.hero-cta { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1rem; }

.hero-media {
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,0));
  border: 1px solid rgba(255,255,255,.08);
  padding: 10px;
  position: relative;
  /* IMPROVEMENT: subtle float animation */
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: conic-gradient(from 180deg, transparent, rgba(34,197,94,.28), transparent 30%);
  filter: blur(18px);
  z-index: -1;
}

.hero-video {
  aspect-ratio: 16/9;
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.06);
  display: block;
}

.grad-text {
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text;
  background-clip: text;
  /* FIX: use transparent not var(--brand) so gradient shows */
  color: transparent;
}

/* Animated name shimmer + glow — base (nav brand) */
.vitalisa-anim {
  background-size: 200% 200%;
  animation: gradient-pan 8s ease-in-out infinite, glow 3.6s ease-in-out infinite alternate;
}
@keyframes gradient-pan {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes glow {
  0%   { text-shadow: 0 0 0 rgba(34,197,94,0); }
  100% { text-shadow: 0 0 22px rgba(34,197,94,.35); }
}

/* Hero h1 "Vitalisa" — extra stylish treatment */
.hero h1 .grad-text.vitalisa-anim {
  background: linear-gradient(110deg,
    #bbf7d0 0%,
    #4ade80 18%,
    #22c55e 35%,
    #86efac 52%,
    #16a34a 68%,
    #4ade80 82%,
    #bbf7d0 100%
  );
  background-size: 300% 300%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 900;
  letter-spacing: -1px;
  animation: vitalisa-pan 5s ease-in-out infinite, vitalisa-glow 2.8s ease-in-out infinite alternate;
  display: inline-block;
  -webkit-text-stroke: .5px rgba(34,197,94,.15);
}
@keyframes vitalisa-pan {
  0%   { background-position: 0%   50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0%   50%; }
}
@keyframes vitalisa-glow {
  0%   { filter: drop-shadow(0 0 4px  rgba(34,197,94,.4)); }
  100% { filter: drop-shadow(0 0 22px rgba(34,197,94,.85)) drop-shadow(0 0 40px rgba(134,239,172,.35)); }
}

/* ===== Sections / Headings ===== */
section {
  padding: 3.5rem 0;
  transition: background-color var(--speed);
}
section .head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.head h2 {
  margin: 0;
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  transition: color var(--speed);
}

/* ===== About photo ===== */
.about-layout {
  grid-template-columns: 230px 1fr 1fr;
  align-items: start;
}
@media (max-width: 900px) {
  .about-layout {
    grid-template-columns: 1fr 1fr;
  }
  .about-photo-col {
    grid-column: 1 / -1;
    max-width: 300px;
    margin: 0 auto;
  }
}
@media (max-width: 600px) {
  .about-layout { grid-template-columns: 1fr; }
  .about-photo-col { max-width: 100%; }
}

.about-photo-col {
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: var(--shadow);
  transition: transform var(--speed), box-shadow var(--speed), border-color var(--speed);
}
.about-photo-col:hover {
  transform: translateY(-4px);
  border-color: rgba(34,197,94,.25);
  box-shadow: 0 20px 50px rgba(34,197,94,.2);
}
.about-portrait {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 500ms ease;
}
.about-photo-col:hover .about-portrait { transform: scale(1.04); }

/* ===== Stats ===== */
.stats {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 900px) { .stats { grid-template-columns: repeat(2, 1fr); } }

.stat {
  padding: 1.1rem;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,0));
  border: 1px solid rgba(255,255,255,.08);
  text-align: center;
  transition: transform var(--speed), box-shadow var(--speed), border-color var(--speed);
}
.stat:hover {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,.15);
  box-shadow: 0 12px 30px rgba(34,197,94,.15);
}
.stat b {
  font-size: 1.8rem;
  display: block;
  color: var(--brand);
  animation: counter-pop 600ms ease-out;
}
@keyframes counter-pop {
  0%   { transform: scale(.8); opacity: 0; }
  100% { transform: scale(1);  opacity: 1; }
}

/* ===== Video Cards ===== */
.video-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.08);
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,0));
  transition: transform var(--speed), box-shadow var(--speed), filter var(--speed), border-color var(--speed);
  cursor: pointer;
  will-change: transform;
}

/* FIX: play button overlay — was positioned wrong (inset on non-flex container) */
.video-card::before {
  content: '▶';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: rgba(255,255,255,0);
  background: rgba(0,0,0,0);
  z-index: 10;
  transition: color var(--speed), background var(--speed), font-size var(--speed);
  pointer-events: none;
}
.video-card:hover::before {
  color: rgba(255,255,255,.9);
  background: rgba(0,0,0,.4);
  /* IMPROVEMENT: icon grows slightly on hover */
  font-size: 3.4rem;
}
.video-card:hover {
  transform: translateY(-6px);
  filter: saturate(1.05);
  border-color: rgba(255,255,255,.15);
  box-shadow: 0 16px 40px rgba(34,197,94,.2);
}
/* FIX: focus-visible for keyboard users */
.video-card:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

.video-thumb {
  aspect-ratio: 16/9;
  width: 100%;
  background: #1b231f;
  overflow: hidden;
}
.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: center;
}

/* Ken Burns — plays when card is revealed */
.thumb-kenburns {
  animation: kenburns 14s ease-in-out infinite alternate paused;
}
.reveal.visible .thumb-kenburns {
  animation-play-state: running;
}
@keyframes kenburns {
  0%   { transform: scale(1.05); }
  100% { transform: scale(1.14); }
}

.video-meta {
  padding: .65rem .8rem .75rem;
}
.video-meta .chip { margin-bottom: .3rem; }
.video-meta h3 { margin: 0 0 .2rem; font-size: 1rem; line-height: 1.35; }
.video-meta p  { margin: 0; font-size: .88rem; }

.chip {
  display: inline-block;
  font-size: .75rem;
  padding: .25rem .55rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  color: var(--muted);
}

/* ===== Hover-lift utility ===== */
.hover-lift {
  transition: transform var(--speed), box-shadow var(--speed), border-color var(--speed);
  border: 1px solid rgba(255,255,255,.08);
}
.hover-lift:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(34,197,94,.25);
  border-color: rgba(255,255,255,.15);
}

/* ===== Blog Cards ===== */
.blog-card {
  cursor: pointer;
  overflow: hidden;
  transition: transform var(--speed), box-shadow var(--speed);
}
.blog-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(34,197,94,.25);
}
.blog-card img {
  aspect-ratio: 4/5;
  width: 100%;
  object-fit: cover;
  object-position: center 18%;
  /* base scale leaves room for parallax drift without white edges */
  transform: scale(1.08);
  transition: transform 500ms ease;
}
.blog-card:hover img { transform: scale(1.08); }
.blog-card .body {
  padding: 1rem;
  transition: background var(--speed);
}
.blog-card:hover .body { background: rgba(255,255,255,.04); }

/* ===== FAQ ===== */
.faq-item {
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  overflow: hidden;
  transition: background var(--speed), border-color var(--speed), box-shadow var(--speed);
}
.faq-item:hover {
  border-color: rgba(255,255,255,.15);
  background: rgba(255,255,255,.02);
}
/* IMPROVEMENT: highlight open item */
.faq-item.open {
  border-color: rgba(34,197,94,.3);
  box-shadow: 0 0 0 1px rgba(34,197,94,.12);
}

.faq-q {
  width: 100%;
  text-align: left;
  padding: 1rem;
  background: transparent;
  color: var(--text);
  border: 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color var(--speed);
  font-weight: 600;
  font-size: 1rem;
}
.faq-q:hover { color: var(--brand); }
.faq-q:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }

.faq-q span {
  font-size: 1.5rem;
  transition: transform var(--speed);
  /* FIX: prevent the icon from being selectable */
  user-select: none;
}
.faq-item.open .faq-q span { transform: rotate(45deg); }

/* FIX: use grid for smooth height animation instead of max-height hack */
.faq-a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 300ms ease, padding 300ms ease;
  color: var(--muted);
}
.faq-a > * { overflow: hidden; }
.faq-item.open .faq-a {
  grid-template-rows: 1fr;
  padding-bottom: 1rem;
}
.faq-a p { padding: 0 1rem; margin: 0; }

/* ===== Forms ===== */
.input {
  width: 100%;
  padding: .9rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.05);
  color: var(--text);
  transition: border-color var(--speed), background var(--speed), box-shadow var(--speed);
  font-size: 16px;
  outline: none;
  /* FIX: inherit font from body */
  font-family: inherit;
}
.input:hover {
  border-color: rgba(255,255,255,.22);
  background: rgba(255,255,255,.08);
}
.input:focus {
  border-color: var(--brand);
  background: rgba(255,255,255,.1);
  box-shadow: 0 0 0 3px rgba(34,197,94,.15);
}
.input::placeholder {
  color: rgba(255,255,255,.35);
  transition: color var(--speed);
}
.input:focus::placeholder { color: rgba(255,255,255,.2); }

/* FIX: light mode inputs need dark text */
.light .input {
  border-color: rgba(16,24,20,.18);
  background: rgba(16,24,20,.04);
  color: var(--text);
}
.light .input::placeholder { color: rgba(16,24,20,.4); }
.light .input:focus {
  border-color: var(--brand-2);
  box-shadow: 0 0 0 3px rgba(22,163,74,.15);
}

textarea.input { resize: vertical; min-height: 120px; }

/* ===== Scroll progress bar ===== */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--brand), var(--brand-2), #86efac);
  z-index: 9999;
  transition: width 80ms linear;
  border-radius: 0 2px 2px 0;
}

/* ===== Contact typewriter ===== */
.contact-tagline {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--brand);
  min-height: 1.8em;
  margin-bottom: 1.4rem;
  letter-spacing: .01em;
}
.cursor-blink {
  display: inline-block;
  color: var(--brand);
  font-weight: 300;
  margin-left: 1px;
  animation: blink 0.75s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ===== Section heading slide-in ===== */
/* Headings are always visible; animation plays once when entering viewport */
.head h2.heading-visible {
  animation: heading-slide-in 550ms ease both;
}
@keyframes heading-slide-in {
  from { opacity: 0; transform: translateX(-18px); }
  to   { opacity: 1; transform: none; }
}

/* ===== Full-page aurora blobs ===== */
.bg-blob {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  will-change: transform;
  filter: blur(60px);
}

@keyframes blob-a {
  0%,100% { transform: translate(0, 0)      scale(1);    }
  25%     { transform: translate(70px,-55px) scale(1.12); }
  50%     { transform: translate(-40px,80px) scale(.9);  }
  75%     { transform: translate(50px, 35px) scale(1.06); }
}
@keyframes blob-b {
  0%,100% { transform: translate(0, 0)       scale(1);    }
  30%     { transform: translate(-65px, 50px) scale(1.1); }
  60%     { transform: translate(55px,-45px)  scale(.88); }
  80%     { transform: translate(-20px, 20px) scale(1.04); }
}
@keyframes blob-c {
  0%,100% { transform: translate(0, 0)      scale(1);    }
  40%     { transform: translate(45px, 65px) scale(1.18); }
  70%     { transform: translate(-55px,-30px) scale(.93); }
}

/* ===== Hero particles ===== */
.hero-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.particle {
  position: absolute;
  background: var(--brand);
  animation: float-up linear infinite;
}
@keyframes float-up {
  0%   { transform: translateY(0)      translateX(0)                         scale(1);    opacity: var(--p-op, .1); }
  30%  { transform: translateY(-28vh)  translateX(var(--p-dx, 18px))         scale(1);    opacity: var(--p-op, .1); }
  70%  { transform: translateY(-74vh)  translateX(calc(var(--p-dx,18px)*-.5)) scale(.8);  opacity: var(--p-op, .1); }
  90%  { opacity: var(--p-op, .1); }
  100% { transform: translateY(-112vh) translateX(0)                         scale(.4);   opacity: 0; }
}

/* ===== Enhanced FAB pulse ring ===== */
.fab-subscribe::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 999px;
  border: 2px solid rgba(34,197,94,.5);
  animation: fab-ring 2s ease-out infinite;
}
@keyframes fab-ring {
  0%   { transform: scale(1);   opacity: .6; }
  100% { transform: scale(1.35); opacity: 0; }
}

/* ===== TikTok centred embed below socials cards ===== */
.tiktok-centre {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
}

.social-embed-wrap {
  width: 100%;
  max-width: 380px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: var(--shadow);
  background: #000;
}
.social-embed-wrap iframe {
  width: 100%;
  height: 560px;
  display: block;
}
@media (max-width: 500px) {
  .social-embed-wrap { max-width: 100%; }
  .social-embed-wrap iframe { height: 480px; }
}

/* ===== Social card hover glow ===== */
#socials .card.hover-lift:hover {
  box-shadow: 0 20px 50px rgba(34,197,94,.3);
  border-color: rgba(34,197,94,.35);
}
#socials .card h3 {
  transition: color var(--speed);
}
#socials .card.hover-lift:hover h3 {
  color: var(--brand);
}

/* ===== Footer ===== */
footer {
  padding: 1.5rem 0 1.2rem;
  color: var(--muted);
  margin-top: 0;
  border-top: 1px solid rgba(255,255,255,.06);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color var(--speed);
}

.footer-link:hover {
  color: var(--brand);
}

.footer-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  align-items: flex-end;
}

/* ===== Legal Modals ===== */
.legal-modal .modal-content {
  max-width: 800px;
  max-height: 80vh;
  overflow-y: auto;
}

.legal-content h2 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.modal-date {
  color: var(--muted);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

.modal-body h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.modal-body p {
  margin-bottom: 1rem;
  line-height: 1.6;
}

.modal-body ul {
  margin-bottom: 1rem;
  padding-left: 1.2rem;
}

.modal-body li {
  margin-bottom: 0.5rem;
}

.modal-body a {
  color: var(--brand);
  text-decoration: underline;
}

/* ===== Back to top ===== */
#toTop {
  position: fixed;
  right: 18px; bottom: 18px;
  z-index: 4000;
  /* FIX: use visibility + opacity instead of display:none so transition works */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  padding: .7rem .85rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.15);
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform var(--speed), background var(--speed), box-shadow var(--speed), opacity var(--speed), visibility var(--speed);
}
#toTop.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  animation: slideInUp 400ms ease-out;
}
#toTop:hover {
  transform: translateY(-4px);
  background: rgba(255,255,255,.15);
  box-shadow: 0 12px 30px rgba(34,197,94,.2);
}

/* ===== Modal ===== */
.modal {
  position: fixed;
  inset: 0;
  /* FIX: use visibility + opacity so animation works; display:none skips transition */
  display: grid;
  place-items: center;
  background: rgba(0,0,0,.75);
  z-index: 5000;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 300ms ease, visibility 300ms ease;
}
.modal.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.modal-content {
  width: min(900px, 92%);
  padding: .6rem;
  background: var(--panel);
  position: relative;
  border-radius: 16px;
  transform: translateY(20px);
  transition: transform 300ms ease;
}
.modal.open .modal-content {
  transform: translateY(0);
}
#modalFrame {
  width: 100%;
  aspect-ratio: 16/9;
  border: 0;
  border-radius: 12px;
  display: block;
}
#closeModal {
  position: absolute;
  right: 10px; top: 10px;
  transition: transform var(--speed), background var(--speed);
}
#closeModal:hover { transform: rotate(90deg); }

/* ===== Floating Subscribe FAB ===== */
.fab-subscribe {
  position: fixed;
  right: 16px; bottom: 78px;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .7rem 1rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #051009;
  font-weight: 800;
  box-shadow: var(--shadow);
  transition: transform var(--speed), box-shadow var(--speed);
  animation: slideInUp 600ms ease-out;
}
.fab-subscribe:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(34,197,94,.35);
}

/* ===== Keyframes ===== */
@keyframes slideInUp {
  from { transform: translateY(60px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ===== Reveal on scroll ===== */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms ease, transform 600ms ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* Staggered reveal for grid children */
.grid > .reveal:nth-child(2) { transition-delay: 100ms; }
.grid > .reveal:nth-child(3) { transition-delay: 200ms; }
.grid > .reveal:nth-child(4) { transition-delay: 300ms; }
.grid > .reveal:nth-child(5) { transition-delay: 400ms; }
.grid > .reveal:nth-child(6) { transition-delay: 500ms; }

/* ===== Tilt ===== */
.tilt { transform-style: preserve-3d; perspective: 800px; }

/* ===== Social Links ===== */
.socials a {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem .7rem;
  border-radius: 8px;
  transition: background var(--speed), transform var(--speed), color var(--speed), border-color var(--speed);
  border: 1px solid rgba(255,255,255,.1);
  font-size: .9rem;
}
.socials a:hover {
  background: rgba(255,255,255,.08);
  transform: translateY(-2px);
  border-color: var(--brand);
  color: var(--brand);
}

/* ===== List link hover ===== */
ul li a {
  transition: color var(--speed), padding-left var(--speed), border-left-color var(--speed);
  border-left: 2px solid transparent;
  padding-left: .5rem;
  display: inline-block;
}
ul li a:hover {
  color: var(--brand);
  border-left-color: var(--brand);
  padding-left: .8rem;
}

/* ================================================
   ADVANCED ANIMATIONS
   ================================================ */

/* ===== Custom cursor ===== */
@media (pointer: fine) {
  * { cursor: none !important; }
}
.cursor-dot {
  position: fixed;
  width: 7px; height: 7px;
  background: var(--brand);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  will-change: left, top;
  transition: width .2s, height .2s, background .2s;
}
.cursor-ring {
  position: fixed;
  width: 34px; height: 34px;
  border: 2px solid rgba(34,197,94,.55);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99998;
  transform: translate(-50%, -50%);
  will-change: left, top;
  transition: width .35s cubic-bezier(.16,1,.3,1),
              height .35s cubic-bezier(.16,1,.3,1),
              border-color .25s,
              background .25s;
}
.cursor-ring.hovered {
  width: 52px; height: 52px;
  border-color: var(--brand);
  background: rgba(34,197,94,.07);
}
.cursor-ring.clicked {
  width: 22px; height: 22px;
  background: rgba(34,197,94,.18);
}

/* ===== Card spotlight overlay ===== */
.card-spotlight {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity .3s;
}
.video-card:hover .card-spotlight,
.blog-card:hover .card-spotlight,
.card:hover .card-spotlight { opacity: 1; }

/* ===== Hero entrance — staggered fade-up-blur ===== */
@keyframes fade-up-blur {
  from { opacity: 0; transform: translateY(28px); filter: blur(6px); }
  to   { opacity: 1; transform: none;             filter: blur(0); }
}
.hero .kicker    { animation: fade-up-blur .7s cubic-bezier(.16,1,.3,1) .1s both; }
.hero h1         { animation: fade-up-blur .8s cubic-bezier(.16,1,.3,1) .25s both; }
.hero > div > p  { animation: fade-up-blur .7s cubic-bezier(.16,1,.3,1) .42s both; }
.hero-cta        { animation: fade-up-blur .7s cubic-bezier(.16,1,.3,1) .56s both; }
.hero-media      { animation: fade-up-blur .9s cubic-bezier(.16,1,.3,1) .4s both; }

/* ===== Hero h1 word-by-word reveal ===== */
.word-char {
  display: inline-block;
  animation: word-pop .55s cubic-bezier(.16,1,.3,1) both;
}
@keyframes word-pop {
  from { opacity: 0; transform: translateY(22px) rotateX(-15deg); }
  to   { opacity: 1; transform: none; }
}

/* ===== Video card animated shimmer border ===== */
.video-card {
  background-clip: padding-box;
}
.video-card::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: calc(var(--radius) + 1px);
  background: conic-gradient(
    from var(--angle, 0deg),
    transparent 0%,
    var(--brand) 10%,
    transparent 20%
  );
  z-index: -1;
  opacity: 0;
  transition: opacity .4s ease;
}
.video-card:hover::after { opacity: 1; animation: border-spin 2.5s linear infinite; }
@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
@keyframes border-spin { to { --angle: 360deg; } }

/* ===== Stat number glow on enter ===== */
.stat b {
  transition: text-shadow .4s ease, color .4s ease;
}
.stat:hover b {
  text-shadow: 0 0 20px rgba(34,197,94,.6), 0 0 40px rgba(34,197,94,.3);
}

/* ===== Magnetic button — class added by JS ===== */
.btn { will-change: transform; }

/* ===== About portrait parallax ===== */
.about-photo-col { will-change: transform; }

/* ===== Social link icon bounce ===== */
.socials a {
  position: relative;
  overflow: hidden;
}
.socials a::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(34,197,94,.15), transparent);
  opacity: 0;
  border-radius: inherit;
  transition: opacity .3s;
}
.socials a:hover::before { opacity: 1; }

/* ===== Section entrance sweep for head ===== */
.head {
  position: relative;
  overflow: hidden;
}

/* ===== Blog card image parallax wrapper ===== */
.blog-card { overflow: hidden; }
.blog-card img { will-change: transform; }

/* ===== Social card flip ===== */
.social-flip-card {
  perspective: 900px;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  min-height: 140px;
  overflow: visible !important;
}
.flip-inner {
  width: 100%;
  height: 100%;
  min-height: 140px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 1s cubic-bezier(.4,0,.2,1);
}
.social-flip-card:hover .flip-inner {
  transform: rotateY(180deg);
}
.flip-front,
.flip-back {
  position: absolute;
  inset: 0;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: var(--shadow);
}
.flip-front {
  background: var(--card);
  border: 1px solid rgba(255,255,255,.06);
}
.flip-back {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  transform: rotateY(180deg);
  align-items: center;
  text-align: center;
  gap: .3rem;
}
.flip-back .flip-handle {
  font-weight: 800;
  font-size: .95rem;
  color: #051009;
  margin: 0;
}
.flip-back .flip-visit {
  font-size: .8rem;
  color: rgba(5,16,9,.7);
  margin: 0;
}

/* ===== Reduced motion: kill all the extras ===== */
@media (prefers-reduced-motion: reduce) {
  .cursor-dot, .cursor-ring,
  .word-char,
  .hero .kicker, .hero h1, .hero > div > p,
  .hero-cta, .hero-media {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
  .video-card::after { display: none; }
}