/* Homepage-only cinematic layer */

/* Continuous page atmosphere — no hard section jumps */
.is-home {
  background:
    radial-gradient(1200px 640px at 12% -4%, rgba(15, 158, 147, 0.11), transparent 58%),
    radial-gradient(900px 520px at 96% 18%, rgba(7, 19, 31, 0.05), transparent 52%),
    radial-gradient(800px 480px at 70% 72%, rgba(255, 79, 109, 0.045), transparent 55%),
    var(--paper);
}

.is-home .home-main {
  position: relative;
  isolation: isolate;
}

.is-home .home-day .section {
  padding: clamp(2.25rem, 5.5vw, 3.75rem) 0;
}
.is-home #upcoming {
  padding-top: clamp(1.75rem, 4vw, 2.75rem);
}
.is-home #experiences {
  padding-top: clamp(1.75rem, 4vw, 2.75rem);
}

/* Shared light field — one continuous surface across day sections */
.is-home .home-day {
  position: relative;
  background:
    radial-gradient(1500px 640px at 50% 0%, rgba(45, 212, 191, 0.16), transparent 60%),
    radial-gradient(980px 420px at 8% 26%, rgba(15, 158, 147, 0.07), transparent 60%),
    radial-gradient(760px 380px at 92% 48%, rgba(7, 19, 31, 0.035), transparent 55%),
    radial-gradient(720px 360px at 40% 72%, rgba(255, 79, 109, 0.035), transparent 58%),
    var(--paper);
}

.is-home .home-day-end {
  background:
    radial-gradient(980px 420px at 12% 24%, rgba(15, 158, 147, 0.06), transparent 60%),
    radial-gradient(760px 380px at 88% 55%, rgba(7, 19, 31, 0.03), transparent 55%),
    radial-gradient(720px 360px at 50% 78%, rgba(255, 79, 109, 0.03), transparent 58%),
    var(--paper);
}

/* Soft wash accents inside the continuous day field (no hard slabs) */
.is-home #upcoming::before,
.is-home .home-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(900px 280px at 18% 0%, rgba(15, 158, 147, 0.08), transparent 62%),
    linear-gradient(180deg, rgba(231, 238, 246, 0.45) 0%, rgba(231, 238, 246, 0.12) 42%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 14%, #000 86%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 14%, #000 86%, transparent 100%);
}

.is-home #upcoming > *,
.is-home .home-cta > * {
  position: relative;
  z-index: 1;
}

/* Shared dark river — coming alone + orbit as one surface.
   Do NOT set overflow:clip/hidden here — it kills position:sticky on .orbit-pin
   and leaves ~200–300vh of empty scroll after the gallery. */
.is-home .home-ink {
  position: relative;
  color: var(--white);
  background:
    radial-gradient(1100px 520px at 12% 8%, rgba(15, 158, 147, 0.22), transparent 55%),
    radial-gradient(900px 480px at 88% 42%, rgba(255, 79, 109, 0.12), transparent 52%),
    radial-gradient(700px 400px at 50% 100%, rgba(15, 158, 147, 0.14), transparent 55%),
    linear-gradient(180deg, #07131f 0%, #0a1a2b 38%, #07131f 100%);
}

.is-home .home-ink-copy {
  color: var(--white);
}

.is-home .home-ink-copy .lede {
  color: rgba(255, 255, 255, 0.72);
}

.is-home .home-ink-copy .kicker {
  color: var(--accent-bright);
}

.is-home .home-ink-copy .section-title {
  color: var(--white);
}

.is-home .home-ink-copy .btn-secondary {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.55);
}
.is-home .home-ink-copy .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
}

.is-home .home-ink .orbit {
  background: transparent;
}

/* Social + footer = one continuous ink close (flat surface, one glow) */
.is-home .home-social {
  color: var(--white);
  background:
    radial-gradient(1100px 520px at 16% -10%, rgba(15, 158, 147, 0.18), transparent 58%),
    #050d16;
  padding: clamp(2rem, 4.5vw, 3rem) 0 clamp(1.5rem, 3.5vw, 2.25rem);
}

.is-home .home-social .lede {
  color: rgba(255, 255, 255, 0.72);
}

.is-home .home-social .kicker {
  color: var(--accent-bright);
}

.is-home .home-social .section-title {
  color: var(--white);
}

.is-home .site-footer {
  background: #050d16;
  margin-top: 0;
  padding-top: clamp(1.5rem, 3.5vw, 2.25rem);
}

