/* Bruce Svenson — "The Diagnosis" design system (rebuild 2026-07-18).
   Ivory paper, dark ink, one gold accent. Editorial serif display +
   plain body + mono spec-labels. All texture and linework is code —
   zero background images. */

:root {
  --paper: #faf7f1;
  --paper-2: #f3eee4;
  --ink: #1c1813;
  --ink-2: #5b5347;
  --ink-3: #8a8071;
  --gold: #b9821e;
  --gold-bright: #e9a23b;
  --line: #e3dccd;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --maxw: 1080px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background-color: var(--paper);
  -webkit-font-smoothing: antialiased;
}

/* Paper grain — pure code, no image. Fixed layer, barely-there. */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.55 0 0 0 0 0.5 0 0 0 0 0.42 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
}
main, header, footer, section { position: relative; z-index: 1; }

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

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 700px; margin-left: auto; margin-right: auto; }

section { padding: 92px 0; }
section.tint { background: var(--paper-2); }
@media (max-width: 720px) { section { padding: 60px 0; } }

/* ---- Type ---- */
h1, h2, h3 { font-family: var(--serif); font-weight: 550; line-height: 1.12; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.5rem, 5.6vw, 4.2rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); margin-bottom: 0.5em; }
h3 { font-size: 1.25rem; }
.lead { font-size: 1.16rem; color: var(--ink-2); }

.spec {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--gold); display: inline-block;
  margin-bottom: 16px;
}

/* Gold underline stroke that draws in */
.stroke { position: relative; white-space: nowrap; }
.stroke::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0.04em;
  height: 0.14em; background: var(--gold-bright); opacity: 0.4;
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.3, 1) 0.25s;
}
.in-view .stroke::after, h1 .stroke::after { transform: scaleX(1); }
/* Continuous life: a soft glint travels along the gold underline */
@media (prefers-reduced-motion: no-preference) {
  .stroke::after {
    background: linear-gradient(90deg,
      var(--gold-bright) 0%, var(--gold-bright) 38%,
      #ffdd96 50%,
      var(--gold-bright) 62%, var(--gold-bright) 100%);
    background-size: 240% 100%;
    animation: glint 4.6s ease-in-out 1.6s infinite;
  }
  @keyframes glint {
    0% { background-position: 130% 0; }
    55% { background-position: -40% 0; }
    100% { background-position: -40% 0; }
  }
}
@media (prefers-reduced-motion: reduce) { .stroke::after { transform: scaleX(1); transition: none; } }

/* ---- Buttons ---- */
.btn {
  display: inline-block; font-family: var(--sans); font-weight: 600;
  font-size: 16px; padding: 16px 32px; border-radius: 10px; border: none;
  cursor: pointer; text-decoration: none;
  transition: transform 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}
.btn-primary {
  background: var(--ink); color: var(--paper);
  box-shadow: 0 14px 34px -18px rgba(28, 24, 19, 0.55);
}
.btn-primary:hover { background: #000; transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

.reassure { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.06em; color: var(--ink-3); margin-top: 14px; }

/* ---- Header ---- */
.site-header { padding: 22px 0; }
.header-inner { display: flex; justify-content: space-between; align-items: center; }
.logo { font-family: var(--serif); font-weight: 600; font-size: 1.2rem; color: var(--ink); text-decoration: none; }
.logo b { color: var(--gold); font-weight: 600; }
.header-cta { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.08em; color: var(--ink); text-decoration: none; border-bottom: 1.5px solid var(--gold-bright); padding-bottom: 2px; }
.header-nav { display: flex; align-items: center; gap: 26px; }
.header-nav a:not(.header-cta) { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.08em; color: var(--ink-soft, #6b6459); text-decoration: none; }
.header-nav a:not(.header-cta):hover { color: var(--ink); }

/* ---- Hero ---- */
.hero { padding: 60px 0 90px; }
.hero-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 56px; align-items: center; }
.hero h1 { margin: 14px 0 22px; }
.hero .lead { max-width: 34em; }
.hero-cta { margin-top: 30px; }
.portrait-frame { position: relative; max-width: 360px; justify-self: end; }
.portrait-frame img { border-radius: 16px; filter: saturate(0.92); }
.portrait-frame::after {
  content: ""; position: absolute; inset: 14px -14px -14px 14px;
  border: 1.5px solid var(--gold-bright); border-radius: 16px; z-index: -1;
}
/* Caption ticker: scrolls across, clipped to the photo's width. */
.portrait-caption {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-3); margin-top: 18px;
  width: 100%; max-width: 360px; margin-left: auto;
  overflow: hidden; white-space: nowrap;
}
.caption-track { display: inline-flex; }
.caption-track span { padding-right: 2.5em; }
@media (prefers-reduced-motion: no-preference) {
  .caption-track { animation: captionScroll 16s linear infinite; }
}
@keyframes captionScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .portrait-frame { justify-self: start; max-width: 280px; }
  .portrait-caption { margin-left: 0; max-width: 280px; }
}

