/* Pmise Journal — site-wide stylesheet. Tokens mirror DESIGN.md. */

:root {
  --paper: #f6f1e8;
  --surface: #fffdf8;
  --ink: #1f2a22;
  --muted: #5d665c;
  --accent: #156a4e;
  --accent-strong: #0d5038;
  --accent-tint: #e3efe6;
  --gold: #a8842f;
  --border: #e2dac8;
  --inverse-bg: #17211a;
  --inverse-fg: #c9d8c5;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --shadow-rest: 0 1px 2px rgba(31, 42, 34, 0.06);
  --shadow-hover: 0 14px 34px rgba(31, 42, 34, 0.1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 16px;
  color: var(--ink);
}
h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 16px; }
ul, ol { margin: 0 0 16px; padding-left: 22px; }
li { margin-bottom: 6px; }
::selection { background: var(--accent-tint); }

.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: #fff; padding: 10px 16px; z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---------- topline ---------- */
.topline {
  background: var(--inverse-bg);
  color: var(--inverse-fg);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
}
.topline .container {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; padding-top: 8px; padding-bottom: 8px;
}
.topline a { color: var(--inverse-fg); }
.topline .certs { color: #8fd4ae; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 241, 232, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 14px; padding-bottom: 14px; }
.logo { display: flex; flex-direction: column; line-height: 1.1; }
.logo .word {
  font-family: var(--serif); font-size: 28px; font-weight: 600;
  color: var(--ink); letter-spacing: 0;
}
.logo .word em { font-style: normal; color: var(--accent); }
.logo .tag {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--muted); margin-top: 3px;
}
.logo:hover { text-decoration: none; }
.nav { display: flex; align-items: center; gap: 26px; }
.nav > a {
  color: var(--ink); font-size: 15px; font-weight: 500;
}
.nav > a:hover { color: var(--accent); text-decoration: none; }
.nav > a[aria-current="page"] { color: var(--accent); }
.nav .btn { margin-left: 6px; }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--border);
  border-radius: 6px; padding: 8px; color: var(--ink); cursor: pointer;
}

/* ---------- buttons & chips ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--sans); font-size: 15px; font-weight: 600;
  padding: 12px 22px; border-radius: 6px; cursor: pointer;
  border: 1px solid transparent;
  transition: transform 160ms var(--ease-out), background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-strong); color: #fff; text-decoration: none; transform: translateY(-1px); }
.btn-ghost { border-color: var(--border); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--accent-tint); text-decoration: none; transform: translateY(-1px); }
.btn-ghost-dark { border-color: rgba(201, 216, 197, 0.4); color: var(--inverse-fg); }
.btn-ghost-dark:hover { border-color: var(--inverse-fg); color: #fff; text-decoration: none; }

.chip {
  display: inline-block;
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  background: var(--accent-tint); color: var(--accent-strong);
  padding: 5px 12px; border-radius: 999px;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: ""; width: 26px; height: 1px; background: var(--gold);
}

/* ---------- hero ---------- */
.hero { padding: 88px 0 72px; }
.hero .grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: 64px; align-items: center;
}
.hero h1 { margin-bottom: 20px; }
.hero .lede { font-size: 18px; color: var(--muted); max-width: 52ch; }
.hero .actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.hero-visual { margin: 0; }
.hero-visual .plate {
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  padding: 28px; box-shadow: var(--shadow-rest);
}
.hero-visual .plate img { width: 100%; }
.hero-visual figcaption {
  display: flex; justify-content: space-between; gap: 12px;
  font-family: var(--mono); font-size: 12px; color: var(--muted);
  letter-spacing: 0.04em; margin-top: 12px;
}

/* split text (JS-gated) */
html.js .hero h1 .w {
  display: inline-block;
  opacity: 0; transform: translateY(0.55em);
  animation: word-in 560ms var(--ease-out) forwards;
  animation-delay: calc(var(--i) * 45ms);
}
@keyframes word-in { to { opacity: 1; transform: translateY(0); } }

