/* Splash: fewer labels, more light.
   Each section's heading carries it on its own: the small uppercase labels, numbered
   tabs, window captions, and duplicate film captions are gone. Light through an
   aperture (assets/aperture-field.js) replaces the floating shards: a beam falls onto
   the product recording at the top, and light leaves the Aperture mark at the close.
   Loaded last on the homepage. Every effect here stops with motion off. */

/* --- Aperture field ---------------------------------------------------------------- */

.aperture-field {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero .hero-layout,
.closing-section > .container {
  position: relative;
  z-index: 1;
}

/* --- Hero: the headline leads ------------------------------------------------------ */

.hero .hero-layout {
  padding-block: 104px 72px;
}

.hero .hero-copy {
  margin-bottom: 56px;
}

.hero .hero-copy h1 {
  font-size: clamp(36px, 4.3vw, 62px);
  line-height: 1.06;
  letter-spacing: -0.05em;
}

/* The chapter key reads "Ask 01 / 06"; "Chapter" stays for screen readers. */
.demo-chapter-hint {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.chapter-groove {
  border-radius: 18px;
}

.chapter-groove > .demo-chapter {
  min-height: 40px;
  padding-inline: 16px 14px;
  border-radius: 13px;
}

.demo-chapter i {
  left: 16px;
  right: 14px;
}

/* A thin light runs the recording's edge, where the falling sparks land. */
.demo-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  padding: 1px;
  border-radius: inherit;
  background: conic-gradient(
    from var(--border-angle),
    transparent 0 72%,
    color-mix(in srgb, var(--glow-bright) 75%, transparent) 86%,
    transparent 94%
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: border-spin 11s linear infinite;
  pointer-events: none;
}

/* --- Workspace ---------------------------------------------------------------------- */

/* Window chrome without a caption: three quiet, engraved lights. */
.feature-image .window-bar {
  justify-content: flex-start;
  gap: 7px;
  padding: 12px 16px;
}

.window-bar i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--text) 13%, transparent);
  box-shadow: var(--engraved);
}

/* --- Governance: authority flows down the stack ------------------------------------ */

@media (min-width: 601px) {
  .authority-map {
    padding-top: 40px;
  }

  .authority-connector {
    position: relative;
    display: block;
    width: 1px;
    height: 30px;
    margin: 0 auto;
    padding: 0;
    background: linear-gradient(
      var(--track-border),
      color-mix(in srgb, var(--accent) 50%, transparent)
    );
  }

  .authority-connector::after {
    content: "";
    position: absolute;
    left: -1px;
    top: 0;
    width: 3px;
    height: 10px;
    border-radius: 2px;
    background: linear-gradient(transparent, var(--glow-bright));
    box-shadow: 0 0 8px var(--glow-bright);
    opacity: 0;
    animation: authority-flow 2.8s var(--ease-out) infinite;
  }

  .authority-connector:nth-of-type(2)::after {
    animation-delay: 1.4s;
  }
}

@keyframes authority-flow {
  20% {
    opacity: 1;
  }
  from {
    transform: translateY(-4px);
  }
  to {
    transform: translateY(24px);
    opacity: 0;
  }
}

/* --- Security: each card's mark is a tile sunk into the card, lit on hover ---------- */

.trust-grid > a {
  display: flex;
  flex-direction: column;
}

.trust-grid .trust-icon {
  position: static;
  order: -1;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 30px;
  border: 1px solid var(--track-border);
  border-radius: 13px;
  background: var(--track);
  box-shadow: var(--track-shadow);
  transition:
    border-color 0.3s,
    background 0.3s,
    box-shadow 0.3s;
}

.trust-grid .trust-icon .site-icon {
  width: 19px;
  height: 19px;
}

.trust-grid > a:hover .trust-icon {
  border-color: var(--lit-border);
  background: var(--lit);
  box-shadow: var(--lit-shadow);
}

.trust-grid > a:hover .trust-icon .site-icon {
  color: #fff;
  opacity: 1;
}

.trust-grid h3 {
  margin: 0 0 12px;
}

.trust-topic {
  display: none;
}

/* --- Documentation, license, gear ----------------------------------------------------- */

.guide-promo-layout .groove {
  margin-top: 4px;
}

.price-card .groove-block {
  margin-top: 8px;
}

@media (min-width: 601px) {
  .gear-choices {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
  }
}

@media (max-width: 600px) {
  .gear-choices {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* --- Closing ------------------------------------------------------------------------ */

.closing-section img {
  margin-bottom: 36px;
}

/* The glow used to stop in a hard line at the section's top edge; it fades in instead,
   and the flat wash that was brightest along that edge goes. */
.closing-section {
  background: none;
}

.closing-section::before {
  -webkit-mask-image: linear-gradient(transparent 42%, #000 68%);
  mask-image: linear-gradient(transparent 42%, #000 68%);
}

/* --- Motion off ----------------------------------------------------------------------- */

.motion-off .demo-frame::after,
.page-hidden .demo-frame::after {
  animation: none;
  opacity: 0;
}

.motion-off .authority-connector::after,
.page-hidden .authority-connector::after {
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  .demo-frame::after,
  .authority-connector::after {
    animation: none;
    opacity: 0;
  }
}

/* --- Phones ------------------------------------------------------------------------- */

@media (max-width: 760px) {
  .hero .hero-layout {
    padding-block: 56px 40px;
  }

  .hero .hero-copy {
    margin-bottom: 32px;
  }

  .hero .hero-copy h1 {
    font-size: clamp(32px, 8.4vw, 44px);
  }
}

/* In the narrower two-column hero the keys stack, full width, as they do on phones. */
@media (min-width: 761px) and (max-width: 1050px) {
  .hero-intro-actions .button-row.groove {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .hero-intro-actions .button-row.groove .button {
    justify-content: center;
  }
}

/* Five footer links no longer fit one phone line; letting them wrap keeps phones
   from zooming the whole page out to fit. */
@media (max-width: 600px) {
  .closing-section .button-row.groove {
    flex-direction: column;
    align-items: stretch;
    width: min(100%, 340px);
  }

  .closing-section .button-row.groove .button {
    justify-content: center;
  }

  .site-footer nav {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 10px 22px;
  }
}
