/* Home page sections, footer, legal pages. Vertical rhythm is deliberately compact. */
.page-section {
  width: min(var(--page-max), 100% - 2 * var(--gutter));
  margin-inline: auto;
  padding-top: clamp(2.25rem, 5vw, 4rem);
}

.page-section--last { padding-bottom: clamp(2.25rem, 5vw, 4rem); }

.section-heading { max-width: 42rem; }
.section-heading h2 { margin-top: 0.75rem; }

/* Journey tabs: stacked cards share one grid cell so the height never jumps. */
.storybook-tabs__header h2 { max-width: 48rem; }
.storybook-tab-cards { display: grid; }
.storybook-tab-cards .storybook-tab-card { grid-area: 1 / 1; }
.storybook-tab-card:not(.is-active) { visibility: hidden; pointer-events: none; }
.storybook-tab-card h3 { margin-top: 0.75rem; font-size: 1.3rem; }
.storybook-tab-card__copy p { max-width: 36rem; margin-top: 0.75rem; color: var(--muted-foreground); font-size: 0.95rem; line-height: 1.65; }
.storybook-tab-card__count { color: var(--burgundy); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; }
.storybook-tabs { min-width: 0; }

@media (max-width: 900px) {
  .storybook-tabs__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .storybook-tab-card { min-height: 0; grid-template-columns: 1fr; gap: 1rem; padding: 1.25rem; }
  .storybook-tab-card__symbol { width: 4.5rem; height: 4.5rem; border-radius: 1.25rem; }
  .storybook-tab-card__symbol .icon { width: 2rem; height: 2rem; }
}

@media (max-width: 520px) {
  .storybook-tabs__list { grid-template-columns: 1fr; margin-top: 1.5rem; }
  .storybook-tab:last-child { grid-column: auto; }
}

/* AI workflow band */
.ai-band {
  overflow: hidden;
  border-radius: 28px;
  background: var(--burgundy-dark);
  color: var(--pearl);
  padding: clamp(1.5rem, 4vw, 2.5rem);
}

.ai-band__head { display: grid; gap: 1rem; }
.ai-band h2 { margin-top: 0.75rem; max-width: 40rem; color: var(--pearl); }
.ai-band .eyebrow-k { color: var(--burgundy-soft); }
.ai-band__lead { max-width: 36rem; color: rgba(252, 250, 247, 0.72); font-size: 0.95rem; line-height: 1.7; }
.ai-band__grid { display: grid; gap: 0.75rem; margin-top: 1.75rem; }

.ai-card {
  padding: 1.25rem;
  border: 1px solid rgba(252, 250, 247, 0.1);
  border-radius: 18px;
  background: rgba(252, 250, 247, 0.06);
}

.ai-card__icon {
  display: flex;
  width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  background: rgba(252, 250, 247, 0.1);
  color: var(--burgundy-soft);
}

.ai-card h3 { margin-top: 1rem; font-size: 1.05rem; color: var(--pearl); }
.ai-card p { margin-top: 0.6rem; color: rgba(252, 250, 247, 0.72); font-size: 0.875rem; line-height: 1.6; }

@media (min-width: 640px) {
  .ai-band__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ai-card:last-child { grid-column: 1 / -1; }
}

@media (min-width: 1024px) {
  .ai-band__head { grid-template-columns: 0.9fr 1.1fr; align-items: end; gap: 1.5rem; }
  .ai-band__lead { justify-self: end; }
  .ai-band__grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .ai-card:last-child { grid-column: auto; }
}

/* Stakeholders */
.stake { display: grid; gap: 1rem; margin-top: 1.5rem; }

.stake__visual {
  position: relative;
  min-height: 18rem;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 1.75rem;
  background: #e8eef1;
  box-shadow: var(--shadow-soft);
}

