/* ==========================================================================
   AKSO — Sections
   Generic, page-agnostic section scaffolding: vertical rhythm, full-bleed
   vs contained variants, dividers, eyebrows, and the inverted CTA band.
   Page-specific composition lives in assets/css/pages/*.css.
   ========================================================================== */

main {
  display: block;
  min-height: 100svh;
}

/* Base section: consistent vertical rhythm across the entire site */
.section {
  position: relative;
  padding-block: var(--section-padding-y);
}

.section-tight {
  padding-block: var(--space-5);
}

.section-flush-top {
  padding-top: 0;
}

.section-flush-bottom {
  padding-bottom: 0;
}

/* Full-bleed section: edge-to-edge, used for imagery/video moments */
.section-full {
  position: relative;
  width: 100%;
}

/* A full-viewport section (hero, CTA moments) */
.section-viewport {
  position: relative;
  width: 100%;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

/* Inverted section — rare, used for a single CTA band per the design system */
.section-inverse {
  background-color: var(--color-inverse-bg);
  color: var(--color-inverse-text);
}

.section-inverse h1,
.section-inverse h2,
.section-inverse h3,
.section-inverse p {
  color: var(--color-inverse-text);
}

/* Elevated panel background — forms, cards */
.section-elevated {
  background-color: var(--color-bg-elevated);
}

/* ---------------------------------------------------------------------
   Section header pattern — eyebrow + title, reused across every page
   --------------------------------------------------------------------- */
.section-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.section-header .eyebrow {
  color: var(--color-text-muted);
}

.section-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

@media (max-width: 768px) {
  .section-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
  }
}

/* ---------------------------------------------------------------------
   Dividers
   --------------------------------------------------------------------- */
hr,
.divider {
  border: none;
  border-top: 1px solid var(--color-border);
  width: 100%;
}

.divider-vertical {
  border: none;
  border-left: 1px solid var(--color-border);
  height: 100%;
}

/* ---------------------------------------------------------------------
   Overlay / scrim helpers — for legibility over imagery and video
   --------------------------------------------------------------------- */
.scrim {
  position: absolute;
  inset: 0;
  background: var(--color-scrim-bottom);
  pointer-events: none;
}

.scrim-full {
  position: absolute;
  inset: 0;
  background-color: var(--color-overlay);
  pointer-events: none;
}

/* ---------------------------------------------------------------------
   Media frame — consistent wrapper for images/video with lazy states
   --------------------------------------------------------------------- */
.media-frame {
  position: relative;
  overflow: hidden;
  background-color: var(--color-bg-elevated);
}

.media-frame img,
.media-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------------------------------------------------------------------
   Buttons — text/underline or thin-border only, no filled pills
   --------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-nav);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  padding-block: var(--space-2);
  transition: color var(--duration-fast) var(--ease-standard),
              border-color var(--duration-fast) var(--ease-standard),
              background-color var(--duration-fast) var(--ease-standard);
}

.btn-outline {
  border: 1px solid var(--color-border-hover);
  padding-inline: var(--space-4);
  color: var(--color-text-primary);
}

.btn-outline:hover {
  border-color: var(--color-text-primary);
  background-color: var(--color-text-primary);
  color: var(--color-inverse-text);
}

.btn-text {
  position: relative;
  padding-inline: 0;
  color: var(--color-text-primary);
}

.btn-text::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background-color: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--duration-base) var(--ease-out);
}

.btn-text:hover::after,
.btn-text:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ---------------------------------------------------------------------
   Scroll cue — hero scroll indicator
   --------------------------------------------------------------------- */
.scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-secondary);
}

.scroll-cue .scroll-cue-line {
  width: 1px;
  height: var(--space-5);
  background-color: var(--color-border-hover);
  position: relative;
  overflow: hidden;
}

.scroll-cue .scroll-cue-line::after {
  content: "";
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--color-text-primary);
  animation: scrollCue 2.2s var(--ease-in-out) infinite;
}

@keyframes scrollCue {
  0%   { top: -100%; }
  60%  { top: 100%; }
  100% { top: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-cue .scroll-cue-line::after {
    animation: none;
    top: 0;
  }
}

/* ---------------------------------------------------------------------
   Reveal-on-scroll base state
   Shared by every page that uses assets/js/modules/scroll-animations.js.
   Elements tagged [data-reveal] start hidden/offset only once JS has
   confirmed it's running (html gets a .js class via an inline snippet
   in each page's <head>) and the user hasn't requested reduced motion.
   This keeps content visible and correctly positioned if JavaScript
   fails to load, with no flash of hidden content otherwise.
   --------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  html.js [data-reveal] {
    opacity: 0;
    transform: translateY(32px);
  }
}
