/* Page-specific layouts */

/* ——— Home ——— */
.home-hero {
  display: flex;
  flex-direction: column;
  gap: var(--stack-md);
  align-items: stretch;
  width: 100%;
  padding-block: var(--stack-md);
}

@media (min-width: 1024px) {
  .home-hero {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--stack-lg);
    padding-block: var(--stack-lg);
  }
}

.home-hero__copy {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 36rem;
}

.home-hero__copy h1 .text-secondary {
  display: block;
}

.home-hero__copy .lead {
  max-width: 32rem;
  color: var(--on-surface-variant);
  margin-top: 0.25rem;
}

.home-hero__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.25rem;
  margin-top: 0.5rem;
}

@media (min-width: 480px) {
  .home-hero__actions {
    flex-direction: row;
    align-items: center;
  }
}

.home-hero__actions .link-inline {
  color: var(--on-surface-variant);
  font-size: var(--fs-body-md);
  padding-block: 0.5rem;
  transition: color 0.2s ease;
}

.home-hero__actions .link-inline:hover {
  color: var(--on-surface);
}

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  margin-top: 0.25rem;
}

.trust-strip span {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
  background: var(--surface-container);
  border: 1px solid color-mix(in srgb, var(--outline-variant) 60%, transparent);
  border-radius: var(--radius-pill);
  padding: 0.35rem 0.75rem;
}

.school-note {
  margin-top: 0.5rem;
  font-size: var(--fs-body-md);
  color: var(--on-surface-variant);
}

.school-note a {
  color: var(--on-surface);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--outline-variant);
}

.school-note a:hover {
  text-decoration-color: var(--secondary);
  color: var(--secondary);
}

.home-features {
  padding-block: var(--stack-md) var(--stack-lg);
}

.home-features__head {
  margin-bottom: 1.75rem;
}

.home-features__head h2 {
  font-family: var(--font-display);
  font-size: var(--fs-headline-md);
  font-weight: 500;
  color: var(--on-surface);
  margin-bottom: 0.5rem;
}

.home-features__head p {
  color: var(--on-surface-variant);
  max-width: 36rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

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

@media (min-width: 1024px) {
  .feature-grid.feature-grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature-card {
  background: var(--surface-container-low);
  border: 1px solid var(--surface-variant);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.feature-card__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-lg);
  background: var(--surface-container-highest);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.feature-card__icon .material-symbols-outlined {
  font-size: 1.35rem;
}

.feature-card h3 {
  font-family: var(--font-display);
  font-size: var(--fs-headline-sm);
  font-weight: 500;
  color: var(--on-surface);
}

.feature-card p {
  color: var(--on-surface-variant);
  font-size: var(--fs-body-md);
  line-height: 1.55;
}

.home-tiles {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--unit);
  width: 100%;
  flex: 1;
}

@media (min-width: 640px) {
  .home-tiles {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    min-height: 500px;
  }

  .home-tiles__stack {
    grid-row: 1 / span 2;
  }
}

.home-tiles__stack {
  display: flex;
  flex-direction: column;
  gap: var(--unit);
  min-height: 0;
}

.home-tiles__metric {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  flex: 1;
  min-height: 200px;
}

.home-tiles__metric .metric-value {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
}

.home-tiles__support {
  min-height: 200px;
  display: flex;
  flex-direction: column;
}

@media (min-width: 640px) {
  .home-tiles__support {
    height: 246px;
    min-height: 246px;
  }
}

.home-tiles__support h3 {
  font-family: var(--font-display);
  font-size: var(--fs-headline-sm);
  font-weight: 500;
  line-height: 1.25;
  color: var(--on-surface);
  margin-bottom: 0.75rem;
}

/* ——— Insights ——— */
.insights-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--stack-md);
  align-items: center;
  padding-block: var(--stack-md) 2rem;
}

@media (min-width: 960px) {
  .insights-hero {
    grid-template-columns: 0.95fr 1.05fr;
    gap: var(--stack-lg);
    padding-block: var(--stack-lg) var(--stack-md);
  }
}

.insights-hero__copy {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.insights-hero__copy .lead {
  color: var(--on-surface-variant);
  max-width: 32rem;
}

.insights-hero__label {
  font-size: var(--fs-label-caps);
  font-weight: 700;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--secondary);
}

