/* ============================================================
   Homepage — sections after the hero
   ============================================================ */

/* Section shells -------------------------------------------- */
.section {
  padding: 6rem 0;
  position: relative;
}
.section--page { background: var(--bg-page); }
.section--deep { background: var(--bg-deep); }

.section__header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 3.5rem;
}
.section__eyebrow { margin-bottom: 1.25rem; }

.section__title {
  font-family: var(--font-display);
  font-weight: 700;
  /* +12% from default token */
  font-size: clamp(2.25rem, 4.4vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -0.022em;
  color: var(--fg-1);
  margin: 0;
  text-wrap: balance;
}
.section__title--tight { letter-spacing: -0.025em; }

.lead {
  font-size: 1.15rem;
  line-height: 1.65;
  color: var(--fg-2);
  margin: 1.25rem 0;
  text-wrap: pretty;
}

.accent-head {
  font-family: var(--font-display);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--fg-accent);
  margin: 1.75rem 0 .75rem;
}

/* ============================================================
   Cards — depth, layered shadow, 2deg tilt
   ============================================================ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
  perspective: 1600px;
}

.card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  /* layered shadow for depth, even at rest */
  box-shadow:
    0 1px 0 rgba(255,255,255,0.03) inset,
    0 1px 2px rgba(0,0,0,0.25),
    0 8px 24px rgba(0,0,0,0.18);
  transition:
    transform var(--dur-2) var(--ease),
    border-color var(--dur-2) var(--ease),
    box-shadow var(--dur-2) var(--ease);
  transform-style: preserve-3d;
  will-change: transform;
}
.card:hover {
  transform: translateY(-4px) rotateX(2deg);
  border-color: var(--cx-green-500);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.05) inset,
    0 0 0 1px rgba(34,197,94,0.18),
    0 14px 40px rgba(0,0,0,0.4),
    0 0 36px rgba(34,197,94,0.14);
}

/* a quiet bloom that flares behind the card border on hover */
.card::after {
  content: '';
  position: absolute; inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: 0 0 0 1px transparent;
  transition: opacity var(--dur-2) var(--ease);
  opacity: 0;
}
.card:hover::after { opacity: 1; }

.card__icon {
  width: 48px; height: 48px;
  background: var(--cx-green-100-a10);
  border: 1px solid rgba(34,197,94,0.2);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.4rem;
  color: var(--fg-accent);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.04) inset,
    0 4px 14px rgba(34,197,94,0.10);
  transition: transform var(--dur-2) var(--ease), background var(--dur-2) var(--ease);
}
.card__icon svg { display: block; }
.card:hover .card__icon {
  background: rgba(34,197,94,0.18);
  transform: translateZ(8px);
}

.card__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--fg-1);
  margin: 0 0 .65rem;
}
.card__text {
  color: var(--fg-2);
  font-size: .96rem;
  line-height: 1.65;
  margin: 0;
}

/* Case-study cards */
.case-card .quote {
  margin-top: 1.25rem;
  border-left: 3px solid var(--fg-accent);
  padding-left: 1.1rem;
  font-style: italic;
  color: var(--fg-1);
  font-size: 1rem;
  line-height: 1.65;
}
.quote__author {
  display: block;
  font-style: normal;
  font-size: .82rem;
  color: var(--fg-2);
  margin-top: .55rem;
  letter-spacing: .02em;
}
.case-card__badge { margin-bottom: 1rem; }
.case-card--soon { opacity: .82; }

/* ============================================================
   Two-column section (Opportunity Map)
   ============================================================ */
.twocol {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.checklist {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}
.checklist li {
  position: relative;
  padding: .35rem 0 .35rem 1.85rem;
  color: var(--fg-1);
  font-size: 1rem;
  line-height: 1.55;
}
.checklist li::before {
  content: '\2713';
  position: absolute; left: 0; top: .45rem;
  width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  color: var(--fg-accent);
  font-weight: 700;
  font-size: .85rem;
}

.map-areas {
  list-style: none;
  margin: 1rem 0 1.75rem;
  padding: 0;
  border-top: 1px solid rgba(34, 197, 94, 0.18);
}
.map-areas li {
  position: relative;
  padding: .55rem 0 .55rem 1.5rem;
  color: var(--fg-1);
  font-size: .98rem;
  line-height: 1.5;
  border-bottom: 1px solid rgba(34, 197, 94, 0.18);
}
.map-areas li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  background: var(--fg-accent);
  border-radius: 1px;
}

