/* ==========================================================================
   Denim Edit — editorial fashion SEO demo
   Tokens → base → layout → components → pages
   ========================================================================== */

:root {
  --color-bg: #faf9f7;
  --color-ink: #121212;
  --color-muted: #5a5a5a;
  --color-line: #e8e4de;
  --color-surface: #ffffff;
  --color-soft: #f0ece6;
  --color-accent: #1c1c1c;
  --color-overlay: rgba(10, 10, 10, 0.72);

  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font-sans: "Helvetica Neue", Helvetica, Arial, "Segoe UI", sans-serif;

  --text-xs: 0.72rem;
  --text-sm: 0.86rem;
  --text-base: 1.0625rem;
  --text-md: 1.12rem;
  --text-lg: 1.45rem;
  --text-xl: clamp(1.85rem, 3.8vw, 2.75rem);
  --text-display: clamp(1.85rem, 4.2vw, 3rem);

  --space-1: 0.35rem;
  --space-2: 0.65rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2.25rem;
  --space-6: 3rem;

  --radius: 0;
  --max: 1120px;
  --prose: 42rem;
  --header-h: 4.5rem;
  --shadow-soft: 0 1px 0 rgba(0, 0, 0, 0.04);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-ink); text-decoration: underline; text-underline-offset: 3px; }
a:hover { opacity: 0.75; }
:focus-visible {
  outline: 2px solid var(--color-ink);
  outline-offset: 3px;
}

.wrap { width: min(100% - 2rem, var(--max)); margin-inline: auto; }

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-ink);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 100;
  text-decoration: none;
}
.skip-link:focus { left: 0.75rem; top: 0.75rem; }

/* Header */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-line);
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: var(--shadow-soft);
}
.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0 0.65rem;
  gap: 1rem;
}
.logo {
  font-family: var(--font-serif);
  font-size: clamp(1.45rem, 3vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--color-ink);
}
.logo:hover { opacity: 1; }
.tagline-mini {
  display: none;
  color: var(--color-muted);
  font-size: 0.82rem;
  margin: 0;
}
@media (min-width: 720px) {
  .tagline-mini { display: block; }
}
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  padding: 0 0 0.9rem;
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.nav a {
  text-decoration: none;
  color: var(--color-muted);
  font-weight: 600;
}
.nav a:hover,
.nav a[aria-current="page"] { color: var(--color-ink); }
.nav a.nav-cta {
  color: #fff;
  background: #17324D;
  padding: 0.35rem 0.7rem;
  text-decoration: none;
  letter-spacing: 0.03em;
}
.nav a.nav-cta:hover,
.nav a.nav-cta[aria-current="page"] {
  color: #fff;
  opacity: 0.92;
}

/* Banners */
.hero-visual,
.page-banner {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--color-line);
  background: #1a1a1a;
  margin: 1.25rem 0 1.75rem;
  min-height: 280px;
  display: flex;
  align-items: flex-end;
}
.hero-visual { min-height: clamp(280px, 42vw, 420px); }
.page-banner { min-height: clamp(220px, 32vw, 340px); }
.page-banner--compact { min-height: clamp(180px, 26vw, 260px); }
.hero-visual img,
.page-banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero-visual::after,
.page-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10, 10, 10, 0.78) 0%,
    rgba(10, 10, 10, 0.45) 45%,
    rgba(10, 10, 10, 0.2) 100%
  );
  pointer-events: none;
}
.hero-visual-content,
.page-banner-content {
  position: relative;
  z-index: 1;
  color: #fff;
  padding: clamp(1.25rem, 3vw, 2.25rem);
  max-width: 40rem;
}
.hero-visual-content h1,
.page-banner-content h1 {
  font-family: var(--font-serif);
  font-size: var(--text-display);
  line-height: 1.12;
  margin: 0 0 0.65rem;
  letter-spacing: -0.03em;
  color: #fff;
}
.hero-visual-content .lede,
.page-banner-content p {
  margin: 0 0 1rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(0.98rem, 1.6vw, 1.08rem);
  max-width: 36rem;
}
.hero-cta {
  display: inline-block;
  background: #fff;
  color: #121212;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.7rem 1.1rem;
}
.hero-cta:hover { opacity: 0.9; color: #121212; }

/* Featured */
.featured {
  display: grid;
  gap: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  margin-bottom: 2.5rem;
}
@media (min-width: 860px) {
  .featured { grid-template-columns: 1.15fr 1fr; }
}
.featured > a.featured-link {
  text-decoration: none;
  color: inherit;
  display: contents;
}
.featured img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}
.featured-body {
  padding: 1.6rem 1.4rem 1.8rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-muted);
  font-weight: 700;
  margin-bottom: 0.6rem;
}
.featured h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  line-height: 1.2;
  margin: 0 0 0.75rem;
}
.featured p { margin: 0; color: var(--color-muted); }

