/* ==========================================================================
   layout.css — page structure, sections, containers
   ========================================================================== */

/* Content row: inset by the gutter, and capped at the design's content width
   so proportions stay identical on very wide screens instead of stretching.
   Section backgrounds remain full-bleed. */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---- Header ---- */
/* The nav belongs to the hero only: it reads as part of that first screen and
   lifts away as soon as you scroll past it. Fixed rather than sticky so the
   hero starts at y=0 — a sticky header offsets the first section and the
   browser jumps down to meet it on load. */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 28px max(var(--gutter), calc((100% - var(--container)) / 2));
  background: transparent;
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}
.site-header.is-hidden {
  opacity: 0;
  transform: translateY(-100%);
  pointer-events: none;
}

.nav-links {
  display: flex;
  flex: 1;
  gap: 12px;
}

.nav-actions {
  display: flex;
  gap: 8px;
}

/* ---- Hero ---- */
.hero {
  /* gutter on small screens, centred 1312px content box on large ones */
  --edge: max(var(--gutter), calc((100% - var(--container)) / 2));
  position: relative;
  width: 100%;
  /* Full screen starting at y=0 — the header floats over it. */
  min-height: 100vh;
  min-height: 100svh;
  padding: var(--header-h) var(--edge) 40px;
  overflow: hidden;
}

/* Design: Aeonik Medium 96 / 120, tracking -1.92px, uppercase */
.hero-title {
  position: relative;
  z-index: 2;
  font-size: clamp(48px, 8.6vw, 96px);
  font-weight: var(--w-medium);
  line-height: 1.25;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.hero-title--top { padding-top: 12px; }

.hero-title--bottom {
  text-align: right;
  position: absolute;
  right: var(--edge);
  bottom: clamp(120px, 22vh, 174px);
  z-index: 2;
}

.hero-caption {
  position: absolute;
  top: 179px;
  right: var(--edge);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero-buy {
  position: absolute;
  left: var(--edge);
  bottom: 40px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ---- Intro (lime) ---- */
.intro {
  background: var(--lime);
  min-height: 100vh;
  display: flex;
  align-items: stretch;      /* let the container own the full height */
  padding-block: 96px;
}

/* Auto gap: the mark/lead sit at the top, the stats row at the bottom, and
   the space between them absorbs whatever height is left. */
.intro .container {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
}
.intro-head {
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 4vh, 56px);
}

.intro-mark { width: 74px; height: 32px; }

/* ---- Feature cards ---- */
.features {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-block: 96px;
}

.feature-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

/* ---- Tech specs ---- */
.specs {
  --specs-h: clamp(380px, calc(100vh - 260px), 480px);   /* design height */
  position: relative;
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  min-height: 100vh;
  padding: 96px var(--gutter);
  display: flex;
  align-items: center;
  gap: 48px;
}

/* Design: Aeonik Medium 40 / 56, uppercase */
.specs-rail {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 40px;
  line-height: 56px;
  font-weight: var(--w-medium);
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.2);
  white-space: nowrap;
}

.specs-grid {
  display: flex;
  align-items: stretch;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

/* ---- Community ---- */
.community {
  background: var(--black);
  color: var(--white);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: 88px;
}

.community-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 48px;
}

.community-cta {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Infinite marquee: the viewport clips, the track scrolls itself.
   main.js duplicates the tiles so -50% wraps seamlessly. */
.community-viewport {
  overflow: hidden;          /* clips the marquee horizontally */
  width: 100%;
  /* Head-room so the hovered tile can scale up without being clipped. */
  padding-block: 28px;
}
/* No padding here: the strip is full-bleed so tiles bleed off both edges and
   the loop reads as continuous from the very first frame. main.js drives the
   transform on rAF (rather than a CSS keyframe) so it can ease the speed in
   and out instead of stopping dead on hover. */
.community-track {
  display: flex;
  gap: 8px;
  width: max-content;
  will-change: transform;
}

/* Focus effect: hovering one tile softens the rest of the strip and lifts the
   hovered card above them. */
.tile {
  transition: filter 0.45s var(--ease), opacity 0.45s var(--ease),
              transform 0.45s var(--ease);
}
.community-viewport.is-focusing .tile {
  filter: blur(5px) brightness(0.55);
  opacity: 0.85;
  transform: scale(0.96);
}
.community-viewport.is-focusing .tile.is-focused {
  filter: none;
  opacity: 1;
  transform: scale(1.09);
  z-index: 2;
}

@media (prefers-reduced-motion: reduce) {
  .community-viewport { overflow-x: auto; }
  .community-viewport.is-focusing .tile { filter: none; opacity: 1; }
}

/* ---- How it works ---- */
.how {
  background: var(--black);
  color: var(--white);
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-block: 96px;
}

.how-grid {
  display: flex;
  align-items: flex-end;
  gap: 80px;
}

.how-media {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* ---- Footer ---- */
.site-footer {
  background: var(--black);
  padding: 0 0 40px;
}

.footer-bar {
  display: flex;
  align-items: center;
  gap: 40px;
  background: var(--ink-800);
  border-radius: 20px;
  padding: 28px 32px;
}

.footer-copy {
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0.32;
  color: var(--white);
}

.footer-links {
  display: flex;
  gap: 16px;
  margin-left: auto;
}
