/* ==========================================================================
   layr. components. Every value comes from tokens.css where a token exists.
   Sections: base · wordmark · buttons · rule · status · navigation · hero ·
             section title · product showcase · early access · footer · mobile menu · breakpoints
   ========================================================================== */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--charcoal);
  color: var(--parchment);
  font-family: var(--font-ui);
  font-size: var(--fs-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: inherit; }
img { max-width: 100%; display: block; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--space-4); top: -100px; z-index: 100;
  background: var(--parchment); color: var(--charcoal);
  padding: var(--space-3) 18px; border-radius: var(--radius-md); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: var(--space-4); }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ---------- Wordmark ----------
   <span class="wordmark"><img src="assets/brand/layr-logo-light.svg" alt="layr." width="3502" height="1908"></span>
   Size it with font-size (tokens --fs-wordmark-*); the SVG scales from that. */
.wordmark {
  font-family: var(--font-ui);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1;
  color: var(--parchment);
  white-space: nowrap;
}
.wordmark img { display: block; height: 0.97em; width: auto; }

/* ---------- Buttons ----------
   .btn                 primary (gold fill)
   .btn--outline        secondary (outlined, understated)
   sizes: .btn--small (nav) · .btn--hero (hero CTA) · .btn--large (forms, menu) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  background: var(--gold); color: var(--charcoal);
  font-family: var(--font-ui); font-weight: 600;
  text-decoration: none; border: 0; cursor: pointer;
  white-space: nowrap;
}
.btn:hover { background: var(--gold-hover); }
.btn--outline {
  background: transparent; color: var(--parchment);
  box-shadow: inset 0 0 0 1px var(--line-outline);
  font-weight: 500;
}
.btn--outline:hover { background: var(--tint-hover); box-shadow: inset 0 0 0 1px var(--gold); }
.btn--small {
  min-height: var(--touch-min); padding: 0 22px; border-radius: var(--radius-md);
  font-size: clamp(14px, 0.9vw, 16px);
}
.btn--hero {
  min-height: clamp(52px, 6.2svh, 66px);
  padding: 0 clamp(28px, 2.6vw, 46px);
  border-radius: var(--radius-pill);
  font-size: clamp(16px, min(4.2vw, 2.1svh), 22px);
}
.btn--large {
  min-height: var(--control-h); padding: 0 28px; border-radius: var(--radius-pill); font-size: 17px;
}
.btn__arrow { width: 1.05em; height: 1.05em; flex: none; }

/* ---------- Gold rule (short divider) ---------- */
.rule { width: var(--rule-w); height: 1px; border: 0; background: var(--gold); }

/* ---------- Status indicator (released / beta / upcoming) ----------
   <span class="status" data-status-for="albums"></span>; label and modifier come from SITE.products in main.js */
.status {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-family: var(--font-ui); font-size: var(--fs-label); font-weight: 500; letter-spacing: var(--ls-label); text-transform: uppercase;
  line-height: 1.3;
}
.status::before { content: ""; width: 0.55em; height: 0.55em; border-radius: 50%; flex: none; }
.status--released { color: var(--gold); }
.status--released::before { background: var(--gold); }
.status--beta { color: var(--parchment); }
.status--beta::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--parchment); }
.status--upcoming { color: var(--stone); }
.status--upcoming::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--stone); opacity: 0.8; }

/* ---------- Navigation (header) ---------- */
.site-header {
  width: 100%;
  max-width: var(--frame-max);
  margin-inline: auto;
  padding: clamp(14px, 2.6svh, 34px) var(--pad-inline) 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-5);
}
.site-header__brand { justify-self: start; text-decoration: none; border-radius: 6px; }
.site-header__brand .wordmark { font-size: var(--fs-wordmark-nav); }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(20px, 2.2vw, 44px); }
.site-nav a {
  display: inline-flex; align-items: center; min-height: var(--touch-min);
  font-size: var(--fs-nav); font-weight: 400;
  text-decoration: none; color: var(--parchment); opacity: 0.88;
}
.site-nav a:hover { opacity: 1; }
.site-header__cta { justify-self: end; }

