/* ---------- Grift ---------- */
@font-face {
  font-family: 'Grift';
  src: url('../grift-2026-04-07-06-24-15-utc/Web-TT/Grift-Regular.woff2') format('woff2'),
       url('../grift-2026-04-07-06-24-15-utc/Web-TT/Grift-Regular.woff') format('woff');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Grift';
  src: url('../grift-2026-04-07-06-24-15-utc/Web-TT/Grift-Italic.woff2') format('woff2'),
       url('../grift-2026-04-07-06-24-15-utc/Web-TT/Grift-Italic.woff') format('woff');
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Grift';
  src: url('../grift-2026-04-07-06-24-15-utc/Web-TT/Grift-Medium.woff2') format('woff2'),
       url('../grift-2026-04-07-06-24-15-utc/Web-TT/Grift-Medium.woff') format('woff');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Grift';
  src: url('../grift-2026-04-07-06-24-15-utc/Web-TT/Grift-SemiBold.woff2') format('woff2'),
       url('../grift-2026-04-07-06-24-15-utc/Web-TT/Grift-SemiBold.woff') format('woff');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Grift';
  src: url('../grift-2026-04-07-06-24-15-utc/Web-TT/Grift-Bold.woff2') format('woff2'),
       url('../grift-2026-04-07-06-24-15-utc/Web-TT/Grift-Bold.woff') format('woff');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Grift';
  src: url('../grift-2026-04-07-06-24-15-utc/Web-TT/Grift-ExtraBold.woff2') format('woff2'),
       url('../grift-2026-04-07-06-24-15-utc/Web-TT/Grift-ExtraBold.woff') format('woff');
  font-weight: 800; font-style: normal; font-display: swap;
}

/* ---------- Trully Signature (tagline only) ---------- */
@font-face {
  font-family: 'Trully Signature';
  src: url('../Trully%20Signature%20Trial.ttf') format('truetype');
  font-weight: normal; font-style: normal; font-display: swap;
}

:root {
  --bg: #050507;
  --bg-2: #08080d;
  --text: #f2f2f5;
  --muted: #9a9aa8;
  --line: rgba(255, 255, 255, 0.08);
  --accent: #6d5dfc;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  /* Scroll is driven manually by js/dive.js (snap between work/contact),
     so native smooth-scroll must stay off to avoid fighting the animation. */
  scroll-behavior: auto;
}

body {
  --dive: 0; /* 0 = globe closed, 1 = fully opened (set by js/dive.js) */
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Grift', system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

/* ---------- Layers ---------- */

#globe-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  touch-action: none; /* swipes are handled by the snap controller in js/dive.js */
}

#vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
    ellipse 85% 75% at 50% 55%,
    transparent 42%,
    rgba(0, 0, 0, 0.55) 100%
  );
}

/* ---------- Nav ---------- */

#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
}

.logo-img {
  height: 22px;
  width: auto;
  display: block;
}

.pill-nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 2px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(12, 12, 18, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.pill-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 999px;
  transition: color 0.25s ease, background 0.25s ease;
}

.pill-nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}

.nav-actions {
  display: flex;
  gap: 10px;
}

.btn {
  display: inline-block;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-ghost {
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(12, 12, 18, 0.4);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-solid {
  background: #ffffff;
  color: #0a0a0f;
}

.btn-solid:hover {
  background: #e9e9f2;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
}

/* ---------- Hero ---------- */

#hero {
  position: relative;
  z-index: 2;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 16vh 24px 0;
  pointer-events: none; /* drags pass through to the globe canvas */
  transition: opacity 0.5s ease;
  scroll-snap-align: start;
}

body.is-focused #hero-text {
  opacity: 0;
  pointer-events: none;
}

.chip {
  display: inline-block;
  padding: 7px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

#hero h1 {
  margin-top: 22px;
  font-size: clamp(2.5rem, 6.5vw, 4.8rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.04;
  color: #ffffff;
}

#hero h1,
#hero p {
  max-width: 100%;
}

#hero p {
  margin-top: 18px;
  max-width: min(460px, 100%);
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

/* Hero entrance */
.fade-up {
  opacity: 0;
  animation: fadeUp 1s cubic-bezier(0.22, 1, 0.36, 1) var(--d, 0s) forwards;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Immersive stage (work headline → about dive) ---------- */

#stage {
  position: fixed;
  inset: 0;
  z-index: 2; /* above canvas + vignette, below <main> sections */
  pointer-events: none;
}

