/* Page-specific layouts: hero variants, bento, scrollytelling, mock dashboard. */

/* ─── Dynamic hero pill (geo/time-aware personalization) ─── */
.hero__personal {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0.55rem 0.95rem 0.55rem 0.7rem;
  background: hsl(var(--surface) / 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  color: hsl(var(--foreground-muted));
  margin-top: var(--space-6);
  line-height: 1.3;
  max-width: 100%;
  box-shadow: var(--shadow-xs);
}

.hero__personal strong { color: hsl(var(--primary)); font-weight: 600; }

.hero__personal__icon {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--gradient-cta);
  color: white;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 0 0 4px hsl(var(--brand-frost) / 0.2);
}

@media (max-width: 480px) {
  .hero__personal {
    font-size: var(--text-xs);
    padding: 0.45rem 0.75rem 0.45rem 0.55rem;
  }
  .hero__personal__icon { width: 1.35rem; height: 1.35rem; }
}

/* ─── HERO — editorial, asymmetric, layered ─── */
.hero {
  position: relative;
  padding: calc(var(--space-section) + 4rem) 0 var(--space-section);
  overflow: hidden;
  isolation: isolate;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--space-12);
  align-items: end;
}

/* Dashboard hero variant — visual sits up top, copy aligns center */
.hero--dashboard .hero__grid {
  align-items: start;
}

.hero--dashboard .hero__visual {
  margin-top: -2rem;
  aspect-ratio: 4 / 5.4;
}

@media (max-width: 960px) {
  .hero--dashboard .hero__visual { margin-top: 0; aspect-ratio: 16 / 11; }
}

.hero__copy { max-width: 38ch; }

.hero__title {
  font-size: var(--text-hero);
  font-weight: 800;
  line-height: 0.96;
  letter-spacing: -0.04em;
  color: hsl(var(--primary));
  margin-block: var(--space-6);
}

.hero__title em {
  font-style: normal;
  background-image: var(--gradient-text);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  position: relative;
}

.hero__lede {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: hsl(var(--foreground-muted));
  margin-bottom: var(--space-8);
  max-width: 50ch;
}

.hero__cta {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.hero__visual {
  position: relative;
  aspect-ratio: 4 / 5;
  min-height: 420px;
}

.hero__decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; gap: var(--space-12); }
  .hero__visual { aspect-ratio: 16 / 11; min-height: 320px; }
}


/* ─── BENTO grid for service features ─── */
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: minmax(11rem, auto);
  gap: var(--space-4);
}

.bento__cell {
  background: hsl(var(--surface));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-md);
  padding: var(--space-6);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-3);
  transition: transform var(--duration-normal) var(--ease-out-cubic),
              border-color var(--duration-normal) var(--ease-out-cubic),
              box-shadow var(--duration-normal) var(--ease-out-cubic);
}

.bento__cell:hover {
  transform: translateY(-3px);
  border-color: hsl(var(--brand-frost));
  box-shadow: var(--shadow-md);
}

/* Bento cells. The grid is 6-col on desktop and we keep the math clean:
   feature spans 4 cols (× 2 rows), every other cell spans 2 cols. That way
   the layout reads as one hero card + five supporting cards in 6×3 — no
   unpredictable wrapping. */
.bento__cell--wide { grid-column: span 4; }
.bento__cell--md { grid-column: span 2; }
.bento__cell--sm { grid-column: span 2; }
.bento__cell--tall { grid-row: span 2; }

.bento__cell--feature {
  grid-column: span 4;
  grid-row: span 2;
  background: linear-gradient(135deg, hsl(var(--brand-twilight)) 0%, hsl(var(--brand-teal)) 100%);
  color: hsl(var(--brand-frost));
  border-color: transparent;
}

.bento__cell--feature h3 { color: white; font-size: var(--text-2xl); }
.bento__cell--feature p { color: hsl(var(--brand-frost) / 0.85); }

.bento__cell--accent {
  grid-column: span 2;
  background: var(--gradient-soft);
  border-color: hsl(var(--brand-frost));
}

.bento__num {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: hsl(var(--accent));
  letter-spacing: var(--tracking-wide);
}

.bento__title {
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  color: hsl(var(--primary));
  line-height: 1.15;
}

.bento__text {
  font-size: var(--text-sm);
  color: hsl(var(--foreground-muted));
  line-height: var(--leading-snug);
}