/* Social CTA already lists networks — drop duplicate Follow column */
.is-home .footer-social {
  display: none;
}
@media (min-width: 860px) {
  .is-home .footer-top {
    grid-template-columns: 1.6fr 1fr 1fr;
  }
}
.is-home .footer-top {
  padding-top: clamp(1.25rem, 3vw, 1.75rem);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Hero → day bridge */
.is-home .hero {
  isolation: isolate;
}

.is-home .hero-shade {
  background:
    linear-gradient(180deg, rgba(7, 19, 31, 0.45) 0%, rgba(7, 19, 31, 0.12) 38%, rgba(7, 19, 31, 0.55) 78%, rgba(7, 19, 31, 0.92) 100%);
}

.is-home .hero-shade::after {
  height: 55%;
  background: linear-gradient(0deg, #07131f 0%, rgba(7, 19, 31, 0.65) 35%, transparent 100%);
}

.is-home .ticker {
  background: #07131f;
  border-block: 0;
  color: var(--white);
  padding: 1.15rem 0 1.35rem;
  position: relative;
  z-index: 2;
}

.is-home .ticker::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(45, 212, 191, 0.35), transparent);
}

.is-home .home-social .social-links a,
.is-home .home-social .social-links .social-item {
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--white);
  background: rgba(255, 255, 255, 0.04);
}
.is-home .home-social .social-links a:hover,
.is-home .home-social .social-links .social-item:hover {
  border-color: var(--accent-bright);
  color: var(--accent-bright);
  background: rgba(45, 212, 191, 0.08);
}

/* Hero polish */
.is-home .hero-content {
  max-width: 44rem;
}
.is-home .hero h1 .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(1.1em) rotate(4deg);
  animation: charIn 0.7s var(--ease) forwards;
}
@keyframes charIn {
  to { opacity: 1; transform: none; }
}
.hero-scroll {
  position: absolute;
  right: max(1.25rem, calc((100% - min(var(--max), calc(100% - 2.5rem))) / 2));
  bottom: clamp(1.5rem, 4vw, 2.5rem);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  color: rgba(255,255,255,0.72);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  animation: rise 1s var(--ease) 0.55s both;
}
.hero-scroll-line {
  width: 1px;
  height: 3.25rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), var(--accent-bright));
  transform-origin: top;
  animation: scrollPulse 1.8s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { transform: scaleY(0.45); opacity: 0.45; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* Kinetic marquee */
.ticker {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: var(--white);
  border-block: 1px solid rgba(255,255,255,0.08);
  padding: 1.05rem 0;
}
.ticker-track {
  display: flex;
  width: max-content;
  gap: 0;
  will-change: transform;
}
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 1.25rem;
  padding-inline: 1.25rem;
  font-family: var(--font-brand);
  font-size: clamp(1.15rem, 2.4vw, 1.65rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  white-space: nowrap;
  opacity: 0.92;
}
.ticker-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--accent-bright);
  flex-shrink: 0;
}
.ticker-item em {
  font-style: normal;
  color: var(--accent-bright);
}

/* Orbit — pinned horizontal story (the wow) */
.orbit {
  position: relative;
  background: transparent;
  color: var(--white);
}
.orbit-spacer {
  position: relative;
  z-index: 1;
  height: 200vh;
}
.orbit-pin {
  position: sticky;
  top: 0;
  height: 100dvh;
  overflow: hidden;
  display: grid;
  align-items: center;
}
.orbit-stage {
  width: min(var(--max), calc(100% - 2.5rem));
  margin-inline: auto;
  display: grid;
  gap: 1.75rem;
  height: min(78dvh, 42rem);
  grid-template-rows: auto 1fr auto;
}
.orbit-top {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.orbit-kicker {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-bright);
  margin-bottom: 0.55rem;
}
.orbit-live-title {
  font-family: var(--font-brand);
  font-weight: 700;
  font-size: clamp(1.75rem, 4.5vw, 3rem);
  letter-spacing: -0.045em;
  line-height: 1.05;
  max-width: 16ch;
  min-height: 2.2em;
}
.orbit-meta {
  text-align: right;
}
.orbit-count {
  font-family: var(--font-brand);
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
}
.orbit-count span { color: var(--accent-bright); }
.orbit-hint {
  margin-top: 0.45rem;
  font-size: 0.8rem;
  opacity: 0.55;
  letter-spacing: 0.04em;
}

.orbit-viewport {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--radius) + 0.2rem);
  mask-image: linear-gradient(90deg, transparent 0%, #000 4%, #000 96%, transparent 100%);
}
.orbit-track {
  display: flex;
  gap: clamp(1rem, 2.5vw, 1.75rem);
  height: 100%;
  will-change: transform;
  transition: none;
}
.orbit-card {
  position: relative;
  flex: 0 0 min(72vw, 28rem);
  height: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  background: #122233;
  transform: scale(0.92);
  opacity: 0.45;
  transition: transform 0.45s var(--ease), opacity 0.45s var(--ease), box-shadow 0.45s;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}