/* Centre vignette that deepens as the camera dives into the globe,
   focusing attention on the About card. */
#stage::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0; /* dims the globe behind, but sits below the stage text */
  pointer-events: none;
  background: radial-gradient(
    ellipse 78% 78% at 50% 50%,
    rgba(0, 0, 0, 0.5) 0%,
    rgba(0, 0, 0, 0.9) 100%
  );
  opacity: calc(var(--dive) * 0.96);
}

/* Work headline — floats high over the low-sitting globe, like the old hero. */
#hero-text {
  position: absolute;
  z-index: 1; /* above the dive vignette */
  top: 18vh;
  left: 0;
  right: 0;
  text-align: center;
  padding: 0 24px;
  opacity: 1;
  transition: opacity 0.45s ease;
  will-change: opacity, transform;
}

#hero-text h1 {
  font-size: clamp(2.5rem, 6.5vw, 4.8rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.04;
  background: linear-gradient(180deg, #ffffff 30%, #b6b6cc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-cue {
  margin-top: 30px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero-cue .cue-line {
  width: 1px;
  height: 46px;
  background: linear-gradient(var(--muted), transparent);
  transform-origin: top;
  animation: cuePulse 2.6s ease-in-out infinite;
}

@keyframes cuePulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
  50% { opacity: 0.9; transform: scaleY(1); }
}

/* About card — appears at the mid-globe rest stop. */
#about-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  padding: 0 24px;
  pointer-events: none;
}

#about-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 760px;
  opacity: 0;
  will-change: opacity, transform;
}

.about-card-title {
  font-size: clamp(1.2rem, 2.4vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  white-space: nowrap;
  color: #ffffff;
}

.about-card-body {
  margin-top: 28px;
  color: rgba(195, 195, 210, 0.78);
  font-size: clamp(14px, 1.6vw, 18px);
  font-weight: 400;
  line-height: 1.85;
  letter-spacing: 0.005em;
}

.about-card-subtitle {
  margin-top: 56px;
  font-size: clamp(1.1rem, 2vw, 1.7rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  white-space: nowrap;
  color: #ffffff;
}

.about-card-list {
  margin-top: 28px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: rgba(195, 195, 210, 0.78);
  font-size: clamp(14px, 1.6vw, 18px);
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: 0.005em;
}

.about-card-list strong {
  color: #ffffff;
  font-weight: 600;
}

/* Contact card — appears at the mid-globe rest stop. */
#contact-overlay {
  position: absolute;
  inset: 0;
  z-index: 1; /* above the dive vignette */
  display: grid;
  place-items: center;
  padding: 0 24px;
  pointer-events: none;
}

#contact-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 620px;
  opacity: 0; /* opacity/transform driven by js/dive.js */
  will-change: opacity, transform;
}

#contact-card h2 {
  font-size: clamp(1.9rem, 4.6vw, 3rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.04;
  color: #ffffff;
}

#contact-card .lead {
  margin-top: 16px;
  max-width: 480px;
  color: var(--muted);
  font-size: clamp(15px, 1.5vw, 17px);
  line-height: 1.7;
}

#contact-card .btn-lg {
  margin-top: 30px;
}

.contact-details {
  display: flex;
  gap: 72px;
  margin-top: 20px;
  justify-content: center;
}

.contact-detail-link {
  color: var(--muted);
  text-decoration: none;
  font-size: clamp(13px, 1.3vw, 15px);
  font-weight: 500;
  transition: color 0.25s ease;
}

.contact-detail-link:hover {
  color: var(--text);
}

#contact-card .socials {
  margin-top: 28px;
}

#contact-card .tagline {
  margin-top: 34px;
  white-space: nowrap;
  font-size: clamp(2rem, 7vw, 3.4rem);
}

/* ---------- Detail panel ---------- */

#detail-panel {
  position: fixed;
  z-index: 20;
  top: 50%;
  right: clamp(20px, 8vw, 140px);
  width: min(380px, calc(100vw - 48px));
  transform: translateY(-50%) translateX(40px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0.6s;
}

#detail-panel.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%);
  transition-delay: 0.2s, 0.2s, 0s;
}

/* Detail text on the left when the card came from the right side. */
#detail-panel.side-left {
  right: auto;
  left: clamp(20px, 8vw, 140px);
  transform: translateY(-50%) translateX(-40px);
}