.bento__cell--feature .bento__title { color: white; font-size: var(--text-3xl); }
.bento__cell--feature .bento__text { color: hsl(var(--brand-frost) / 0.85); }
.bento__cell--feature .bento__num { color: hsl(var(--brand-frost)); }

/* Bento responsive: 6-col → 4-col tablet → 2-col phablet → 1-col phone.
   Feature cell stays 'big' relative to siblings at every breakpoint. */
@media (max-width: 1024px) {
  .bento { grid-template-columns: repeat(4, 1fr); }
  .bento__cell--feature { grid-column: span 4; grid-row: span 1; }
  .bento__cell--md, .bento__cell--sm, .bento__cell--accent { grid-column: span 2; }
}

@media (max-width: 640px) {
  .bento { grid-template-columns: 1fr; gap: var(--space-3); }
  .bento__cell, .bento__cell--feature, .bento__cell--md,
  .bento__cell--sm, .bento__cell--accent { grid-column: span 1; }
  .bento__cell--feature .bento__title { font-size: var(--text-xl); }
  .bento__cell { padding: var(--space-5); }
}

/* ─── Process / steps ─── */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
  counter-reset: step;
}

.step { counter-increment: step; position: relative; padding-top: var(--space-6); }

.step::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: hsl(var(--accent));
  font-weight: 700;
  display: block;
  margin-bottom: var(--space-3);
  letter-spacing: var(--tracking-wide);
}

.step::after {
  content: '';
  position: absolute;
  top: var(--space-6);
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, hsl(var(--accent)), transparent);
}

.step__title {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-2);
  color: hsl(var(--primary));
  letter-spacing: var(--tracking-tight);
}

.step__text {
  color: hsl(var(--foreground-muted));
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}

@media (max-width: 768px) {
  .steps { grid-template-columns: 1fr; }
}

/* ─── Lead form section ─── */
.lead-section {
  position: relative;
  background: var(--gradient-hero);
  color: white;
  padding-block: var(--space-section);
  isolation: isolate;
  overflow: hidden;
}

.lead-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 80% 20%, hsl(var(--brand-frost) / 0.3), transparent 60%),
    radial-gradient(ellipse 50% 60% at 10% 80%, hsl(var(--brand-surf) / 0.35), transparent 65%);
  z-index: -1;
}

.lead-section__grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: var(--space-12);
  align-items: center;
}

.lead-section__copy { color: white; }

.lead-section__copy .eyebrow { color: hsl(var(--brand-frost)); }
.lead-section__copy h2 { color: white; font-size: var(--text-4xl); margin-block: var(--space-4); }
.lead-section__copy p { color: hsl(var(--brand-frost) / 0.9); font-size: var(--text-lg); line-height: var(--leading-relaxed); max-width: 42ch; }

.lead-section__perks {
  margin-top: var(--space-8);
  display: grid;
  gap: var(--space-4);
  font-size: var(--text-sm);
  color: hsl(var(--brand-frost));
}

.lead-section__perks li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-weight: 500;
}

.lead-section__perks svg {
  flex-shrink: 0;
  color: hsl(var(--brand-surf));
  margin-top: 0.2rem;
}

.lead-card {
  background: hsl(var(--surface));
  color: hsl(var(--foreground));
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: var(--shadow-lg);
  border: 1px solid hsl(var(--border) / 0.4);
}

.lead-card__title {
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  margin-bottom: var(--space-2);
  color: hsl(var(--primary));
}

.lead-card__sub {
  font-size: var(--text-sm);
  color: hsl(var(--foreground-muted));
  margin-bottom: var(--space-6);
}

@media (max-width: 960px) {
  .lead-section__grid { grid-template-columns: 1fr; }
}

/* ─── FAQ ─── */
.faq { display: flex; flex-direction: column; gap: var(--space-3); }

.faq__item {
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  background: hsl(var(--surface));
  overflow: hidden;
  transition: border-color var(--duration-fast);
}

.faq__item[open] { border-color: hsl(var(--accent) / 0.4); }

.faq__item summary {
  cursor: pointer;
  padding: var(--space-5) var(--space-6);
  font-weight: 600;
  font-size: var(--text-base);
  color: hsl(var(--primary));
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
}

.faq__item summary::-webkit-details-marker { display: none; }