/* ---------- proof strip ---------- */
.proof { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--surface); }
.proof .container {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 18px;
}
.proof .terms { display: flex; gap: 22px; flex-wrap: wrap; }
.proof .terms span {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 500; color: var(--ink);
}
.proof .terms svg { color: var(--accent); flex: none; }

/* ---------- sections ---------- */
.section { padding: 104px 0; }
.section.alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 720px; margin-bottom: 56px; }
.section-head .num {
  font-family: var(--mono); font-size: 13px; color: var(--gold);
  letter-spacing: 0.14em; display: block; margin-bottom: 10px;
}
.section-head .lede { font-size: 17px; color: var(--muted); margin: 0; }
.section-head h2 { margin-bottom: 12px; }

/* ---------- library list (signature) ---------- */
.lib-list { border-top: 1px solid var(--border); }
.lib-row {
  display: grid; grid-template-columns: 64px 1fr auto;
  gap: 28px; align-items: baseline;
  padding: 30px 0; border-bottom: 1px solid var(--border);
  color: var(--ink);
}
a.lib-row:hover { text-decoration: none; }
.lib-row .no {
  font-family: var(--mono); font-size: 13px; color: var(--gold);
  letter-spacing: 0.1em;
}
.lib-row .t {
  font-family: var(--serif); font-size: clamp(1.3rem, 2.4vw, 1.75rem);
  font-weight: 500; line-height: 1.25; display: block; margin-bottom: 6px;
  transition: color 180ms ease;
}
a.lib-row:hover .t { color: var(--accent); }
.lib-row .d { color: var(--muted); font-size: 15px; max-width: 62ch; display: block; }
.lib-row .go {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--accent); white-space: nowrap;
  display: inline-flex; align-items: center; gap: 8px;
}
.lib-row .go svg { transition: transform 200ms var(--ease-out); }
a.lib-row:hover .go svg { transform: translateX(4px); }

/* ---------- featured product panel ---------- */
.featured {
  display: grid; grid-template-columns: 0.9fr 1.1fr;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden; color: var(--ink);
  box-shadow: var(--shadow-rest);
  transition: box-shadow 220ms ease, transform 220ms var(--ease-out);
  margin-bottom: 56px;
}
a.featured:hover { text-decoration: none; box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.featured .photo { background: #fff; padding: 36px; display: flex; align-items: center; justify-content: center; border-right: 1px solid var(--border); }
.featured .photo img { width: 100%; max-width: 380px; }
.featured .body { padding: 44px 48px; display: flex; flex-direction: column; justify-content: center; }
.featured .cat {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 12px;
}
.featured h3 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: 12px; }
.featured .desc { color: var(--muted); margin-bottom: 18px; }
.featured .tags { margin-bottom: 22px; }
.featured .more {
  font-weight: 600; color: var(--accent);
  display: inline-flex; align-items: center; gap: 8px;
}
.featured .more svg { transition: transform 200ms var(--ease-out); }
a.featured:hover .more svg { transform: translateX(4px); }

/* ---------- product card rows ---------- */
.cluster { margin-bottom: 44px; }
.cluster:last-child { margin-bottom: 0; }
.cluster > h3 {
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
  padding-bottom: 12px; border-bottom: 1px solid var(--border); margin-bottom: 20px;
}
.row { display: grid; gap: 20px; }
.row.c3 { grid-template-columns: repeat(3, 1fr); }
.row.c4 { grid-template-columns: repeat(4, 1fr); }
.row.c5 { grid-template-columns: repeat(5, 1fr); }
.mini-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden; color: var(--ink);
  display: flex; flex-direction: column; position: relative;
  transition: box-shadow 220ms ease, transform 220ms var(--ease-out), border-color 180ms ease;
}
a.mini-card:hover { text-decoration: none; box-shadow: var(--shadow-hover); transform: translateY(-2px); border-color: #cfc4a8; }
.mini-card .thumb { background: #fff; padding: 18px; border-bottom: 1px solid var(--border); }
.mini-card .thumb img { width: 100%; }
.mini-card .txt { padding: 16px 18px 18px; }
.mini-card .name { font-family: var(--serif); font-size: 17px; font-weight: 600; }
.mini-card .sub { font-size: 13px; color: var(--muted); }
.mini-card .cat-line {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent); display: block; margin-bottom: 6px;
}
.mini-all {
  border-style: dashed; border-color: #cfc4a8; background: transparent;
  justify-content: center; gap: 14px; padding: 22px;
}
.mini-all .more-link {
  font-weight: 600; color: var(--accent);
  display: inline-flex; align-items: center; gap: 8px;
}

/* spotlight hover (JS-gated) */
html.js .spot::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 50%), rgba(21, 106, 78, 0.08), transparent 65%);
  opacity: 0; transition: opacity 240ms ease;
}
html.js .spot:hover::after { opacity: 1; }

