/**
 * Marketing layout only — colors, type steps, radii, motion clocks
 * come from /tokens.css (packages/design-tokens SSOT).
 * Do not introduce palette hex or off-scale type here.
 */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  touch-action: manipulation;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-bricolage);
  font-size: var(--text-base);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 0;
  z-index: 100;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-control);
  background: var(--copper);
  color: var(--on-copper);
  font-size: var(--text-sm);
  font-weight: 600;
  transform: translateY(-120%);
  transition: transform var(--duration-base) var(--ease-mechanical);
}

.skip-link:focus {
  transform: translateY(0.75rem);
  outline: 2px solid var(--copper-fg);
  outline-offset: 2px;
}

::selection {
  background: var(--copper);
  color: var(--on-copper);
}

:focus-visible {
  outline: 2px solid var(--copper-fg);
  outline-offset: 2px;
}

a {
  color: inherit;
  text-decoration: none;
}

.mono {
  font-family: var(--font-plex-mono);
}

/* —— shell —— */
.shell {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  font-size: var(--text-sm);
  letter-spacing: -0.01em;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* —— buttons (match HQ control radius + copper CTA) —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.625rem 1.125rem;
  border-radius: var(--radius-control);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition:
    background-color var(--duration-base) var(--ease-mechanical),
    border-color var(--duration-base) var(--ease-mechanical),
    color var(--duration-base) var(--ease-mechanical);
}

.btn-primary {
  background: var(--copper);
  color: var(--on-copper);
}

.btn-primary:hover {
  background: var(--copper-600);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border-strong);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: color-mix(in srgb, var(--copper) 45%, var(--border-strong));
}

/* —— hero —— */
.hero {
  padding: 4.5rem 0 3.5rem;
  animation: bh-rise-in var(--duration-enter) var(--ease-mechanical) both;
}

.kicker {
  margin: 0 0 1rem;
  font-family: var(--font-plex-mono);
  font-size: var(--text-label);
  line-height: var(--text-label--line-height);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--copper-fg);
}

.hero h1 {
  margin: 0;
  max-width: 14ch;
  font-size: clamp(var(--text-h2), 6vw, var(--text-h1));
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.lede {
  margin: 1.25rem 0 0;
  max-width: 36rem;
  font-size: var(--text-base);
  line-height: 1.55;
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

/* —— modules (hylla metaphor) —— */
.section {
  padding: 2.5rem 0 4rem;
}

.section-head {
  margin-bottom: 1.5rem;
}

.section-head h2 {
  margin: 0;
  font-size: var(--text-h3);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 0.5rem 0 0;
  color: var(--text-muted);
  font-size: var(--text-body-sm);
  line-height: var(--text-body-sm--line-height);
}

.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow);
  transition:
    translate var(--duration-base) var(--ease-mechanical),
    box-shadow var(--duration-base) var(--ease-mechanical),
    border-color var(--duration-base) var(--ease-mechanical);
}

.card:hover {
  translate: 0 -1px;
  border-color: var(--border-strong);
}

.card-label {
  margin: 0 0 0.5rem;
  font-family: var(--font-plex-mono);
  font-size: var(--text-label);
  line-height: var(--text-label--line-height);
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: var(--text-base);
  font-weight: 600;
}

.card p {
  margin: 0;
  font-size: var(--text-body-sm);
  line-height: var(--text-body-sm--line-height);
  color: var(--text-muted);
}

/* —— shelf graphic —— */
.shelf {
  margin-top: 2.5rem;
  padding: 1.5rem;
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.shelf-row {
  display: flex;
  gap: 0.5rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
}

.shelf-row:last-child {
  border-bottom: 0;
}

.module {
  flex: 1;
  min-height: 2.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-plex-mono);
  font-size: var(--text-micro);
  line-height: var(--text-micro--line-height);
  color: var(--text-muted);
}

.module.is-on {
  border-color: color-mix(in srgb, var(--copper) 55%, var(--border-strong));
  color: var(--copper-fg);
  background: color-mix(in srgb, var(--copper) 12%, var(--surface));
}

/* —— closing CTA —— */
.closing {
  padding-top: 1rem;
  padding-bottom: 4.5rem;
}

.closing-inner {
  max-width: 36rem;
  padding: 2rem 1.5rem;
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.closing-inner h2 {
  margin: 0;
  font-size: clamp(var(--text-base), 4vw, var(--text-h3));
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.closing-lede {
  margin: 0.85rem 0 1.5rem;
  font-size: var(--text-base);
  line-height: 1.55;
  color: var(--text-muted);
}

/* —— footer —— */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0 2.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: var(--text-body-sm);
  line-height: var(--text-body-sm--line-height);
}

.site-footer a {
  color: var(--text-muted);
}

.site-footer a:hover {
  color: var(--copper-fg);
}

/* —— motion (same recipes as HQ globals) —— */
@keyframes bh-rise-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
