/* Lunavis Consulting — site styles */

@font-face { font-family: "Sora"; font-style: normal; font-weight: 300; font-display: swap; src: url("../fonts/sora-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "Sora"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/sora-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }

:root {
  --bg: #0B1020;
  --bg-panel: #0E1427;
  --line: #252E4A;
  --line-soft: #1E2640;
  --line-strong: #39425C;
  --text: #E8ECF4;
  --text-soft: #C9D0DE;
  --text-muted: #A7B0C4;
  --text-faint: #8A94AB;
  --text-number: #6B7591;
  --eyebrow: #9AA6BF;
  --accent: #E9D6A6;          /* moon gold: logo + primary buttons only */
  --tech: #9CC3FF;            /* light blue: logo orbit trail */
  --accent-hover: #F4E6C2;

  --light-bg: #EEF0F4;        /* Approach section */
  --light-text: #0B1020;
  --light-muted: #4A5470;
  --light-line: #C3C8D4;
  --light-orbit: #2F6FD6;     /* orbit blue for light backgrounds */

  --font-display: "Sora", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --max: 1200px;
  --gutter: 24px;
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background-color: var(--bg);
  /* faint moonlight glow behind the header and hero */
  background-image: radial-gradient(ellipse 60% 70% at 85% 0%, rgba(233, 214, 166, 0.09), rgba(233, 214, 166, 0) 70%);
  background-repeat: no-repeat;
  background-size: 100% 900px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

svg { display: block; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.container { max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 10;
  background: var(--accent); color: var(--bg); padding: 10px 16px; border-radius: var(--radius);
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 16px; }

/* ---------- Header + hero glow ---------- */
.site-header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  padding-top: 20px; padding-bottom: 20px;
  border-bottom: 1px solid rgba(232, 236, 244, 0.07);
}
.brand { display: flex; align-items: center; gap: 14px; min-height: 44px; text-decoration: none; color: var(--text); }
.brand:hover { color: var(--text); }
.brand__mark { width: 38px; height: 38px; overflow: visible; }
/* logo animation: the orbit trail draws in once on load, then the satellite dot pops into place */
.brand__orbit { stroke-dasharray: 100; animation: lv-trace 1.1s cubic-bezier(0.4, 0, 0.2, 1) 0.25s both; }
.brand__sat { transform-box: fill-box; transform-origin: center; animation: lv-pop 0.45s cubic-bezier(0.3, 1.6, 0.5, 1) 1.2s both; }
@keyframes lv-trace { 0% { stroke-dashoffset: 100; opacity: 0; } 8% { opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .brand__orbit, .brand__sat { animation: none; } }
@keyframes lv-pop { from { transform: scale(0); } to { transform: scale(1); } }
.brand__rule { width: 1px; height: 32px; background: var(--line-strong); }
.brand__text { display: flex; flex-direction: column; line-height: 1; }
.brand__name { display: block; }   /* LUNAVIS wordmark, drawn as an SVG so the A has no crossbar */
.brand__sub { font-size: 10px; letter-spacing: 0.5em; color: var(--text-muted); text-transform: uppercase; margin-top: 8px; }

.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 28px; font-size: 15px; }
.nav__link { color: var(--text-soft); text-decoration: none; padding: 10px 0; }
.nav__link:hover { color: var(--text); }
.nav__cta {
  color: var(--text); text-decoration: none; font-weight: 500;
  padding: 9px 16px; border-radius: var(--radius); border: 1px solid #4A5470;
}
.nav__cta:hover { color: var(--text); border-color: var(--text-muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 12px 24px; border-radius: var(--radius);
  font-weight: 600; text-decoration: none; text-align: center;
  transition: background-color .15s ease, border-color .15s ease;
}
.btn--primary { background: var(--accent); color: var(--bg); }
.btn--primary:hover { background: var(--accent-hover); color: var(--bg); }
.btn--ghost { color: var(--text); border: 1px solid var(--line-strong); font-weight: 500; }
.btn--ghost:hover { color: var(--text); border-color: var(--text-muted); }

/* ---------- Shared type ---------- */
.eyebrow { margin: 0; font-weight: 400; font-size: 13px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--eyebrow); }
.section-head { display: flex; flex-wrap: wrap; gap: 24px 56px; margin-bottom: 56px; }
.section-head .eyebrow { flex: 1 1 200px; margin-top: 8px; }
.section-head--solo { margin-bottom: 24px; }
.section-title {
  flex: 999 1 520px; margin: 0;
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem); line-height: 1.15; letter-spacing: -0.02em;
}

/* small orbit-blue dot used between words in a heading */
.sep {
  display: inline-block; width: 0.17em; height: 0.17em; border-radius: 50%;
  background: var(--tech); vertical-align: middle; margin: 0 0.42em; position: relative; top: -0.04em;
}
.nowrap { white-space: nowrap; }

/* ---------- Hero ---------- */
/* London, Kent and the Channel at night from the ISS (NASA) as a faint watermark behind the hero.
   Screen blending drops the photo's black sky into the navy, leaving only the city lights. */
.hero-wrap { position: relative; isolation: isolate; overflow: hidden; }
.hero-wrap::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: url("../img/london-night-2000.jpg") center 30% / cover no-repeat;
  background-image: image-set(url("../img/london-night-2000.webp") type("image/webp"), url("../img/london-night-2000.jpg") type("image/jpeg"));
  mix-blend-mode: screen; opacity: 0.42;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 78%, transparent 100%);
          mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 78%, transparent 100%);
}
/* soft navy veil behind the facts list so its small labels stay readable over the city lights */
.facts { position: relative; }
.facts::before {
  content: ""; position: absolute; inset: -70px -90px; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(11, 16, 32, 0.9) 55%, rgba(11, 16, 32, 0));
}
.hero { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 56px; padding-top: 96px; padding-bottom: 112px; }
.hero__copy { flex: 999 1 560px; min-width: 0; }
.hero .eyebrow { margin-bottom: 24px; }
.hero__title {
  margin: 0 0 28px;
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(2.4rem, 5.4vw, 4.4rem); line-height: 1.06; letter-spacing: -0.03em;
}
.hero__line { display: block; text-wrap: balance; }   /* each statement on its own line, wrapped evenly */
.hero__title-soft { color: var(--text-muted); }
.hero__lead { margin: 0 0 40px; max-width: 34rem; font-size: 1.15rem; color: var(--text-muted); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

.facts { flex: 1 1 300px; margin: 0; display: flex; flex-direction: column; }
.facts div {
  display: grid; grid-template-columns: 88px 1fr; gap: 14px; align-items: baseline;
  padding: 16px 0; border-top: 1px solid var(--line);
}
.facts div:last-child { border-bottom: 1px solid var(--line); }
.facts dt { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-faint); }
.facts dd { margin: 0; font-family: var(--font-display); font-weight: 300; font-size: 18px; line-height: 1.4; color: var(--text); }
/* comma read by screen readers between dotted items, hidden visually */
.sr-sep { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Photos ---------- */
picture { display: block; }

/* ---------- Services ---------- */
.services { padding: 104px 0; }
.service-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); column-gap: 56px;
  border-bottom: 1px solid var(--line);
}
.service-list li { display: flex; gap: 24px; padding: 32px 0; border-top: 1px solid var(--line); }
.service-list__icon {
  flex: none; width: 48px; height: 48px; display: grid; place-items: center;
  border: 1px solid var(--line-strong); border-radius: 10px;
  background: linear-gradient(160deg, rgba(156, 195, 255, 0.08), rgba(156, 195, 255, 0) 70%);
}
.service-list__icon svg { width: 24px; height: 24px; fill: none; stroke: var(--tech); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.service-list h3 { margin: 4px 0 10px; font-family: var(--font-display); font-size: 21px; font-weight: 400; }
.service-list p { margin: 0; color: var(--text-muted); font-size: 16px; }
.service-list .service-list__outcome { margin-top: 14px; color: var(--text-soft); font-size: 15px; }
.service-list__outcome span {
  margin-right: 8px; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--tech);
}

