/* ============================================================
   Salma Ghoneim — Film Director & Editor
   Aesthetic: dark cinematic, "film festival" / Coppola-LOGAN.
   Anton (display) · Archivo (body) · Fraunces (quote).
   ============================================================ */

:root {
  --bg:        #0a0a0a;
  --bg-2:      #0e0d0b;
  --bg-3:      #141210;
  --ink:       #f4f1ea;
  --muted:     #b3ac9e;
  --muted-2:   #8c8676;
  /* Accent: cinematic "premiere" red (swapped from amber/gold at Salma's request).
     Both clear WCAG AA (5.06:1 / 6.54:1 on --bg) as text and as button backgrounds. */
  --gold:      #e5484d;
  --gold-2:    #f56565;
  --line:      rgba(244, 241, 234, 0.10);
  --line-2:    rgba(244, 241, 234, 0.18);

  --font-display: 'Anton', Impact, sans-serif;
  --font-body:    'Archivo', system-ui, -apple-system, sans-serif;
  --font-quote:   'Fraunces', Georgia, 'Times New Roman', serif;

  --maxw: 1280px;
  --gutter: clamp(1.25rem, 5vw, 5rem);
  --radius: 4px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.0625rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, picture { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
ul, ol { list-style: none; }

/* Make the [hidden] attribute authoritative — a later class with display:flex/grid
   would otherwise un-hide nav menu / lightboxes and leave them eating clicks. */
[hidden] { display: none !important; }

::selection { background: var(--gold); color: #0a0a0a; }

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

.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

.skip-link {
  position: fixed; top: -120px; left: 1rem; z-index: 200;
  background: var(--gold); color: #0a0a0a; padding: 0.7rem 1.1rem;
  font-weight: 600; border-radius: var(--radius); transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }

/* ---------- film grain ---------- */
.grain {
  position: fixed; inset: -50%; z-index: 100; pointer-events: none;
  opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.6s steps(2) infinite;
}
@keyframes grain {
  0%   { transform: translate(0, 0); }
  50%  { transform: translate(-3%, 2%); }
  100% { transform: translate(2%, -2%); }
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 80;
  transition: background 0.35s var(--ease), border-color 0.35s, backdrop-filter 0.35s;
  border-bottom: 1px solid transparent;
}
.nav--scrolled {
  background: rgba(10, 10, 10, 0.78);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
}
.nav__inner {
  max-width: var(--maxw); margin-inline: auto;
  padding: clamp(1rem, 2vw, 1.5rem) var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
}
.nav__mark {
  font-family: var(--font-display); font-size: 1.15rem; letter-spacing: 0.04em;
  text-transform: uppercase; display: inline-flex; gap: 0.4em; line-height: 1;
}
.nav__mark-dot { color: var(--gold); }
.nav__links { display: flex; gap: clamp(1.25rem, 3vw, 2.5rem); align-items: center; }
.nav__links a {
  font-size: 0.82rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 500;
  color: var(--muted); padding: 0.5rem 0; position: relative; transition: color 0.2s;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 0;
  background: var(--gold); transition: width 0.3s var(--ease);
}
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after { width: 100%; }
.nav__cta { color: var(--gold) !important; }

.nav__toggle { display: none; width: 44px; height: 44px; flex-direction: column; gap: 6px; align-items: center; justify-content: center; }
.nav__toggle span { display: block; width: 24px; height: 2px; background: var(--ink); transition: transform 0.3s var(--ease), opacity 0.2s; }
.nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

.nav__mobile {
  display: flex; flex-direction: column; gap: 0.25rem;
  padding: 0.5rem var(--gutter) 1.5rem;
  background: rgba(10, 10, 10, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.nav__mobile a {
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.04em;
  font-size: 1.6rem; padding: 0.6rem 0; border-bottom: 1px solid var(--line);
  color: var(--ink); transition: color 0.2s;
}
.nav__mobile a:hover { color: var(--gold); }

/* ============================================================
   HERO
   ============================================================ */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; }
.hero__bg { position: absolute; inset: 0; z-index: -2; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.85) contrast(1.05); transform: scale(1.04); }
.hero__shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to top, var(--bg) 2%, rgba(10,10,10,0.55) 38%, rgba(10,10,10,0.25) 70%, rgba(10,10,10,0.55) 100%),
    radial-gradient(120% 80% at 20% 90%, rgba(10,10,10,0.7), transparent 60%);
}
.hero__content {
  max-width: var(--maxw); width: 100%; margin-inline: auto;
  padding: 0 var(--gutter) clamp(3rem, 8vh, 7rem);
}
.kicker {
  font-size: 0.8rem; letter-spacing: 0.32em; text-transform: uppercase; font-weight: 600;
  color: var(--gold); margin-bottom: clamp(1.75rem, 4vw, 3rem);
}
.kicker span { color: var(--muted-2); margin: 0 0.3em; }
.hero__name {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(3.6rem, 15vw, 14rem); line-height: 0.86; letter-spacing: 0.005em;
  text-transform: uppercase; margin-bottom: clamp(1.25rem, 3vw, 2rem);
  text-shadow: 0 2px 40px rgba(0,0,0,0.5);
}
.hero__lead {
  font-size: clamp(1.05rem, 1.6vw, 1.4rem); color: var(--ink); max-width: 34ch;
  line-height: 1.5; margin-bottom: clamp(1.75rem, 4vw, 2.5rem); font-weight: 300;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }
.hero__scroll {
  position: absolute; bottom: 1.5rem; right: var(--gutter); z-index: 2;
  display: inline-flex; flex-direction: column; align-items: center; gap: 0.5rem;
  font-size: 0.68rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted);
}
.hero__scroll svg { animation: bob 2s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(5px); } }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 1.6rem; font-size: 0.82rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; border-radius: var(--radius);
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.25s;
}
.btn--primary { background: var(--gold); color: #0a0a0a; }
.btn--primary:hover { background: var(--gold-2); }
.btn--ghost { border: 1px solid var(--line-2); color: var(--ink); }
.btn--ghost:hover { border-color: var(--gold); color: var(--gold); }

/* ============================================================
   QUOTE MARK (lives inside About now)
   ============================================================ */
.quote-mark {
  font-family: var(--font-quote); font-style: italic; color: var(--gold);
  font-size: clamp(4rem, 9vw, 7rem); line-height: 0.5; opacity: 0.32;
  display: block; margin-bottom: 0.05em;
}

/* ============================================================
   SECTION HEADINGS
   ============================================================ */
.sec-head { margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.sec-label {
  display: inline-block; font-size: 0.74rem; letter-spacing: 0.28em; text-transform: uppercase;
  font-weight: 600; color: var(--gold); margin-bottom: 0.85rem;
}
.sec-title {
  font-family: var(--font-display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(2.2rem, 6.5vw, 5rem); line-height: 0.92; letter-spacing: 0.01em;
}

/* ============================================================
   WORK GRID
   ============================================================ */
.work { padding: clamp(3rem, 6vw, 5rem) 0 clamp(5rem, 10vw, 8rem); }
.work__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1.5rem, 3vw, 2.75rem); }
.project--feature { grid-column: 1 / -1; }

.project__link { display: block; }
.project__media {
  position: relative; overflow: hidden; border-radius: var(--radius);
  aspect-ratio: 16 / 9; background: var(--bg-3); border: 1px solid var(--line);
}
.project--feature .project__media { aspect-ratio: 21 / 9; }
.project__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.7s var(--ease), filter 0.5s; filter: saturate(0.9) brightness(0.92);
}
.project__link:hover .project__media img,
.project__link:focus-visible .project__media img { transform: scale(1.045); filter: saturate(1) brightness(1); }
.project__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,10,10,0.55), transparent 45%);
  opacity: 0.8; transition: opacity 0.4s;
}
.project__play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(0.9);
  width: 64px; height: 64px; border-radius: 50%; z-index: 2;
  display: grid; place-items: center; color: #0a0a0a;
  background: var(--gold); opacity: 0; transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
  box-shadow: 0 8px 30px rgba(0,0,0,0.45);
}
.project__play svg { margin-left: 3px; }
.project__link:hover .project__play,
.project__link:focus-visible .project__play { opacity: 1; transform: translate(-50%, -50%) scale(1); }