/* Heatmap mock */
.heatmap-frame {
  background: var(--surface-container-low);
  border: 1px solid var(--surface-variant);
  border-radius: var(--radius-xl);
  padding: 1rem;
  box-shadow: 0 16px 40px rgba(28, 27, 27, 0.06);
}

.heatmap-chrome {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
  padding: 0 0.25rem;
}

.heatmap-chrome span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--surface-dim);
}

.heatmap-chrome span:nth-child(1) { background: #d4a59a; }
.heatmap-chrome span:nth-child(2) { background: #c8c6c5; }
.heatmap-chrome span:nth-child(3) { background: #e5e2e1; }

.heatmap-stage {
  position: relative;
  aspect-ratio: 16 / 11;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, #faf7f5 0%, #f3eeeb 100%);
  border: 1px solid var(--outline-variant);
  overflow: hidden;
}

.heatmap-page {
  position: absolute;
  inset: 10% 12% 14% 12%;
  border-radius: 6px;
  background: #fffefc;
  border: 1px solid color-mix(in srgb, var(--outline-variant) 70%, transparent);
  box-shadow: 0 8px 24px rgba(28, 27, 27, 0.04);
}

.heatmap-page::before,
.heatmap-page::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  height: 6px;
  border-radius: 3px;
  background: var(--surface-container-high);
}

.heatmap-page::before { top: 12%; width: 40%; right: auto; }
.heatmap-page::after { top: 22%; opacity: 0.7; }

.heatmap-lines {
  position: absolute;
  left: 10%;
  right: 10%;
  top: 34%;
  bottom: 16%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.heatmap-lines i {
  display: block;
  height: 5px;
  border-radius: 3px;
  background: var(--surface-container);
}

.heatmap-lines i:nth-child(1) { width: 92%; }
.heatmap-lines i:nth-child(2) { width: 78%; }
.heatmap-lines i:nth-child(3) { width: 86%; }
.heatmap-lines i:nth-child(4) { width: 64%; }
.heatmap-lines i:nth-child(5) { width: 72%; }

.heatmap-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(12px);
  pointer-events: none;
  mix-blend-mode: multiply;
}

.heatmap-blob--a {
  width: 38%;
  height: 42%;
  top: 18%;
  left: 28%;
  background: radial-gradient(circle, rgba(186, 70, 45, 0.55) 0%, rgba(254, 165, 137, 0.35) 45%, transparent 70%);
}

.heatmap-blob--b {
  width: 28%;
  height: 30%;
  top: 48%;
  left: 52%;
  background: radial-gradient(circle, rgba(144, 75, 53, 0.5) 0%, rgba(254, 165, 137, 0.28) 50%, transparent 72%);
}

.heatmap-blob--c {
  width: 22%;
  height: 24%;
  top: 58%;
  left: 22%;
  background: radial-gradient(circle, rgba(212, 140, 80, 0.45) 0%, transparent 70%);
}

.heatmap-blob--d {
  width: 18%;
  height: 20%;
  top: 28%;
  left: 62%;
  background: radial-gradient(circle, rgba(254, 165, 137, 0.5) 0%, transparent 70%);
}

.heatmap-zone {
  position: absolute;
  border-radius: 50%;
  border: 1px solid transparent;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
  z-index: 2;
}

.heatmap-zone:hover,
.heatmap-zone:focus-visible {
  border-color: color-mix(in srgb, var(--secondary) 50%, transparent);
  background: color-mix(in srgb, var(--secondary) 8%, transparent);
  transform: scale(1.05);
  outline: none;
}

.heatmap-zone::after {
  content: attr(data-label);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  transform: translateX(-50%) translateY(4px);
  white-space: nowrap;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--on-surface);
  background: var(--surface-container-lowest);
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius-pill);
  padding: 0.3rem 0.55rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 6px 16px rgba(28, 27, 27, 0.08);
}

.heatmap-zone:hover::after,
.heatmap-zone:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.heatmap-zone--cta {
  width: 22%;
  height: 14%;
  left: 39%;
  top: 68%;
}

.heatmap-zone--nav {
  width: 30%;
  height: 12%;
  left: 35%;
  top: 10%;
}

.heatmap-zone--body {
  width: 36%;
  height: 28%;
  left: 32%;
  top: 32%;
}