/* ---------- Expertise ---------- */
.expertise { background: var(--bg-panel); border-top: 1px solid var(--line-soft); padding: 104px 0; }
.section-head__body { flex: 999 1 520px; min-width: 0; }
.section-head__body .section-title { margin-bottom: 20px; }
.section-intro { margin: 0; max-width: 40rem; color: var(--text-muted); font-size: 1.1rem; }
.expertise__body { display: flex; flex-wrap: wrap; gap: 40px 56px; align-items: stretch; }
.expertise__body picture { flex: 1 1 420px; min-width: 0; }
.expertise__img { display: block; width: 100%; height: 100%; min-height: 380px; object-fit: cover; border-radius: 8px; }
.points { flex: 1 1 420px; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 28px; }
.points li { padding-top: 28px; border-top: 1px solid var(--line); }
.points h3 { margin: 0 0 10px; font-family: var(--font-display); font-size: 21px; font-weight: 400; }
.points p { margin: 0; color: var(--text-muted); font-size: 16px; }

/* ---------- Approach (light section) ---------- */
.approach { background: var(--light-bg); color: var(--light-text); padding: 104px 0; }
.approach .eyebrow { color: var(--light-muted); }
/* the four phases as a moon-phase timeline: vertical on small screens, horizontal on wide ones,
   joined by a thin orbit-blue line */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.steps li { position: relative; padding: 0 0 36px 76px; min-height: 56px; }