.orbit-card.is-active {
  transform: scale(1);
  opacity: 1;
  box-shadow: 0 28px 60px rgba(0,0,0,0.4), 0 0 0 1px rgba(45, 212, 191, 0.25);
}
.orbit-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.orbit-card figcaption {
  position: absolute;
  inset: auto 0 0;
  padding: 2.5rem 1.25rem 1.15rem;
  background: linear-gradient(0deg, rgba(7,19,31,0.92), transparent);
  font-family: var(--font-brand);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}
.orbit-card .tag {
  display: block;
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-bright);
  margin-bottom: 0.35rem;
}

.orbit-progress {
  height: 3px;
  background: rgba(255,255,255,0.12);
  border-radius: 999px;
  overflow: hidden;
}
.orbit-progress > span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-bright), var(--signal));
  border-radius: inherit;
  transform-origin: left center;
}

.orbit-rings {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: 0.35;
  z-index: 0;
}
.orbit-rings span {
  position: absolute;
  border: 1px solid rgba(45, 212, 191, 0.35);
  border-radius: 50%;
  top: 50%;
  left: 62%;
  width: 28rem;
  height: 28rem;
  margin: -14rem 0 0 -14rem;
  animation: ringDrift 14s ease-in-out infinite alternate;
}
.orbit-rings span:nth-child(2) {
  width: 40rem;
  height: 40rem;
  margin: -20rem 0 0 -20rem;
  left: 58%;
  animation-duration: 18s;
  border-color: rgba(255, 79, 109, 0.2);
}
.orbit-rings span:nth-child(3) {
  width: 18rem;
  height: 18rem;
  margin: -9rem 0 0 -9rem;
  left: 70%;
  animation-duration: 11s;
}
@keyframes ringDrift {
  from { transform: translate3d(-2%, -1%, 0) scale(0.96); }
  to { transform: translate3d(3%, 2%, 0) scale(1.05); }
}

@media (max-width: 720px) {
  .orbit-spacer { height: 180vh; }
  .orbit-card { flex-basis: min(82vw, 22rem); }
  .orbit-meta { text-align: left; }
  .hero-scroll { display: none; }
}

/* Magnetic buttons */
.btn.is-magnetic {
  --mx: 0px;
  --my: 0px;
  transform: translate3d(var(--mx), var(--my), 0);
  transition: transform 0.15s ease-out, background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.btn.is-magnetic:hover {
  transform: translate3d(var(--mx), var(--my), 0) translateY(-2px);
}

/* Float chip constellation under intro */
.constellation {
  position: relative;
  margin-top: 1.75rem;
  min-height: 3.5rem;
}
.constellation-chip {
  position: absolute;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.72);
  border-radius: var(--radius);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink-soft);
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(7, 19, 31, 0.06);
  will-change: transform;
  transition: border-color 0.25s, color 0.25s;
}
.constellation-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Experience mosaic — bento photo grid with real 3D tilt + parallax depth */
.xmosaic {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, clamp(7rem, 11vw, 9.5rem));
  grid-template-areas:
    "a a b b"
    "a a c c"
    "d e f f"
    "d e g g";
  gap: clamp(0.6rem, 1.6vw, 1rem);
  perspective: 1600px;
}
.xm-a { grid-area: a; }
.xm-b { grid-area: b; }
.xm-c { grid-area: c; }
.xm-d { grid-area: d; }
.xm-e { grid-area: e; }
.xm-f { grid-area: f; }
.xm-g { grid-area: g; }

.xm-card {
  --rx: 0deg;
  --ry: 0deg;
  --gx: 50%;
  --gy: 50%;
  --s: 1;
  position: relative;
  display: block;
  border-radius: calc(var(--radius) + 0.1rem);
  text-decoration: none;
  color: var(--white);
  isolation: isolate;
  transform-style: preserve-3d;
  transform: perspective(1600px) rotateX(var(--rx)) rotateY(var(--ry)) scale(var(--s));
  transition: transform 0.5s var(--ease), box-shadow 0.4s;
  box-shadow: 0 1px 0 rgba(7, 19, 31, 0.02);
}
.xm-card.is-tilting {
  transition: transform 0.08s linear, box-shadow 0.4s;
  box-shadow: 0 22px 44px rgba(7, 19, 31, 0.28);
}

