/* SourceCompounds — sourcecompounds.co
   Original identity. Light, clinical, generous whitespace. No framework. */

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

:root {
  --ink:        #151a2d;
  --navy:       #2c3368;   /* wordmark */
  --navy-deep:  #1f2450;
  --accent:     #0e9384;   /* clinical teal */
  --accent-dk:  #0b7568;
  --accent-pale:#e6f6f4;
  --muted:      #5c6780;
  --faint:      #7b8499;
  --line:       #e4e8f2;
  --line-soft:  #eef1f7;
  --surface:    #f7f9fc;
  --white:      #ffffff;
  --ruo-bg:     #fff8e6;
  --ruo-line:   #e8c165;
  --ruo-ink:    #6b5200;
  --ok:         #0e9384;
  --shadow-sm:  0 1px 3px rgba(21,26,45,.06);
  --shadow-md:  0 4px 20px rgba(21,26,45,.08);
  --r:          10px;
  --r-lg:       16px;
  --maxw:       1120px;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column; min-height: 100vh;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-dk); }
a:hover { color: var(--accent); }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; width: 100%; }
.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;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--navy); color: #fff; padding: 10px 18px; border-radius: 0 0 var(--r) 0;
}
.skip-link:focus { left: 0; color: #fff; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ── HEADER ── */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 100;
}
.header-in {
  max-width: var(--maxw); margin: 0 auto; padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand { display: inline-block; line-height: 0; }
.brand img { width: 232px; }
.header-note { font-size: 13px; color: var(--muted); text-align: right; }
.header-note strong { color: var(--ink); font-weight: 600; }

/* ── RUO BANNER (above the fold, never in the footer) ── */
.ruo-banner {
  background: var(--ruo-bg);
  border-bottom: 1px solid var(--ruo-line);
  color: var(--ruo-ink);
}
.ruo-banner .wrap {
  display: flex; align-items: center; gap: 11px;
  padding-top: 13px; padding-bottom: 13px;
  font-size: 14px; font-weight: 600; line-height: 1.45;
}
.ruo-banner svg { width: 19px; height: 19px; flex-shrink: 0; }

/* ── PRODUCT ── */
.product { padding: 56px 0 72px; }
.product-grid {
  display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  gap: 56px; align-items: start;
}
.gallery {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 32px;
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 1 / 1;
}
.gallery img { max-height: 100%; width: auto; }

.eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--accent-dk); margin-bottom: 10px;
}
h1 {
  font-size: clamp(30px, 4vw, 42px); font-weight: 700; line-height: 1.15;
  letter-spacing: -0.02em; color: var(--ink); margin-bottom: 8px;
}
.subtitle { font-size: 17px; color: var(--muted); margin-bottom: 26px; }

.price-row { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 6px; }
.price { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
.price-cur { font-size: 15px; font-weight: 600; color: var(--faint); }
.stock {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 14px; font-weight: 600; color: var(--ok);
}
.stock .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.unit { font-size: 14px; color: var(--muted); margin-bottom: 26px; }

.buy { display: flex; gap: 12px; align-items: stretch; margin-bottom: 14px; flex-wrap: wrap; }
.qty {
  display: inline-flex; align-items: center; border: 1px solid var(--line);
  border-radius: var(--r); overflow: hidden; background: var(--white);
}
.qty button {
  width: 44px; height: 52px; border: 0; background: var(--white); cursor: pointer;
  font-size: 20px; color: var(--muted); font-family: inherit; line-height: 1;
}
.qty button:hover { background: var(--surface); color: var(--ink); }
.qty input {
  width: 52px; height: 52px; border: 0; text-align: center; font-size: 16px;
  font-weight: 600; font-family: inherit; color: var(--ink);
  -moz-appearance: textfield;
}
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 52px; padding: 0 30px; border: 0; border-radius: var(--r);
  background: var(--accent); color: #fff; font-family: inherit;
  font-size: 16px; font-weight: 650; cursor: pointer; text-decoration: none;
  transition: background .18s, transform .18s, box-shadow .18s;
  flex: 1; min-width: 220px;
}
.btn:hover { background: var(--accent-dk); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }
.btn svg { width: 18px; height: 18px; }
.btn-secondary {
  background: var(--white); color: var(--navy); border: 1px solid var(--line);
  font-weight: 600; flex: none; min-width: 0; padding: 0 20px;
}
.btn-secondary:hover { background: var(--surface); color: var(--navy); box-shadow: none; }