/* ---- Pain mirror ---- */
.mirror { display: grid; gap: 14px; margin-top: 36px; }
.mirror blockquote {
  font-family: var(--serif); font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  line-height: 1.45; color: var(--ink); padding-left: 22px;
  border-left: 2px solid var(--line);
}
.mirror blockquote.gold { border-left-color: var(--gold-bright); }
.closer { margin-top: 30px; color: var(--ink-2); }

/* ---- SVG linework (knot, lanes) ---- */
.linework { display: block; margin: 0 auto; max-width: 640px; width: 100%; height: auto; }
.linework .draw {
  stroke-dasharray: var(--len, 1200); stroke-dashoffset: var(--len, 1200);
  transition: stroke-dashoffset 1.6s ease 0.2s;
}
.in-view .draw { stroke-dashoffset: 0; }
.linework .draw.d2 { transition-delay: 0.7s; }
.linework .draw.d3 { transition-delay: 1.2s; }
@media (prefers-reduced-motion: reduce) { .linework .draw { stroke-dashoffset: 0 !important; transition: none; } }

/* ---- Steps ---- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 44px; }
.step { border-top: 2px solid var(--ink); padding-top: 18px; }
.step .n { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em; color: var(--gold); }
.step h3 { margin: 8px 0 10px; }
.step p { font-size: 0.96rem; color: var(--ink-2); }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }
.how-i-coach {
  margin-top: 40px; padding: 26px 30px; background: var(--paper-2);
  border-left: 3px solid var(--gold-bright); border-radius: 0 12px 12px 0;
}
.how-i-coach p { color: var(--ink-2); }
.how-i-coach strong { color: var(--ink); }

/* ---- Case files ---- */
.file-label { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; color: var(--ink-3); text-transform: uppercase; margin-top: 10px; }
.files { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 40px; }
.file {
  background: #fffdf8; border: 1px solid var(--line); border-radius: 14px;
  padding: 26px; box-shadow: 0 2px 4px rgba(28, 24, 19, 0.04);
}
.file h3 { font-size: 1.1rem; margin-bottom: 16px; }
.file dl { display: grid; gap: 12px; }
.file dt { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); }
.file dd { font-size: 0.93rem; color: var(--ink-2); line-height: 1.55; }
@media (max-width: 900px) { .files { grid-template-columns: 1fr; } }

/* ---- Offer ---- */
.offer-card {
  background: #fffdf8; border: 1.5px solid var(--ink); border-radius: 18px;
  padding: 40px; margin-top: 40px; box-shadow: 8px 8px 0 rgba(233, 162, 59, 0.25);
}
.offer-price { font-family: var(--serif); font-size: clamp(2rem, 4vw, 2.8rem); }
.offer-price small { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; color: var(--ink-3); display: block; margin-top: 4px; }
.phases { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; margin: 28px 0; }
.phase { border-top: 2px solid var(--gold-bright); padding-top: 14px; }
.phase h3 { font-size: 1.05rem; margin-bottom: 8px; }
.phase p { font-size: 0.94rem; color: var(--ink-2); }
@media (max-width: 720px) { .phases { grid-template-columns: 1fr; } }
.call-types { display: grid; gap: 12px; margin: 22px 0; }
.call-types li { list-style: none; font-size: 0.96rem; color: var(--ink-2); padding-left: 20px; position: relative; }
.call-types li::before { content: "—"; position: absolute; left: 0; color: var(--gold); }
.ai-inclusion {
  margin: 22px 0; padding: 18px 22px; background: var(--paper-2);
  border-radius: 12px; font-size: 0.95rem; color: var(--ink-2);
}
.commit { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.06em; color: var(--ink-2); margin-top: 18px; }

