/* ============================================================
   SITE STYLES — layout & components. Business-agnostic: colors,
   fonts, and radii all come from theme.css tokens. Mobile-first.
   ============================================================ */

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

body,
h1, h2, h3, h4, p,
figure, blockquote,
ul, ol, dl, dd {
  margin: 0;
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

button,
input {
  font: inherit;
}

/* ---------- Base ---------- */
html {
  scroll-behavior: smooth;
}

body {
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

a {
  color: var(--color-primary);
}

a:hover {
  color: var(--color-primary-deep);
}

:focus-visible {
  outline: 3px solid var(--color-highlight);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap {
  max-width: 1060px;
  margin-inline: auto;
  padding-inline: 20px;
}

.visually-hidden {
  position: absolute;
  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: 16px;
  top: -48px;
  z-index: 100;
  background: var(--color-ink);
  color: var(--color-bg);
  padding: 10px 16px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  text-decoration: none;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 0;
  color: var(--color-bg);
}

.eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  white-space: nowrap;
  padding: 0.8em 1.5em;
  border: 2px solid transparent;
  border-radius: 999px;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.btn:hover {
  background: var(--color-primary-deep);
  color: #fff;
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn-ghost:hover {
  background: var(--color-primary);
  color: #fff;
}

.btn-light {
  background: var(--color-bg);
  color: var(--color-primary-deep);
}

.btn-light:hover {
  background: #fff;
  color: var(--color-primary-deep);
}

.btn-small {
  padding: 0.5em 1.1em;
  font-size: 0.9375rem;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--color-bg) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.brand em {
  font-style: normal;
  color: var(--color-primary);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-nav a {
  color: var(--color-ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
}

.site-nav a:hover {
  color: var(--color-primary);
}

.site-nav a[aria-current="page"] {
  color: var(--color-primary);
}

.site-nav .btn {
  color: #fff;
}

/* Keep brand + nav + CTA on one line on narrow phones. */
@media (max-width: 420px) {
  .header-inner {
    min-height: 56px;
  }

  .brand {
    font-size: 1.3125rem;
  }

  .site-nav {
    gap: 2px;
  }

  .site-nav a {
    font-size: 0.875rem;
    padding: 6px;
  }

  .site-nav .btn {
    padding: 0.45em 0.9em;
  }
}

/* ---------- Hero ---------- */
.hero {
  padding-block: 48px 24px;
}

.hero-inner {
  display: grid;
  gap: 32px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.5rem, 8vw, 4rem);
  margin-bottom: 1rem;
}

.hero .lede {
  font-size: 1.1875rem;
  color: var(--color-ink-soft);
  max-width: 34em;
  margin-bottom: 1.75rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-art img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

@media (min-width: 800px) {
  .hero {
    padding-block: 72px 40px;
  }

  .hero-inner {
    grid-template-columns: 6fr 5fr;
    gap: 48px;
  }
}

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

.section-head {
  max-width: 40em;
  margin-bottom: 2rem;
}

.section-head h2 {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  margin-bottom: 0.5rem;
}

.section-head p {
  color: var(--color-ink-soft);
}

/* ---------- Product cards ---------- */
.card-grid {
  display: grid;
  gap: 24px;
}

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

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  text-decoration: none;
  color: var(--color-ink);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  color: var(--color-ink);
}

.product-card img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
}

.product-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  flex: 1;
}

.product-card h3 {
  font-size: 1.375rem;
}

.product-card p {
  color: var(--color-ink-soft);
  font-size: 0.975rem;
  flex: 1;
}

.card-cta {
  font-weight: 700;
  color: var(--color-primary);
  font-size: 0.9375rem;
}

.product-card:hover .card-cta {
  color: var(--color-primary-deep);
}

/* ---------- Heat indicator ---------- */
.heat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-ink-soft);
}

.heat-dots {
  display: inline-flex;
  gap: 4px;
}

.heat-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-line);
}

.heat-dot.on {
  background: var(--color-primary);
}

/* ---------- How it works ---------- */
.steps {
  display: grid;
  gap: 20px;
  counter-reset: step;
  padding: 0;
  list-style: none;
}

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

.steps li {
  counter-increment: step;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  padding: 24px 20px 20px;
}

.steps li::before {
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-highlight);
  color: var(--color-ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  margin-bottom: 12px;
}

.steps h3 {
  font-size: 1.1875rem;
  margin-bottom: 6px;
}

.steps p {
  color: var(--color-ink-soft);
  font-size: 0.975rem;
}

/* ---------- Story teaser ---------- */
.story-teaser {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  padding: 36px 24px;
  display: grid;
  gap: 20px;
}

@media (min-width: 800px) {
  .story-teaser {
    grid-template-columns: 2fr 1fr;
    align-items: center;
    padding: 48px;
  }
}

.story-teaser h2 {
  font-size: clamp(1.625rem, 4.5vw, 2.25rem);
  margin-bottom: 0.5rem;
}

.story-teaser p {
  color: var(--color-ink-soft);
  max-width: 38em;
}

.story-teaser .btn {
  justify-self: start;
}

@media (min-width: 800px) {
  .story-teaser .btn {
    justify-self: end;
  }
}