.faq__item summary::after {
  content: '+';
  font-size: var(--text-2xl);
  font-weight: 300;
  color: hsl(var(--accent));
  transition: transform var(--duration-fast) var(--ease-out-cubic);
  line-height: 1;
}

.faq__item[open] summary::after { transform: rotate(45deg); }

.faq__body {
  padding: 0 var(--space-6) var(--space-5);
  color: hsl(var(--foreground-muted));
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  max-width: 70ch;
}

/* ─── Two-column compare ─── */
.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
}

.compare__col {
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-md);
  padding: var(--space-6);
  background: hsl(var(--surface));
}

.compare__col--bad h4 { color: hsl(var(--foreground-muted)); }
.compare__col--good {
  background: linear-gradient(135deg, hsl(var(--brand-cyan) / 0.6), hsl(var(--surface)));
  border-color: hsl(var(--brand-frost));
}

.compare__col h4 {
  font-size: var(--text-base);
  font-weight: 700;
  margin-bottom: var(--space-4);
  letter-spacing: var(--tracking-snug);
}

.compare__col ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: hsl(var(--foreground-muted));
  line-height: var(--leading-snug);
}

.compare__col li {
  padding-left: 1.5rem;
  position: relative;
}

.compare__col--bad li::before {
  content: '×';
  position: absolute;
  left: 0;
  top: -0.1rem;
  color: hsl(var(--danger));
  font-weight: 700;
  font-size: 1.25em;
}

.compare__col--good li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: hsl(var(--success));
  font-weight: 700;
}

@media (max-width: 768px) {
  .compare { grid-template-columns: 1fr; }
}

/* ─── Stats row ─── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-8);
}

@media (max-width: 768px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
}

/* ─── Service-specific accent helpers ─── */
.svc-website { --svc-accent: var(--brand-surf); }
.svc-seo { --svc-accent: var(--brand-teal); }
.svc-analytics { --svc-accent: var(--brand-twilight); }

/* ─── Feature split (icon list with copy) ─── */
.feature-split {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: var(--space-12);
  align-items: start;
}

.feature-split__visual {
  position: sticky;
  top: 6rem;
  background: var(--gradient-soft);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  border: 1px solid hsl(var(--brand-frost) / 0.5);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  min-height: 22rem;
}

.feature-split__visual--dark {
  background: hsl(var(--brand-twilight));
  border-color: transparent;
  color: hsl(var(--brand-frost));
}

.feature-split__visual--dark h3,
.feature-split__visual--dark .stat__value {
  color: white;
  background: none;
  -webkit-text-fill-color: white;
}

.feature-list { display: flex; flex-direction: column; gap: var(--space-6); }

.feature-list__item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-4);
  align-items: start;
  padding: var(--space-4) 0;
  border-top: 1px solid hsl(var(--border));
}

.feature-list__item:first-child { border-top: none; padding-top: 0; }

.feature-list__icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  background: hsl(var(--accent) / 0.1);
  color: hsl(var(--accent-strong));
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.feature-list__title {
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  margin-bottom: var(--space-2);
  color: hsl(var(--primary));
}

.feature-list__text {
  color: hsl(var(--foreground-muted));
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}

@media (max-width: 900px) {
  .feature-split { grid-template-columns: 1fr; }
  .feature-split__visual { position: relative; top: 0; }
}

/* ─── Dynamic content callout (geo-aware highlights) ─── */
.dynamic-strip {
  background: hsl(var(--surface-raised));
  border-block: 1px solid hsl(var(--border));
  padding-block: var(--space-6);
}

.dynamic-strip__inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-6);
  align-items: center;
}

.dynamic-strip__cell {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: hsl(var(--foreground-muted));
  line-height: var(--leading-snug);
}

.dynamic-strip__cell svg {
  flex-shrink: 0;
  color: hsl(var(--accent));
}

.dynamic-strip__cell strong {
  color: hsl(var(--primary));
  font-weight: 600;
}

@media (max-width: 760px) {
  .dynamic-strip__inner { grid-template-columns: 1fr; gap: var(--space-4); }
}

/* ─── Section heading block ─── */
.section-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: end;
  margin-bottom: var(--space-12);
}

.section-head__title {
  font-size: var(--text-4xl);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  max-width: 16ch;
}

.section-head__lede {
  color: hsl(var(--foreground-muted));
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  max-width: 50ch;
}

@media (max-width: 768px) {
  .section-head { grid-template-columns: 1fr; gap: var(--space-6); }
}