/* Cards */
.section-label {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  margin: 0 0 1rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--color-line);
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  display: flex;
  flex-direction: column;
}
.card a.card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--color-soft);
}
.card-body { padding: 1rem 1rem 1.25rem; flex: 1; }
.card .cat {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-muted);
  font-weight: 700;
  margin-bottom: 0.45rem;
}
.card h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  line-height: 1.3;
  margin: 0 0 0.5rem;
}
.card p {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.92rem;
}

/* Breadcrumb */
.breadcrumb {
  font-size: 0.82rem;
  color: var(--color-muted);
  margin-bottom: 1.1rem;
}
.breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: 0.35rem;
  color: var(--color-line);
}
.breadcrumb a { color: var(--color-muted); text-decoration: none; }
.breadcrumb [aria-current="page"] { color: var(--color-ink); }

/* Article */
.article-page { padding: 1.5rem 0 3rem; }
.article-kicker {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-muted);
  font-weight: 700;
  margin-bottom: 0.6rem;
}
.article-title {
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin: 0 0 0.85rem;
  max-width: 22ch;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  color: var(--color-muted);
  font-size: 0.88rem;
  margin-bottom: 1.4rem;
}
.hero-figure {
  margin: 0 0 1.6rem;
  background: var(--color-soft);
  border: 1px solid var(--color-line);
}
.hero-figure img {
  width: 100%;
  max-height: 560px;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}
.hero-figure figcaption,
.inline-figure figcaption {
  padding: 0.65rem 0.85rem;
  font-size: 0.86rem;
  color: var(--color-muted);
  border-top: 1px solid var(--color-line);
  background: var(--color-surface);
}
.article-body { max-width: var(--prose); }
.article-body .deck {
  font-size: var(--text-md);
  color: #2a2a2a;
  margin: 0 0 1.4rem;
}
.article-body h2 {
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  line-height: 1.25;
  margin: 2.1rem 0 0.75rem;
  letter-spacing: -0.015em;
}
.article-body p { margin: 0 0 1.05rem; }
.article-body ul,
.article-body ol {
  margin: 0 0 1.2rem;
  padding-left: 1.25rem;
}
.article-body li { margin-bottom: 0.4rem; }
.inline-figure {
  margin: 1.5rem 0 1.7rem;
  border: 1px solid var(--color-line);
  background: var(--color-soft);
}
.inline-figure img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}
.callout {
  background: var(--color-surface);
  border-left: 3px solid var(--color-ink);
  padding: 0.9rem 1rem;
  margin: 1.4rem 0;
  font-size: 0.95rem;
}
.related {
  margin-top: 2.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-line);
}
.related h2 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  margin: 0 0 1rem;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}
.related a {
  text-decoration: none;
  display: block;
  padding: 0.9rem 1rem;
  border: 1px solid var(--color-line);
  background: var(--color-surface);
}
.related a strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1rem;
  margin-bottom: 0.25rem;
}
.related a span { color: var(--color-muted); font-size: 0.85rem; }

.article-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-line);
  font-size: 0.9rem;
}
.article-nav a { text-decoration: none; max-width: 45%; }
.article-nav .label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 0.25rem;
}

/* Static / about */
.page-section { padding: 0 0 3rem; }
.prose-block {
  max-width: var(--prose);
  margin-top: 0.5rem;
}
.prose-block .lede-plain {
  font-size: var(--text-md);
  color: #2a2a2a;
}
.prose-block code {
  font-size: 0.9em;
  background: var(--color-soft);
  padding: 0.1em 0.35em;
}

/* 404 */
.error-page {
  padding: 4rem 0;
  text-align: center;
}
.error-page h1 {
  font-family: var(--font-serif);
  font-size: var(--text-display);
  margin: 0 0 0.75rem;
}
.error-page p { color: var(--color-muted); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--color-line);
  background: var(--color-surface);
  padding: 1.75rem 0;
  font-size: 0.86rem;
  color: var(--color-muted);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}
.footer-brand {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--color-ink);
  margin: 0 0 0.25rem;
}
.footer-meta { margin: 0; }
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
}
.footer-nav a { color: var(--color-muted); text-decoration: none; }
.demo-note {
  display: inline-block;
  border: 1px solid var(--color-line);
  padding: 0.15rem 0.45rem;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-left: 0.35rem;
}