/* ---------- Signup band ---------- */
.signup {
  background: linear-gradient(140deg, var(--color-primary), var(--color-primary-deep));
  color: #fff;
  padding-block: 56px;
}

.signup-inner {
  max-width: 620px;
  text-align: center;
}

.signup h2 {
  font-size: clamp(1.75rem, 5vw, 2.375rem);
  margin-bottom: 0.5rem;
}

.signup-inner > p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1.5rem;
}

.signup-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (min-width: 540px) {
  .signup-form {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
}

.signup-form input[type="email"] {
  flex: 1 1 260px;
  min-width: 0;
  padding: 0.8em 1.1em;
  border: 2px solid transparent;
  border-radius: 999px;
  background: #fff;
  color: var(--color-ink);
}

.signup-form input[type="email"]:focus-visible {
  outline-color: var(--color-highlight);
}

/* Honeypot: hidden from humans, present for bots. */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.signup-msg {
  flex-basis: 100%;
  min-height: 1.5em;
  font-weight: 600;
  margin-top: 4px;
}

.signup-msg.is-error {
  color: #ffd9ce;
}

.signup-fine {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 12px;
}

/* ---------- Product page ---------- */
.product-hero {
  padding-block: 40px 8px;
}

.product-hero-inner {
  display: grid;
  gap: 28px;
  align-items: start;
}

@media (min-width: 800px) {
  .product-hero-inner {
    grid-template-columns: 1fr 1fr;
    gap: 48px;
  }
}

.product-hero-art img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.art-note {
  font-size: 0.8125rem;
  color: var(--color-ink-soft);
  margin-top: 10px;
}

.product-hero h1 {
  font-size: clamp(2.125rem, 7vw, 3.25rem);
  margin-bottom: 0.5rem;
}

.product-hero .tagline {
  font-size: 1.1875rem;
  color: var(--color-ink-soft);
  margin-bottom: 1rem;
}

.product-hero .heat {
  margin-bottom: 1.25rem;
}

.product-copy p + p {
  margin-top: 0.9em;
}

.back-link {
  display: inline-block;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 20px;
}

/* "Great with" chips */
.uses {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 0.75rem;
}

.uses li {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-ink-soft);
}

.subhead {
  font-size: 1.0625rem;
  margin-top: 1.75rem;
}

/* Sizes / how-to-buy note */
.sizes-note {
  margin-top: 1.75rem;
  background: color-mix(in srgb, var(--color-highlight) 16%, var(--color-surface));
  border: 1px solid color-mix(in srgb, var(--color-highlight) 45%, var(--color-line));
  border-radius: var(--radius-md);
  padding: 18px 20px;
  font-size: 0.9750rem;
}

.sizes-note strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.0625rem;
  margin-bottom: 4px;
}

/* Cross-links to sibling products */
.more-products {
  padding-block: 48px 64px;
}

.more-products h2 {
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

/* ---------- Story page ---------- */
.prose {
  max-width: 42em;
  padding-block: 40px 64px;
}

.prose h1 {
  font-size: clamp(2.25rem, 7vw, 3.25rem);
  margin-bottom: 1.5rem;
}

.prose h2 {
  font-size: 1.5rem;
  margin-top: 2.25rem;
  margin-bottom: 0.75rem;
}

.prose p + p {
  margin-top: 0.9em;
}

.prose img {
  border-radius: var(--radius-lg);
  margin-block: 1.5rem;
}

.pull-quote {
  border-left: 4px solid var(--color-highlight);
  padding: 8px 0 8px 20px;
  margin-block: 2rem;
  font-family: var(--font-display);
  font-size: 1.375rem;
  line-height: 1.4;
  color: var(--color-primary-deep);
}

.pull-quote cite {
  display: block;
  margin-top: 8px;
  font-family: var(--font-body);
  font-style: normal;
  font-size: 0.9375rem;
  color: var(--color-ink-soft);
}

/* ---------- Simple page (thanks / 404) ---------- */
.simple-page {
  max-width: 34em;
  text-align: center;
  padding-block: 96px 120px;
}

.simple-page h1 {
  font-size: clamp(2rem, 7vw, 3rem);
  margin-bottom: 0.75rem;
}

.simple-page p {
  color: var(--color-ink-soft);
  margin-bottom: 1.75rem;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-footer);
  color: rgba(255, 252, 245, 0.82);
  padding-block: 48px 28px;
  margin-top: 0;
}

.footer-grid {
  display: grid;
  gap: 32px;
  padding-bottom: 32px;
}

@media (min-width: 700px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.footer-brand .brand {
  color: #fff;
  font-size: 1.375rem;
}

.footer-brand p {
  margin-top: 8px;
  font-size: 0.9375rem;
  color: rgba(255, 252, 245, 0.66);
  max-width: 26em;
}

.site-footer h3 {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 252, 245, 0.55);
  margin-bottom: 12px;
  font-family: var(--font-body);
}

.site-footer ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 8px;
}

.site-footer a {
  color: rgba(255, 252, 245, 0.85);
  text-decoration: none;
  font-size: 0.9375rem;
}

.site-footer a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 252, 245, 0.14);
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: rgba(255, 252, 245, 0.55);
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