.project__meta { padding-top: 1.1rem; }
.project__title {
  font-family: var(--font-display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(1.5rem, 3vw, 2.6rem); line-height: 1; letter-spacing: 0.01em;
  overflow-wrap: anywhere; transition: color 0.25s;
}
.project--feature .project__title { font-size: clamp(2rem, 5vw, 4rem); }
.project__link:hover .project__title, .project__link:focus-visible .project__title { color: var(--gold); }
.project__info {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.55em; margin-top: 0.7rem;
  font-size: 0.84rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}
.project__info .dot { color: var(--muted-2); }
.project__info .role { color: var(--gold-2); font-weight: 500; overflow-wrap: anywhere; }
.project__watch {
  display: inline-flex; align-items: center; gap: 0.45em; margin-top: 1rem;
  font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600; color: var(--ink);
}
.project__watch svg { transition: transform 0.3s var(--ease); }
.project__link:hover .project__watch svg, .project__link:focus-visible .project__watch svg { transform: translate(3px, -3px); }

/* ============================================================
   MORE WORK
   ============================================================ */
.more { padding: clamp(4rem, 9vw, 7rem) 0; background: var(--bg-2); border-block: 1px solid var(--line); }
.more__list { margin-top: 0.5rem; }
.more__list li { border-top: 1px solid var(--line); }
.more__list li:last-child { border-bottom: 1px solid var(--line); }
.more__list a {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: clamp(1.1rem, 2.5vw, 1.9rem) 0.25rem; transition: padding 0.3s var(--ease), color 0.25s;
}
.more__title {
  font-family: var(--font-display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(1.35rem, 3.5vw, 2.4rem); line-height: 1.05; letter-spacing: 0.01em; color: var(--ink);
  overflow-wrap: anywhere; transition: color 0.25s;
}
.more__title .ar { font-family: var(--font-body); font-weight: 500; font-size: 0.62em; color: var(--muted); margin-inline-start: 0.4em; }
.more__arrow { color: var(--muted-2); font-size: 1.4rem; transition: color 0.25s, transform 0.3s var(--ease); }
.more__list a:hover { padding-left: 1.25rem; }
.more__list a:hover .more__title { color: var(--gold); }
.more__list a:hover .more__arrow { color: var(--gold); transform: translate(4px, -4px); }

/* ============================================================
   ON SET / BTS GALLERY
   ============================================================ */
.onset { padding: clamp(5rem, 10vw, 8rem) 0; }
.onset__grid {
  max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter);
  display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(0.6rem, 1.4vw, 1.1rem);
  grid-auto-rows: clamp(170px, 26vw, 320px);
}
.onset__item { overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line); }
.onset__item--tall { grid-row: span 2; }
.onset__btn { display: block; width: 100%; height: 100%; }
.onset__btn picture, .onset__btn img { width: 100%; height: 100%; }
.onset__item img {
  object-fit: cover; filter: grayscale(0.25) brightness(0.85);
  transition: transform 0.8s var(--ease), filter 0.5s;
}
.onset__btn:hover img, .onset__btn:focus-visible img { transform: scale(1.06); filter: grayscale(0) brightness(1); }