.ship-line { font-size: 14px; color: var(--muted); margin-bottom: 30px; }
.ship-line strong { color: var(--ink); font-weight: 600; }

/* ── SPEC TABLE ── */
.spec { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; margin-bottom: 24px; }
.spec h2 {
  font-size: 13px; font-weight: 700; letter-spacing: 1.1px; text-transform: uppercase;
  color: var(--muted); padding: 15px 20px; background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.spec dl { display: grid; grid-template-columns: minmax(140px, 40%) 1fr; }
.spec dt, .spec dd {
  padding: 12px 20px; font-size: 14.5px; border-bottom: 1px solid var(--line-soft);
}
.spec dt { color: var(--muted); font-weight: 500; }
.spec dd { color: var(--ink); font-weight: 600; }
.spec dl > :nth-last-child(1), .spec dl > :nth-last-child(2) { border-bottom: 0; }
.pending {
  color: var(--faint); font-weight: 500; font-style: italic;
  background: repeating-linear-gradient(-45deg, #fafbfe, #fafbfe 6px, #f2f4fa 6px, #f2f4fa 12px);
  padding: 1px 8px; border-radius: 4px; border: 1px dashed var(--line);
}

/* ── COA ── */
.coa {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; padding: 18px 20px; border: 1px solid var(--line);
  border-radius: var(--r-lg); background: var(--surface); margin-bottom: 26px;
}
.coa-l { display: flex; align-items: center; gap: 13px; }
.coa-l svg { width: 26px; height: 26px; color: var(--accent-dk); flex-shrink: 0; }
.coa-t { font-size: 14.5px; font-weight: 650; color: var(--ink); }
.coa-s { font-size: 13px; color: var(--muted); }
.coa-s code {
  background: var(--white); border: 1px solid var(--line); border-radius: 4px;
  padding: 1px 7px; font-size: 12.5px; color: var(--ink);
}

/* ── DESCRIPTION / PROSE ── */
.desc h2, .prose h2 {
  font-size: 20px; font-weight: 700; letter-spacing: -0.01em;
  color: var(--ink); margin: 30px 0 12px;
}
.desc p, .prose p { color: var(--muted); margin-bottom: 14px; font-size: 15.5px; }
.desc p strong, .prose p strong, .prose li strong { color: var(--ink); font-weight: 650; }
.prose h1 { margin-bottom: 10px; }
.prose h3 { font-size: 16.5px; font-weight: 650; color: var(--ink); margin: 22px 0 8px; }
.prose ul, .prose ol { margin: 0 0 16px 22px; color: var(--muted); font-size: 15.5px; }
.prose li { margin-bottom: 7px; }
.prose table { width: 100%; border-collapse: collapse; margin: 6px 0 20px; font-size: 15px; }
.prose th, .prose td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.prose th { background: var(--surface); font-weight: 650; color: var(--ink); }
.prose td { color: var(--muted); }
.lede { font-size: 17px; color: var(--muted); margin-bottom: 26px; }
.page { padding: 52px 0 76px; }
.page .wrap { max-width: 760px; }
.updated { font-size: 13px; color: var(--faint); margin-bottom: 30px; }

.callout {
  border-left: 3px solid var(--accent); background: var(--accent-pale);
  padding: 15px 18px; border-radius: 0 var(--r) var(--r) 0; margin: 20px 0;
}
.callout p { color: #0a5c53; margin: 0; font-size: 15px; }
.callout p + p { margin-top: 9px; }

/* ── CHECKOUT PANEL (template only) ── */
.checkout-panel {
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--white); padding: 24px; margin-top: 20px; display: none;
  box-shadow: var(--shadow-md);
}
.checkout-panel.open { display: block; }
.checkout-panel h3 { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.checkout-panel .cp-sub { font-size: 14px; color: var(--muted); margin-bottom: 18px; }
#checkout-mount { min-height: 150px; display: grid; place-items: center; }
.cp-stub {
  text-align: center; padding: 26px 20px; border: 1px dashed var(--line);
  border-radius: var(--r); background: var(--surface); width: 100%;
}
.cp-stub .cp-badge {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: var(--ruo-ink); background: var(--ruo-bg);
  border: 1px solid var(--ruo-line); border-radius: 999px; padding: 4px 12px; margin-bottom: 12px;
}
.cp-stub p { font-size: 14px; color: var(--muted); margin: 0 auto; max-width: 380px; }
.order-line {
  display: flex; justify-content: space-between; font-size: 14.5px;
  padding: 9px 0; border-bottom: 1px solid var(--line-soft); color: var(--muted);
}
.order-line:last-of-type { border-bottom: 0; font-weight: 700; color: var(--ink); font-size: 16px; padding-top: 13px; }

/* ── FOOTER ── */
.site-footer {
  margin-top: auto; background: var(--surface);
  border-top: 1px solid var(--line); padding: 46px 0 30px;
}
.foot-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; margin-bottom: 34px;
}
.foot-brand img { width: 200px; margin-bottom: 14px; }
.foot-brand p { font-size: 13.5px; color: var(--muted); max-width: 330px; }
.foot-col h4 {
  font-size: 12px; font-weight: 700; letter-spacing: 1.1px; text-transform: uppercase;
  color: var(--ink); margin-bottom: 13px;
}
.foot-col ul { list-style: none; }
.foot-col li { margin-bottom: 9px; }
.foot-col a, .foot-col address {
  font-size: 13.5px; color: var(--muted); text-decoration: none; font-style: normal; line-height: 1.7;
}
.foot-col a:hover { color: var(--accent-dk); text-decoration: underline; }
.foot-ruo {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 16px 0; margin-bottom: 18px;
  font-size: 13px; color: var(--muted); line-height: 1.7;
}
.foot-ruo strong { color: var(--ink); }
.foot-base {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--faint);
}

/* ── CONFIRMATION ── */
.confirm { padding: 76px 0; text-align: center; }
.confirm .wrap { max-width: 560px; }
.confirm-icon {
  width: 62px; height: 62px; border-radius: 50%; background: var(--accent-pale);
  display: grid; place-items: center; margin: 0 auto 22px;
}
.confirm-icon svg { width: 30px; height: 30px; color: var(--accent-dk); }
.confirm h1 { font-size: 30px; margin-bottom: 10px; }
.confirm p { color: var(--muted); margin-bottom: 10px; }
.confirm .btn { margin-top: 22px; flex: none; display: inline-flex; }

/* ── TODO marker for unfilled real-world data ── */
.todo {
  background: #ffe8e8; border: 1px dashed #e08c8c; color: #8f2020;
  padding: 1px 7px; border-radius: 4px; font-size: .93em; font-weight: 600;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .product-grid { grid-template-columns: 1fr; gap: 32px; }
  .gallery { aspect-ratio: 4 / 3; padding: 24px; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .product { padding: 34px 0 52px; }
  .page { padding: 34px 0 56px; }
  .header-in { padding: 13px 16px; }
  .brand img { width: 178px; }
  .header-note { display: none; }
  .wrap { padding: 0 16px; }
  .spec dl { grid-template-columns: 1fr; }
  .spec dt { padding-bottom: 0; border-bottom: 0; font-size: 13px; }
  .spec dd { padding-top: 3px; }
  .btn { min-width: 0; width: 100%; }
  .qty { width: 100%; justify-content: space-between; }
  .foot-grid { grid-template-columns: 1fr; gap: 26px; }
  .ruo-banner .wrap { font-size: 13px; align-items: flex-start; }
}