.price-line {
  margin: 1.5rem 0 1.75rem;
  font-size: 1rem;
}
.price {
  color: var(--fg-accent);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.005em;
}
.price-meta { color: var(--fg-2); margin-left: .35rem; }

/* ============================================================
   Opportunity Map frame — subtly tilted, slow scan line
   ============================================================ */
.twocol__visual { margin: 0; }

.opp-frame {
  position: relative;
  border-radius: var(--radius-lg);
  background: var(--cx-slate-900);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.04) inset,
    0 30px 80px rgba(0,0,0,0.45),
    0 0 0 1px rgba(34,197,94,0.06);
  transform: perspective(1800px) rotateY(-4deg) rotateX(2deg);
  transform-origin: center center;
  transition: transform var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease);
  will-change: transform;
}
.opp-frame:hover {
  transform: perspective(1800px) rotateY(-2deg) rotateX(1deg) translateY(-4px);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.06) inset,
    0 36px 90px rgba(0,0,0,0.55),
    0 0 0 1px rgba(34,197,94,0.18),
    0 0 60px rgba(34,197,94,0.12);
}

.opp-frame__chrome {
  display: flex; align-items: center; gap: .5rem;
  padding: .65rem 1rem;
  background: var(--cx-slate-800);
  border-bottom: 1px solid var(--border);
}
.opp-frame__dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--cx-slate-600);
}
.opp-frame__dot:nth-child(3) { background: var(--cx-green-500); box-shadow: 0 0 6px rgba(34,197,94,.5); }
.opp-frame__label {
  margin-left: .75rem;
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--fg-2);
  letter-spacing: .04em;
}
.opp-frame__status {
  margin-left: auto;
  font-family: var(--font-display);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--fg-accent);
  position: relative;
  padding-left: 1rem;
}
.opp-frame__status::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  width: 6px; height: 6px; margin-top: -3px;
  border-radius: 50%;
  background: var(--cx-green-500);
  box-shadow: 0 0 6px rgba(34,197,94,.7);
  animation: opp-status 2.4s ease-in-out infinite;
}
@keyframes opp-status {
  0%,100% { opacity: .4; }
  50%     { opacity: 1; }
}

.opp-frame__body {
  position: relative;
  background: var(--cx-slate-900);
}
.opp-frame__body img {
  display: block;
  width: 100%; height: auto;
}
.opp-frame__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(34,197,94,0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(34,197,94,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  mix-blend-mode: screen;
}
.opp-frame__scan {
  position: absolute;
  left: 0; right: 0;
  top: 0;
  height: 30%;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(34,197,94,0.0) 40%,
    rgba(34,197,94,0.18) 80%,
    rgba(34,197,94,0.55) 99%,
    rgba(34,197,94,0.0) 100%
  );
  animation: opp-scan 8s linear infinite;
}
@keyframes opp-scan {
  0%   { transform: translateY(-100%); }
  100% { transform: translateY(360%); }
}

/* ============================================================
   Founder
   ============================================================ */
.section--founder { padding: 7rem 0; }

.founder {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 5rem;
  align-items: center;
}

.founder__photo-wrap {
  position: relative;
  width: 360px; height: 360px;
}
.founder__photo {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
  box-shadow:
    0 24px 60px rgba(0,0,0,.45),
    0 0 0 4px var(--cx-slate-900);
}

.founder__ring {
  position: absolute;
  inset: -8px;
  width: calc(100% + 16px);
  height: calc(100% + 16px);
  pointer-events: none;
  transform: rotate(-90deg);
}
.founder__ring-track {
  fill: none;
  stroke: rgba(148,163,184,0.12);
  stroke-width: 0.6;
}
.founder__ring-draw {
  fill: none;
  stroke: var(--cx-green-500);
  stroke-width: 0.7;
  stroke-linecap: round;
  /* circumference of r=48 ≈ 301.59 */
  stroke-dasharray: 301.6;
  stroke-dashoffset: 301.6;
  filter: drop-shadow(0 0 4px rgba(34,197,94,0.5));
  transition: stroke-dashoffset 1800ms cubic-bezier(0.4, 0, 0.2, 1);
}
.founder__photo-wrap.is-drawn .founder__ring-draw {
  stroke-dashoffset: 0;
}