#detail-panel.side-left.is-open {
  transform: translateY(-50%);
}

#detail-panel.side-left #detail-close {
  right: auto;
  left: 0;
}

/* ---------- Floating category chips around a focused card ---------- */

#card-tags {
  position: fixed;
  inset: 0;
  z-index: 19;
  pointer-events: none;
}

.card-tags-anchor {
  position: absolute;
  width: 0;
  height: 0;
}

.card-tag {
  position: absolute;
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(18, 20, 28, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #ececf3;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 0.5s ease var(--cd, 0s),
    transform 0.6s cubic-bezier(0.22, 1, 0.36, 1) var(--cd, 0s);
}

#card-tags.is-open .card-tag {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

#detail-close {
  position: absolute;
  top: -32px;
  right: 0;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.25s ease, border-color 0.25s ease;
}

#detail-close:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.25);
}

#detail-panel h2 {
  margin-top: 16px;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

#detail-panel p {
  margin-top: 14px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.panel-cta {
  margin-top: 22px;
}

/* ---------- Content sections ---------- */

main {
  position: relative;
  z-index: 3;
  background: transparent; /* let the fixed globe show through during the dive */
  pointer-events: none; /* it only holds the scroll spacer — let clicks reach the globe */
}

/* The work spacer is invisible and click-through so the globe behind it
   receives drag/click while it defines the dive scroll distance. */
#work-scroll {
  position: relative;
  z-index: 3;
  height: 340vh;
  pointer-events: none;
  background: transparent;
}

.content-section {
  position: relative;
  z-index: 3;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 clamp(24px, 10vw, 160px);
  background: transparent;
  scroll-snap-align: start;
  border-top: none;
}

.content-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  pointer-events: none;
}


.section-label {
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.content-section > * {
  position: relative;
  z-index: 1;
}

.content-section h2 {
  margin-top: 14px;
  max-width: 640px;
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.lead {
  margin-top: 18px;
  max-width: 560px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  margin-top: 48px;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-num {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(180deg, #fff, #a9a9c2);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat-label {
  color: var(--muted);
  font-size: 14px;
}

.skill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.skill-chip {
  padding: 11px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  transition: border-color 0.25s ease, background 0.25s ease,
    transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.skill-chip:hover {
  border-color: rgba(109, 93, 252, 0.5);
  background: rgba(109, 93, 252, 0.08);
  transform: translateY(-2px);
}

.contact-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.contact-center h2,
.contact-center .lead {
  max-width: 560px;
}

.contact-center .btn-lg {
  margin-top: 32px;
}

.socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 26px;
  margin-top: 30px;
}

.socials a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.25s ease;
}

.socials a:hover {
  color: var(--text);
}

.social-icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.tagline {
  margin-top: 40px;
  font-family: 'Trully Signature', cursive;
  font-size: clamp(2.2rem, 6vw, 4rem);
  color: var(--text);
  letter-spacing: 0.01em;
}

/* ---------- Book Appointment modal ---------- */

#appt-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0s linear 0.35s;
}

#appt-modal.is-open {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

#appt-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: pointer;
}

#appt-modal-box {
  position: relative;
  width: min(660px, 100%);
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: clamp(32px, 5vw, 52px) clamp(28px, 5vw, 52px) clamp(36px, 5vw, 52px);
  transform: translateY(24px) scale(0.97);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

#appt-modal.is-open #appt-modal-box {
  transform: none;
}

#appt-modal-close {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 36px;
  height: 36px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

#appt-modal-close:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.25);
}

#appt-modal-title {
  text-align: center;
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--text);
  margin-bottom: 28px;
}

.appt-field {
  margin-bottom: 16px;
}

.appt-field input,
.appt-field textarea {
  width: 100%;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 10px;
  padding: 16px 20px;
  color: var(--text);
  font-family: 'Grift', system-ui, sans-serif;
  font-size: 15px;
  font-weight: 400;
  outline: none;
  resize: vertical;
  transition: border-color 0.2s ease;
}

.appt-field input::placeholder,
.appt-field textarea::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.appt-field input:focus,
.appt-field textarea:focus {
  border-color: rgba(255, 255, 255, 0.6);
}

.appt-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  margin-top: 20px;
  user-select: none;
}

.appt-checkbox input[type="checkbox"] {
  display: none;
}

