/* ==========================================================================
   Bright Commerce Lab - site stylesheet
   Palette sampled from images/logo.png (see comment at top of index.php):
     navy   #010544  wordmark + outline of the test-tube mark
     gold   #D8934F  copper-gold fill of the tube, arrow and sparkle
     brown  #68340F  dark copper base of the mark
   Everything else is a tint or shade of those three.
   ========================================================================== */

:root {
  --navy: #010544;
  --navy-800: #0d1458;
  --navy-600: #2a3170;
  --navy-100: #e6e8f3;
  --navy-50: #f3f4fa;
  --gold: #d8934f;
  --gold-600: #b8733a;       /* deeper gold for small accents on light bg */
  --gold-200: #f1d5b6;
  --gold-100: #f8e9d8;
  --brown: #68340f;
  --cream: #fbf7f1;
  --paper: #ffffff;
  --text: #1e2248;           /* navy-tinted body text */
  --muted: #5a5e7e;
  --line: #e4e1ea;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 18px 40px -22px rgba(1, 5, 68, .35);
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  background: var(--cream);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--brown); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--navy); line-height: 1.2; font-weight: 600; letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem); margin: 0 0 .6em; }
h3 { font-size: 1.25rem; margin: 0 0 .4em; }
p { margin: 0 0 1.1em; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 10px; top: 10px; }

/* ---------- Notice strip ---------- */
.notice {
  background: var(--navy);
  color: #fff;
  font-size: .82rem;
  letter-spacing: .02em;
}
.notice .wrap { display: flex; gap: 10px 22px; flex-wrap: wrap; align-items: center; justify-content: center; padding-top: 8px; padding-bottom: 8px; text-align: center; }
.notice b { color: var(--gold); font-weight: 700; }

