/* ============================================================
   redesign-page.css
   Loaded AFTER redesign.css on every page (homepage + subpages).
   Consolidated — no appended layers, no dead rules.

   1. View transitions        6. Approach steps
   2. Page chrome             7. Contact extras
   3. Nav: layering + fire     8. Bottom CTA
   4. Hero: layering + kicker  9. Torch cursor
   5. Showcase                10. Motion / reveal
                              11. Mobile
   ============================================================ */


/* ── 1. CROSS-DOCUMENT VIEW TRANSITIONS ───────────────────── */

@view-transition { navigation: auto; }

nav    { view-transition-name: site-nav; }
footer { view-transition-name: site-footer; }

::view-transition-old(root) { animation: vt-out 0.30s cubic-bezier(0.4, 0, 1, 1) both; }
::view-transition-new(root) { animation: vt-in  0.44s cubic-bezier(0, 0, 0.2, 1) both; }
@keyframes vt-out { to   { opacity: 0; transform: translateY(-16px) scale(0.985); filter: blur(7px); } }
@keyframes vt-in  { from { opacity: 0; transform: translateY(26px)  scale(1.012); filter: blur(9px); } }


/* ── 2. PAGE CHROME (subpages only) ───────────────────────── */

body.subpage {
  background:
    radial-gradient(120% 80% at 20% -10%, rgba(47,127,255,0.16), rgba(0,0,0,0) 60%),
    #0c0c0e;
  min-height: 100vh;
}
body.subpage #bg-overlay {
  background: linear-gradient(180deg, rgba(12,12,14,0) 0%, rgba(12,12,14,0.55) 100%);
}

.page-hero { padding: 90px 56px 54px; max-width: 900px; }
.page-title {
  position: relative;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 14px 0 18px;
}
.page-title.particle-on { color: transparent; }
.page-title .pt-canvas { position: absolute; left: 0; top: 0; pointer-events: none; }
.page-lead {
  font-family: 'Inter', sans-serif;
  font-size: 1.05rem;
  line-height: 1.65;
  color: rgba(255,255,255,0.68);
  max-width: 620px;
}
.page-section { padding: 20px 56px 90px; }

.page-hero .eyebrow { position: relative; }
.page-hero .eyebrow::after {
  content: '';
  position: absolute;
  left: 0; bottom: -10px;
  height: 1px; width: 132px;
  background-image: linear-gradient(100deg,
    rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.08) 40%,
    rgba(47,127,255,0.9) 47%, rgba(207,228,255,1) 50%, rgba(47,127,255,0.9) 53%,
    rgba(255,255,255,0.08) 60%, rgba(255,255,255,0.08) 100%);
  background-size: 280% 100%;
  animation: nav-spark 6s linear infinite;
}


/* ── 3. NAV — layering, contrast, fire ────────────────────── */

/* nav above every fire layer on the page */
nav { position: relative; z-index: 50; }

/* its own spark canvas sits at the bottom of the nav's stack */
#nav-spark-canvas { z-index: 0; }

/* everything you can see or click sits above that canvas */
nav .logo-link,
nav .logo,
nav ul,
nav ul li,
nav ul a,
nav .talk-btn { position: relative; z-index: 5; }

nav .logo-link { display: inline-flex; align-items: center; text-decoration: none; }