.stake__visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 48% center; transition: transform 1.1s var(--ease-kriyon); }
.stake__visual:hover img { transform: scale(1.025); }
.stake__shade { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(36, 17, 25, 0.85) 100%); }
.stake__caption { position: absolute; right: 1.25rem; bottom: 1.25rem; left: 1.25rem; z-index: 2; color: #fff; }
.stake__caption span { display: block; margin-bottom: 0.4rem; color: #f2c9d8; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.stake__caption strong { display: block; max-width: 30rem; font-size: clamp(1.05rem, 2.4vw, 1.6rem); line-height: 1.2; letter-spacing: -0.02em; }

.stake__details { display: flex; min-width: 0; flex-direction: column; gap: 0.75rem; }
.stake__tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.5rem; }

.stake__tab {
  display: grid;
  gap: 0.1rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  background: var(--pearl);
  color: var(--muted-foreground);
  text-align: left;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.stake__tab strong { color: var(--burgundy); font-size: 0.65rem; letter-spacing: 0.08em; }
.stake__tab span { font-size: 0.85rem; font-weight: 700; }
.stake__tab:hover { border-color: var(--burgundy-soft); }
.stake__tab[aria-selected="true"] { border-color: var(--burgundy); background: var(--burgundy); color: #fff; }
.stake__tab[aria-selected="true"] strong { color: #f2c9d8; }

.stake__panels { display: grid; flex: 1; }
.stake__panel { grid-area: 1 / 1; display: flex; flex-direction: column; padding: clamp(1.25rem, 3vw, 2rem); border: 1px solid var(--border); border-radius: 1.6rem; }
.stake__panel[hidden] { display: flex; visibility: hidden; }
.stake__panel--1 { background: #eaf6fd; }
.stake__panel--2 { background: #fff4d6; }
.stake__panel--3 { background: #f2e6eb; }
.stake__panel--4 { background: #e8f2e4; }

.stake__top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.stake__identity { display: flex; min-width: 0; align-items: center; gap: 0.8rem; }
.stake__icon { display: grid; width: 2.9rem; height: 2.9rem; flex: none; place-items: center; border: 1px solid rgba(108, 31, 61, 0.13); border-radius: 0.95rem; background: rgba(252, 250, 247, 0.72); color: var(--burgundy); }
.stake__cue { color: var(--burgundy); font-size: 0.85rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.stake__num { color: rgba(108, 31, 61, 0.35); font-size: 0.85rem; font-weight: 800; }
.stake__panel h3 { margin-top: 1rem; font-size: clamp(1.2rem, 2.4vw, 1.5rem); line-height: 1.2; }
.stake__panel p { max-width: 36rem; margin-top: 0.7rem; color: var(--muted-foreground); font-size: 0.95rem; line-height: 1.6; }
.stake__highlights { display: grid; gap: 0.6rem; margin-top: 1.1rem; }
.stake__highlights li { display: flex; align-items: center; gap: 0.6rem; padding: 0.7rem 0.8rem; border: 1px solid rgba(108, 31, 61, 0.1); border-radius: 0.85rem; background: rgba(252, 250, 247, 0.55); font-size: 0.85rem; font-weight: 650; line-height: 1.35; }
.stake__highlights li::before { width: 0.4rem; height: 0.4rem; flex: none; border-radius: 999px; background: var(--burgundy); content: ""; opacity: 0.55; }

@media (min-width: 560px) {
  .stake__highlights { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
  .stake { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: stretch; }
  .stake__visual { min-height: 100%; }
}

@media (max-width: 899px) {
  .stake__details { order: 1; }
  .stake__visual { order: 2; aspect-ratio: 4 / 3; min-height: 0; }
}

@media (max-width: 420px) {
  .stake__tab { padding: 0.5rem 0.4rem; text-align: center; }
  .stake__tab span { font-size: 0.72rem; }
}

/* Broader vision */
.vision-section { margin-top: clamp(2.25rem, 5vw, 4rem); padding-block: clamp(2rem, 5vw, 3rem); border-block: 1px solid var(--border); }
.vision-constellation { position: relative; isolation: isolate; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 30px; padding: clamp(1.5rem, 5vw, 3.5rem); color: var(--pearl); box-shadow: 0 28px 65px -42px rgba(72, 19, 38, 0.85); }
.vision__inner { position: relative; z-index: 1; }
.vision__eyebrow { color: var(--burgundy-soft); font-size: 0.7rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; }
.vision__title { max-width: 760px; margin-top: 1rem; color: var(--pearl); font-size: clamp(1.9rem, 5vw, 3.4rem); line-height: 1.06; letter-spacing: -0.035em; }
.vision__grid { display: grid; gap: 2rem; margin-top: 2rem; }
.vision__text { max-width: 36rem; color: rgba(252, 250, 247, 0.72); font-size: 0.92rem; line-height: 1.75; }
.vision__sub { max-width: 36rem; margin-top: 1rem; color: var(--pearl); font-size: clamp(1.4rem, 2.8vw, 2.1rem); line-height: 1.15; }
.vision__closing { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid rgba(255, 255, 255, 0.2); color: var(--pearl); font-size: 0.95rem; font-weight: 650; line-height: 1.6; }
.vision-orbit__logo img { max-width: none; }
@media (min-width: 768px) { .vision__grid { grid-template-columns: 1fr 0.95fr; gap: 3.5rem; align-items: start; } }

/* Contact */
.contact-section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.contact__grid { display: grid; gap: 1.75rem; }
.contact__lead { margin-top: 1.1rem; padding: 1.1rem; border: 1px solid var(--border); border-radius: 18px; background: #edf4f7; color: var(--muted-foreground); font-size: 0.95rem; line-height: 1.65; }
.contact__notes { display: grid; gap: 0.75rem; margin-top: 1.25rem; }
.note-box { padding: 1.1rem; border: 1px solid var(--border); border-radius: 18px; background: var(--pearl); }
.note-box--tint { background: var(--burgundy-tint); }
.note-box h3 { font-size: 1.05rem; }
.note-box p, .note-box li { margin-top: 0.5rem; color: var(--muted-foreground); font-size: 0.85rem; line-height: 1.6; }
.contact__form { padding: clamp(1.1rem, 3vw, 1.75rem); }
@media (min-width: 1024px) { .contact__grid { grid-template-columns: 0.85fr 1.4fr; align-items: start; gap: 2.5rem; } }

/* Footer */
.site-footer { margin-top: clamp(2rem, 5vw, 3.5rem); background: var(--burgundy-dark); color: var(--pearl); }
.site-footer__top { display: grid; gap: 2rem; padding-block: 2.5rem; }
.site-footer__brand { font-size: 1.25rem; font-weight: 800; }
.site-footer__about { max-width: 24rem; margin-top: 0.75rem; color: rgba(252, 250, 247, 0.7); font-size: 0.875rem; line-height: 1.65; }
.site-footer h2 { color: var(--pearl); font-size: 1.1rem; font-weight: 800; }
.site-footer li { margin-top: 0.6rem; }
.site-footer nav a { color: rgba(252, 250, 247, 0.75); font-size: 0.875rem; transition: color 160ms ease; }
.site-footer nav a:hover, .site-footer__contact a:hover { color: var(--pearl); }
.site-footer__bottom { border-top: 1px solid rgba(252, 250, 247, 0.1); }
.site-footer__bottom-inner { display: flex; flex-direction: column; gap: 1rem; padding-block: 1rem; color: rgba(252, 250, 247, 0.55); font-size: 0.75rem; }
.site-footer__contact { display: flex; flex-direction: column; gap: 0.25rem; }
.site-footer__contact a { color: rgba(252, 250, 247, 0.65); }
@media (min-width: 640px) {
  .site-footer__top { grid-template-columns: 1.4fr 1fr 1fr; }
  .site-footer__bottom-inner { flex-direction: row; align-items: flex-end; justify-content: space-between; }
  .site-footer__contact { align-items: flex-end; text-align: right; }
}

/* Legal + contact page */
.legal { padding-block: clamp(2.5rem, 7vw, 5rem); background: var(--pearl); }
.legal__inner { max-width: 48rem; }
.legal h1 { margin-top: 1rem; }
.legal__lead { margin-top: 1rem; color: var(--muted-foreground); }
.legal__sections { display: grid; gap: 2rem; margin-top: 2.5rem; }
.legal h2 { font-size: 1.25rem; }
.legal__sections p { margin-top: 0.6rem; color: var(--muted-foreground); line-height: 1.7; }
.contact-page { padding-block: clamp(2.5rem, 7vw, 5rem); }
.contact-page__intro { max-width: 42rem; }
.contact-page__intro h1 { margin-top: 1rem; }
.contact-page__intro p { margin-top: 1rem; color: var(--muted-foreground); font-size: 1.05rem; line-height: 1.7; }
.contact-page .contact__grid { margin-top: 2.5rem; }
@media (min-width: 1024px) { .contact-page .contact__grid { grid-template-columns: 1.6fr 1fr; } }

@media (prefers-reduced-motion: reduce) {
  .stake__visual img { transition: none; }
}

/* One shared content width everywhere. */
.container-k {
  width: min(var(--page-max), 100% - 2 * var(--gutter));
  max-width: none;
  margin-inline: auto;
  padding-inline: 0;
}
