/* === Landing-only styles === */
.hero {
  position: relative;
  padding: 40px 0 40px;
  overflow: hidden;
}

.hero-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 var(--pad-x-lg);
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 56px;
  align-items: stretch;
}

.hero-inner > .fade-up {
  align-self: center;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(48px, 7vw, 96px);
  line-height: .95;
  letter-spacing: -0.02em;
  margin: 18px 0 28px;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent-2);
  position: relative;
}

.hero p.lead {
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 520px;
  line-height: 1.65;
  margin: 0 0 36px;
}

/* L1: CTA arrow slides right on hover */
#hero-cta-primary svg,
#final-cta-btn svg {
  transition: transform .2s ease;
  flex-shrink: 0;
}

#hero-cta-primary:hover svg,
#final-cta-btn:hover svg {
  transform: translateX(4px);
}

.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.hero-meta {
  position: relative;
  display: flex;
  gap: 28px;
  margin-top: 48px;
  padding-top: 28px;
  color: var(--ink-dim);
  font-size: 13px;
}

.hero-meta::before {
  content: "";
  position: absolute;
  top: 0;
  left: calc(var(--hero-meta-offset, 0px) * -1);
  width: 100vw;
  border-top: 1px solid var(--line-soft);
  pointer-events: none;
}

.hero-meta strong {
  display: block;
  font-family: var(--font-display);
  color: var(--ink);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 2px;
}

/* Hero visual: large diagonal slideshow band, flush with header & hero-meta */
.hero-visual {
  position: relative;
  width: 100%;
  height: var(--hero-visual-h, 540px);
  min-height: 420px;
  margin-top: -40px; /* cancel .hero padding-top so the band starts flush at header.bottom */
  align-self: start;
  overflow: hidden;
  --hero-clip-skew: 8%;
  /* Bottom Y uses calc(100% - 1px) so subpixel rasterization of the polygon
     edge never paints onto/past the hero-meta border line at any zoom level. */
  clip-path: polygon(
    var(--hero-clip-skew) 0,
    100% 0,
    calc(100% - var(--hero-clip-skew)) calc(100% - 1px),
    0 calc(100% - 1px)
  );
}

/* BG6: conic-gradient slowly rotating behind the hero visual */
@media (prefers-reduced-motion: no-preference) {
  .hero-visual::before {
    content: '';
    position: absolute;
    inset: -25%;
    z-index: 0;
    pointer-events: none;
    background: conic-gradient(
      from 0deg,
      var(--accent-glow) 0%,
      transparent 30%,
      rgba(201, 164, 97, .22) 50%,
      transparent 70%,
      var(--accent-glow) 100%
    );
    filter: blur(60px);
    opacity: .55;
    animation: conicSpin 45s linear infinite;
    will-change: transform;
  }
}

:root[data-theme="light"] .hero-visual::before {
  opacity: .35;
  filter: blur(50px);
}

@media (max-width: 640px) {
  .hero-visual::before {
    filter: blur(40px);
    opacity: .35;
  }
}

/* Slides container — masked top/bottom for "smoke" fade */
.hero-slides {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(135deg, #2a3038 0%, #14181c 60%, #06080a 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, black 12%, black 88%, transparent 100%);
          mask-image: linear-gradient(180deg, transparent 0%, black 12%, black 88%, transparent 100%);
}

.hero-slide {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  transition: opacity 1.2s ease;
  will-change: opacity;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.hero-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.35) 100%);
}

.hero-slide.active {
  opacity: 1;
}


@media (prefers-reduced-motion: reduce) {
  .hero-slide {
    transition: none;
  }
}

/* Overlay: artist + date + node title, anchored top-right */
.hero-overlay {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 3;
  padding: 18px clamp(28px, 5%, 56px) 28px;
  background: linear-gradient(180deg, rgba(0, 0, 0, .75) 0%, rgba(0, 0, 0, .55) 30%, transparent 100%);
  pointer-events: none;
  transition: opacity .35s ease;
  text-align: right;
}

.hero-overlay.swap {
  opacity: 0;
}