/* ---------- treatment index ---------- */
.tx-index { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 48px; }
.tx-col h3 {
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
  padding-bottom: 12px; border-bottom: 1px solid var(--border); margin-bottom: 8px;
}
.tx-link {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding: 13px 0; border-bottom: 1px solid var(--border);
  color: var(--ink); font-size: 15px; font-weight: 500;
}
a.tx-link:hover { text-decoration: none; color: var(--accent); }
.tx-link .wl { font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; }
a.tx-link:hover .wl { color: var(--accent); }

/* ---------- stats & pillars ---------- */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 32px; margin-bottom: 64px;
  padding-bottom: 56px; border-bottom: 1px solid var(--border);
}
.stat .num {
  font-family: var(--serif); font-size: clamp(2.4rem, 4.5vw, 3.4rem);
  font-weight: 500; line-height: 1; margin-bottom: 10px;
}
.stat .lbl { font-size: 14px; color: var(--muted); }
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 36px; }
.pillar { border-top: 2px solid var(--ink); padding-top: 20px; }
.pillar .icon-tile {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 8px;
  background: var(--accent-tint); color: var(--accent-strong); margin-bottom: 16px;
}
.pillar h3 { font-size: 18px; margin-bottom: 8px; }
.pillar p { font-size: 14.5px; color: var(--muted); margin: 0; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--inverse-bg); color: var(--inverse-fg);
  border-radius: 10px; padding: 72px 64px; text-align: center;
}
.cta-band h2 { color: #fff; margin-bottom: 14px; }
.cta-band p { max-width: 56ch; margin: 0 auto 30px; color: var(--inverse-fg); }
.cta-band .actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- footer ---------- */
.site-footer { background: var(--inverse-bg); color: var(--inverse-fg); padding: 72px 0 36px; }
.site-footer .cols {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 48px; padding-bottom: 48px; margin-bottom: 28px;
  border-bottom: 1px solid rgba(201, 216, 197, 0.16);
}
.site-footer h4 {
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: #8fd4ae; margin-bottom: 16px;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: var(--inverse-fg); font-size: 14.5px; }
.site-footer a:hover { color: #fff; }
.brand-blurb { font-size: 14.5px; color: rgba(201, 216, 197, 0.85); }
.site-footer .legal {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em;
  color: rgba(201, 216, 197, 0.6);
}

/* ---------- breadcrumbs & page hero ---------- */
.breadcrumbs { padding: 22px 0 0; font-size: 13.5px; color: var(--muted); }
.breadcrumbs ol { list-style: none; padding: 0; margin: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.breadcrumbs li + li::before { content: "/"; margin-right: 8px; color: var(--border); }
.page-hero { padding: 56px 0 64px; }
.page-hero .lede { font-size: 18px; color: var(--muted); max-width: 60ch; }
.page-hero.narrow { max-width: 780px; }

/* ---------- prose (article typography) ---------- */
.prose { max-width: 100%; }
.prose > p, .prose > ul, .prose > ol { max-width: 68ch; }
.prose h2 { font-size: 1.6rem; margin-top: 48px; margin-bottom: 14px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.15rem; margin-top: 32px; margin-bottom: 10px; }
.prose blockquote {
  margin: 28px 0; padding: 4px 0 4px 24px;
  border-left: 3px solid var(--gold);
  font-family: var(--serif); font-size: 1.15rem; line-height: 1.5;
  color: var(--ink);
}
.prose .note {
  background: var(--accent-tint); border-radius: 8px;
  padding: 16px 20px; font-size: 14.5px; color: var(--accent-strong);
  max-width: 68ch;
}
.section-block { margin-bottom: 8px; }

/* ---------- spec table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
table.spec { width: 100%; border-collapse: collapse; font-size: 15px; }
table.spec th, table.spec td { padding: 13px 18px; text-align: left; border-bottom: 1px solid var(--border); }
table.spec tr:last-child th, table.spec tr:last-child td { border-bottom: 0; }
table.spec th {
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
  width: 38%; white-space: nowrap;
}
table.spec td { font-weight: 500; }

/* ---------- faq ---------- */
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  cursor: pointer; list-style: none; position: relative;
  font-family: var(--serif); font-size: 1.12rem; font-weight: 500;
  padding: 20px 44px 20px 0;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 8px; top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono); font-size: 18px; color: var(--accent);
  transition: transform 200ms var(--ease-out);
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details div { padding: 0 40px 22px 0; color: var(--muted); }

/* ---------- detail page grid ---------- */
.detail-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 56px; align-items: center; }
.detail-grid .photo {
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  padding: 32px; box-shadow: var(--shadow-rest);
}

/* ---------- related strip ---------- */
.related-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 56px; align-items: start; }
.form-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 40px; box-shadow: var(--shadow-rest);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { margin-bottom: 18px; }
.field label {
  display: block; font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 7px;
}
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--ink);
  background: #fff; border: 1px solid var(--border); border-radius: 6px;
  padding: 11px 14px; font-size: 15px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(21, 106, 78, 0.14);
}
.field textarea { min-height: 130px; resize: vertical; }
.form-foot { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 8px; }
.form-foot .hint { font-size: 13.5px; color: var(--muted); }
.contact-aside .card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 26px 28px; margin-bottom: 20px;
}
.contact-aside h3 { font-size: 1.05rem; margin-bottom: 10px; }
.contact-aside p, .contact-aside li { font-size: 14.5px; color: var(--muted); }
.contact-aside ul { list-style: none; padding: 0; margin: 0; }
.contact-aside a { font-weight: 500; }

