/* ==========================================================================
   SISIDLAN — styles
   Mobile-first. Hero uses images/banner*.jpg; video cards use YouTube
   thumbnails (see VIDEOS in script.js).
   ========================================================================== */

:root {
  /* Palette */
  --c-bg: #070914;
  --c-bg-alt: #0b0f26;
  --c-navy: #121a3d;
  --c-purple: #4a2a85;
  --c-purple-soft: #7b56c2;
  --c-gold: #d9b56a;
  --c-gold-light: #f0d79c;
  --c-text: #ece6d8;
  --c-muted: #b7b2c9;
  --c-line: rgba(217, 181, 106, 0.22);

  /* Type */
  --f-serif: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --f-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Layout */
  --nav-h: 3.75rem;
  --radius: 14px;
  --container: 68rem;
}

/* ---- Base ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-padding-top: calc(var(--nav-h) + 1rem);
  -webkit-text-size-adjust: 100%;
}

/* clip (not hidden) so nothing can widen the layout viewport, yet no scroll
   container is created and the sticky header keeps working */
html, body { overflow-x: clip; }

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--f-sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--f-serif); font-weight: 500; line-height: 1.15; margin: 0; }
p { margin: 0; }
a { color: var(--c-gold-light); }
svg { display: block; }

:focus-visible {
  outline: 2px solid var(--c-gold-light);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 1rem; top: -3rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--c-gold);
  color: var(--c-bg);
  font-weight: 600;
  border-radius: 6px;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

/* ---- Nav ----------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 9, 20, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--c-line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: var(--nav-h);
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--c-gold);
  text-decoration: none;
  flex-shrink: 0;
}
.nav__logo { width: 2rem; height: 2rem; }
.nav__wordmark {
  display: none; /* shown from tablet up to save space */
  font-family: var(--f-serif);
  font-size: 1.15rem;
  letter-spacing: 0.3em;
  color: var(--c-text);
}

.nav__links {
  display: flex;
  gap: 0.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__links a {
  display: block;
  padding: 0.5rem 0.45rem;
  color: var(--c-muted);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  border-radius: 6px;
  white-space: nowrap;
  transition: color 0.2s ease;
}
.nav__links a:hover,
.nav__links a[aria-current="true"] { color: var(--c-gold-light); }
.nav__links a[aria-current="true"] { text-decoration: underline; text-underline-offset: 0.4em; text-decoration-thickness: 1px; }

/* ---- Hero / banner ------------------------------------------------------- */
.hero {
  text-align: center;
  padding-bottom: 3.5rem;
}

/* Clips the parallax/tilted banner so its edges never show */
.hero__media {
  position: relative;
  overflow: hidden;
  perspective: 1200px;
}

/* Full-width banner; height follows the image so the wordmark never crops */
.hero__banner {
  position: relative;
  display: block;
}
.hero__banner img {
  display: block;
  width: 100%;
  height: auto;
}
/* Soft fade from the banner into the page background (on the wrapper, so it stays put during parallax) */
.hero__media::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 35%;
  background: linear-gradient(180deg, transparent, var(--c-bg));
  pointer-events: none;
}

.hero__inner { display: grid; justify-items: center; gap: 1.1rem; padding-top: 1.5rem; }