.hero-overlay-meta {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  font-family: 'JetBrainsMono', ui-monospace, monospace;
  font-weight: 700;
  font-size: 11px;
  color: rgba(255, 255, 255, .82);
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.hero-overlay-title {
  font-family: 'JetBrainsMono', ui-monospace, monospace;
  font-weight: 700;
  font-size: clamp(22px, 2.4vw, 28px);
  letter-spacing: .04em;
  margin: 0;
  color: #fff;
  text-align: right;
  text-shadow: 0 2px 16px rgba(0, 0, 0, .5);
  /* SH3: skeleton shimmer while node data loads */
  background: linear-gradient(90deg, rgba(255,255,255,.04) 25%, rgba(255,255,255,.12) 50%, rgba(255,255,255,.04) 75%);
  background-size: 200% 100%;
  animation: shimmer-sweep 1.8s ease-in-out infinite;
  border-radius: 6px;
  color: transparent;
}

.hero-overlay-title.loaded {
  background: none;
  color: #fff;
  animation: none;
  border-radius: 0;
}

/* Floating glyphs around hero */
.glyph {
  position: absolute;
  pointer-events: none;
  color: var(--accent);
  opacity: .25;
}

.glyph-1 {
  top: 8%;
  right: 6%;
  font-size: 80px;
}

.glyph-2 {
  bottom: 10%;
  left: 4%;
  font-size: 60px;
  transform: rotate(-15deg);
}

/* === Section heads === */
.section {
  padding: 40px 0;
  position: relative;
}

#section-final-cta { padding-top: 0; }

.section-head {
  max-width: 760px;
  margin: 0 auto 60px;
  text-align: center;
}

.section-head h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(34px, 4.5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 14px 0 18px;
}

.section-head p {
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.65;
}

/* === What is === */
.what-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 60px;
}

/* Staggered fade-up delays (was inline style="animation-delay:…") */
.what-grid .feature:nth-child(1) { animation-delay: .05s; }
.what-grid .feature:nth-child(2) { animation-delay: .12s; }
.what-grid .feature:nth-child(3) { animation-delay: .19s; }

.feature {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  padding: 32px 28px;
  transition: transform .25s, border-color .25s;
  position: relative;
  overflow: hidden;
}

.feature:hover {
  transform: translateY(-4px);
  border-color: var(--line);
}

.feature::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .3s;
}

.feature:hover::before {
  opacity: 1;
}

.feature-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .2em;
  color: var(--accent-2);
  margin-bottom: 22px;
  display: block;
}

.feature h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(18px, 3.2vw, 22px);
  margin: 0 0 10px;
  line-height: 1.2;
}

.feature p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.6;
}

/* SH5: rotating border-light spotlight on .feature card hover */
.feature::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(
    transparent 0deg,
    transparent 250deg,
    var(--accent-glow) 270deg,
    rgba(201,164,97,.2) 290deg,
    transparent 310deg,
    transparent 360deg
  );
  opacity: 0;
  transition: opacity .4s;
  animation: borderSpin 5s linear infinite;
  pointer-events: none;
  z-index: 0;
}
.feature:hover::after {
  opacity: 1;
}
/* ensure feature content sits above the ::after spotlight */
.feature > * { position: relative; z-index: 1; }

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--line-soft);
  display: grid;
  place-items: center;
  color: var(--accent-2);
  margin-bottom: 22px;
  /* L2: icon lifts on card hover */
  transition: transform .22s cubic-bezier(.2,.8,.2,1);
}

.feature:hover .feature-icon {
  transform: scale(1.08) rotate(-3deg);
}

/* === How it works (split with steps) === */
.how {
  background:
    linear-gradient(180deg, transparent, rgba(193, 53, 43, .04) 50%, transparent),
    var(--bg-2);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--line-soft);
}

.step {
  padding: 40px 32px;
  border-right: 1px solid var(--line-soft);
  position: relative;
}

.step:last-child {
  border-right: 0;
}

.step-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 64px;
  color: var(--ink-faint);
  line-height: 1;
  margin-bottom: 20px;
}

.step h4 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(17px, 3vw, 20px);
  margin: 0 0 10px;
}

