/* Marketing site styles v2 ("Warstwy"). Tokens live in tokens.css (copy of
   apps/web/src/styles/tokens.css). MOBILE-FIRST: base rules are the phone
   layout, wider screens only add min-width queries (640 / 820 / 1024).
   No inline styles anywhere: the CSP in _headers allows only style-src 'self'. */

@font-face {
  font-family: "Instrument Sans Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 400 700;
  font-stretch: 75% 100%;
  src: url(/fonts/instrument-sans-latin-ext-standard-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Instrument Sans Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 400 700;
  font-stretch: 75% 100%;
  src: url(/fonts/instrument-sans-latin-standard-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

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

html {
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--foreground);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
}

/* Aurora + grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(70% 45% at 0% 0%, var(--aurora-1), transparent 70%),
    radial-gradient(55% 40% at 100% 8%, var(--aurora-2), transparent 70%),
    radial-gradient(60% 40% at 50% 100%, var(--aurora-3), transparent 70%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: var(--noise-opacity);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 640px) {
  .wrap {
    padding: 0 32px;
  }
}

main {
  flex: 1;
}

h1,
h2,
h3 {
  font-stretch: 82%;
  text-wrap: balance;
}

h1 {
  margin: 0 0 20px;
  font-size: clamp(2.7rem, 1.9rem + 4.4vw, 5.2rem);
  font-weight: 640;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

h2 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 1.5rem + 2.2vw, 3rem);
  font-weight: 620;
  line-height: 1.02;
  letter-spacing: -0.035em;
}

h3 {
  margin: 0 0 6px;
  font-size: 1.2rem;
  font-weight: 620;
  letter-spacing: -0.015em;
}

p {
  margin: 0 0 16px;
  text-wrap: pretty;
}

a {
  color: var(--primary);
  text-underline-offset: 3px;
}

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

.lede {
  max-width: 34em;
  font-size: 1.15rem;
  color: var(--muted-foreground);
}

@media (min-width: 640px) {
  .lede {
    font-size: 1.25rem;
  }
}

.muted {
  color: var(--muted-foreground);
}

.glass {
  background: var(--card);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
  box-shadow: 0 0 0 1px var(--glass-edge), var(--shadow-tile);
}

.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* Header: floating glass pill */
header.site {
  position: sticky;
  top: 0;
  z-index: 10;
  padding-top: 10px;
}

header.site .bar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 60px;
  padding: 0 8px 0 12px;
  border-radius: var(--radius-pill);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--foreground);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--cta);
  color: var(--cta-foreground);
}

.logo-mark svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

nav.site {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

nav.site .nav-link {
  display: none;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  color: var(--muted-foreground);
  font-size: 0.95rem;
  text-decoration: none;
}

nav.site .nav-link:hover {
  background: var(--accent);
  color: var(--accent-foreground);
}

@media (min-width: 820px) {
  nav.site .nav-link {
    display: inline-block;
  }
}

/* Buttons: pills */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: var(--cta);
  color: var(--cta-foreground);
  font: inherit;
  font-size: 1rem;
  font-weight: 620;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 12px 26px -12px var(--cta-glow);
  transition:
    transform var(--duration) var(--ease-out),
    box-shadow var(--duration) var(--ease-out);
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px -12px var(--cta-glow);
}

.button.ghost {
  background: var(--card-solid);
  color: var(--foreground);
  border-color: var(--border);
  box-shadow: none;
}

.button.ghost:hover {
  background: var(--accent);
  color: var(--accent-foreground);
}

.button.small {
  min-height: 44px;
  padding: 0 18px;
  font-size: 0.95rem;
}

.button:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

/* Hero */
.hero {
  display: grid;
  gap: 48px;
  padding-block: 40px 64px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding: 6px 14px 6px 6px;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  color: var(--muted-foreground);
}

@media (min-width: 1024px) {
  .hero {
    grid-template-columns: 1fr 1.05fr;
    align-items: center;
    gap: 56px;
    padding-block: 88px 120px;
  }
}

/* Product scene: glass document + floating tiles, all HTML so it follows the theme. */
.scene {
  position: relative;
  padding-bottom: 56px;
}

.fragment {
  position: relative;
  padding: 8px;
  border-radius: var(--radius-xl);
}

.fragment-inner {
  overflow: hidden;
  border-radius: calc(var(--radius-xl) - 8px);
  background: var(--card-solid);
}

.fragment-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 16px 18px 12px;
}

.doc-no {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--muted-foreground);
}

.fragment-title {
  display: block;
  font-size: 1.05rem;
  font-weight: 620;
}

.lines {
  margin: 0;
  padding: 0 8px 8px;
  list-style: none;
}

.lines li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 12px;
  align-items: center;
  padding: 12px 10px;
  border-radius: 14px;
  font-size: 0.95rem;
}

.lines li.scanning {
  background: var(--accent);
}

.lines small {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--muted-foreground);
}

.lines .qty {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.lines .loc {
  grid-column: 1 / -1;
  justify-self: start;
}

@media (min-width: 640px) {
  .lines li {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .lines .loc {
    grid-column: auto;
  }
}

.fragment-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px 16px;
  font-size: 0.9rem;
  color: var(--muted-foreground);
}

.track {
  flex: 1;
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--border);
  overflow: hidden;
}

.track span {
  display: block;
  width: 66%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--primary-strong));
}

.float {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px 12px 12px;
  border-radius: 20px;
  font-size: 0.9rem;
  line-height: 1.3;
}