/* Tagline is baked into the banner; above 640px keep it for assistive tech only */
.hero__subtext {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (max-width: 640px) {
  .hero__subtext {
    position: static;
    width: auto; height: auto;
    overflow: visible;
    clip: auto;
    white-space: normal;
    font-family: var(--f-serif);
    font-style: italic;
    font-size: 1.2rem;
    color: var(--c-gold);
  }
}

.hero__bio {
  max-width: 34rem;
  color: var(--c-muted);
  font-size: 0.98rem;
}

/* ---- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  padding: 0.7rem 1.5rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.btn--ghost {
  margin-top: 0.75rem;
  color: var(--c-gold-light);
  border: 1px solid var(--c-gold);
}
.btn--ghost:hover { background: rgba(217, 181, 106, 0.12); }

.btn--gold {
  background: linear-gradient(135deg, var(--c-gold-light), var(--c-gold));
  color: #1a1206;
  font-weight: 600;
  box-shadow: 0 6px 24px rgba(217, 181, 106, 0.2);
}
.btn--gold:hover { box-shadow: 0 8px 32px rgba(217, 181, 106, 0.35); transform: translateY(-1px); }

/* ---- Sections ------------------------------------------------------------ */
.section { padding-block: 4.5rem; }

.eyebrow {
  margin-bottom: 0.5rem;
  color: var(--c-gold);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.section__title {
  font-size: clamp(2rem, 7vw, 3rem);
  margin-bottom: 2rem;
}
.section__title em { color: var(--c-gold-light); }

/* About */
.about {
  background:
    radial-gradient(ellipse 70% 50% at 100% 0%, rgba(74, 42, 133, 0.25), transparent 70%);
}

.definition {
  max-width: 42rem;
  padding: 1.5rem;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  background: rgba(18, 26, 61, 0.45);
}
.definition__term {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-family: var(--f-serif);
  font-size: 1.6rem;
  color: var(--c-gold-light);
}
.definition__pos { font-family: var(--f-sans); font-size: 0.8rem; font-style: italic; color: var(--c-muted); }
.definition__text { margin-top: 0.5rem; font-size: 1.1rem; }
.definition__note { margin-top: 0.9rem; color: var(--c-muted); }

.questions__title {
  margin: 3.5rem 0 1.5rem;
  font-size: 1.5rem;
  color: var(--c-muted);
  font-style: italic;
}

.questions {
  display: grid;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.question {
  position: relative;
  margin: 0;
  padding: 1.5rem 1.5rem 1.5rem 3.25rem;
  border-left: 2px solid var(--c-gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: linear-gradient(90deg, rgba(74, 42, 133, 0.28), rgba(18, 26, 61, 0.15));
  font-family: var(--f-serif);
  font-size: clamp(1.3rem, 4.5vw, 1.6rem);
  font-style: italic;
  line-height: 1.35;
}
.question::before {
  content: "\201C";
  position: absolute;
  left: 0.9rem;
  top: 0.6rem;
  font-size: 3rem;
  line-height: 1;
  color: var(--c-gold);
  opacity: 0.8;
}

/* Reflections */
.reflections { background: rgba(11, 15, 38, 0.8); } /* --c-bg-alt, translucent so the starfield shows */
.reflections .section__title { margin-bottom: 1rem; }
.reflections__intro { max-width: 36rem; color: var(--c-muted); }

.cards {
  display: grid;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.video-list { margin-top: 2.5rem; }
.card {
  position: relative;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  background: var(--c-navy);
  transition: border-color 0.25s ease, transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.5s ease;
}
.card:hover { border-color: rgba(217, 181, 106, 0.5); transform: translateY(-2px); }

/* Video thumbnail (link without JS, button with JS) → swapped for an iframe on click */
.video-card__media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--c-bg);
  cursor: pointer;
}
.video-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover; /* crops the letterbox bars of 4:3 hqdefault thumbnails */
  opacity: 0.85;
  transition: opacity 0.25s ease;
}
.video-card__play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 3.5rem;
  height: 3.5rem;
  transform: translate(-50%, -50%);
  border: 1px solid var(--c-gold);
  border-radius: 50%;
  background: rgba(7, 9, 20, 0.65);
  box-shadow: 0 6px 24px rgba(217, 181, 106, 0.2);
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}
.video-card__play::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 54%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 0.6rem 0 0.6rem 1rem;
  border-color: transparent transparent transparent var(--c-gold-light);
}
.video-card__media:hover img,
.video-card__media:focus-visible img { opacity: 1; }
.video-card__media:hover .video-card__play,
.video-card__media:focus-visible .video-card__play {
  background: rgba(217, 181, 106, 0.2);
  box-shadow: 0 8px 32px rgba(217, 181, 106, 0.35);
}

.card__body { display: grid; gap: 0.5rem; padding: 1.25rem 1.25rem 1.5rem; }
.card__title { font-size: 1.55rem; }
.video-card__link { color: inherit; text-decoration: none; }
.video-card__link:hover { color: var(--c-gold-light); }

/* Follow */
.follow {
  text-align: center;
  background:
    radial-gradient(ellipse 60% 70% at 50% 100%, rgba(74, 42, 133, 0.4), transparent 70%);
}
.follow__inner { display: grid; justify-items: center; }
.follow__inner .section__title { margin-bottom: 1rem; }
.follow__text { max-width: 32rem; margin-bottom: 2rem; color: var(--c-muted); }
.follow__actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.75rem; }
.follow__actions .btn--ghost { margin-top: 0; }