.menu-button {
  display: none;
  justify-self: end; grid-column: 3;
  width: 48px; height: 48px; margin-right: -10px;
  background: transparent; border: 0; border-radius: var(--radius-md); color: var(--parchment); cursor: pointer;
  align-items: center; justify-content: center;
}
.menu-button svg { width: 30px; height: 30px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  isolation: isolate;
  background-color: var(--hero-placeholder, var(--charcoal));
}
.hero { --scrim-uniform: var(--hero-landscape-scrim, 0); }
.hero__media {
  position: absolute; inset: 0; z-index: -2;
  background-color: var(--hero-placeholder, var(--charcoal));
  background-image: var(--hero-landscape, none);
  background-position: var(--hero-landscape-position, 50% 50%);
  background-size: cover;
  background-repeat: no-repeat;
}
@media (max-aspect-ratio: 4/5), (max-width: 767px) {
  .hero__media {
    background-image: var(--hero-portrait, none);
    background-position: var(--hero-portrait-position, 50% 40%);
  }
  .hero { --scrim-uniform: var(--hero-portrait-scrim, 0); }
}
/* Dark scrim keeps the text readable over any photograph. */
.hero__scrim {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(rgba(23, 22, 20, var(--scrim-uniform)), rgba(23, 22, 20, var(--scrim-uniform))),
    radial-gradient(ellipse 60% 55% at 50% 50%, rgba(23, 22, 20, 0.45), rgba(23, 22, 20, 0) 70%),
    linear-gradient(to bottom, rgba(23, 22, 20, 0.55), rgba(23, 22, 20, 0.15) 22%, rgba(23, 22, 20, 0.15) 70%, rgba(23, 22, 20, 0.6));
}

.hero__content {
  align-self: center;
  width: 100%;
  max-width: calc(var(--content-max) + 2 * var(--pad-inline));
  margin-inline: auto;
  padding: clamp(20px, 4.5svh, 96px) var(--pad-inline);
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
}
.hero__wordmark { font-size: var(--fs-wordmark-hero); margin: 0; }
.hero__tagline {
  margin: clamp(14px, 2.6svh, 40px) 0 0;
  font-size: var(--fs-eyebrow);
  font-weight: 400;
  letter-spacing: var(--ls-eyebrow);
  margin-right: calc(-1 * var(--ls-eyebrow));   /* optically re-centre the tracked line */
  text-transform: uppercase;
  line-height: 1.6;
  color: var(--parchment);
  opacity: 0.92;
}
.hero__rule { margin: clamp(18px, 3.4svh, 52px) 0 0; }
.hero__headline {
  margin: clamp(18px, 3.4svh, 52px) 0 0;
  font-family: var(--font-editorial);
  font-weight: 400;
  font-size: var(--fs-display);
  line-height: var(--lh-display);
  letter-spacing: var(--ls-display);
  text-wrap: balance;
}
.hero__headline span { display: block; }
.hero__headline em { font-style: italic; }
.hero__support {
  margin: clamp(16px, 3svh, 44px) 0 0;
  font-size: var(--fs-lead);
  font-weight: 300;
  line-height: 1.45;
  color: var(--parchment);
  opacity: 0.9;
  max-width: 40em;
  text-wrap: balance;
}
.hero__cta { margin-top: clamp(24px, 4.2svh, 64px); }
.hero__subscription {
  margin: clamp(20px, 3.4svh, 48px) 0 0;
  margin-right: calc(-1 * var(--ls-eyebrow-sm));
  font-size: var(--fs-eyebrow-sm);
  letter-spacing: var(--ls-eyebrow-sm);
  text-transform: uppercase;
  color: var(--stone);
}

/* Product strip along the lower edge of the hero (desktop / landscape tablets) */
.hero__products {
  width: 100%;
  max-width: min(1320px, 100%);
  margin-inline: auto;
  padding: 0 var(--pad-inline) clamp(24px, 5.5svh, 80px);
}
.hero__products ul {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
}
.hero__products li + li { border-left: 1px solid var(--hairline); }
.hero__products a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-1);
  min-height: var(--space-8); padding: 6px var(--space-3); text-decoration: none; border-radius: var(--radius-md);
}
.hero__products .product-name { font-size: clamp(16px, 1.1vw, 20px); font-weight: 500; }
.hero__products .status { font-size: clamp(11px, 0.72vw, 13px); }

.scroll-cue {
  display: none;
  justify-self: center;
  width: 48px; height: 48px; margin-bottom: max(var(--space-3), env(safe-area-inset-bottom));
  align-items: center; justify-content: center; color: var(--parchment); opacity: 0.75; border-radius: var(--radius-md);
}
.scroll-cue svg { width: 30px; height: 30px; }