.founder__copy { max-width: 620px; }
.founder__copy .section__title { margin-top: 1rem; }
.founder__copy .lead { margin-top: 1rem; }
.founder__copy p:not(.lead) {
  color: var(--fg-2);
  margin: .85rem 0 1.5rem;
  font-size: 1.02rem;
}

/* ============================================================
   Final CTA
   ============================================================ */
.section--cta {
  padding: 7rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-glow {
  position: absolute;
  left: 50%; top: 50%;
  width: 720px; height: 720px;
  margin-left: -360px; margin-top: -360px;
  pointer-events: none;
  background: radial-gradient(circle at center, rgba(34,197,94,0.08) 0%, rgba(34,197,94,0) 60%);
  animation: cta-pulse 4s ease-in-out infinite;
}
@keyframes cta-pulse {
  0%,100% { opacity: 0.55; transform: scale(1); }
  50%     { opacity: 1; transform: scale(1.04); }
}
.cta__inner { position: relative; z-index: 1; }
.section__title--cta {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  margin-bottom: 1rem;
}
.section--cta .lead {
  max-width: 600px;
  margin: 1rem auto 2.25rem;
  font-size: 1.15rem;
  color: var(--fg-2);
}
.cta__actions {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem;
  margin-bottom: 1.5rem;
}
.cta__trust { font-size: .9rem; color: var(--fg-2); }

/* ============================================================
   Button arrow micro-interaction
   ============================================================ */
.btn-arrow {
  gap: .55rem;
}
.btn-arrow__icon {
  display: inline-block;
  font-family: var(--font-body);
  transition: transform var(--dur-2) var(--ease);
}
.btn-arrow:hover .btn-arrow__icon { transform: translateX(4px); }

/* gradient sweep on primary button — uses only green tones (no off-brand colour) */
.cx-btn--primary {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.cx-btn--primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg,
    rgba(255,255,255,0) 30%,
    rgba(255,255,255,0.18) 50%,
    rgba(255,255,255,0) 70%);
  transform: translateX(-120%);
  transition: transform 700ms var(--ease);
  z-index: -1;
  pointer-events: none;
}
.cx-btn--primary:hover::before { transform: translateX(120%); }

/* ============================================================
   Footer + Voice Front Door
   ============================================================ */
.footer {
  background: var(--bg-deep);
  border-top: 1px solid var(--border);
  padding: 5rem 0 2rem;
}
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}
.footer__brand img { height: 32px; width: 32px; }
.footer__brand span { font-size: 1rem; }
.footer__blurb {
  font-size: .92rem;
  color: var(--fg-2);
  line-height: 1.65;
  margin-top: 1rem;
  max-width: 32ch;
}
.footer__heading {
  font-family: var(--font-display);
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--fg-1);
  margin: 0 0 1rem;
}
.footer__links {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: .5rem;
}
.footer__links a {
  font-size: .92rem;
  color: var(--fg-2);
  text-decoration: none;
  transition: color var(--dur-2) var(--ease);
}
.footer__links a:hover { color: var(--fg-accent); }
.footer__contact {
  font-size: .92rem;
  color: var(--fg-2);
  margin: 0 0 .65rem;
}
.footer__contact a { color: var(--fg-2); text-decoration: none; transition: color var(--dur-2) var(--ease); }
.footer__contact a:hover { color: var(--fg-accent); }

.voice-front-door {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem 1.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin: 1rem 0 2.5rem;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.03) inset,
    0 12px 30px rgba(0,0,0,0.25);
}
.vfd__pulse {
  flex-shrink: 0;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--cx-green-500);
  box-shadow: 0 0 0 0 rgba(34,197,94,0.6);
  animation: vfd-pulse 2.6s ease-out infinite;
}
@keyframes vfd-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(34,197,94,0.55); }
  70%  { box-shadow: 0 0 0 14px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}
.vfd__copy { display: flex; flex-direction: column; gap: .15rem; flex: 1; min-width: 0; }
.vfd__eyebrow {
  font-family: var(--font-display);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--fg-accent);
}
.vfd__line {
  font-size: .98rem;
  color: var(--fg-1);
}
.vfd__btn {
  display: inline-flex; align-items: center; gap: .55rem;
  background: var(--cx-green-500);
  color: var(--fg-on-accent);
  border: 2px solid var(--cx-green-500);
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .9rem;
  letter-spacing: .02em;
  padding: .7rem 1.3rem;
  cursor: pointer;
  transition: all var(--dur-2) var(--ease);
}
.vfd__btn:hover {
  background: var(--cx-green-600);
  border-color: var(--cx-green-600);
  transform: translateY(-1px);
  box-shadow: var(--shadow-btn-glow);
}
.vfd__btn-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--cx-slate-900);
}