/* ---- Footer -------------------------------------------------------------- */
.site-footer {
  padding-block: 2rem;
  border-top: 1px solid var(--c-line);
  color: var(--c-muted);
  font-size: 0.85rem;
}
.footer__inner { display: grid; gap: 0.35rem; text-align: center; }
.footer__tagline { font-family: var(--f-serif); font-style: italic; font-size: 1.05rem; color: var(--c-gold); }
.footer__link { color: var(--c-gold); text-decoration: none; letter-spacing: 0.04em; transition: color 0.2s ease; }
.footer__link:hover { color: var(--c-gold-light); text-decoration: underline; }
.footer__links { display: flex; justify-content: center; gap: 1.25rem; }

/* ---- Larger screens ------------------------------------------------------ */
@media (min-width: 40em) {
  .nav__links { gap: 0.5rem; }
  .nav__links a { font-size: 0.875rem; padding-inline: 0.65rem; }
  .cards { grid-template-columns: repeat(2, 1fr); }
}

/* Very narrow phones (320px): tighten the nav so the links don't overflow */
@media (max-width: 349px) {
  :root { --nav-h: 5.5rem; } /* two-row nav: keep anchor offsets clear */
  .nav { gap: 0.4rem; row-gap: 0; padding-inline: 0.5rem; flex-wrap: wrap; justify-content: center; }
  .nav__brand { justify-content: center; }
  .nav__logo { width: 1.75rem; height: 1.75rem; }
  /* Full-width item forces the links onto their own centered row under the logo */
  .nav__links { flex: 1 1 100%; min-width: 0; gap: 0; flex-wrap: wrap; justify-content: center; }
  .nav__links a {
    font-size: 0.8rem;
    letter-spacing: 0;
    padding-inline: 0.4rem;
    min-height: 2.25rem; /* keep tap targets >= 36px */
  }
}

@media (min-width: 56em) {
  :root { --nav-h: 4.25rem; }
  .nav__wordmark { display: inline; }
  .section { padding-block: 6rem; }
  /* Wide screens: cap banner to the visible viewport, cropping evenly */
  .hero__banner img {
    max-height: calc(100svh - var(--nav-h));
    object-fit: cover;
    object-position: center;
  }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .footer__inner { grid-auto-flow: column; justify-content: space-between; text-align: left; }
}

/* ---- Depth effects (effects.js) ------------------------------------------
   JS adds .fx to <html> only when motion is allowed, so without JS or with
   reduced motion everything stays static and visible. */
/* Mirrors the inline style on the canvas; effects.js drops the canvas if it isn't fixed */
#cosmos {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
main, .site-footer { position: relative; z-index: 1; }

.fx .hero__banner { will-change: transform; }

/* Card tilt: vars set per pointer move; glare follows the cursor */
.card.is-tilt {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(1.025);
  border-color: rgba(217, 181, 106, 0.5);
  box-shadow: 0 22px 44px -18px rgba(0, 0, 0, 0.75), 0 0 28px rgba(217, 181, 106, 0.1);
  transition: border-color 0.25s ease, transform 0.12s ease-out, box-shadow 0.3s ease;
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 0%), rgba(240, 215, 156, 0.2), transparent 55%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.card.is-tilt::after { opacity: 1; }

/* Scroll reveal: only elements below the fold at load get .reveal */
.fx .reveal {
  opacity: 0;
  transform: perspective(900px) translateY(28px) rotateX(8deg);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: var(--d, 0ms);
}
.fx .reveal.is-in { opacity: 1; transform: none; }

/* Slow float on the logo and the quote cards */
@keyframes fx-float {
  50% { transform: translateY(-3px) rotate(var(--fr, 0deg)); }
}
.fx .nav__logo { --fr: 3deg; animation: fx-float 9s ease-in-out infinite; }
.fx .question { animation: fx-float 11s ease-in-out infinite; }
.fx .questions li:nth-child(2) .question { animation-delay: -4s; }
.fx .questions li:nth-child(3) .question { animation-delay: -7s; }

/* Vessel of light: a 0×0 anchor that effects.js translates to the orb's centre.
   Hidden until JS has placed it (no stray orb in the corner without JS). Its fixed
   parent is inline-styled and overflow:hidden, so nothing can leave the viewport. */