.steps li::before {
  content: ""; position: absolute; left: 27px; top: 64px; bottom: 8px; width: 1.5px;
  background: linear-gradient(180deg, var(--light-orbit), rgba(47, 111, 214, 0.25));
}
.steps li:last-child { padding-bottom: 0; }
.steps li:last-child::before { display: none; }
.steps svg { position: absolute; left: 0; top: 0; width: 56px; height: 56px; }
.steps h3 { margin: 6px 0 8px; font-family: var(--font-display); font-size: 20px; font-weight: 400; }
.steps h3 span { color: var(--light-orbit); font-size: 15px; margin-right: 2px; }
.steps p { margin: 0; color: var(--light-muted); font-size: 16px; }
@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 32px; }
  .steps li { padding: 84px 0 0; }
  .steps li::before {
    left: 72px; right: -16px; top: 27px; bottom: auto; width: auto; height: 2px;
    background: linear-gradient(90deg, var(--light-orbit), rgba(47, 111, 214, 0.45));
  }
}
.phase-ring { fill: none; stroke: var(--light-text); stroke-width: 1.2; }
.phase-fill { fill: var(--light-text); }
.phase-cut { fill: var(--light-bg); }

/* ---------- About ---------- */
.about { padding: 104px 0 0; }
.about__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 40px 72px; }
/* portrait slot: monogram over the crescent for now; swap for a headshot later */
.about__portrait {
  position: relative; flex: 0 0 300px; aspect-ratio: 1; overflow: hidden;
  display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--line);
  background: radial-gradient(circle at 70% 25%, rgba(233, 214, 166, 0.14), rgba(233, 214, 166, 0) 60%), var(--bg-panel);
}
.about__initials {
  display: grid; place-items: center; width: 62%; aspect-ratio: 1; border-radius: 50%;
  border: 1px solid rgba(233, 214, 166, 0.35); box-shadow: 0 0 60px rgba(233, 214, 166, 0.08);
  font-family: var(--font-display); font-weight: 300; font-size: 64px; letter-spacing: 0.08em; text-indent: 0.08em; color: var(--accent);
}
.about__copy { flex: 1 1 460px; min-width: 0; }
.about__copy .eyebrow { margin-bottom: 20px; }
.about__copy .section-title { margin-bottom: 20px; }
.about__note { margin: 20px 0 0; max-width: 40rem; color: var(--text-soft); }
.about__sig { margin: 28px 0 0; font-family: var(--font-display); font-size: 18px; }
.about__sig span { display: block; margin-top: 4px; font-family: var(--font-body); font-size: 14px; color: var(--text-faint); }