.heatmap-caption {
  margin-top: 0.75rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--on-surface-variant);
}

.features-section {
  padding-block: var(--stack-md) var(--stack-lg);
}

.features-section > h2 {
  font-family: var(--font-display);
  font-size: var(--fs-headline-md);
  font-weight: 500;
  color: var(--on-surface);
  margin-bottom: 0.5rem;
}

.features-section > .lead {
  color: var(--on-surface-variant);
  margin-bottom: 2rem;
  max-width: 36rem;
}

.insights-preview {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gutter);
  width: 100%;
  padding-top: 2rem;
}

.insights-preview__side {
  display: flex;
  flex-direction: column;
  gap: var(--gutter);
}

@media (min-width: 768px) {
  .insights-preview {
    grid-template-columns: repeat(12, 1fr);
  }

  .insights-preview__main {
    grid-column: span 8;
  }

  .insights-preview__side {
    grid-column: span 4;
  }
}

.insights-preview__main {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.insights-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding-top: 3rem;
  padding-bottom: var(--stack-md);
}

body.has-bottom-nav .insights-list {
  padding-bottom: calc(var(--stack-md) + 2rem);
}

.insights-list > h2 {
  font-family: var(--font-display);
  font-size: var(--fs-headline-md);
  font-weight: 500;
  color: var(--on-surface);
  margin-bottom: 0.5rem;
}

/* ——— Philosophy page (original about layout) ——— */
.philo-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--gutter);
  padding-block: var(--stack-lg) var(--stack-md);
}

.philo-hero h1 {
  max-width: 48rem;
}

.philo-hero .lead {
  max-width: 40rem;
  color: var(--on-surface-variant);
}

/* No large hero image */

.philo-ethos {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--stack-lg);
  align-items: center;
  padding-block: var(--stack-lg);
  border-top: 1px solid var(--outline-variant);
}

@media (min-width: 768px) {
  .philo-ethos {
    grid-template-columns: repeat(12, 1fr);
  }

  .philo-ethos__copy {
    grid-column: span 5;
  }

  .philo-ethos__media {
    grid-column: span 7;
  }
}

.philo-ethos__copy {
  display: flex;
  flex-direction: column;
  gap: var(--gutter);
}

.philo-ethos__copy h2 {
  font-family: var(--font-display);
  font-size: var(--fs-headline-md);
  font-weight: 500;
  color: var(--on-surface);
}

.philo-ethos__copy p {
  color: var(--on-surface-variant);
  font-size: var(--fs-body-md);
  line-height: 1.65;
}

.philo-ethos__media {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gutter);
}

.philo-ethos__media img {
  width: 100%;
  height: 16rem;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--outline-variant);
  background: var(--surface-container);
  display: block;
}

@media (min-width: 768px) {
  .philo-ethos__media img:nth-child(2) {
    margin-top: 2rem;
  }
}

.philo-people {
  background: var(--surface-container);
  border-radius: var(--radius-xl);
  padding: var(--stack-md) var(--gutter);
  margin-bottom: var(--stack-lg);
}

.philo-people__intro {
  text-align: center;
  margin-bottom: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: var(--unit);
}

.philo-people__intro h2 {
  font-family: var(--font-display);
  font-size: var(--fs-headline-md);
  font-weight: 500;
  color: var(--on-surface);
}

.philo-people__intro p {
  color: var(--on-surface-variant);
  max-width: 36rem;
  margin-inline: auto;
}

.team-grid--two {
  max-width: 520px;
  margin-inline: auto;
  grid-template-columns: 1fr;
  gap: var(--gutter);
}

@media (min-width: 480px) {
  .team-grid--two {
    grid-template-columns: 1fr 1fr;
  }
}

.team-card .role {
  margin-top: 0.25rem;
}

/* ——— Download ——— */
.download-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
  padding-block: var(--stack-md);
}

@media (min-width: 768px) {
  .download-page {
    padding-block: var(--stack-lg);
  }
}

.download-hero {
  max-width: 48rem;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  margin-bottom: var(--stack-lg);
}

.download-hero .lead {
  color: var(--on-surface-variant);
  max-width: 36rem;
}

.download-page .download-grid {
  margin-bottom: var(--stack-lg);
}

.download-page .source-band {
  margin-bottom: var(--stack-md);
}