/* ---------- Section title (centred editorial heading; size set per use) ---------- */
.section-title {
  margin: 0; font-family: var(--font-editorial); font-weight: 400;
  line-height: var(--lh-title); letter-spacing: var(--ls-title);
}
.section-title span { display: block; }

/* ---------- Product showcase ----------
   .products > header.products__intro + ul.products__list > li.product
   li.product = figure.product__media (image or labelled placeholder)
              + div.product__body (status, name, headline, support, link) */
.products {
  max-width: var(--frame-max);
  margin-inline: auto;
  padding: var(--section-pad-block) var(--pad-inline);
}
.products__intro { text-align: center; margin: 0 auto clamp(48px, 5.5vw, 96px); }
.products__title { font-size: var(--fs-title-2); }
.products__rule { margin: clamp(20px, 2.2vw, 32px) auto 0; }
.products__list {
  list-style: none; margin: 0 auto; padding: 0;
  max-width: var(--showcase-max);
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(40px, 5.5vw, 120px);
  row-gap: clamp(64px, 6.8vw, 128px);
}
.product { display: flex; flex-direction: column; scroll-margin-top: var(--space-6); min-width: 0; }
.product__media {
  margin: 0; aspect-ratio: 16 / 10; overflow: hidden;
  background: var(--graphite); border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
}
.product__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Vector illustration: compact 16:7 frame, transparent over the charcoal, no border, card or shadow. */
.product__media.is-illustration { aspect-ratio: auto; background: none; border-radius: 0; overflow: visible; }
.product__media.is-illustration img { width: clamp(120px, 12.5vw, 190px); height: auto; }
@media (max-width: 767px) { .product__media.is-illustration img { width: 140px; } }

.product__media:not(.has-image) { outline: 1px dashed var(--line-placeholder); outline-offset: -1px; }
.product__placeholder {
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--stone); opacity: 0.85;
}
.product__body {
  display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3);
  padding-top: clamp(24px, 2.4vw, 36px); max-width: 34em;
  flex: 1;                       /* fill the row so every link sits on the same line */
}
.product__name { margin: var(--space-1) 0 0; font-size: var(--fs-product-name); font-weight: 600; letter-spacing: -0.01em; }
.product__headline {
  margin: 0; font-family: var(--font-editorial); font-weight: 400;
  font-size: var(--fs-title-3); line-height: var(--lh-title-3); letter-spacing: var(--ls-title-3);
  text-wrap: balance;
}
.product__support { margin: 0 0 6px; color: var(--stone); font-size: var(--fs-body-lg); }
.product__link {
  margin-top: auto;              /* bottom-aligned within each desktop row */
  display: inline-flex; align-items: center; gap: 0.5em; min-height: var(--touch-min);
  color: var(--gold); font-weight: 500; font-size: var(--fs-ui); text-decoration: none;
}
.product__link:hover { text-decoration: underline; text-underline-offset: 4px; }
.product__link svg { width: 1.05em; height: 1.05em; }

/* Final layout (CD approval, 29 Nov 2026): each product centred under its gold icon. */
.product { align-items: center; text-align: center; }
.product__body { align-items: center; padding-top: var(--space-4); margin-inline: auto; }