.appt-checkbox-box {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  background: transparent;
  margin-top: 1px;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.appt-checkbox input:checked ~ .appt-checkbox-box {
  background: #fff;
  border-color: #fff;
}

.appt-submit {
  display: block;
  margin: 28px auto 0;
  width: 180px;
  padding: 16px 0;
  background: #fff;
  color: #0a0a0f;
  border: none;
  border-radius: 10px;
  font-family: 'Grift', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.appt-submit:hover {
  background: #e9e9f2;
  transform: translateY(-1px);
}

footer {
  position: relative;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  padding: 20px 32px;
  border-top: 1px solid var(--line);
  background: var(--bg);
  color: var(--muted);
  font-size: 13px;
}

/* ---------- Split section layout ---------- */

.content-section.split {
  flex-direction: row;
  padding: 0;
  background: transparent;
  overflow: hidden;
  position: relative;
}

/* Dark veil over the shared background so text stays legible */
.content-section.split::before {
  display: block;
  background: rgba(0, 0, 0, 0.5);
}

.section-text {
  flex: 1 1 58%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 0;
  padding-bottom: 0;
  padding-left: clamp(40px, 8vw, 120px);
  padding-right: clamp(24px, 4vw, 60px);
}

.section-photo {
  width: clamp(260px, 40vw, 560px);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  margin: 0;
}

.section-photo::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Dark veil over the photo for mood */
.section-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.38);
  z-index: 1;
  pointer-events: none;
}

.section-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 1.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.content-section.split:hover .section-photo-img {
  transform: scale(1.04);
}

/* ---------- About diagonal layout (top-left + bottom-left) ---------- */

/* Diagonal composition: header one top-left, header two bottom-right */
.section-text--diagonal {
  justify-content: space-between;
  padding-top: clamp(116px, 17vh, 160px);
  padding-bottom: clamp(56px, 9vh, 100px);
  padding-right: clamp(40px, 8vw, 120px);
}

#about .about-top {
  align-self: flex-start;
  max-width: 560px;
}

#about .about-bottom {
  align-self: flex-end;
  text-align: right;
  max-width: 560px;
}

/* Bigger, bolder headers with a gentle continuous float */
#about .about-top h2 {
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  line-height: 1.04;
}

#about .about-bottom-head {
  font-size: clamp(2rem, 4.2vw, 3rem);
}

.about-float {
  animation: aboutFloat 6.5s ease-in-out infinite;
  will-change: transform;
}

.about-float--alt {
  animation-duration: 8s;
  animation-direction: alternate-reverse;
}

@keyframes aboutFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.about-top .lead {
  max-width: 540px;
}

.about-bottom {
  position: relative;
}

/* Accent rule (right-anchored on the bottom block) that draws itself in */
.about-rule {
  display: block;
  width: 0;
  height: 2px;
  margin: 0 0 22px auto;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.85));
  transition: width 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.35s;
}

.about-bottom.is-visible .about-rule {
  width: clamp(64px, 10vw, 120px);
}

.about-bottom-head {
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--text);
}

.about-bottom .lead {
  margin-top: 14px;
  max-width: 540px;
  margin-left: auto;
}

/* ---------- About ambient decoration (fills the open right side) ---------- */

.about-stage .about-ambient {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  /* --px/--py are nudged by the cursor (about-fx.js) for parallax */
  transform: translate3d(calc(var(--px, 0) * 1px), calc(var(--py, 0) * 1px), 0);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* The text layer drifts the opposite way for depth */
.about-stage .section-text {
  transform: translate3d(calc(var(--px, 0) * -0.4px), calc(var(--py, 0) * -0.4px), 0);
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.about-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  will-change: transform;
}

.about-orb--a {
  width: 40vw;
  max-width: 540px;
  aspect-ratio: 1;
  top: -12%;
  right: -6%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1), transparent 68%);
  animation: orbDriftA 24s ease-in-out infinite;
}

.about-orb--b {
  width: 30vw;
  max-width: 420px;
  aspect-ratio: 1;
  bottom: -14%;
  left: 26%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.06), transparent 70%);
  animation: orbDriftB 28s ease-in-out infinite;
}

/* Flowing contour line-art — faint warm strokes, kept well below text contrast */
.about-flow {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: rgba(240, 234, 224, 0.16);
  pointer-events: none;
}