/* white links so they read against white-hot flame */
@supports (-webkit-background-clip: text) or (background-clip: text) {
  nav ul a {
    background-image: linear-gradient(100deg,
      #ffffff 0%,
      #ffffff 40%,
      #2f7fff 47%,
      #cfe4ff 50%,
      #2f7fff 53%,
      #ffffff 60%,
      #ffffff 100%);
  }
}

/* dark halo keeps the letterforms separated from the fire behind them */
nav ul a {
  filter:
    drop-shadow(0 1px 2px rgba(0,0,0,0.9))
    drop-shadow(0 0 7px rgba(0,0,0,0.65));
}

/* a link that's burning is lit by its own fire */
nav ul a.burning {
  filter:
    drop-shadow(0 1px 2px rgba(0,0,0,0.85))
    drop-shadow(0 0 10px rgba(140,195,255,0.85))
    drop-shadow(0 0 22px rgba(47,127,255,0.55));
}

/* current page indicator (subpages) */
nav ul a.is-active { color: #fff; }
nav ul a.is-active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -7px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #2f7fff, #cfe4ff);
  opacity: 1;
  transform: none;
  animation: none;
  color: transparent;
}


/* ── 4. HERO — fire layering + kicker ─────────────────────── */

/* full-viewport fire canvases stay below all content (content is z-index 2) */
#flame-canvas        { z-index: 1; }
#torch-cursor-canvas { position: fixed; inset: 0; pointer-events: none; z-index: 1; }

.hero-panel { position: relative; }

/* wordmark artwork above its own fire canvas */
#wordmark-wrap { position: relative; }
.wordmark-fire { position: absolute; pointer-events: none; z-index: 0; }
#wordmark-img  { position: relative; z-index: 5; opacity: 1; }
.hero-visual .overlay-text { position: relative; z-index: 5; }

/* kicker: raised and slightly larger */
.hero-visual .overlay-text .kicker {
  font-size: 1rem;
  letter-spacing: 0.18em;
  margin-bottom: 30px;
}


/* ── 5. SHOWCASE — hover list (desktop) / bento (mobile) ──── */

.showcase { position: relative; }
.sc-list { display: flex; flex-direction: column; }

.sc-row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 40px;
  align-items: baseline;
  gap: 20px;
  padding: 26px 6px;
  border-top: 1px solid rgba(255,255,255,0.09);
  text-decoration: none;
  cursor: pointer;
  transition: padding-left 0.45s cubic-bezier(0.2,0.8,0.3,1);
}
.sc-row:last-child { border-bottom: 1px solid rgba(255,255,255,0.09); }
.sc-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(1.5rem, 3.4vw, 2.6rem);
  line-height: 1.1;
  color: rgba(255,255,255,0.62);
  transition: color 0.32s ease;
}
.sc-meta {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.76rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.26);
  transition: color 0.32s ease;
}
.sc-arrow {
  justify-self: end;
  font-size: 1.3rem;
  color: rgba(255,255,255,0.18);
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity 0.35s ease, transform 0.4s cubic-bezier(0.2,1,0.3,1), color 0.3s ease;
}
.showcase.hot .sc-name { color: rgba(255,255,255,0.16); }
.showcase.hot .sc-meta { color: rgba(255,255,255,0.10); }
.sc-row:hover { padding-left: 26px; }
.showcase.hot .sc-row:hover .sc-name { color: #fff; }
.showcase.hot .sc-row:hover .sc-meta { color: #2f7fff; }
.sc-row:hover .sc-arrow { opacity: 1; transform: none; color: #2f7fff; }

.sc-media {
  position: fixed;
  left: 0; top: 0;
  width: 280px; height: 182px;
  margin: -91px 0 0 -140px;
  border-radius: 12px;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  z-index: 40;
  transform: scale(0.86) rotate(-3deg);
  transition: opacity 0.3s ease, transform 0.45s cubic-bezier(0.2,1,0.3,1);
  box-shadow: 0 26px 60px rgba(0,0,0,0.62), 0 0 0 1px rgba(47,127,255,0.4);
  will-change: transform;
}
.sc-media.on { opacity: 1; transform: scale(1) rotate(0deg); }
.sc-media img, .sc-media video { width: 100%; height: 100%; object-fit: cover; display: block; }


/* ── 6. APPROACH STEPS ────────────────────────────────────── */

.step-list { display: flex; flex-direction: column; gap: 10px; max-width: 900px; }
.step-row {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 8px;
  padding: 34px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.step-row:last-child { border-bottom: 1px solid rgba(255,255,255,0.08); }
.step-num {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
  color: rgba(47,127,255,0.85);
}
.step-copy h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800;
  font-size: 1.9rem;
  color: #fff;
  margin-bottom: 10px;
  transition: color 0.35s ease;
}
.step-row:hover .step-copy h3 { color: #cfe4ff; }
.step-short {
  font-family: 'Inter', sans-serif;
  font-size: 1.02rem;
  color: rgba(255,255,255,0.82);
  margin-bottom: 12px;
}
.step-long {
  font-family: 'Inter', sans-serif;
  font-size: 0.97rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.55);
  max-width: 640px;
}
.step-ghost {
  position: absolute;
  right: 6px; top: 50%;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800;
  font-size: clamp(4.5rem, 11vw, 9rem);
  line-height: 1;
  color: rgba(255,255,255,0.035);
  pointer-events: none;
  user-select: none;
  will-change: transform;
}


/* ── 7. FAQ + CONTACT EXTRAS ──────────────────────────────── */

.page-section .faq-item {
  transition: transform 0.35s cubic-bezier(0.34,1.2,0.64,1), border-color 0.35s ease;
}
.page-section .faq-item:hover { transform: translateX(6px); }

.next-steps {
  max-width: 520px;
  margin: 46px auto 0;
  padding-top: 30px;
  border-top: 1px solid rgba(255,255,255,0.09);
}
.next-steps h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 16px;
}
.next-steps ol { padding-left: 20px; display: flex; flex-direction: column; gap: 12px; }
.next-steps li {
  font-family: 'Inter', sans-serif;
  font-size: 0.97rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.66);
  transition: color 0.3s ease, transform 0.3s ease;
}
.next-steps li:hover { color: rgba(255,255,255,0.92); transform: translateX(4px); }


/* ── 8. BOTTOM CTA ────────────────────────────────────────── */

.page-cta {
  text-align: center;
  padding: 76px 56px 90px;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.page-cta h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: #fff;
  margin-bottom: 14px;
}
.page-cta h2 .cta-letter {
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.34,1.5,0.64,1), color 0.3s ease, text-shadow 0.3s ease;
}
.page-cta h2:hover .cta-letter {
  transform: translateY(-6px);
  color: #cfe4ff;
  text-shadow: 0 0 12px rgba(47,127,255,0.85);
}
.page-cta p {
  font-family: 'Inter', sans-serif;
  color: rgba(255,255,255,0.6);
  margin-bottom: 30px;
}
.page-cta .cta-btn,
#contact .contact-form button.cta-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 18px 36px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: #fff;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
}