/* ---------- Early access (email-only signup) ---------- */
.early-access {
  border-top: 1px solid var(--hairline);
  padding: var(--section-pad-block) var(--pad-inline);
  scroll-margin-top: 0;
}
@media (min-width: 960px) {
  .early-access { padding-block: var(--section-pad-block-compact); }
}
.early-access__inner { max-width: var(--form-max); margin: 0 auto; text-align: center; }
.early-access__title { font-size: var(--fs-title-1); }
.early-access__lead {
  margin: 14px 0 0; font-size: var(--fs-caption); letter-spacing: var(--ls-eyebrow-sm); margin-right: calc(-1 * var(--ls-eyebrow-sm));
  text-transform: uppercase; color: var(--stone);
}
.signup { margin-top: clamp(32px, 4vw, 48px); text-align: left; display: grid; gap: 14px; }
.signup__row { display: flex; gap: 10px; }
.signup__row input {
  flex: 1; min-width: 0; min-height: var(--control-h); padding: 0 20px;
  font: inherit; font-size: var(--fs-body); color: var(--parchment);
  background: var(--graphite); border: 1px solid var(--line-control); border-radius: var(--radius-pill);
}
.signup__row input::placeholder { color: var(--text-placeholder); }
.signup__row input:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; border-color: transparent; }
.signup__row input[aria-invalid="true"] { border-color: var(--error-line); }
.signup__error { margin: 0; padding-left: 20px; font-size: 14px; color: var(--error-text); }
.signup__submit[disabled] { opacity: 0.6; cursor: progress; }
.signup__status { margin: 0; min-height: 1.5em; font-size: var(--fs-ui); text-align: center; }
.signup__status[data-kind="pending"] { color: var(--stone); }
.signup__status[data-kind="error"] { color: var(--error-text); }
.signup__status[data-kind="success"] { color: var(--parchment); }
.signup__consent { margin: var(--space-4) auto 0; max-width: 34em; font-size: var(--fs-caption); line-height: 1.55; color: var(--stone); text-align: center; }
.signup__privacy { display: inline-flex; align-items: center; min-height: var(--touch-min); margin-top: var(--space-1); font-size: var(--fs-caption); color: var(--stone); text-underline-offset: 3px; }
.signup__privacy:hover { color: var(--parchment); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--hairline);
  max-width: var(--frame-max); margin-inline: auto;
  padding: var(--space-6) var(--pad-inline) max(var(--space-6), env(safe-area-inset-bottom));
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap;
  color: var(--stone); font-size: var(--fs-caption);
}
.site-footer .wordmark { font-size: var(--fs-wordmark-footer); }
.site-footer p { margin: 0; }

/* ---------- Mobile menu panel ---------- */
.menu-panel {
  position: fixed; inset: 0; z-index: 50;
  background: var(--charcoal);
  display: flex; flex-direction: column;
  padding: clamp(14px, 2.6svh, 34px) var(--pad-inline) max(var(--space-6), env(safe-area-inset-bottom));
}
.menu-panel[hidden] { display: none; }
.menu-panel__top { display: flex; justify-content: space-between; align-items: center; min-height: 48px; }
.menu-panel__top .wordmark { font-size: var(--fs-wordmark-menu); }
.menu-panel ul { list-style: none; margin: 40px 0 0; padding: 0; display: grid; }
.menu-panel li + li { border-top: 1px solid var(--hairline); }
.menu-panel ul a {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
  min-height: var(--space-8); text-decoration: none;
  font-family: var(--font-ui); font-size: 22px; font-weight: 500; letter-spacing: -0.01em;
}
.menu-panel__cta { margin-top: var(--space-6); align-self: stretch; }
.menu-close { margin-right: -10px; }

/* ---------- Breakpoints (reference list in tokens.css) ---------- */
@media (max-width: 959px) {             /* lg */
  .site-nav, .site-header__cta { display: none; }
  .menu-button { display: inline-flex; }
  .site-header__brand { display: none; }          /* mobile: centred hero logo only */
  .hero__products { display: none; }
  .scroll-cue { display: inline-flex; }
}
@media (max-width: 767px) {             /* md */
  .products__list { grid-template-columns: 1fr; row-gap: 58px; }
}
@media (max-width: 599px) {             /* sm */
  .signup__row { flex-direction: column; }
  .signup__submit { width: 100%; }
  .early-access__lead { font-size: 11px; letter-spacing: 0.32em; margin-right: -0.32em; }
}
/* Short landscape screens: let the strip drop below the fold rather than crowd the hero. */
@media (min-width: 960px) and (max-height: 620px) {
  .hero__products { display: none; }
  .scroll-cue { display: inline-flex; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* xl: very large monitors at 1x scaling (e.g. 32-inch 4K). Grow the composition one step so it
   does not float small in empty space, while the content width stays bounded. */
@media (min-width: 3000px) and (min-height: 1700px) {
  :root {
    --content-max: 1500px;
    --fs-wordmark-hero: 330px;
    --fs-wordmark-nav: 46px;
    --fs-display: 122px;
    --fs-lead: 31px;
    --fs-eyebrow: 23px;
    --fs-eyebrow-sm: 18px;
    --fs-nav: 20px;
  }
  .hero__rule { width: 68px; }
  .btn--small { font-size: 18px; min-height: 52px; padding: 0 28px; }
  .btn--hero { font-size: 26px; min-height: 80px; padding: 0 56px; }
  .hero__products { max-width: 1700px; }
  .hero__products .product-name { font-size: 25px; }
  .hero__products .status { font-size: 15px; }
  .hero__products a { min-height: 84px; }
}