/* ---------- Contact ---------- */
.contact { padding-top: 104px; padding-bottom: 104px; }
.contact__panel {
  border: 1px solid var(--line); border-radius: 8px;
  padding: clamp(32px, 6vw, 64px);
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 40px;
  background-color: var(--bg-panel);
  background-image: radial-gradient(ellipse 50% 80% at 100% 100%, rgba(233, 214, 166, 0.07), rgba(233, 214, 166, 0) 70%);
}
/* Artemis II crescent Moon (NASA), echoing the logo, rising behind the call to action */
.contact__panel { position: relative; isolation: isolate; overflow: hidden; }
.contact__panel::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  right: -60px; top: -40px; width: 620px; height: 395px;
  background: url("../img/crescent-moon-1200.jpg") center / contain no-repeat;
  background-image: image-set(url("../img/crescent-moon-1200.webp") type("image/webp"), url("../img/crescent-moon-1200.jpg") type("image/jpeg"));
  mix-blend-mode: screen; opacity: 0.5;
  -webkit-mask-image: radial-gradient(closest-side, #000 70%, transparent);
          mask-image: radial-gradient(closest-side, #000 70%, transparent);
}
.contact__copy { flex: 999 1 420px; min-width: 0; }
.contact__copy h2 {
  margin: 0 0 14px; font-family: var(--font-display); font-weight: 400;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem); line-height: 1.15; letter-spacing: -0.02em;
}
.contact__copy p { margin: 0; color: var(--text-muted); font-size: 1.1rem; }
.contact__copy .contact__where { margin-top: 16px; color: var(--text-faint); font-size: 15px; }
.contact__actions { flex: 1 1 240px; display: flex; flex-direction: column; gap: 12px; }

/* ---------- Footer ---------- */
.site-footer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  padding-top: 32px; padding-bottom: 48px; border-top: 1px solid var(--line-soft);
  color: var(--text-faint); font-size: 14px;
}
.site-footer__brand { display: flex; align-items: center; gap: 12px; }
.site-footer__brand svg { width: 22px; height: 22px; flex: none; }