.float strong {
  display: block;
  font-size: 1.35rem;
  font-weight: 640;
  font-stretch: 80%;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.float.stock {
  right: 8px;
  bottom: 0;
}

.float.scan {
  display: none;
  top: -28px;
  left: -24px;
}

.float-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: var(--accent);
  color: var(--accent-foreground);
}

.float-icon.ok {
  background: var(--success-subtle);
  color: var(--success);
}

@media (min-width: 1024px) {
  .float.scan {
    display: flex;
  }
}

/* Location label: the rack-label signature */
.loc {
  display: inline-flex;
  align-items: stretch;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1;
  border-radius: var(--radius-sm);
  background: var(--card-solid);
  box-shadow: inset 0 0 0 1px var(--border);
  overflow: hidden;
}

.loc > span {
  padding: 5px 7px;
}

.loc > .zone {
  background: var(--signal);
  color: var(--signal-foreground);
  font-weight: 700;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 11px;
  border-radius: var(--radius-pill);
  background: var(--info-subtle);
  color: var(--info);
  font-size: 0.8rem;
  font-weight: 600;
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge.ok {
  background: var(--success-subtle);
  color: var(--success);
}

/* Sections */
.section {
  padding-block: 56px;
}

.section-head {
  max-width: 40em;
  margin-bottom: 32px;
}

@media (min-width: 1024px) {
  .section {
    padding-block: 88px;
  }
}

/* Process: a real sequence, so numbered. */
.steps {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 24px;
  border-radius: var(--radius-xl);
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--accent-foreground);
  font-weight: 650;
}

.steps h3,
.steps p {
  margin: 0;
}

.steps p {
  color: var(--muted-foreground);
}

.steps .loc,
.steps .badge,
.steps .doc-no {
  justify-self: start;
}

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

/* Features: bento of different sizes, one featured tile. */
.bento {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bento li {
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 24px;
  border-radius: var(--radius-xl);
  color: var(--muted-foreground);
}

.bento strong {
  display: block;
  margin-top: 10px;
  color: var(--foreground);
  font-size: 1.15rem;
  font-weight: 620;
  letter-spacing: -0.015em;
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--accent);
  color: var(--accent-foreground);
}

.feature-icon.violet {
  background: var(--violet-subtle);
  color: var(--violet);
}

.feature-icon.info {
  background: var(--info-subtle);
  color: var(--info);
}

.feature-icon.warning {
  background: var(--warning-subtle);
  color: var(--warning);
}

.bento li.featured {
  background: radial-gradient(circle at 100% 0%, var(--hero-glow), transparent 60%), var(--hero);
  color: var(--hero-muted);
  border: 1px solid var(--border);
  box-shadow: 0 0 0 1px var(--glass-edge), var(--shadow-tile);
}

.bento li.featured strong {
  color: var(--hero-foreground);
  font-size: 1.6rem;
  font-stretch: 85%;
  letter-spacing: -0.03em;
}

.bento li.featured .feature-icon {
  background: var(--hero-chip);
  color: var(--hero-foreground);
}

@media (min-width: 640px) {
  .bento {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .bento li.featured {
    grid-column: span 2;
  }
}

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

  .bento li.featured {
    grid-column: auto;
    grid-row: span 2;
    padding: 32px;
  }
}

/* Contact */
.contact {
  display: grid;
  gap: 32px;
}

@media (min-width: 1024px) {
  .contact {
    grid-template-columns: 0.9fr 1.1fr;
    gap: 72px;
    align-items: start;
  }
}

.form {
  display: grid;
  gap: 18px;
  padding: 20px;
  border-radius: var(--radius-xl);
}

.form .row {
  display: grid;
  gap: 18px;
}

@media (min-width: 640px) {
  .form {
    padding: 32px;
  }

  .form .row {
    grid-template-columns: 1fr 1fr;
  }
}

.form label {
  display: grid;
  gap: 6px;
  font-size: 0.95rem;
  font-weight: 550;
}

.form input,
.form textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid var(--input);
  border-radius: var(--radius);
  background: var(--card-solid);
  color: var(--foreground);
  font: inherit;
  font-size: 1rem;
  font-weight: 400;
  transition:
    border-color var(--duration) var(--ease-out),
    box-shadow var(--duration) var(--ease-out);
}

.form input:focus-visible,
.form textarea:focus-visible {
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 4px color-mix(in oklch, var(--ring) 25%, transparent);
}

.form textarea {
  min-height: 150px;
  resize: vertical;
}

.form .consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--muted-foreground);
}

.form .consent input {
  width: 20px;
  min-height: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--primary);
}

/* Honeypot: invisible to people, bots fill it in. */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.status {
  margin: 0;
  min-height: 1.6em;
  font-size: 0.95rem;
}

.status.error {
  color: var(--destructive);
}

.status.ok {
  color: var(--success);
}

/* Legal pages */
.legal {
  max-width: 760px;
  padding-block: 48px 72px;
}

.legal h1 {
  font-size: clamp(2.2rem, 1.8rem + 2vw, 3.2rem);
}

.legal h2 {
  margin-top: 40px;
  font-size: 1.5rem;
}

.placeholder {
  padding: 0 4px;
  border-radius: 4px;
  background: var(--warning-subtle);
  color: var(--warning);
}

.notice {
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  background: var(--accent);
  color: var(--accent-foreground);
}

/* 404 */
.not-found {
  max-width: 680px;
  padding-block: 88px;
}

.not-found .loc {
  margin-bottom: 24px;
}

.not-found .hero-actions {
  margin-top: 24px;
}

footer.site .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 28px 36px;
  color: var(--muted-foreground);
  font-size: 0.92rem;
}

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

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