/* ---------- reveal (JS-gated) ---------- */
html.js .reveal {
  opacity: 0; transform: translateY(16px);
  transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
}
html.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal, html.js .hero h1 .w { opacity: 1; transform: none; animation: none; transition: none; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .row.c5 { grid-template-columns: repeat(3, 1fr); }
  .row.c4 { grid-template-columns: repeat(2, 1fr); }
  .pillars { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .site-footer .cols { grid-template-columns: 1fr 1fr; }
  .hero .grid, .detail-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { max-width: 520px; }
  .featured { grid-template-columns: 1fr; }
  .featured .photo { border-right: 0; border-bottom: 1px solid var(--border); }
  .contact-grid { grid-template-columns: 1fr; }
  .tx-index { grid-template-columns: 1fr; gap: 0; }
  .related-strip { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .section { padding: 64px 0; }
  .hero { padding: 56px 0 48px; }
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--paper); border-bottom: 1px solid var(--border);
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px 24px 20px; display: none;
  }
  .nav.open { display: flex; }
  .nav > a { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .nav .btn { margin: 14px 0 0; justify-content: center; }
  .topline .certs { display: none; }
  .row.c3, .row.c4, .row.c5 { grid-template-columns: 1fr 1fr; }
  .lib-row { grid-template-columns: 40px 1fr; }
  .lib-row .go { display: none; }
  .cta-band { padding: 48px 24px; }
  .form-row { grid-template-columns: 1fr; }
  .form-card { padding: 26px 22px; }
  .featured .body { padding: 28px 24px; }
  .site-footer .cols { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 480px) {
  .row.c3, .row.c4, .row.c5 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; gap: 24px; }
}