.step p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.6;
}

/* === Stats / Quote === */
#section-quote {
  position: relative;
  overflow: hidden;
}

/* BG5: Constellation backdrop — draws on, stars twinkle */
.constellation-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  color: var(--accent-2);
  opacity: .35;
  z-index: 0;
}

:root[data-theme="light"] .constellation-bg {
  color: var(--accent);
  opacity: .25;
}

@media (prefers-reduced-motion: no-preference) {
  .constellation-bg .constellation-lines line {
    stroke-dasharray: 220;
    stroke-dashoffset: 220;
    animation: constellationDraw 1.8s ease-out forwards;
  }

  /* Stagger each line so they draw in sequence */
  .constellation-bg .constellation-lines line:nth-child(1)  { animation-delay: .15s; }
  .constellation-bg .constellation-lines line:nth-child(2)  { animation-delay: .35s; }
  .constellation-bg .constellation-lines line:nth-child(3)  { animation-delay: .55s; }
  .constellation-bg .constellation-lines line:nth-child(4)  { animation-delay: .75s; }
  .constellation-bg .constellation-lines line:nth-child(5)  { animation-delay: .95s; }
  .constellation-bg .constellation-lines line:nth-child(6)  { animation-delay: 1.15s; }
  .constellation-bg .constellation-lines line:nth-child(7)  { animation-delay: 1.35s; }
  .constellation-bg .constellation-lines line:nth-child(8)  { animation-delay: .50s; }
  .constellation-bg .constellation-lines line:nth-child(9)  { animation-delay: .80s; }
  .constellation-bg .constellation-lines line:nth-child(10) { animation-delay: 1.10s; }
  .constellation-bg .constellation-lines line:nth-child(11) { animation-delay: 1.40s; }

  .constellation-bg .constellation-stars circle {
    animation: twinkle 4s ease-in-out infinite;
    transform-origin: center;
  }
  .constellation-bg .constellation-stars circle:nth-child(2n)  { animation-delay: .8s;  }
  .constellation-bg .constellation-stars circle:nth-child(3n)  { animation-delay: 1.6s; }
  .constellation-bg .constellation-stars circle:nth-child(5n)  { animation-delay: 2.4s; }
  .constellation-bg .constellation-stars circle:nth-child(7n)  { animation-delay: 3.2s; }
}

.quote-block {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  padding: 0 var(--pad-x-lg);
  position: relative;
  z-index: 1;
}

.quote-block blockquote {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.3;
  margin: 0 0 28px;
  color: var(--ink);
}

.quote-block blockquote::before {
  content: '"';
  display: block;
  font-size: 90px;
  color: var(--accent);
  line-height: .5;
  margin-bottom: 20px;
}

.quote-author {
  color: var(--ink-dim);
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
}

/* === Final CTA === */
.final-cta {
  max-width: 1100px;
  margin: 40px auto 0;
  padding: 70px 60px;
  border-radius: 32px;
  border: 1px solid var(--line);
  text-align: center;
  position: relative;
  overflow: hidden;
}

:root[data-theme="dark"] .final-cta {
  background:
    radial-gradient(ellipse 60% 80% at 0% 100%, rgba(193, 53, 43, .25), transparent 60%),
    radial-gradient(ellipse 60% 80% at 100% 0%, rgba(201, 164, 97, .1), transparent 60%),
    linear-gradient(180deg, var(--surface), var(--bg-2));
}

:root[data-theme="light"] .final-cta {
  background:
    radial-gradient(ellipse 60% 80% at 0% 100%, rgba(168, 38, 30, .10), transparent 60%),
    radial-gradient(ellipse 60% 80% at 100% 0%, rgba(156, 122, 50, .06), transparent 60%),
    linear-gradient(180deg, var(--surface), var(--bg-2));
}

.final-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='40'><path d='M0 39.5h40M39.5 0v40' stroke='%23ffffff' stroke-opacity='.025'/></svg>");
  pointer-events: none;
}

.final-cta h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 5vw, 60px);
  margin: 0 0 18px;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.final-cta p {
  color: var(--ink-soft);
  font-size: 17px;
  max-width: 540px;
  margin: 0 auto 32px;
}