/* ==========================================================================
   B2B commercial-page helpers (keep token family)
   ========================================================================== */

.pending-flag {
  display: inline;
  font-size: 0.78em;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #6b4f00;
  background: #fff3cd;
  border: 1px solid #e6d59a;
  padding: 0.1em 0.4em;
  white-space: nowrap;
}

.pending-note {
  border-left-color: #b8860b;
  background: #fffaf0;
}

.form-success {
  border-left-color: #2f6b3a;
  background: #f0fff4;
}

.backup-contact {
  margin-top: 1rem;
}

.muted { color: var(--color-muted); font-size: 0.92rem; }

.topic-grid,
.evidence-grid,
.cta-band-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 0 0 2.5rem;
}

.topic-card,
.evidence-card,
.app-card {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  padding: 1.15rem 1.1rem 1.25rem;
  text-decoration: none;
  color: inherit;
  display: block;
}

a.topic-card:hover,
a.app-card:hover { opacity: 1; border-color: #cfc8bc; }

.topic-card h3,
.app-card h3,
.evidence-card .eyebrow {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  margin: 0 0 0.45rem;
  line-height: 1.25;
}

.topic-card p,
.app-card p { margin: 0; color: var(--color-muted); font-size: 0.92rem; }

.placeholder-asset {
  background: var(--color-soft);
  border: 1px dashed #c8c0b4;
  min-height: 8rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.placeholder-asset.block {
  padding: 1.25rem 1.1rem;
  margin: 1.25rem 0 1.75rem;
}

.cta-band {
  background: var(--color-ink);
  color: #fff;
  padding: 1.75rem 1.35rem;
  margin: 0 0 3rem;
}

.cta-band h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  margin: 0 0 0.5rem;
  color: #fff;
}

.cta-band p { margin: 0 0 1rem; color: rgba(255,255,255,0.88); max-width: 36rem; }

.cta-band .cta-actions { display: flex; flex-wrap: wrap; gap: 0.65rem; }

.btn-primary,
.btn-secondary,
a.btn-primary,
a.btn-secondary {
  display: inline-block;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.7rem 1.1rem;
  border: 1px solid transparent;
}

.btn-primary,
a.btn-primary {
  background: #fff;
  color: #121212;
  border-color: #fff;
}

.btn-secondary,
a.btn-secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.55);
}

.prose-block .btn-primary,
.article-body .btn-primary,
.cta-row .btn-primary {
  background: var(--color-ink);
  color: #fff;
  border-color: var(--color-ink);
}

.prose-block .btn-secondary,
.article-body .btn-secondary,
.cta-row .btn-secondary {
  background: var(--color-surface);
  color: var(--color-ink);
  border-color: var(--color-line);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 1.5rem 0 0.5rem;
}

.home-section { margin-bottom: 0.5rem; }
.home-section .section-label { margin-top: 0.5rem; }

.dev-modules {
  margin-top: 2.5rem;
  padding: 1.25rem 1.1rem 1.4rem;
  border: 1px solid var(--color-line);
  background: var(--color-surface);
}

.dev-modules h2 {
  font-size: 1.15rem !important;
  margin-top: 1.35rem !important;
}

.dev-modules h2:first-child { margin-top: 0 !important; }

.quote-form {
  max-width: 36rem;
  margin: 1.25rem 0 2rem;
}

.quote-form fieldset {
  border: 1px solid var(--color-line);
  background: var(--color-surface);
  margin: 0 0 1rem;
  padding: 1rem 1rem 1.1rem;
}

.quote-form legend {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 0 0.35rem;
}

.quote-form label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0.75rem 0;
}

.quote-form input,
.quote-form select,
.quote-form textarea {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--color-line);
  background: var(--color-bg);
  font: inherit;
}

.form-hint {
  font-size: 0.86rem;
  color: var(--color-muted);
  margin: 0.35rem 0 0.75rem;
}

.nav {
  gap: 0.3rem 0.85rem;
  font-size: 0.78rem;
}

@media (max-width: 900px) {
  .pending-flag { white-space: normal; }
}


/* Sampling stages table */
.table-wrap {
  overflow-x: auto;
  margin: 1.25rem 0 1.75rem;
  border: 1px solid var(--color-line);
  background: var(--color-surface);
}
.prose-block table,
.article-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.prose-block th,
.prose-block td,
.article-body th,
.article-body td {
  border-bottom: 1px solid var(--color-line);
  padding: 0.75rem 0.9rem;
  text-align: left;
  vertical-align: top;
}
.prose-block thead th,
.article-body thead th {
  background: var(--color-soft);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
