/* ==========================================================================
   CondomPoint — The Condom Codex
   style.css v1.0 — Session 01 — 2026-08-14
   Single shared stylesheet. Never inline this into pages.
   ========================================================================== */

:root {
  --base: #FDF6F2;
  --surface: #FFFFFF;
  --surface-alt: #F7EBE4;
  --accent: #7A2E43;
  --accent-deep: #5C1F30;
  --accent-tint: #F2DFE2;
  --ink: #2A1119;
  --ink-soft: #5C3B42;
  --ink-muted: #8A6B70;
  --border: rgba(42, 17, 25, 0.12);
  --border-str: rgba(42, 17, 25, 0.22);
  --radius: 8px;
  --radius-card: 12px;
  --maxw: 1100px;
  --font-display: Georgia, "Times New Roman", Times, serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --step: 1.5rem;
}

/* --------------------------------------------------------------- reset -- */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--base);
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  overflow-x: hidden;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 400;
  line-height: 1.2;
  margin: 0 0 0.6em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 5.2vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.15rem); }
h3 { font-size: clamp(1.15rem, 2.2vw, 1.4rem); }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1.1em; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-deep); }

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

/* --------------------------------------------------------- utilities -- */

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: var(--base);
  padding: 0.7rem 1.1rem; z-index: 200; border-radius: 0 0 var(--radius) 0;
}
.skip:focus { left: 0; }

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.75rem;
  font-weight: 600;
}

.lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 60ch; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ------------------------------------------------------------ header -- */

.site-head {
  position: sticky; top: 0; z-index: 100;
  background: rgba(253, 246, 242, 0.94);
  border-bottom: 1px solid var(--border);
}

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

.brandmark {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.brandmark .dot { color: var(--accent); }
.brandmark:hover { color: var(--ink); }

.site-nav ul {
  list-style: none; display: flex; gap: 1.5rem;
  margin: 0; padding: 0;
}
.site-nav a {
  font-size: 0.92rem; color: var(--ink-soft);
  text-decoration: none; padding: 0.5rem 0;
  display: inline-block; border-bottom: 1px solid transparent;
}
.site-nav a:hover, .site-nav a[aria-current="page"] {
  color: var(--accent); border-bottom-color: var(--accent);
}

.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--border-str);
  border-radius: var(--radius);
  min-width: 44px; min-height: 44px;
  color: var(--ink); font-size: 0.85rem; cursor: pointer;
  align-items: center; justify-content: center;
}

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: fixed; inset: 64px 0 auto 0;
    background: var(--base);
    border-bottom: 1px solid var(--border);
    max-height: 0; overflow: hidden;
    transition: max-height 0.28s ease;
  }
  .site-nav[data-open="true"] { max-height: 70vh; overflow-y: auto; }
  .site-nav ul { flex-direction: column; gap: 0; padding: 0.5rem 1.25rem 1.5rem; }
  .site-nav li { border-bottom: 1px solid var(--border); }
  .site-nav a { padding: 0.9rem 0; width: 100%; border-bottom: none; }
}

/* -------------------------------------------------------------- hero -- */

.hero { padding: clamp(3rem, 8vw, 5.5rem) 0 clamp(2rem, 5vw, 3rem); }

.hero h1 { max-width: 16ch; }
.hero .lede { margin-bottom: 2rem; }

.hero-meta {
  display: flex; flex-wrap: wrap; gap: 0.6rem 1.5rem;
  font-size: 0.82rem; color: var(--ink-muted);
  padding-top: 1.25rem; border-top: 1px solid var(--border);
}

/* ------------------------------------- signature: the trace device -- */

.trace {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 1.5rem;
  margin: 2.5rem 0 0;
}

.trace-label {
  font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-muted); margin: 0 0 1.1rem;
}

.trace-chain {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
}

.trace-step {
  border-left: 2px solid var(--accent-tint);
  padding: 0.15rem 0 0.15rem 0.85rem;
  min-width: 0;
}
.trace-step:first-child { border-left-color: var(--accent); }

.trace-role {
  font-size: 0.63rem; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--ink-muted); display: block; margin-bottom: 0.2rem;
}

.trace-value {
  font-family: var(--font-display);
  font-size: 1.05rem; color: var(--ink);
  display: block; line-height: 1.3;
  overflow-wrap: break-word;
  transition: opacity 0.3s ease;
}

.trace-note {
  font-size: 0.78rem; color: var(--ink-muted);
  margin: 1.1rem 0 0; padding-top: 0.9rem;
  border-top: 1px solid var(--border);
}

.trace[data-fading="true"] .trace-value { opacity: 0.25; }

@media (max-width: 720px) {
  .trace-chain { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 0.75rem; }
}

/* ------------------------------------------------------------ bands -- */

.band { padding: clamp(2.5rem, 6vw, 4rem) 0; }
.band-alt { background: var(--surface-alt); }
.band-head { max-width: 58ch; margin-bottom: 2.25rem; }

/* ------------------------------------------------------ codex cards -- */

.codex-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.codex-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 1.4rem 1.5rem;
  text-decoration: none;
  display: flex; flex-direction: column;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.codex-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.codex-card h3 { margin-bottom: 0.4rem; }
.codex-card p {
  font-size: 0.9rem; color: var(--ink-soft);
  margin: 0 0 1rem; flex-grow: 1;
}

.codex-count {
  font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-muted);
}

.status {
  display: inline-block;
  font-size: 0.68rem; letter-spacing: 0.09em; text-transform: uppercase;
  padding: 0.22rem 0.6rem; border-radius: 100px;
  background: var(--accent-tint); color: var(--accent-deep);
}