/* ---------- Small screens ---------- */
@media (max-width: 640px) {
  :root { --gutter: 20px; }
  .nav__link { display: none; }                 /* phones: just the call-to-action */
  .hero-wrap::before {
    background-image: image-set(url("../img/london-night-phone-1000.webp") type("image/webp"), url("../img/london-night-phone-1000.jpg") type("image/jpeg"));
    background-size: 100% auto; background-position: center bottom;
    -webkit-mask-image: linear-gradient(180deg, transparent 52%, #000 72%, #000 90%, transparent 100%);
            mask-image: linear-gradient(180deg, transparent 52%, #000 72%, #000 90%, transparent 100%);
  }
  .contact__panel::before {
    width: 300px; height: 190px; right: -40px; top: -20px; opacity: 0.4;
    background-image: image-set(url("../img/crescent-moon-700.webp") type("image/webp"), url("../img/crescent-moon-700.jpg") type("image/jpeg"));
  }
  .hero { padding-top: 56px; padding-bottom: 72px; gap: 40px; }
  .services, .expertise, .approach { padding: 72px 0; }
  .about { padding-top: 72px; }
  .about__portrait { flex-basis: 132px; }
  .about__initials { font-size: 30px; }
  .contact { padding-top: 72px; padding-bottom: 72px; }
  .section-head { margin-bottom: 32px; }
  .expertise__img { min-height: 240px; }
  .hero__actions .btn { flex: 1 1 100%; }
  .site-footer { flex-direction: column; align-items: flex-start; }
}

/* ====================================================================
   Depth and motion (CSS only, no JavaScript)
   - a tilted 3D orbit turning slowly behind the hero
   - hero text rises in on load; the night photo drifts as you scroll
   - sections tilt up into place as they scroll into view
   - icons, photo and portrait lift in 3D on hover
   Scroll effects sit inside @supports, so browsers without scroll-driven
   animations simply show the page as normal. Everything is switched off
   for visitors who ask their device to reduce motion.
   ==================================================================== */

/* ---- 3D orbit behind the hero ---- */
.orbit {
  position: absolute; z-index: -1; pointer-events: none;
  width: 900px; aspect-ratio: 1; right: -260px; top: -150px; perspective: 1400px;
}
.orbit__ring {
  --rx: 68deg; --ry: -16deg; --turn: 360deg;
  position: absolute; inset: 0; border-radius: 50%; transform-style: preserve-3d;
  animation: lv-orbit 40s linear infinite;
}
.orbit__ring::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(156, 195, 255, 0.2); }
.orbit__ring::after {           /* light trail behind the satellite */
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(156, 195, 255, 0) 0 55%, rgba(156, 195, 255, 0.95));
  -webkit-mask: radial-gradient(closest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px));
          mask: radial-gradient(closest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px));
}
.orbit__sat {                   /* counter-rotated so the dot stays round while the ring is tilted */
  position: absolute; left: 50%; top: 0; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%;
  background: var(--tech); box-shadow: 0 0 14px 3px rgba(156, 195, 255, 0.55);
  animation: lv-orbit-sat 40s linear infinite;
}
.orbit__ring--inner { --rx: 74deg; --ry: 14deg; --turn: -360deg; inset: 19%; animation-duration: 64s; }
.orbit__ring--inner::after { background: conic-gradient(from 0deg, rgba(233, 214, 166, 0.8), rgba(233, 214, 166, 0) 38% 100%); }
.orbit__ring--inner .orbit__sat { width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; background: var(--accent); box-shadow: 0 0 12px 2px rgba(233, 214, 166, 0.5); animation-duration: 64s; }
@keyframes lv-orbit {
  from { transform: rotateX(var(--rx)) rotateY(var(--ry)) rotateZ(0deg); }
  to   { transform: rotateX(var(--rx)) rotateY(var(--ry)) rotateZ(var(--turn)); }
}
@keyframes lv-orbit-sat {
  from { transform: rotateZ(0deg) rotateY(calc(var(--ry) * -1)) rotateX(calc(var(--rx) * -1)); }
  to   { transform: rotateZ(calc(var(--turn) * -1)) rotateY(calc(var(--ry) * -1)) rotateX(calc(var(--rx) * -1)); }
}