.xm-media {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
  border-radius: inherit;
  transform: translateZ(0px);
}
.xm-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  transition: transform 0.6s var(--ease), filter 0.5s;
  filter: saturate(0.94);
}
.xm-card:hover .xm-media img,
.xm-card:focus-visible .xm-media img {
  transform: scale(1.08);
  filter: saturate(1.08);
}
.xm-overlay {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  transform: translateZ(2px);
  background:
    linear-gradient(0deg, rgba(7, 19, 31, 0.92) 0%, rgba(7, 19, 31, 0.35) 46%, rgba(7, 19, 31, 0.08) 72%);
  transition: background 0.35s;
}
.xm-card:hover .xm-overlay,
.xm-card:focus-visible .xm-overlay {
  background:
    linear-gradient(0deg, rgba(7, 19, 31, 0.95) 0%, rgba(7, 19, 31, 0.5) 55%, rgba(7, 19, 31, 0.12) 78%);
}
.xm-glare {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  transform: translateZ(6px);
  background: radial-gradient(circle at var(--gx) var(--gy), rgba(255,255,255,0.55), rgba(255,255,255,0.08) 32%, transparent 60%);
  mix-blend-mode: overlay;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.xm-card.is-tilting .xm-glare {
  opacity: 1;
}
.xm-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.14);
  transition: box-shadow 0.3s;
  pointer-events: none;
  transform: translateZ(1px);
}
.xm-card:hover::after,
.xm-card:focus-visible::after {
  box-shadow: inset 0 0 0 1.5px var(--accent-bright);
}

.xm-tag {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  z-index: 2;
  padding: 0.3rem 0.65rem;
  background: var(--accent);
  color: var(--white);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  transform: translateZ(38px);
  box-shadow: 0 8px 18px rgba(7, 19, 31, 0.3);
}

.xm-body {
  position: absolute;
  inset: auto 0.9rem 0.85rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  transform: translateZ(52px);
}
.xm-name {
  font-family: var(--font-brand);
  font-weight: 700;
  font-size: clamp(0.98rem, 1.5vw, 1.2rem);
  letter-spacing: -0.03em;
  line-height: 1.12;
  text-shadow: 0 2px 14px rgba(0,0,0,0.35);
}
.xm-a .xm-name {
  font-size: clamp(1.4rem, 2.8vw, 2.1rem);
  letter-spacing: -0.04em;
}
.xm-desc {
  font-size: 0.82rem;
  line-height: 1.4;
  color: rgba(255,255,255,0.82);
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease), opacity 0.3s;
}
.xm-a .xm-desc {
  font-size: 0.92rem;
  max-width: 26rem;
}
.xm-card:hover .xm-desc,
.xm-card:focus-visible .xm-desc {
  max-height: 4rem;
  opacity: 1;
}

.xm-arrow {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 2;
  width: 1.9rem;
  height: 1.9rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255,255,255,0.14);
  backdrop-filter: blur(6px);
  font-size: 1rem;
  line-height: 1;
  opacity: 0;
  transform: translateZ(46px) translate3d(-4px, 4px, 0) scale(0.85);
  transition: opacity 0.3s, transform 0.35s var(--ease), background 0.25s;
}
.xm-card:hover .xm-arrow,
.xm-card:focus-visible .xm-arrow {
  opacity: 1;
  transform: translateZ(46px) translate3d(0, 0, 0) scale(1);
  background: var(--accent);
}

@media (hover: none), (pointer: coarse) {
  .xm-media,
  .xm-overlay,
  .xm-card::after { transform: none; }
  .xm-tag,
  .xm-body,
  .xm-arrow { transform: none; }
  .xm-card:hover .xm-arrow,
  .xm-card:focus-visible .xm-arrow { transform: none; }
  .xm-glare { display: none; }
}

@media (max-width: 860px) {
  .xmosaic {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: 12rem repeat(6, 8.5rem);
    grid-template-areas:
      "a a"
      "b c"
      "d e"
      "f g";
  }
  .xm-desc {
    max-height: 4rem;
    opacity: 1;
  }
  .xm-arrow {
    opacity: 1;
    transform: none;
  }
}
@media (max-width: 480px) {
  .xmosaic {
    grid-template-columns: 1fr;
    grid-template-rows: 11rem repeat(6, 9rem);
    grid-template-areas:
      "a"
      "b"
      "c"
      "d"
      "e"
      "f"
      "g";
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-scroll-line,
  .orbit-rings span,
  .is-home .hero h1 .char {
    animation: none !important;
  }
  .is-home .hero h1 .char {
    opacity: 1;
    transform: none;
  }
  .orbit-spacer { height: auto; }
  .orbit-pin { position: relative; height: auto; padding: 3rem 0; }
  .orbit-track {
    flex-wrap: wrap;
    transform: none !important;
    height: auto;
  }
  .orbit-card {
    flex: 1 1 14rem;
    height: 16rem;
    opacity: 1;
    transform: none;
  }
  .xm-desc { max-height: 4rem !important; opacity: 1 !important; }
  .xm-arrow { opacity: 1 !important; transform: none !important; }
}