/* ---- DDP lane ---- */
.ddp-lane { margin-top: 34px; border: 1px dashed var(--gold); border-radius: 14px; padding: 30px; }
.ddp-lane ul { margin: 14px 0 16px 20px; color: var(--ink-2); }
.ddp-lane a { color: var(--gold); font-weight: 600; }
.trust-line { font-size: 0.9rem; color: var(--ink-3); font-style: italic; }

/* ---- Proof ---- */
.proof-links { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin: 34px 0 22px; }
.proof-link {
  display: block; border: 1px solid var(--line); border-radius: 14px;
  text-decoration: none; color: var(--ink); background: #fffdf8; overflow: hidden;
  transition: border-color 0.18s, transform 0.18s, box-shadow 0.18s;
}
.proof-link:hover { border-color: var(--gold-bright); transform: translateY(-3px); box-shadow: 0 16px 34px -20px rgba(28, 24, 19, 0.4); }
.proof-link .spec { margin-bottom: 6px; }
.proof-link p { font-size: 0.92rem; color: var(--ink-2); }
.proof-body { padding: 20px 24px 24px; }
@media (max-width: 720px) { .proof-links { grid-template-columns: 1fr; } }

/* Browser-frame site preview inside a proof card */
.site-shot { border-bottom: 1px solid var(--line); background: #eceae4; }
.site-chrome {
  display: flex; align-items: center; gap: 10px; padding: 9px 14px;
  background: #f3f1ea; border-bottom: 1px solid var(--line);
}
.site-chrome .dots { display: flex; gap: 5px; }
.site-chrome .dots i { width: 9px; height: 9px; border-radius: 50%; background: #d8d2c2; }
.site-chrome .url {
  flex: 1; font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.04em;
  color: var(--ink-3); background: #fff; border-radius: 6px; padding: 3px 10px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.site-shot img { width: 100%; display: block; aspect-ratio: 4 / 3; object-fit: cover; object-position: top; }
.proof-link:hover .site-shot img { filter: none; }

/* ---- Manage-booking pages (confirm / reschedule) ---- */
.manage-shell { text-align: center; padding: 40px 0 90px; }
.manage-card {
  background: #fffdf8; border: 1px solid var(--line); border-radius: 14px;
  padding: 22px 26px; margin: 28px auto; max-width: 430px; text-align: left;
}
.manage-card .svc { font-family: var(--serif); font-size: 1.15rem; font-weight: 550; }
.manage-card .when { color: var(--ink-2); margin-top: 6px; }
.manage-card .with { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); margin-top: 12px; }
.check { width: 62px; height: 62px; margin: 0 auto 20px; }
.check svg { width: 100%; height: 100%; fill: none; stroke: var(--gold-bright); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.manage-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }
.day-chips { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 28px 0 14px; }
.day-chip {
  padding: 10px 16px; border: 1.5px solid var(--line); border-radius: 999px; background: #fff;
  font-family: var(--sans); font-weight: 600; font-size: 0.92rem; color: var(--ink-2); cursor: pointer;
  transition: border-color 0.16s, background 0.16s, color 0.16s;
}
.day-chip:hover { border-color: var(--gold-bright); color: var(--ink); }
.day-chip.selected { background: var(--gold-bright); border-color: var(--gold-bright); color: #fff; }
.reslot-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; max-width: 560px; margin: 0 auto; }
.cancel-link { background: none; border: none; color: var(--ink-3); font-family: var(--sans); font-size: 0.9rem; text-decoration: underline; cursor: pointer; margin-top: 32px; }
.cancel-link:hover { color: #a33b2e; }

/* ---- Story page (about) ---- */
.story-hero { padding: 60px 0 70px; }
.pull-stat { display: flex; align-items: baseline; gap: 16px; margin: 30px 0; padding: 18px 24px; border-left: 3px solid var(--gold-bright); background: var(--paper-2); border-radius: 0 12px 12px 0; }
section.tint .pull-stat { background: #fffdf8; }
.pull-stat b { font-family: var(--serif); font-weight: 650; font-size: clamp(1.9rem, 4vw, 2.6rem); color: var(--gold); line-height: 1; }
.pull-stat span { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); line-height: 1.5; }
.story-photo { margin: 34px 0; }
.story-photo img { border-radius: 14px; filter: saturate(0.92); }
.story-photo figcaption { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); margin-top: 12px; }

/* ---- FAQ ---- */
.faq-list { margin-top: 36px; }
.faq {
  border-bottom: 1px solid var(--line);
}
.faq summary {
  cursor: pointer; list-style: none; padding: 20px 40px 20px 0;
  font-family: var(--serif); font-size: 1.12rem; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; color: var(--gold); font-family: var(--sans); font-size: 1.4rem; }
.faq[open] summary::after { content: "–"; }
.faq p { padding: 0 0 20px; color: var(--ink-2); max-width: 60ch; }

/* ---- Final CTA ---- */
.final-cta { text-align: center; }
.final-cta .btn { margin-top: 26px; }

/* ---- Footer ---- */
footer { padding: 40px 0 50px; border-top: 1px solid var(--line); }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 0.85rem; color: var(--ink-3); }
.footer-inner a { color: var(--ink-3); }

/* ---- Reveals ---- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.in-view { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ================= book page ================= */
.book-shell { max-width: 780px; margin: 0 auto; padding: 40px 24px 80px; }
.form-card { background: #fffdf8; border: 1px solid var(--line); border-radius: 16px; padding: 34px; margin-top: 30px; }
.field { margin-bottom: 20px; }
.field label { display: block; font-weight: 600; font-size: 0.95rem; margin-bottom: 7px; }
.field .hint { font-weight: 400; color: var(--ink-3); font-size: 0.85rem; }
.field input, .field textarea, .field select {
  width: 100%; padding: 13px 14px; border: 1.5px solid var(--line); border-radius: 10px;
  font-family: var(--sans); font-size: 16px; color: var(--ink); background: #fff;
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--gold-bright); border-color: var(--gold-bright); }
.radio-row { display: grid; gap: 10px; }
.radio-row label { font-weight: 400; font-size: 0.95rem; color: var(--ink-2); display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.radio-row input { width: auto; margin-top: 4px; }
.form-error { color: #a33b2e; font-weight: 600; margin-top: 12px; }

.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-nav { width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 16px; color: var(--ink); }
.cal-nav:disabled { opacity: 0.35; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal-dow { text-align: center; font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.08em; color: var(--ink-3); padding: 6px 0; text-transform: uppercase; }
.cal-day { aspect-ratio: 1; border-radius: 9px; border: 1px solid transparent; background: transparent; font-family: var(--sans); font-size: 0.95rem; color: var(--ink-3); }
.cal-day.available { background: #f6efdd; color: var(--ink); font-weight: 600; cursor: pointer; border-color: #e8d9b4; }
.cal-day.available:hover { border-color: var(--gold-bright); }
.cal-day.selected { background: var(--gold-bright); color: #fff; border-color: var(--gold-bright); }
.slot-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; margin-top: 14px; }
.slot { min-height: 44px; border-radius: 9px; border: 1.5px solid var(--line); background: #fff; font-family: var(--sans); font-size: 0.92rem; font-weight: 600; color: var(--ink); cursor: pointer; }
.slot:hover { border-color: var(--gold-bright); }
.slot.selected { background: var(--gold-bright); border-color: var(--gold-bright); color: #fff; }
.held-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 22px;
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; font-size: 0.92rem;
}
.held-row button { background: none; border: none; color: var(--gold); font-family: var(--sans); font-size: 0.85rem; text-decoration: underline; cursor: pointer; }