/* ---- hero entrance on load ---- */
.hero__title { perspective: 900px; }
.hero__line { transform-origin: 50% 100%; animation: lv-line 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.hero__line + .hero__line { animation-delay: 0.14s; }
.hero__lead, .hero__actions, .facts div { animation: lv-in 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.hero__lead { animation-delay: 0.3s; }
.hero__actions { animation-delay: 0.42s; }
.facts div:nth-child(1) { animation-delay: 0.5s; }
.facts div:nth-child(2) { animation-delay: 0.58s; }
.facts div:nth-child(3) { animation-delay: 0.66s; }
.facts div:nth-child(4) { animation-delay: 0.74s; }
@keyframes lv-line { from { opacity: 0; transform: translateY(0.5em) rotateX(-38deg); } to { opacity: 1; transform: none; } }
@keyframes lv-in { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

/* ---- depth on surfaces, lift on hover ---- */
.btn { transition: background-color .15s ease, border-color .15s ease, transform .2s ease, box-shadow .2s ease; }
.btn--primary { box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset, 0 10px 24px -12px rgba(233, 214, 166, 0.55); }
.btn:hover { transform: translateY(-2px); }
.btn--primary:hover { box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset, 0 16px 30px -12px rgba(233, 214, 166, 0.7); }
.btn:active { transform: translateY(0); }

.service-list__icon {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 14px 24px -14px rgba(0, 0, 0, 0.9);
  transition: transform .35s cubic-bezier(0.2, 0.7, 0.2, 1), border-color .25s ease, box-shadow .35s ease;
}

.expertise__body { perspective: 1400px; }
.expertise__img {
  box-shadow: 0 40px 60px -36px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(156, 195, 255, 0.1);
  transition: transform .5s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.about__inner { perspective: 1200px; }
.about__portrait { box-shadow: 0 40px 60px -36px rgba(0, 0, 0, 0.95); transition: transform .5s cubic-bezier(0.2, 0.7, 0.2, 1); }
.about__initials { position: relative; }
.about__initials::after {       /* small satellite circling the monogram ring */
  content: ""; position: absolute; inset: -6px; border-radius: 50%;
  background: radial-gradient(circle 4px at 50% 6px, var(--tech) 96%, rgba(156, 195, 255, 0));
  animation: lv-spin 16s linear infinite;
}
@keyframes lv-spin { to { transform: rotate(360deg); } }

.contact__panel { box-shadow: 0 50px 80px -50px rgba(0, 0, 0, 0.9); }
.contact__panel::before { animation: lv-float 12s ease-in-out infinite alternate; }
@keyframes lv-float { from { transform: translateY(6px) rotate(1.5deg); } to { transform: translateY(-10px) rotate(-2.5deg); } }

/* tilted elements must never widen the page */
.services, .expertise, .approach, .about, .contact { overflow-x: clip; }

/* ---- scroll-driven depth (Chrome, Edge, Safari 26+; ignored elsewhere) ---- */
@supports (animation-timeline: view()) {
  /* the night photo and the orbit move at different speeds as the hero scrolls away */
  .hero-wrap::before { animation: lv-drift linear both; animation-timeline: scroll(root); animation-range: 0 100vh; }
  .orbit { animation: lv-drift-orbit linear both; animation-timeline: scroll(root); animation-range: 0 100vh; }
  @keyframes lv-drift { to { transform: translateY(16%) scale(1.18); } }
  /* the moon grows and sinks slowly, and the hero text falls away into the distance */
  .moon3d { animation: lv-moon linear both; animation-timeline: scroll(root); animation-range: 0 100vh; }
  .hero { animation: lv-dive linear both; animation-timeline: scroll(root); animation-range: 0 85vh; }
  @keyframes lv-moon { to { transform: translateY(190px) scale(1.35); } }
  @keyframes lv-dive { to { transform: perspective(1000px) translateY(-30px) translateZ(-160px) rotateX(8deg); opacity: 0.1; } }
  @keyframes lv-drift-orbit { to { transform: translateY(-90px) scale(1.12); } }

  .section-head, .service-list li, .points li, .steps li, .about__copy, .contact__panel {
    animation: lv-rise linear both; animation-timeline: view(); animation-range: cover 0% cover 26%;
  }
  .service-list li:nth-child(even), .points li:nth-child(2), .steps li:nth-child(2) { animation-range: cover 3% cover 29%; }
  .points li:nth-child(3), .steps li:nth-child(3) { animation-range: cover 6% cover 32%; }
  .steps li:nth-child(4) { animation-range: cover 9% cover 35%; }
  @keyframes lv-rise {
    from { opacity: 0; transform: perspective(800px) translateY(90px) rotateX(26deg) scale(0.94); }
    to   { opacity: 1; transform: none; }
  }

  /* photo and portrait swing round to face you */
  .expertise__body picture { animation: lv-swing linear both; animation-timeline: view(); animation-range: cover 0% cover 38%; }
  .about__portrait { animation: lv-swing-r linear both; animation-timeline: view(); animation-range: cover 0% cover 34%; }
  @keyframes lv-swing { from { opacity: 0; transform: rotateY(-24deg) rotateX(6deg) translateY(50px) scale(0.92); } to { opacity: 1; transform: none; } }
  @keyframes lv-swing-r { from { opacity: 0; transform: rotateY(26deg) rotateX(6deg) translateY(40px) scale(0.9); } to { opacity: 1; transform: none; } }

  /* moon phases turn into place and the orbit line draws between them */
  .steps svg { animation: lv-phase linear both; animation-timeline: view(); animation-range: cover 4% cover 34%; }
  .steps li::before { transform-origin: 0 0; animation: lv-draw linear both; animation-timeline: view(); animation-range: cover 10% cover 40%; }
  @keyframes lv-phase { from { transform: scale(0.3) rotate(-120deg); opacity: 0; } to { transform: none; opacity: 1; } }
  @keyframes lv-draw { from { scale: 0; } to { scale: 1; } }
}

/* ---- live 3D moon (drawn by assets/js/site.js) ---- */
.moon3d {
  position: absolute; z-index: -1; pointer-events: none; opacity: 0; transition: opacity 1.6s ease 0.2s;
  width: 780px; height: 690px; top: -192px; left: calc(50% + min(600px, 50%) - 590px);
}
.gl .moon3d { opacity: 1; }
.gl .orbit { display: none; }              /* CSS orbit is only the fallback when WebGL is unavailable */
.hero-wrap::before { translate: calc(var(--px, 0) * -22px) calc(var(--py, 0) * 14px); }   /* photo shifts against the pointer */

/* ---- service cards that tilt towards the pointer, with layers at different depths ---- */
.service-list { perspective: 1400px; gap: 24px; border-bottom: 0; }
.service-list li {
  position: relative; padding: 28px; border: 1px solid var(--line); border-radius: 14px;
  background: linear-gradient(160deg, rgba(156, 195, 255, 0.07), rgba(14, 20, 39, 0) 46%), var(--bg-panel);
  box-shadow: 0 34px 50px -40px rgba(0, 0, 0, 0.95);
  transform-style: preserve-3d;
  rotate: var(--ax, 0) var(--ay, 1) 0 calc(var(--amt, 0) * 12deg);
  transition: rotate .6s cubic-bezier(0.2, 0.7, 0.2, 1), border-color .3s ease, box-shadow .3s ease;
}
.service-list li:hover, .service-list li[style*="--amt"] { transition-duration: .12s, .3s, .3s; border-color: rgba(156, 195, 255, 0.45); box-shadow: 0 44px 60px -36px rgba(0, 0, 0, 1), 0 0 40px -18px rgba(156, 195, 255, 0.5); }
.service-list li::after {                  /* soft light that follows the pointer */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s ease;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(156, 195, 255, 0.17), rgba(156, 195, 255, 0) 55%);
}
.service-list li:hover::after, .service-list li[style*="--amt"]::after { opacity: 1; }
.service-list__icon { transform: translateZ(46px); }
.service-list li > div { transform: translateZ(20px); }
.expertise__body picture, .about__portrait {
  rotate: var(--ax, 0) var(--ay, 1) 0 calc(var(--amt, 0) * 10deg);
  transition: rotate .6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.expertise__body picture[style*="--amt"], .about__portrait[style*="--amt"] { transition-duration: .12s; }

@media (max-width: 1099px) {
  .moon3d { width: 560px; height: 500px; top: -150px; left: auto; right: -160px; }
}
@media (max-width: 640px) {
  .moon3d { width: 360px; height: 300px; top: -52px; right: -70px; }
  .gl .hero { padding-top: 190px; }
  .service-list li { padding: 22px; }
}
@media (max-width: 640px) {
  .orbit { width: 420px; right: -260px; top: -150px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .btn:hover, .service-list li:hover .service-list__icon, .service-list li:hover > div,
  .expertise__body picture:hover .expertise__img, .about__portrait:hover { transform: none; }
  .orbit__ring { transform: rotateX(var(--rx)) rotateY(var(--ry)); }
  .orbit__sat { transform: rotateY(calc(var(--ry) * -1)) rotateX(calc(var(--rx) * -1)); }
}