/* ------------------------------------------------------ source tiers -- */

.tier-list { display: grid; gap: 0.85rem; }

.tier {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.1rem 1.3rem;
}
.tier-2 { border-left-color: var(--ink-muted); }
.tier-never { border-left-color: var(--border-str); }

.tier h3 { font-family: var(--font-body); font-size: 0.95rem; font-weight: 600; margin-bottom: 0.35rem; }
.tier p { font-size: 0.9rem; margin: 0; }

/* --------------------------------------------------------- callouts -- */

.callout {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  margin: 1.75rem 0;
  font-size: 0.92rem;
  background: var(--surface);
}
.callout p:last-child { margin-bottom: 0; }
.callout-title {
  font-weight: 600; color: var(--ink);
  display: block; margin-bottom: 0.35rem; font-size: 0.88rem;
}

.callout-disclaimer { border-color: var(--accent); background: var(--accent-tint); }
.callout-disclaimer .callout-title { color: var(--accent-deep); }
.callout-pending { border-style: dashed; }

/* ---------------------------------------------------------- footer -- */

.site-foot {
  background: var(--ink);
  color: rgba(253, 246, 242, 0.72);
  padding: 3rem 0 2rem;
  font-size: 0.88rem;
  margin-top: 3rem;
}
.site-foot h4 {
  color: var(--base); font-family: var(--font-body);
  font-size: 0.72rem; letter-spacing: 0.13em; text-transform: uppercase;
  margin-bottom: 0.9rem; font-weight: 600;
}
.site-foot a { color: rgba(253, 246, 242, 0.72); text-decoration: none; }
.site-foot a:hover { color: var(--base); text-decoration: underline; }

.foot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(253, 246, 242, 0.16);
}
.foot-col ul { list-style: none; margin: 0; padding: 0; }
.foot-col li { margin-bottom: 0.5rem; }

.foot-brand p { font-size: 0.85rem; margin-bottom: 0.5rem; }

.foot-base {
  padding-top: 1.5rem;
  display: flex; flex-wrap: wrap; gap: 0.75rem 2rem;
  justify-content: space-between;
  font-size: 0.8rem;
}
.foot-disclaimer { max-width: 62ch; }

.age-flag {
  display: inline-block;
  border: 1px solid rgba(253, 246, 242, 0.4);
  border-radius: 100px;
  padding: 0.1rem 0.6rem;
  font-size: 0.72rem;
  margin-right: 0.5rem;
}

/* ------------------------------------------------------------- 404 -- */

.narrow { max-width: 640px; padding-top: 4rem; padding-bottom: 4rem; }

/* --------------------------------------------------------- motion -- */

.reveal { opacity: 0; transform: translateY(14px); }
.reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity 0.55s ease, transform 0.55s ease;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ----------------------------------------------------------- print -- */

@media print {
  .site-head, .site-foot, .nav-toggle { display: none; }
  body { background: #fff; color: #000; }
}

/* ==========================================================================
   Session 02 additions — hub pages
   ========================================================================== */

.breadcrumb {
  font-size: 0.82rem; color: var(--ink-muted);
  padding: 1rem 0 0;
}
.breadcrumb a { color: var(--ink-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); text-decoration: underline; }
.breadcrumb .sep { margin: 0 0.4rem; opacity: 0.6; }
.breadcrumb .current { color: var(--ink-soft); }

.verified {
  font-size: 0.8rem; color: var(--ink-muted);
  display: inline-flex; align-items: center; gap: 0.4rem;
}
.verified::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); display: inline-block;
}

.stat-row {
  display: flex; flex-wrap: wrap; gap: 1.5rem;
  font-size: 0.85rem; color: var(--ink-muted);
  margin: 1rem 0 0;
}
.stat-row strong { color: var(--ink); font-weight: 600; }

.scope-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem;
}
@media (max-width: 720px) { .scope-grid { grid-template-columns: 1fr; } }

.scope-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-card); padding: 1.4rem 1.5rem;
}
.scope-box h3 { font-size: 1rem; margin-bottom: 0.6rem; }
.scope-box ul { margin: 0; padding-left: 1.1rem; font-size: 0.92rem; }
.scope-box li { margin-bottom: 0.4rem; }

.entry-list { display: grid; gap: 0.6rem; }

.entry-group-label {
  font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-muted); margin: 1.5rem 0 0.6rem;
}
.entry-group-label:first-child { margin-top: 0; }

.entry-row {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.8rem 1.1rem;
}
.entry-name { font-family: var(--font-display); font-size: 1rem; color: var(--ink); }
.entry-note { font-size: 0.82rem; color: var(--ink-muted); flex: 1; margin: 0 1rem; }

.related-links {
  display: flex; flex-wrap: wrap; gap: 0.6rem;
}
.related-links a {
  display: inline-block; font-size: 0.87rem; text-decoration: none;
  color: var(--ink-soft); background: var(--surface);
  border: 1px solid var(--border); border-radius: 100px;
  padding: 0.45rem 1rem;
}
.related-links a:hover { border-color: var(--accent); color: var(--accent); }

.source-block { display: grid; gap: 0.7rem; }
.source-item {
  font-size: 0.88rem; color: var(--ink-soft);
  padding: 0.7rem 0; border-bottom: 1px solid var(--border);
}
.source-item:last-child { border-bottom: none; }
.source-item strong { color: var(--ink); font-weight: 600; }