/* ---------- Header (light, so the logo is never recoloured) ---------- */
.site-header {
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(1.2) blur(6px);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand img { width: 220px; height: auto; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a {
  text-decoration: none; font-weight: 600; font-size: .92rem; color: var(--navy);
  padding: 8px 12px; border-radius: 999px;
}
.nav a:hover, .nav a[aria-current="page"] { background: var(--gold-100); color: var(--brown); }
.nav-toggle {
  display: none; background: none; border: 2px solid var(--navy); color: var(--navy);
  border-radius: 10px; padding: 6px 12px; font: 700 .85rem var(--font-body); cursor: pointer;
}

/* ---------- Hero ---------- */
.hero { padding: 56px 0 40px; position: relative; }
.hero::before {
  content: ""; position: absolute; inset: 0 0 35% 0; z-index: -1;
  background:
    radial-gradient(600px 300px at 90% 10%, rgba(216,147,79,.18), transparent 70%),
    linear-gradient(180deg, var(--navy-50), var(--cream));
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--brown); background: var(--gold-100); border: 1px solid var(--gold-200);
  padding: 6px 12px; border-radius: 999px; margin-bottom: 18px;
}
.eyebrow svg { width: 14px; height: 14px; }
.hero h1 { font-size: clamp(2rem, 1.3rem + 3vw, 3.4rem); margin: 0 0 18px; }
.hero h1 em { font-style: italic; color: var(--gold-600); }
.dek { font-size: 1.15rem; color: var(--muted); max-width: 58ch; }
.byline { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .88rem; color: var(--muted); margin-top: 18px; }
.byline span { display: inline-flex; align-items: center; gap: 6px; }
.byline svg { width: 16px; height: 16px; color: var(--gold-600); }
.hero-figure { position: relative; margin: 0; }
.hero-figure img { border-radius: 28px 28px 28px 4px; box-shadow: var(--shadow); aspect-ratio: 2 / 1; object-fit: cover; width: 100%; }
.hero-figure::after {
  content: ""; position: absolute; right: -14px; bottom: -14px; width: 42%; height: 46%;
  border: 3px solid var(--gold); border-radius: 0 0 28px 0; border-top: 0; border-left: 0; z-index: -1;
}
.hero-figure figcaption, .figure figcaption { font-size: .78rem; color: var(--muted); margin-top: 10px; }

/* ---------- Key takeaways ---------- */
.takeaways {
  background: var(--navy); color: #e9ebf7; border-radius: var(--radius);
  padding: 30px 32px; margin: 8px 0 0; position: relative; overflow: hidden;
}
.takeaways::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px;
  border-radius: 50%; background: radial-gradient(circle, rgba(216,147,79,.35), transparent 70%);
}
.takeaways h2 { color: #fff; font-size: 1.35rem; margin-bottom: 14px; }
.takeaways ul { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 28px; }
.takeaways li { padding-left: 28px; position: relative; font-size: .97rem; }
.takeaways li::before {
  content: ""; position: absolute; left: 0; top: .55em; width: 14px; height: 14px;
  background: var(--gold); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}

/* ---------- Article layout ---------- */
.article-shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 48px; padding: 48px 0 24px; }
.toc { position: sticky; top: 96px; align-self: start; font-size: .9rem; }
.toc p { font-weight: 800; letter-spacing: .1em; text-transform: uppercase; font-size: .75rem; color: var(--brown); margin-bottom: 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a { display: block; padding: 6px 0 6px 16px; text-decoration: none; color: var(--muted); margin-left: -2px; border-left: 2px solid transparent; }
.toc a::before { content: counter(toc, decimal-leading-zero) "  "; color: var(--gold-600); font-weight: 700; }
.toc a:hover, .toc a.is-active { color: var(--navy); border-left-color: var(--gold); }
.prose { min-width: 0; }
.prose > section { margin-bottom: 56px; scroll-margin-top: 96px; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li { margin-bottom: .45em; }
.prose li::marker { color: var(--gold-600); }
.kicker { font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-600); margin-bottom: 6px; display: block; }

.figure { margin: 28px 0; }
.figure img { border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 2 / 1; object-fit: cover; width: 100%; }

.callout {
  border-left: 5px solid var(--gold); background: var(--paper); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 18px 22px; margin: 24px 0; box-shadow: 0 6px 20px -16px rgba(1,5,68,.4);
}
.callout strong { color: var(--navy); }
.callout.warn { border-left-color: var(--brown); background: #fff8f1; }
.callout p:last-child { margin-bottom: 0; }

/* How it works - 4 steps */
.steps { list-style: none; padding: 0 !important; margin: 24px 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; counter-reset: step; }
.steps li { counter-increment: step; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 18px 18px; position: relative; margin: 0; }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px;
  background: var(--navy); color: var(--gold); font: 700 1.05rem var(--font-display); margin-bottom: 12px;
}
.steps li:nth-child(even)::before { background: var(--gold); color: var(--navy); }
.steps h3 { font-size: 1.05rem; }
.steps p { font-size: .92rem; color: var(--muted); margin: 0; }

/* Comparison table */
.table-wrap { overflow-x: auto; margin: 24px 0; border-radius: var(--radius); border: 1px solid var(--line); background: var(--paper); -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; min-width: 640px; font-size: .92rem; }
th, td { padding: 14px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
thead th { background: var(--navy); color: #fff; font-family: var(--font-body); font-weight: 700; font-size: .85rem; letter-spacing: .02em; }
thead th:first-child { color: var(--gold); }
tbody th { font-weight: 700; color: var(--navy); background: var(--navy-50); }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
.table-note { font-size: .82rem; color: var(--muted); }

/* Bento: what to look for */
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; margin: 24px 0; }
.tile { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; position: relative; overflow: hidden; }
.tile .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--gold-100); color: var(--brown); margin-bottom: 14px; }
.tile .ico svg { width: 22px; height: 22px; }
.tile h3 { font-size: 1.08rem; }
.tile p { font-size: .93rem; color: var(--muted); margin: 0; }
.tile.span-3 { grid-column: span 3; }
.tile.span-2 { grid-column: span 2; }
.tile.span-4 { grid-column: span 4; }
.tile.dark { background: var(--navy); border-color: var(--navy); }
.tile.dark h3 { color: #fff; }
.tile.dark p { color: #cfd3ea; }
.tile.dark .ico { background: rgba(216,147,79,.18); color: var(--gold); }
.tile.gold { background: linear-gradient(145deg, var(--gold-100), #fff); border-color: var(--gold-200); }

/* Suit / not-suit split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 24px 0; }
.split > div { border-radius: var(--radius); padding: 22px 24px; background: var(--paper); border: 1px solid var(--line); }
.split h3 { display: flex; align-items: center; gap: 10px; font-size: 1.1rem; }
.split h3 svg { width: 22px; height: 22px; flex: none; }
.split .yes h3 svg { color: var(--gold-600); }
.split .no { background: var(--navy-50); }
.split .no h3 svg { color: var(--brown); }
.split ul { margin: 0; }

/* Habits grid */
.habits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; list-style: none; padding: 0 !important; margin: 24px 0; }
.habits li { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 18px 16px 56px; position: relative; margin: 0; font-size: .95rem; }
.habits li strong { display: block; color: var(--navy); }
.habits li::before {
  content: ""; position: absolute; left: 18px; top: 18px; width: 24px; height: 24px; border-radius: 8px;
  background: var(--navy) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d8934f' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/14px no-repeat;
}

/* FAQ */
.faq { margin: 20px 0; }
.faq-item { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper); margin-bottom: 10px; overflow: hidden; }
.faq-q {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  padding: 18px 56px 18px 20px; font: 700 1rem/1.45 var(--font-body); color: var(--navy); position: relative;
}
.faq-q::after {
  content: ""; position: absolute; right: 20px; top: 50%; width: 22px; height: 22px; margin-top: -11px; border-radius: 50%;
  background: var(--gold-100) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2368340f' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center/12px no-repeat;
  transition: transform .2s ease;
}
.faq-q[aria-expanded="true"]::after { transform: rotate(45deg); }
.faq-a { padding: 0 20px 18px; color: var(--muted); }
.faq-a[hidden] { display: none; }
.faq-a p:last-child { margin-bottom: 0; }

/* Sources */
.sources { font-size: .9rem; background: var(--paper); border: 1px dashed var(--gold-200); border-radius: var(--radius); padding: 22px 24px; }
.sources ol { margin: 0; }
.sources a { word-break: break-word; }

/* Newsletter band */
.band { background: var(--navy); color: #dfe2f3; padding: 56px 0; position: relative; overflow: hidden; }
.band::before {
  content: ""; position: absolute; left: -80px; bottom: -120px; width: 320px; height: 320px; border-radius: 50%;
  border: 2px solid rgba(216,147,79,.35);
}
.band .wrap { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: center; position: relative; }
.band h2 { color: #fff; }
.band h2 span { color: var(--gold); }
.band p { margin: 0; }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; }
.inline-form input[type="email"] { flex: 1 1 220px; min-width: 0; }
.form-status { font-size: .9rem; margin-top: 10px; min-height: 1.4em; }
.band .form-status { color: var(--gold-200); }
.form-status.err { color: #b3261e; }
.band .form-status.err { color: #ffb4a8; }

/* Forms + buttons */
input, select, textarea {
  font: inherit; color: var(--text); background: #fff; border: 1.5px solid var(--line); border-radius: 12px;
  padding: 12px 14px; width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px rgba(216,147,79,.25); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
  font: 700 .95rem var(--font-body); padding: 13px 22px; border-radius: 12px; border: 0; text-decoration: none;
  background: var(--gold); color: var(--navy); transition: transform .15s ease, background .15s ease;
}
.btn:hover { background: #e3a466; color: var(--navy); transform: translateY(-1px); }
.btn.navy { background: var(--navy); color: #fff; }
.btn.navy:hover { background: var(--navy-800); color: var(--gold-200); }

/* ---------- Footer ---------- */
.site-footer { background: var(--paper); border-top: 4px solid var(--gold); padding: 48px 0 28px; font-size: .92rem; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 32px; }
.footer-grid img { width: 200px; margin-bottom: 14px; }
.site-footer h3 { font-family: var(--font-body); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--brown); margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer a { color: var(--navy); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer address { font-style: normal; }
.footer-legal { border-top: 1px solid var(--line); margin-top: 32px; padding-top: 18px; font-size: .82rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }

/* ---------- Sub pages ---------- */
.page-hero { background: linear-gradient(180deg, var(--navy-50), var(--cream)); padding: 56px 0 32px; }
.page-hero h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem); margin: 0 0 10px; }
.page-hero p { color: var(--muted); max-width: 64ch; margin: 0; }
.page-body { padding: 24px 0 64px; }
.page-body .card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 4vw, 44px); max-width: 860px; }
.page-body h2 { font-size: 1.45rem; margin-top: 1.6em; }
.page-body h2:first-child { margin-top: 0; }
.updated { font-size: .85rem; color: var(--muted); margin-top: 10px !important; }
.details { display: grid; grid-template-columns: 130px 1fr; gap: 8px 16px; margin: 16px 0 24px; padding: 18px 20px; background: var(--navy-50); border-radius: var(--radius-sm); font-size: .95rem; }
.details dt { font-weight: 700; color: var(--navy); }
.details dd { margin: 0; word-break: break-word; }
.contact-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; align-items: start; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 700; font-size: .9rem; color: var(--navy); margin-bottom: 6px; }
.field .hint { font-size: .8rem; color: var(--muted); margin-top: 4px; }
.field .error { display: none; font-size: .8rem; color: #b3261e; margin-top: 4px; }
.field.is-invalid input, .field.is-invalid select, .field.is-invalid textarea { border-color: #b3261e; }
.field.is-invalid .error { display: block; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; }
.check input { width: 18px; height: 18px; margin-top: 4px; flex: none; accent-color: var(--navy); }
.form-status.ok { color: var(--navy); background: var(--gold-100); padding: 10px 14px; border-radius: 10px; }

/* ---------- Reveal ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
  .reveal.in { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .article-shell { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .hero-grid, .band .wrap, .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .hero { padding-top: 36px; }
  .hero-figure::after { right: -8px; bottom: -8px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile.span-2, .tile.span-3, .tile.span-4 { grid-column: span 1; }
  .tile.wide-m { grid-column: 1 / -1; }
  .nav-toggle { display: inline-block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); padding: 10px 16px 16px; flex-direction: column; }
  .nav.open { display: flex; }
  .site-header .wrap { position: relative; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .brand img { width: 170px; }
  .takeaways { padding: 24px 20px; }
  .takeaways ul, .split, .habits, .steps, .bento, .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .details { grid-template-columns: 1fr; }
  .details dt { margin-top: 6px; }
  .notice .wrap { font-size: .75rem; }
}