.orb {
  --s: 28px;
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  visibility: hidden;
}
.orb.is-live { visibility: visible; will-change: transform; }
@media (min-width: 641px) { .orb { --s: 44px; } }

.orb__core {
  position: absolute;
  left: calc(var(--s) / -2);
  top: calc(var(--s) / -2);
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background: radial-gradient(circle at 46% 42%, #fffaf0 0, #f0d79c 16%, rgba(217, 181, 106, 0.7) 32%, rgba(123, 86, 194, 0.42) 55%, rgba(74, 42, 133, 0) 72%);
  animation: orb-pulse 5.5s ease-in-out infinite;
}
/* Wide, faint violet halo */
.orb__core::after {
  content: "";
  position: absolute;
  inset: -55%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(123, 86, 194, 0.22), rgba(123, 86, 194, 0) 65%);
}
/* Four-point sparkle that turns slowly */
.orb__core::before {
  content: "";
  position: absolute;
  inset: 14%;
  background:
    linear-gradient(90deg, transparent 47%, rgba(255, 248, 230, 0.75) 50%, transparent 53%),
    linear-gradient(0deg, transparent 47%, rgba(255, 248, 230, 0.75) 50%, transparent 53%);
  border-radius: 50%;
  animation: orb-spin 26s linear infinite;
}
/* Short comet trail; effects.js rotates it opposite to the direction of travel */
.orb__trail {
  position: absolute;
  left: 0;
  top: -2px;
  width: calc(var(--s) * 2);
  height: 4px;
  transform-origin: 0 50%;
  background: linear-gradient(90deg, rgba(240, 215, 156, 0.55), rgba(185, 162, 239, 0.2) 50%, transparent);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  opacity: 0.3;
}
@keyframes orb-pulse {
  50% { transform: scale(1.08); opacity: 0.85; }
}
@keyframes orb-spin {
  to { transform: rotate(360deg); }
}

/* Watching eyes: almond outline in thin gold, dark iris with a violet halo */
.eyes {
  display: block;
  aspect-ratio: 120 / 36;
  height: auto;
  pointer-events: none;
  overflow: visible;
  filter: drop-shadow(0 0 6px rgba(123, 86, 194, 0.35));
}
.eyes--hero { width: 64px; margin-bottom: -0.25rem; }
.eye__ball { fill: rgba(7, 9, 20, 0.75); }
.eye__line { fill: none; stroke: var(--c-gold); stroke-width: 1.1; stroke-linejoin: round; }
.eye__crease { fill: none; stroke: rgba(217, 181, 106, 0.35); stroke-width: 0.8; stroke-linecap: round; }
.eye__lid {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: eye-blink 6s ease-in-out infinite;
}
/* Smaller pair beside the About heading: quieter, out of the text's way */
.about > .container { position: relative; }
.eyes--about {
  position: absolute;
  top: 0.1rem;
  right: 1.25rem;
  width: 48px;
  opacity: 0.55;
}
.eyes--about .eye__lid { animation-duration: 7.4s; animation-delay: -2.6s; }
@keyframes eye-blink {
  0%, 93%, 100% { transform: scaleY(1); }
  95.5% { transform: scaleY(0.06); }
}
@media (min-width: 641px) {
  .eyes--hero { width: 84px; }
}
@media (min-width: 56em) {
  /* Beside the definition box, in the empty right-hand column */
  .eyes--about { top: 8.5rem; right: 3rem; width: 64px; }
}
.fx .eyes--hero { animation: fx-float 10s ease-in-out infinite; }

/* Small / touch screens (same query as `small` in effects.js): starfield plus a
   flat fade/rise reveal only; no 3D, hero parallax or floats */
@media (max-width: 640px), (pointer: coarse) {
  .hero__media { perspective: none; }
  .fx .hero__banner { will-change: auto; }
  .fx .reveal { transform: translateY(28px); }
  .fx .nav__logo, .fx .question, .fx .eyes--hero { animation: none; }
  .eyes { filter: none; }
}

@media print {
  #cosmos, .orb, .eyes { display: none; }
  .fx .reveal { opacity: 1; transform: none; }
}

/* ---- Motion -------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .orb__trail { display: none; } /* static orb: nothing to trail */
}
