/* Page-level CSS for the marketing site. Everything here was the inline
   <style> block of the static snapshot's index.html, moved into a real
   stylesheet now that there is a server to serve it.

   It defines only page furniture — the plate, headings, CTA, card, well. Every
   value it reaches for is a token from tokens/; nothing is hard-coded, so a
   token change still moves the whole site. Component surfaces (knobs, panels,
   meters) style themselves from the design-system bundle and are not here. */

html {
  box-sizing: border-box;
}
*,
*::before,
*::after {
  box-sizing: inherit;
}
html,
body {
  margin: 0;
}

body {
  background: var(--lf-brand-bg);
  color: var(--lf-brand-ink);
  font-family: var(--lf-font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--lf-ember);
  text-decoration: none;
}
a:hover {
  color: var(--lf-ember-hover);
}

/* The kit's focus ring: warm, visible, never removed. Scoped to the page
   furniture — plugin surfaces keep their own focus treatment. */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--lf-focus);
  outline-offset: 2px;
  border-radius: var(--lf-brand-radius-control);
}

.wrap {
  width: 100%;
  max-width: var(--lf-page-max);
  margin: 0 auto;
  padding-inline: var(--lf-page-gutter);
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 700;
  text-wrap: pretty;
}
h1 {
  font-size: var(--lf-display-xl);
  letter-spacing: var(--lf-track-display);
  line-height: 1.05;
}
h2 {
  font-size: var(--lf-display-lg);
  letter-spacing: var(--lf-track-display);
  line-height: 1.15;
}
h3 {
  font-size: var(--lf-display-md);
  letter-spacing: var(--lf-track-display-sm);
  line-height: 1.2;
}
p {
  margin: 0;
  text-wrap: pretty;
}

.lead {
  font-size: var(--lf-lead);
  color: var(--lf-brand-dim);
  line-height: 1.55;
}

.eyebrow {
  font: 700 11px/1 var(--lf-font-sans);
  text-transform: uppercase;
  letter-spacing: var(--lf-track-caps);
  color: var(--lf-brand-muted);
}

.sect {
  padding-block: var(--lf-section-gap);
}
.hr {
  height: 1px;
  background: var(--lf-brand-line);
  border: 0;
  margin: 0;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--lf-brand-radius-control);
  border: 1px solid var(--lf-ember);
  background: var(--lf-ember);
  color: var(--lf-ember-ink);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.25;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: var(--lf-shadow-lift);
  transition:
    background var(--lf-brand-dur-color) ease,
    border-color var(--lf-brand-dur-color) ease,
    color var(--lf-brand-dur-color) ease,
    transform var(--lf-dur-press) linear,
    box-shadow var(--lf-dur-press) linear;
}
.cta:hover {
  background: var(--lf-ember-hover);
  color: var(--lf-ember-ink);
}
.cta:active {
  background: var(--lf-ember-press);
  transform: translateY(var(--lf-press-drop));
  box-shadow: var(--lf-shadow-press);
}
.cta.ghost {
  background: transparent;
  border-color: var(--lf-brand-line-bright);
  color: var(--lf-brand-ink);
  box-shadow: none;
}
.cta.ghost:hover {
  border-color: var(--lf-ember);
  color: var(--lf-brand-ink);
  background: transparent;
}
.cta:disabled {
  cursor: default;
  opacity: 0.55;
}
.cta.ghost:disabled:hover {
  border-color: var(--lf-brand-line-bright);
  background: transparent;
}

.card {
  border: 1px solid var(--lf-brand-line);
  border-radius: var(--lf-brand-radius-panel);
  background: var(--lf-brand-surface);
  box-shadow: var(--lf-shadow-card);
  overflow: hidden;
}

.spec {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 18px;
  margin: 0;
  font-size: 13px;
}
.spec dt {
  color: var(--lf-brand-muted);
}
.spec dd {
  margin: 0;
  color: var(--lf-brand-dim);
  font-variant-numeric: tabular-nums;
}

/* Nav items are real links now that routing is server-side, so this has to
   read as a link rather than a button — but the resting, hover and current
   treatments are the snapshot's, unchanged.

   The current page is styled from Fresh's own `data-current`, which it sets on
   an exact URL match. Not aria-current: Fresh also puts aria-current="true" on
   every `/` ancestor link, which would leave Home underlined on both product
   pages. */
.navlink {
  background: none;
  border: 0;
  font: inherit;
  font-size: 15px;
  color: var(--lf-brand-dim);
  cursor: pointer;
  padding: 4px 2px;
  border-bottom: 2px solid transparent;
  transition:
    color var(--lf-brand-dur-color) ease,
    border-color var(--lf-brand-dur-color) ease;
}
.navlink:hover {
  color: var(--lf-brand-ink);
}
.navlink[data-current] {
  color: var(--lf-brand-ink);
  border-bottom-color: var(--lf-ember);
}

.wellframe {
  border: 1px solid var(--lf-brand-line);
  border-radius: var(--lf-brand-radius-panel);
  background: var(--aui-well);
  box-shadow: var(--lf-shadow-well);
  padding: clamp(14px, 3vw, 28px);
  display: flex;
  justify-content: center;
  overflow: hidden;
}

/* The forge line: the one place --lf-human is allowed to appear. See the token
   comment in tokens/brand.css for why it may not be used for anything else. */