/* ── 9. TORCH CURSOR ──────────────────────────────────────── */

@media (hover: hover) and (pointer: fine) {
  html.torch-cursor,
  html.torch-cursor * { cursor: none !important; }
  html.torch-cursor input,
  html.torch-cursor textarea,
  html.torch-cursor select { cursor: text !important; }
}


/* ── 10. MOTION — ambient glow + scroll reveal ────────────── */

#page-glow {
  position: fixed;
  left: 0; top: 0;
  width: 620px; height: 620px;
  margin: -310px 0 0 -310px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  background: radial-gradient(circle, rgba(47,127,255,0.14), rgba(47,127,255,0.05) 42%, rgba(47,127,255,0) 70%);
  transition: opacity 0.6s ease;
  will-change: transform;
}
body.subpage.glow-on #page-glow { opacity: 1; }

.reveal {
  opacity: 0;
  transform: translateY(26px);
  will-change: opacity, transform;
  transition: opacity 0.7s cubic-bezier(0.2,0.7,0.3,1),
              transform 0.7s cubic-bezier(0.2,0.7,0.3,1);
}
.reveal.in { opacity: 1; transform: none; will-change: auto; }


/* ── 11. MOBILE ───────────────────────────────────────────── */

@media (max-width: 950px) {
  nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 18px;
    padding: 18px 20px 22px;
  }
  nav ul {
    display: flex !important;
    order: 3;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 22px;
  }
  nav ul a { font-size: 0.9rem; }
  nav ul a.is-active::after { bottom: -5px; }
  nav .logo-link { order: 1; margin-right: auto; }
  nav .talk-btn  { order: 2; margin-left: auto; padding: 12px 22px; font-size: 0.85rem; }

  #hero { min-height: 0; }
  .hero-panel { clip-path: none !important; padding: 46px 22px 52px !important; }
  .hero-visual { min-height: 300px; }
  #faq { padding-left: 24px !important; padding-right: 24px !important; }
}