.footer__bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  display: flex; flex-wrap: wrap;
  justify-content: space-between; gap: 1rem;
  font-size: .82rem;
  color: var(--fg-2);
}
.footer__bottom-tag em { font-style: italic; }
.cx-accent { color: var(--fg-accent); }

/* ============================================================
   Reveal-on-scroll (depth + stagger, editorial)
   ============================================================ */
.reveal .reveal-item {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 720ms var(--ease),
    transform 720ms var(--ease);
  will-change: opacity, transform;
}
.reveal.is-revealed .reveal-item {
  opacity: 1;
  transform: translateY(0);
}
.reveal.is-revealed .reveal-item:nth-child(1) { transition-delay: 0ms; }
.reveal.is-revealed .reveal-item:nth-child(2) { transition-delay: 120ms; }
.reveal.is-revealed .reveal-item:nth-child(3) { transition-delay: 240ms; }
.reveal.is-revealed .reveal-item:nth-child(4) { transition-delay: 360ms; }
.reveal.is-revealed .reveal-item:nth-child(5) { transition-delay: 480ms; }

/* For grids — stagger the cards directly */
.cards-grid .reveal-item {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 720ms var(--ease),
    transform 720ms var(--ease);
}
.reveal.is-revealed .cards-grid .reveal-item:nth-child(1) { transition-delay: 120ms; opacity: 1; transform: none; }
.reveal.is-revealed .cards-grid .reveal-item:nth-child(2) { transition-delay: 240ms; opacity: 1; transform: none; }
.reveal.is-revealed .cards-grid .reveal-item:nth-child(3) { transition-delay: 360ms; opacity: 1; transform: none; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 960px) {
  .cards-grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .twocol { grid-template-columns: 1fr; gap: 3rem; }
  .founder { grid-template-columns: 1fr; gap: 2.5rem; justify-items: center; text-align: left; }
  .founder__photo-wrap { width: 280px; height: 280px; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .voice-front-door { flex-direction: column; align-items: flex-start; gap: 1rem; padding: 1.25rem; }
  .vfd__btn { width: 100%; justify-content: center; }
}
@media (max-width: 540px) {
  .section { padding: 4rem 0; }
  .section--cta { padding: 5rem 0; }
  .footer__grid { grid-template-columns: 1fr; }
  .cta__actions .cx-btn { flex: 1 1 100%; }

  /* Disable battery-heavy motion on small screens */
  .opp-frame__scan { animation: none; opacity: 0; }
  .cta-glow { display: none; }
}

@media (max-width: 430px) {
  /* Homepage hero */
  .hero__cta-group { flex-direction: column; gap: .75rem; }
  .hero__cta-group .cx-btn { width: 100%; justify-content: center; }

  /* Trust bar — 2-col at 375px */
  .trustbar { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.5rem; }
  .trustbar__divider { display: none; }
  .trustbar__item { flex: unset; }

  /* Disable opp-frame 3D tilt on touch */
  .opp-frame { transform: none !important; transition: none !important; }
  .opp-frame:hover { transform: none !important; }

  /* Founder section */
  .founder__photo-wrap { width: 200px; height: 200px; }
  .founder__copy { text-align: left; }

  /* Homepage cards section */
  .cards-grid { gap: 1rem; }

  /* Section headers */
  .section__header { margin-bottom: 2rem; }
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .reveal .reveal-item,
  .cards-grid .reveal-item { opacity: 1 !important; transform: none !important; transition: none !important; }
  .opp-frame__scan,
  .opp-frame__status::before,
  .cta-glow,
  .vfd__pulse { animation: none !important; }
  .opp-frame { transform: none !important; }
  .card { transition: none !important; }
  .card:hover { transform: none !important; }
  .cx-btn:hover { transform: none !important; }
  .cx-btn--primary::before { display: none; }
  .founder__ring-draw { stroke-dashoffset: 0 !important; transition: none !important; }
}