/* ============================================================
   ABOUT
   ============================================================ */
.about { position: relative; padding: clamp(5rem, 11vw, 9rem) 0; }
.about__inner { max-width: 1140px; }
.about__head { text-align: center; }
.about__row { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; margin-top: clamp(3rem, 6vw, 5rem); }
.about__media { overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line); margin: 0; }
.about__media img { width: 100%; display: block; object-fit: cover; filter: grayscale(1) contrast(1.04) brightness(1.06); transition: filter 0.6s var(--ease); }
.about__media:hover img, .about__media:focus-within img { filter: grayscale(0) contrast(1.02) brightness(1.04); }
.about__media--portrait img { aspect-ratio: 3 / 4; object-position: center; }
.about__media--wide img { aspect-ratio: 4 / 5; object-position: center; }
.about__bio { font-size: clamp(1rem, 1.2vw, 1.1rem); line-height: 1.85; color: var(--muted); max-width: 46ch; }
.about__text--quote { position: relative; }
.about__quote {
  font-family: var(--font-quote); font-style: italic; font-weight: 400;
  font-size: clamp(1.5rem, 3.4vw, 2.7rem); line-height: 1.25; letter-spacing: -0.01em; color: var(--ink);
}
.about__quote-by { margin-top: 1.5rem; font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted-2); font-weight: 500; }
.about__cols { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(2rem, 4vw, 3.5rem); margin-top: clamp(3rem, 6vw, 5rem); }
.about__subhead {
  font-size: 0.74rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold);
  font-weight: 600; margin-bottom: 1.5rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--line);
}
.skills li { display: flex; gap: 1rem; align-items: baseline; padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
.skills__num { font-family: var(--font-display); color: var(--muted-2); font-size: 0.95rem; min-width: 2ch; }
.skills__name { font-size: clamp(1rem, 1.6vw, 1.2rem); color: var(--ink); }
.about__degree { font-family: var(--font-display); text-transform: uppercase; font-size: clamp(1.3rem, 2.6vw, 1.9rem); line-height: 1.05; }
.about__school { color: var(--muted); margin-top: 0.6rem; }
.about__year { color: var(--muted-2); margin-top: 0.3rem; font-size: 0.9rem; letter-spacing: 0.08em; text-transform: uppercase; }

/* ============================================================
   CONTACT
   ============================================================ */
.contact { padding: clamp(5rem, 12vw, 9rem) 0 clamp(4rem, 8vw, 6rem); text-align: center; }
.contact .sec-label { display: block; }
.contact__cue {
  font-family: var(--font-display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(2.6rem, 9vw, 7rem); line-height: 0.9; margin-bottom: clamp(2rem, 5vw, 3.5rem);
}
.contact__email {
  display: inline-block; max-width: 100%; font-family: var(--font-quote); font-style: italic;
  font-size: clamp(1rem, 5.5vw, 3rem); color: var(--gold); position: relative;
  padding-bottom: 0.12em; overflow-wrap: anywhere;
}
.contact__email::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform 0.4s var(--ease); }
.contact__email:hover { color: var(--gold-2); }
.contact__email:hover::after { transform: scaleX(1); }
.contact__row { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 1rem 2rem; margin-top: clamp(1.75rem, 4vw, 2.5rem); font-size: 0.9rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.contact__row a { transition: color 0.2s; padding: 0.4rem 0; }
.contact__row a:hover { color: var(--gold); }
.contact__loc { color: var(--muted-2); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { border-top: 1px solid var(--line); padding: 2.25rem 0; }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.footer__name { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.04em; font-size: 1.05rem; }
.footer__role { color: var(--muted-2); font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; }
.footer__top { color: var(--muted); font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; transition: color 0.2s; }
.footer__top:hover { color: var(--gold); }

/* ============================================================
   LIGHTBOX — video
   ============================================================ */
.lb, .ilb {
  position: fixed; inset: 0; z-index: 150; display: grid; place-items: center;
  background: rgba(6, 6, 6, 0.94); backdrop-filter: blur(8px); padding: clamp(1rem, 4vw, 3rem);
  opacity: 0; transition: opacity 0.3s var(--ease);
}
/* A class with display:grid would otherwise override the [hidden] attribute,
   leaving these full-viewport overlays on top and eating every click. */
.lb[hidden], .ilb[hidden] { display: none; }
.lb[data-open], .ilb[data-open] { opacity: 1; }
.lb__close {
  position: fixed; top: clamp(1rem, 3vw, 2rem); right: clamp(1rem, 3vw, 2rem); z-index: 5;
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  color: var(--ink); border: 1px solid var(--line-2); background: rgba(10,10,10,0.6);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.lb__close:hover { background: var(--gold); color: #0a0a0a; border-color: var(--gold); }
.lb__stage { width: min(100%, 1100px); aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); overflow: hidden; box-shadow: 0 30px 90px rgba(0,0,0,0.6); }
.lb__stage iframe { width: 100%; height: 100%; border: 0; }
.ilb__img { max-width: 100%; max-height: 88vh; width: auto; object-fit: contain; border-radius: var(--radius); box-shadow: 0 30px 90px rgba(0,0,0,0.6); }

/* ============================================================
   REVEAL ANIMATIONS
   ============================================================ */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
.reveal[data-delay="4"] { transition-delay: 0.32s; }
.reveal.in-view { opacity: 1; transform: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  .nav__links { display: none; }
  .nav__toggle { display: flex; }
  .work__grid { grid-template-columns: 1fr; }
  .project__media, .project--feature .project__media { aspect-ratio: 16 / 9; }
  .about__row { grid-template-columns: 1fr; }
  .about__cols { grid-template-columns: 1fr; }
  .onset__grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: clamp(150px, 38vw, 240px); }
  .hero__scroll { display: none; }
}
@media (min-width: 861px) {
  .nav__mobile { display: none !important; }
}
@media (max-width: 520px) {
  .onset__grid { grid-template-columns: 1fr; grid-auto-rows: clamp(180px, 56vw, 260px); }
  .onset__item--tall { grid-row: span 1; }
  .hero__actions { width: 100%; }
  .btn { flex: 1; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
  .hero__scroll svg { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__bg img { transform: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

/* ============================================================
   LOADING SCREEN — SG film-reel intro
   Film strips + triangle frame "thread on" via a rotational sweep,
   then the SG pulls into focus. Plays once and fades itself out
   (CSS-only, so it never blocks even if JS is off); main.js then
   removes the node. Hidden entirely for reduced-motion users.
   ============================================================ */
.preload {
  position: fixed; inset: 0; z-index: 1000;
  display: grid; place-items: center;
  background: var(--bg);
  animation: preloadOut 0.55s ease 2.55s forwards;
}
.preload__emb { position: relative; width: min(34vmin, 220px); aspect-ratio: 1; }
.preload__strips, .preload__sg { position: absolute; inset: 0; width: 100%; height: 100%; }
/* No CSS filter here on purpose: filter + <mask> on the same SVG triggers a
   white-box paint bug in iOS WebKit. The brand-red color is baked into the PNGs. */
.preload__strips { overflow: visible; }
.preload__strips circle {
  stroke-dasharray: 100; stroke-dashoffset: 100;
  transform: rotate(-90deg); transform-origin: 139.6px 124.3px;
  animation: preloadSpool 1.4s cubic-bezier(.5,.05,.2,1) forwards;
}
.preload__sg {
  opacity: 0; transform: scale(1.1); transform-origin: 54.5% 48.6%;
  filter: blur(9px);
  animation: preloadFocus 0.9s cubic-bezier(.22,.61,.31,1) 1.2s forwards;
}
.preload__bar {
  position: absolute; left: 0; bottom: 0; height: 2px; width: 0;
  background: var(--gold);
  animation: preloadBar 2.3s ease-in-out forwards;
}
@keyframes preloadSpool { to { stroke-dashoffset: 0; } }
@keyframes preloadFocus {
  0%   { opacity: 0; transform: scale(1.1); filter: blur(9px); }
  60%  { opacity: 1; }
  100% { opacity: 1; transform: scale(1);  filter: blur(0); }
}
@keyframes preloadBar { 0% { width: 0; } 80% { width: 100%; } 100% { width: 100%; } }
@keyframes preloadOut { to { opacity: 0; visibility: hidden; } }

@media (prefers-reduced-motion: reduce) {
  .preload { display: none !important; }
}