/* === Tablet/Mobile === */
@media (max-width: 920px) {
  .hero {
    padding: 30px 0 80px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 50px;
  }

  .hero-visual {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    height: clamp(360px, 60vh, 520px);
    min-height: 320px;
    --hero-clip-skew: 5%;
  }

  .hero-overlay {
    padding: 22px clamp(22px, 6%, 40px) 28px;
  }

  .what-grid {
    grid-template-columns: 1fr;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .step {
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .step:last-child {
    border-bottom: 0;
  }

  .final-cta {
    padding: 48px var(--pad-x-md);
  }

  .section {
    padding: var(--pad-y-section) 0;
  }
}

/* === Mobile (≤640px) === */
@media (max-width: 640px) {
  .hero {
    padding: 20px 0 40px;
  }

  .hero p.lead {
    font-size: 16px;
  }

  .hero-visual {
    max-width: 100%;
    height: clamp(320px, 55vh, 420px);
    min-height: 280px;
    --hero-clip-skew: 3%;
  }

  .hero-slides {
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, black 8%, black 92%, transparent 100%);
            mask-image: linear-gradient(180deg, transparent 0%, black 8%, black 92%, transparent 100%);
  }

  .hero-overlay {
    padding: 18px 22px 22px;
  }

  .hero-overlay-title {
    font-size: 18px;
  }

  .hero-overlay-meta {
    font-size: 10px;
    gap: 12px;
  }

  .hero-meta {
    gap: 18px;
    margin-top: 36px;
    padding-top: 22px;
  }

  .hero-meta strong {
    font-size: 18px;
  }

  .feature {
    padding: 24px 20px;
  }

  .step {
    padding: 32px var(--pad-x);
  }

  .step-num {
    font-size: 48px;
    margin-bottom: 14px;
  }

  .section-head {
    margin-bottom: 36px;
  }

  .section-head p {
    font-size: 15px;
  }

  .final-cta {
    padding: 40px var(--pad-x);
    border-radius: 24px;
  }

  .final-cta p {
    font-size: 15px;
    margin-bottom: 24px;
  }
}

/* === Final CTA button (was inline style on index.html) === */
.btn-cta-final {
  padding: 18px 28px;
  font-size: 14px;
}

/* SC5: step numbers fill in from outline on scroll entry */
@media (prefers-reduced-motion: no-preference) {
  .step-num {
    -webkit-text-stroke: 2px var(--ink-faint);
    color: transparent;
    transition: color .8s ease, -webkit-text-stroke-color .8s ease;
  }
  .step-num.in-view {
    color: var(--ink-faint);
    -webkit-text-stroke-color: transparent;
  }
}

/* DE1: SVG flourish dividers */
.flourish-divider {
  text-align: center;
  padding: 8px 0;
  color: var(--line-soft);
}
.flourish-divider svg {
  width: 200px;
  height: 20px;
}
@media (prefers-reduced-motion: no-preference) {
  @keyframes flourishDraw {
    from { stroke-dashoffset: 250; }
    to   { stroke-dashoffset: 0; }
  }
  .flourish-divider.in-view svg path {
    stroke-dasharray: 250;
    stroke-dashoffset: 250;
    animation: flourishDraw 1s ease-out forwards;
  }
}

/* DE2: corner ornaments on final-cta */
.final-cta::after {
  content: '';
  position: absolute;
  top: 16px; right: 16px;
  width: 16px; height: 16px;
  border-top: 1px solid var(--accent-2);
  border-right: 1px solid var(--accent-2);
  opacity: .3;
  pointer-events: none;
}

/* DE3: animated quote mark entrance */
@media (prefers-reduced-motion: no-preference) {
  @keyframes quoteIn {
    from { opacity: 0; transform: scale(.5) rotate(-10deg); }
    to   { opacity: 1; transform: scale(1) rotate(0deg); }
  }
  .quote-block blockquote::before {
    display: inline-block;
    animation: quoteIn .5s .2s cubic-bezier(.34,1.56,.64,1) both;
  }
}