/* Outer companion loops sit fainter than the dot's loop */
.about-flow-faint {
  opacity: 0.5;
}

/* Continuation of the flow at the top of the process section */
.process-flow {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: rgba(240, 234, 224, 0.12);
  pointer-events: none;
}

.about-travel-dot {
  fill: rgba(255, 251, 244, 0.95);
}

.about-travel-glow {
  fill: rgba(255, 248, 236, 0.5);
}

/* Soft spotlight that follows the cursor (--mx/--my set by about-fx.js) */
.about-spotlight {
  position: absolute;
  top: 0;
  left: 0;
  width: 440px;
  height: 440px;
  margin: -220px 0 0 -220px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 249, 238, 0.13),
    rgba(255, 249, 238, 0.05) 42%,
    transparent 70%
  );
  transform: translate(var(--mx, -9999px), var(--my, -9999px));
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
}

.about-stage.is-hovering .about-spotlight {
  opacity: 1;
}


/* ---------- Process — "How it Takes Shape" black focused stage ---------- */

#process.process-stage {
  position: relative;
  overflow: hidden;
  padding: 0 clamp(24px, 8vw, 140px);
  background: transparent;
}

/* Dark veil over the shared background — keeps the focused black mood */
#process.process-stage::before {
  display: block;
  z-index: 0;
  background: rgba(0, 0, 0, 0.62);
}

.process-ambient {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.process-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
  will-change: transform;
}

.process-orb--a {
  width: 46vw;
  height: 46vw;
  max-width: 620px;
  max-height: 620px;
  top: -14%;
  left: -8%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1), transparent 68%);
  animation: orbDriftA 22s ease-in-out infinite;
}

.process-orb--b {
  width: 38vw;
  height: 38vw;
  max-width: 520px;
  max-height: 520px;
  bottom: -16%;
  right: -6%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.07), transparent 70%);
  animation: orbDriftB 26s ease-in-out infinite;
}

.process-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 45%, #000 30%, transparent 78%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 45%, #000 30%, transparent 78%);
  opacity: 0.6;
}

@keyframes orbDriftA {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(6%, 8%) scale(1.08); }
}

@keyframes orbDriftB {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-7%, -6%) scale(1.1); }
}

.process-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
}

.process-eyebrow {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.22em;
}

.process-head h2 {
  margin-top: 14px;
  max-width: 720px;
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
  background: linear-gradient(180deg, #fff 35%, #9a9aa8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.process-head .lead {
  max-width: 600px;
}

/* The rail of four phases */
.process-rail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(20px, 3vw, 44px);
  margin-top: clamp(48px, 7vh, 84px);
}

.phase {
  position: relative;
  padding-top: 56px;
}

/* Connector segment that sits behind every node */
.phase-track {
  position: absolute;
  top: 23px;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

/* The traveling light that flows along the rail */
.phase-track::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.8),
    transparent
  );
  transform: translateX(-100%);
  animation: railFlow 8s linear infinite;
  animation-delay: calc(var(--i) * 2s);
}

/* The first phase has no incoming line on its left */
.phase[data-index='0'] .phase-track {
  left: 24px;
}

@keyframes railFlow {
  0% { transform: translateX(-100%); }
  40%, 100% { transform: translateX(100%); }
}

.phase-node {
  position: absolute;
  top: 0;
  left: 0;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(10, 10, 16, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--muted);
  transition: color 0.5s ease, border-color 0.5s ease,
    box-shadow 0.5s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.phase-glyph svg {
  width: 22px;
  height: 22px;
  display: block;
}

/* Pulsing ring that animates on the active phase */
.phase-ring {
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.85);
  opacity: 0;
}

.phase-num {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.3);
  transition: color 0.5s ease;
}

.phase-name {
  margin-top: 8px;
  font-size: clamp(1.15rem, 1.8vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  transition: color 0.5s ease;
}

.phase-desc {
  margin-top: 10px;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--muted);
  transition: color 0.5s ease, opacity 0.5s ease;
  opacity: 0.7;
}

/* Completed phases keep a quiet accent so progress reads left-to-right */
.phase.is-done .phase-node {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.35);
}

.phase.is-done .phase-num {
  color: rgba(255, 255, 255, 0.55);
}

/* Active phase — spotlight */
.phase.is-active .phase-node {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.9);
  transform: scale(1.08);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.08),
    0 10px 40px rgba(255, 255, 255, 0.18);
}