@media (max-width: 900px) {
  .sc-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 132px;
    gap: 10px;
  }
  .sc-row {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 0;
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 12px;
    overflow: hidden;
    background: #06070b;
  }
  .sc-row:last-child { border-bottom: 1px solid rgba(255,255,255,0.10); }
  .sc-row:hover { padding-left: 0; }
  .sc-row.b-a { grid-column: span 2; grid-row: span 2; }
  .sc-row.b-e { grid-column: span 2; }
  .sc-media {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    margin: 0;
    opacity: 1;
    transform: none;
    border-radius: 0;
    box-shadow: none;
    z-index: 0;
  }
  .sc-media::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 42%, rgba(0,0,0,0.82));
  }
  .sc-name { position: relative; z-index: 2; font-size: 1.05rem; color: #fff; padding: 0 12px 4px; }
  .sc-meta { position: relative; z-index: 2; font-size: 0.62rem; color: #7cc4ff; padding: 0 12px 12px; }
  .sc-arrow { display: none; }
  .showcase.hot .sc-name { color: #fff; }
  .showcase.hot .sc-meta { color: #7cc4ff; }
}

@media (max-width: 700px) {
  .page-hero    { padding: 70px 22px 40px; }
  .page-section { padding: 16px 22px 70px; }
  .page-cta     { padding: 60px 22px 74px; }
  .step-row     { grid-template-columns: 1fr; gap: 6px; padding: 28px 0; }
  .step-num     { font-size: 1.1rem; }
  .step-copy h3 { font-size: 1.5rem; }

  .hero-panel  { padding: 38px 18px 44px !important; }
  .hero-visual { min-height: 240px; }
  .hero-visual .overlay-text .kicker { font-size: 0.8rem; letter-spacing: 0.12em; margin-bottom: 20px; }
  #hero-cta { padding: 16px 24px; font-size: 0.88rem; letter-spacing: 0.02em; }
  nav .talk-btn { padding: 10px 18px; font-size: 0.8rem; }
  nav ul { gap: 6px 16px; }
  nav ul a { font-size: 0.84rem; }

  #contact { padding-left: 18px !important; padding-right: 18px !important; }
  .contact-form { padding: 26px 20px 24px; }
  footer { flex-direction: column; gap: 6px; text-align: center; padding: 26px 20px; }
}


/* ── REDUCED MOTION ───────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  nav::after { animation: none; background-position: 50% 0; }
  nav .logo  { animation: none; }
  nav ul a   { animation: none; -webkit-text-fill-color: rgba(255,255,255,0.9); }
  nav ul a::before, nav ul a::after { animation: none; opacity: 0; }
  #nav-spark-canvas, #torch-cursor-canvas, .wordmark-fire, .step-ghost, #page-glow { display: none; }
  html.torch-cursor, html.torch-cursor body { cursor: auto; }
  .page-hero .eyebrow::after { animation: none; }
  .page-title.particle-on { color: #fff; }
  .page-title .pt-canvas { display: none; }
  .reveal { opacity: 1; transform: none; filter: none; transition: none; }
  .contact-form::before { animation: none; background-position: 50% 0; }
  .contact-form .field::after { transition: none; }
}
/* FAQ boxes: thin enough for the cursor flame to glow through */
.faq-item {
  background: rgba(12,12,14,0.55);
}
/* custom I-beam for text fields */
@media (hover: hover) and (pointer: fine) {
  html.torch-cursor input,
  html.torch-cursor textarea,
  html.torch-cursor select {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='28'%3E%3Crect x='8.1' y='2.5' width='3.8' height='23' rx='1.9' fill='%232f7fff' opacity='0.38'/%3E%3Crect x='6' y='3' width='8' height='1.8' rx='0.9' fill='%232f7fff'/%3E%3Crect x='6' y='23.2' width='8' height='1.8' rx='0.9' fill='%232f7fff'/%3E%3Crect x='9.2' y='3.8' width='1.6' height='20.4' fill='%23e2f0ff'/%3E%3C/svg%3E") 10 14, text !important;
  }
}
/* words stay whole when the heading wraps */
.contact-word {
  display: inline-block;
  white-space: nowrap;
}

/* backdrop-filter re-blurs against the playing video every scroll frame;
   a smaller radius is dramatically cheaper and looks nearly identical */
.faq-item,
.contact-form {
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
}
/* preview panel is visible even before media paints */
.sc-media {
  background: #06070b;
}