.gate {
  color: var(--lf-human);
}

/* ── photography ─────────────────────────────────────────────────────────
   Photos sit in the same frame as the live product wells — hairline border,
   track radius, card shadow — so the page keeps one surface language. The
   vignette pulls the edges down towards the ground colour; generated images
   tend to be lit evenly to the corners, and this is what stops them glowing
   brighter than the UI they sit next to. */
.photo {
  position: relative;
  margin: 0;
  width: 100%;
  border: 1px solid var(--lf-brand-line);
  border-radius: var(--lf-brand-radius-panel);
  background: var(--lf-brand-surface);
  box-shadow: var(--lf-shadow-card);
  overflow: hidden;
}
.photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse at center,
    transparent 55%,
    color-mix(in srgb, var(--lf-brand-bg) 55%, transparent)
  );
}

/* The waiting state. Hatched in the ground's own greys, labelled with the file
   it wants, so a missing image reads as a slot, not a bug. */
.photo--empty {
  display: grid;
  place-items: center;
  background: repeating-linear-gradient(
    135deg,
    var(--lf-brand-surface) 0 10px,
    var(--lf-brand-raised) 10px 11px
  );
}
.photo--empty::after {
  display: none;
}
.photo__slot {
  font: 500 11px/1.6 var(--lf-font-mono);
  color: var(--lf-brand-muted);
  text-align: center;
  padding: 12px;
}

/* A section header with a photo beside it. Stacks on narrow screens. */
.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(1.75rem, 4vw, 3rem);
  align-items: center;
}

/* A wide photo band between sections. */
.band {
  padding-bottom: clamp(2.5rem, 6vw, 4.5rem);
}

/* ── home hero ───────────────────────────────────────────────────────────
   Four layers, back to front: the photo, pulled down hard towards the ground
   and fading into it at the bottom; an ember glow behind the module that
   breathes with the signal (--hero-energy is written by the island every
   frame); the delay trace on its canvas; then the copy and the live module.
   The photo is only ever allowed to be atmosphere — the brightest thing in
   the section is the product. */
.hero {
  --hero-energy: 0;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  align-items: center;
  min-height: clamp(560px, 88svh, 860px);
  padding-block: clamp(3rem, 8vw, 6rem) clamp(6rem, 14vw, 9rem);
}
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -3;
}
.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% 40%;
  filter: saturate(0.9) brightness(0.62);
  transform: scale(1.04);
  animation: hero-drift 40s ease-in-out infinite alternate;
}
.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
    90deg,
    var(--lf-brand-bg) 0%,
    color-mix(in srgb, var(--lf-brand-bg) 82%, transparent) 38%,
    color-mix(in srgb, var(--lf-brand-bg) 45%, transparent) 70%,
    color-mix(in srgb, var(--lf-brand-bg) 70%, transparent) 100%
  ),
    linear-gradient(
    180deg,
    color-mix(in srgb, var(--lf-brand-bg) 60%, transparent) 0%,
    transparent 25%,
    transparent 55%,
    var(--lf-brand-bg) 100%
  );
}
/* The glow sits behind the module, so it reads as the module lighting the
   room rather than the room lighting the module. */
.hero::before {
  content: "";
  position: absolute;
  z-index: -2;
  right: max(-10vw, calc(50% - 760px));
  top: 50%;
  width: min(900px, 110vw);
  aspect-ratio: 1;
  translate: 0 -55%;
  border-radius: 50%;
  background: radial-gradient(
    closest-side,
    color-mix(in srgb, var(--lf-ember) 26%, transparent),
    color-mix(in srgb, var(--lf-ember) 7%, transparent) 55%,
    transparent
  );
  opacity: calc(0.55 + var(--hero-energy) * 0.45);
  pointer-events: none;
}
.hero__trace {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.hero__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: center;
}
.hero__copy {
  display: grid;
  gap: 22px;
  min-width: 0;
}
.hero__copy > * {
  animation: lf-screen-in var(--product-motion-slow) var(--lf-ease-screen)
    backwards;
}
.hero__copy > :nth-child(2) {
  animation-delay: 60ms;
}
.hero__copy > :nth-child(3) {
  animation-delay: 120ms;
}
.hero__copy > :nth-child(4) {
  animation-delay: 180ms;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}
.hero__copy h1 {
  text-shadow: 0 2px 30px #000a;
}
.hero__stage {
  display: grid;
  gap: 14px;
  justify-items: center;
  min-width: 0;
  animation: lf-screen-in var(--product-motion-slow) var(--lf-ease-screen)
    240ms backwards;
}
.hero__well {
  width: 100%;
  box-shadow: var(--lf-shadow-well), var(--lf-shadow-card),
    0 0 0 1px color-mix(in srgb, var(--lf-ember) 10%, transparent);
}
.hero__hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 500 12px/1 var(--lf-font-mono);
  color: var(--lf-brand-muted);
}
.hero__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lf-ember);
  box-shadow: 0 0 calc(4px + var(--hero-energy) * 10px) var(--lf-ember);
  opacity: calc(0.45 + var(--hero-energy) * 0.55);
}

@keyframes hero-drift {
  to {
    transform: scale(1.1) translate(-1.5%, -1%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__bg img,
  .hero__copy > *,
  .hero__stage {
    animation: none;
  }
}