.phase.is-active .phase-ring {
  animation: nodePulse 2.2s ease-out infinite;
}

.phase.is-active .phase-num {
  color: #fff;
}

.phase.is-active .phase-name {
  color: #fff;
}

.phase.is-active .phase-desc {
  color: var(--text);
  opacity: 1;
}

@keyframes nodePulse {
  0% { opacity: 0.7; transform: scale(1); }
  70% { opacity: 0; transform: scale(1.9); }
  100% { opacity: 0; transform: scale(1.9); }
}

/* ---------- Scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease var(--d, 0s),
    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1) var(--d, 0s);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .pill-nav,
  .btn-ghost {
    display: none;
  }

  #nav {
    padding: 14px 20px;
  }

  #hero h1 {
    font-size: clamp(1.9rem, 8.5vw, 3rem);
  }

  .content-section {
    padding: 0 24px;
  }

  .content-section.split {
    flex-direction: column;
    padding: 0;
    position: relative;
  }

  /* Image fills the whole slide as a background layer */
  .section-photo {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
  }

  /* On mobile swap the left-fade gradient for a subtle top vignette */
  .section-photo::before {
    background: linear-gradient(to bottom, rgba(5, 5, 7, 0.25) 0%, transparent 50%);
  }

  /* Heavier dark veil so text stays legible over any image */
  .section-photo::after {
    background: rgba(0, 0, 0, 0.64);
  }

  /* Text floats above the image */
  .section-text {
    position: relative;
    z-index: 2;
    height: 100%;
    padding: clamp(80px, 14vh, 120px) 24px clamp(40px, 8vh, 80px);
  }

  #detail-panel {
    top: auto;
    bottom: 24px;
    left: 16px;
    right: 16px;
    width: auto;
    padding: 22px 22px 26px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(10, 10, 16, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transform: translateY(30px);
  }

  #detail-panel.is-open {
    transform: none;
  }

  #detail-close {
    top: 14px;
    right: 14px;
  }

  #detail-panel h2 {
    font-size: 26px;
    margin-top: 8px;
  }

  .stats {
    gap: 32px;
  }

  /* About: stack to a single left-aligned column on small screens */
  #about .about-bottom {
    align-self: flex-start;
    text-align: left;
  }

  .about-rule {
    margin-left: 0;
  }

  .about-bottom .lead {
    margin-left: 0;
  }

  .about-orb--b {
    left: -10%;
  }

  /* Process rail becomes a vertical timeline */
  #process.process-stage {
    height: auto;
    min-height: 100vh;
    padding: clamp(96px, 16vh, 130px) 24px clamp(48px, 8vh, 80px);
    justify-content: center;
  }

  .process-rail {
    grid-template-columns: 1fr;
    gap: 0;
    margin-top: clamp(36px, 6vh, 56px);
  }

  .phase {
    padding: 0 0 30px 64px;
    min-height: 64px;
  }

  .phase:last-child {
    padding-bottom: 0;
  }

  /* Vertical connector down the left edge */
  .phase-track {
    top: 48px;
    left: 23px;
    right: auto;
    bottom: -4px;
    width: 1px;
    height: auto;
  }

  .phase:last-child .phase-track {
    display: none;
  }

  .phase-track::after {
    background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    animation-name: railFlowV;
  }

  @keyframes railFlowV {
    0% { transform: translateY(-100%); }
    40%, 100% { transform: translateY(100%); }
  }

  .phase[data-index='0'] .phase-track {
    left: 23px;
  }

  .phase-num {
    margin-top: 2px;
  }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .fade-up {
    animation: none;
    opacity: 1;
  }

  .reveal {
    transition: none;
  }

  #detail-panel {
    /* transform still snaps via the untransitioned property; only fade briefly */
    transition: opacity 0.15s ease;
  }

  .process-orb,
  .phase-track::after,
  .phase-ring,
  .about-orb,
  .about-float {
    animation: none;
  }

  .about-spotlight {
    display: none;
  }

  .about-stage .about-ambient,
  .about-stage .section-text {
    transform: none;
  }

  .about-rule {
    transition: none;
    width: clamp(64px, 10vw, 120px);
  }

  /* initProcess() lights every phase when motion is reduced */
  .phase .phase-node {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.35);
  }

  .phase .phase-desc {
    opacity: 1;
  }
}
