/* Closewell site styles. Brand tokens per spec §4; no inline styles anywhere (CSP). */

@font-face { font-family: "Manrope"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/manrope-700.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 800; font-display: swap; src: url("/fonts/manrope-800.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/inter-400.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/inter-500.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/inter-600.woff2") format("woff2"); }
/* Metric-matched fallbacks (Capsize) so the swap to the web fonts doesn't shift layout. */
@font-face { font-family: "Inter Fallback"; src: local("Arial"), local("ArialMT"); ascent-override: 90.4365%; descent-override: 22.518%; line-gap-override: 0%; size-adjust: 107.1194%; }
@font-face { font-family: "Manrope Fallback"; src: local("Arial"), local("ArialMT"); ascent-override: 103.3095%; descent-override: 29.074%; line-gap-override: 0%; size-adjust: 103.1851%; }

:root {
  --ink: #0E1A26;
  --paper: #F5F6F2;
  --white: #FFFFFF;
  --line: #DDE1DA;
  --line-strong: #C7CCC3;
  --muted: #4A5662;
  --muted-dark: #A9B4BF;
  --green: #15A06A;
  --green-text: #11804F;
  --green-dark: #2BC487;
  --radius-sm: 10px;
  --radius-md: 12px;
  --radius-lg: 24px;

  --ink-hover: #1B2B3B;
  --placeholder: #FFE14D;
  --font-head: "Manrope", "Manrope Fallback", system-ui, sans-serif;
  --font-body: "Inter", "Inter Fallback", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: 96px;
  --section-pad: 120px;
  --header-h: 96px;
}

@media (max-width: 1199px) { :root { --gutter: 48px; } }
@media (max-width: 767px)  { :root { --gutter: 24px; --section-pad: 72px; --header-h: 64px; } }
@media (max-width: 479px)  { :root { --gutter: 16px; } }

/* ---------- Base ---------- */

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
@media (max-width: 767px) { body { font-size: 16px; } }

h1, h2, h3, p, ul, ol, figure, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
strong { font-weight: 600; }

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

.visually-hidden {
  position: absolute !important;
  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: 16px; top: -100px; z-index: 100;
  background: var(--ink); color: var(--paper);
  padding: 12px 16px; border-radius: var(--radius-sm);
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 16px; }

/* Unfilled placeholders: loud on purpose so none ship by accident (spec §11). */
.ph {
  background: var(--placeholder);
  color: var(--ink);
  padding: 0 0.25em;
  border-radius: 3px;
  font-weight: 600;
}

.wrap {
  width: 100%;
  max-width: calc(1248px + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Type ---------- */

.h1, .h2, .h3 { font-family: var(--font-head); color: inherit; }
.h1 { font-size: clamp(40px, 5vw + 8px, 64px); font-weight: 800; line-height: 1.04; letter-spacing: -0.035em; }
.h2 { font-size: clamp(30px, 2vw + 16px, 40px); font-weight: 800; line-height: 1.1; letter-spacing: -0.025em; text-wrap: balance; }
.h3 { font-size: clamp(20px, 0.5vw + 14px, 22px); font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; }
.eyebrow { font-size: 15px; font-weight: 600; line-height: 1.4; color: var(--green-text); }
.lead { font-size: clamp(17px, 0.4vw + 13px, 19px); line-height: 1.55; color: var(--muted); }
.small { font-size: 14px; line-height: 1.5; }
.muted { color: var(--muted); }
.label { font-size: 13px; font-weight: 600; line-height: 1.4; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

/* ---------- Buttons & links ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px;
  padding: 16px 24px;
  border-radius: var(--radius-md);
  font: 600 16px/1.2 var(--font-body);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease;
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--ink-hover); }
.btn-text { min-height: 48px; display: inline-flex; align-items: center; padding: 16px 8px; font-weight: 600; text-decoration: none; }
.btn-text:hover { text-decoration: underline; text-underline-offset: 3px; }

.dark .btn-primary { background: var(--paper); color: var(--ink); }
.dark .btn-primary:hover { background: var(--white); }

.link { font-weight: 600; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.link:hover { text-decoration-color: currentColor; }

/* ---------- Logo ---------- */

.mark-ring { stroke: currentColor; }
.mark-check { stroke: var(--check, var(--green)); }
.on-dark { color: var(--paper); --check: var(--green-dark); }

.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; min-height: 44px; }
.logo svg { width: 34px; height: 34px; flex: none; }
.logo-word { font-family: var(--font-head); font-weight: 800; font-size: 26px; letter-spacing: -0.035em; line-height: 1; }

/* ---------- Header ---------- */

.site-header { background: var(--paper); }
.header-inner { display: flex; align-items: center; flex-wrap: wrap; min-height: var(--header-h); gap: 0 36px; }
.header-inner .logo { margin-right: auto; }
.nav-links { display: flex; align-items: center; gap: 36px; font-size: 15px; font-weight: 500; }
.nav-links a { display: inline-block; padding-block: 12px; text-decoration: none; }
.nav-links a:hover { text-decoration: underline; text-underline-offset: 3px; }
.btn-nav { min-height: 44px; padding: 12px 20px; border-radius: var(--radius-sm); font-size: 16px; }
.nav-toggle { display: none; }

@media (min-width: 768px) {
  .site-header { position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--line); }
  /* Border fades in over the first 8 px of scroll where supported; otherwise always shown. */
  @supports (animation-timeline: scroll()) {
    .site-header { animation: header-line linear both; animation-timeline: scroll(root); animation-range: 0 8px; }
  }
  [id] { scroll-margin-top: var(--header-h); }
}
@keyframes header-line { from { border-bottom-color: transparent; } to { border-bottom-color: var(--line); } }

@media (max-width: 767px) {
  .header-inner { gap: 0 8px; min-height: 0; }
  .header-inner .logo { min-height: var(--header-h); }
  .site-header .btn-nav { order: 2; min-height: 44px; padding: 10px 14px; font-size: 14px; }
  .nav { order: 4; flex-basis: 100%; }
  .nav-links { flex-direction: column; align-items: stretch; gap: 0; padding-bottom: 12px; font-size: 16px; }
  .nav-links a { display: block; padding: 12px 0; border-top: 1px solid var(--line); }

  .js .nav-toggle {
    order: 3;
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; margin-right: -8px;
    border: 0; border-radius: var(--radius-sm);
    background: transparent; color: var(--ink); cursor: pointer;
  }
  .js .nav-toggle svg { width: 24px; height: 24px; }
  .js .nav-toggle .i-close { display: none; }
  .js .nav-toggle[aria-expanded="true"] .i-open { display: none; }
  .js .nav-toggle[aria-expanded="true"] .i-close { display: block; }
  .js .nav:not(.is-open) { display: none; }
}

/* ---------- Sections ---------- */

.section { padding-block: var(--section-pad); }
.band-white { background: var(--white); }
/* Two paper sections in a row (audit -> how) share one gap instead of two. */
.section:not(.band-white):not(.dark) + .section:not(.band-white):not(.dark) { padding-top: 0; }
.dark { background: var(--ink); color: var(--paper); }
.dark .eyebrow { color: var(--green-dark); }
.dark .lead, .dark .muted { color: var(--muted-dark); }

.section-head { display: flex; flex-direction: column; gap: 16px; max-width: 760px; margin-bottom: 56px; }
.section-head .lead { margin-top: 4px; }

.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 32px; }
.band-white .card { background: var(--paper); border-color: transparent; }

.icon { width: 24px; height: 24px; flex: none; fill: none; stroke: var(--ink); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 1199px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px)  { .grid-3, .grid-2 { grid-template-columns: minmax(0, 1fr); } }

.feature { display: flex; flex-direction: column; gap: 12px; }
.feature .icon { margin-bottom: 8px; }
.feature p { color: var(--muted); }

/* ---------- Hero ---------- */

.hero { padding: 32px 0 96px; }
.hero-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px; align-items: center; }
.hero-copy { display: flex; flex-direction: column; gap: 26px; }
.hero-copy .lead { max-width: 540px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero-meta { font-size: 14px; color: var(--muted); }

@media (max-width: 1023px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .hero-copy .h1 { max-width: 640px; }
}
@media (max-width: 767px) { .hero { padding: 24px 0 72px; } .hero-copy { gap: 20px; } }

.claim { display: flex; flex-direction: column; gap: 14px; padding: 32px; }
.claim .label { margin-bottom: 6px; }
.claim-row { display: flex; align-items: center; gap: 14px; border-radius: var(--radius-md); padding: 14px 16px; font-size: 16px; font-weight: 600; line-height: 1.4; }
.claim-row.start { background: var(--paper); }
.claim-row.done { background: var(--ink); color: var(--paper); }
.claim-row.done svg { width: 28px; height: 28px; flex: none; }
.ring { width: 28px; height: 28px; flex: none; border: 3px solid var(--ink); border-radius: 50%; }
.claim-stop { display: flex; align-items: center; gap: 10px; padding: 2px 4px; font-size: 13px; font-weight: 600; color: var(--muted); line-height: 1.4; }
.claim-stop::before, .claim-stop::after { content: ""; flex-grow: 1; border-top: 2px dashed var(--line-strong); }
.claim-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.claim-steps li { border: 1px solid var(--line); border-radius: var(--radius-md); padding: 12px 14px; line-height: 1.4; }
.claim-steps .sys { display: block; font-size: 13px; color: var(--muted); }
.claim-steps .act { display: block; margin-top: 4px; font-size: 15px; font-weight: 600; }

@media (max-width: 479px) {
  .claim { padding: 20px; }
  .claim-steps li { padding: 10px 12px; }
  .claim-steps .act { font-size: 14px; }
}

@media (prefers-reduced-motion: no-preference) {
  .claim-steps li, .claim-row.done { animation: fade-in 0.4s ease-out both; }
  .claim-steps li:nth-child(1) { animation-delay: 0.2s; }
  .claim-steps li:nth-child(2) { animation-delay: 0.32s; }
  .claim-steps li:nth-child(3) { animation-delay: 0.44s; }
  .claim-steps li:nth-child(4) { animation-delay: 0.56s; }
  .claim-row.done { animation-delay: 0.76s; }
}
@keyframes fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------- Audit ---------- */

.audit-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 64px; align-items: start; }
@media (max-width: 1023px) { .audit-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; } }

.checklist { display: flex; flex-direction: column; gap: 20px; }
.checklist li { display: flex; gap: 14px; }
.checklist .tick { width: 22px; height: 22px; flex: none; margin-top: 3px; }
.checklist p { color: var(--muted); }
.checklist strong { color: var(--ink); }

.spec-list { display: flex; flex-direction: column; }
.spec-list div { padding-block: 16px; border-top: 1px solid var(--line); }
.spec-list div:first-child { padding-top: 0; border-top: 0; }
.spec-list dt { margin-bottom: 4px; }
.spec-list dd { font-size: 16px; }

.audit-grid .label + .checklist,
.audit-grid .label + .spec-list { margin-top: 24px; }
.audit-extra { margin-top: 32px; font-size: 14px; }

/* ---------- Steps ---------- */

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; counter-reset: step; }
.steps li { position: relative; display: flex; flex-direction: column; gap: 12px; }
.step-num {
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; margin-bottom: 12px;
  border: 1px solid var(--line); border-radius: 50%;
  background: var(--white);
  font: 800 20px/1 var(--font-head);
}
.steps li:not(:last-child)::after {
  content: ""; position: absolute;
  top: 23px; left: 64px; right: -16px;
  border-top: 2px dashed var(--line-strong);
}
.steps p { color: var(--muted); max-width: 360px; }
.steps-cta { margin-top: 56px; }

@media (max-width: 767px) {
  .steps { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .steps li { padding-left: 72px; }
  .step-num { position: absolute; left: 0; top: 0; margin: 0; }
  .steps li:not(:last-child)::after { top: 60px; bottom: -28px; left: 23px; right: auto; border-top: 0; border-left: 2px dashed var(--line-strong); }
  .steps li .h3 { padding-top: 10px; }
  .steps-cta { margin-top: 40px; }
}

/* ---------- After the audit ---------- */

.offer { display: flex; flex-direction: column; gap: 12px; }
.offer p { color: var(--muted); }
.footnote { margin-top: 32px; font-size: 14px; color: var(--muted); }

/* ---------- Partners (dark) ---------- */

.partners-inner { display: flex; flex-direction: column; gap: 20px; max-width: 760px; }
.partners .price { color: var(--paper); }
.partners .btn { margin-top: 12px; align-self: flex-start; }
.bf-note { margin-top: 8px; padding-top: 20px; border-top: 1px solid rgb(169 180 191 / 25%); font-size: 14px; color: var(--muted-dark); }
.partners[data-spots="0"] .when-open,
.partners:not([data-spots="0"]) .when-full { display: none; }

/* ---------- Data ---------- */

.data-grid { row-gap: 48px; column-gap: 40px; }
.data-links { display: flex; flex-wrap: wrap; gap: 8px 32px; margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--line); }
.data-links a { display: inline-block; padding-block: 10px; }

/* ---------- About ---------- */

.about-grid { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 64px; align-items: start; }
.photo { display: block; width: 100%; aspect-ratio: 1; border-radius: var(--radius-lg); overflow: hidden; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo-placeholder { display: flex; align-items: center; justify-content: center; background: var(--paper); }
.photo-placeholder svg { width: 96px; height: 96px; }
.about-copy { display: flex; flex-direction: column; gap: 16px; max-width: 680px; }
.about-copy .meta { font-size: 14px; color: var(--muted); }
.about-links { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.about-links a { display: inline-block; padding-block: 10px; }

@media (max-width: 767px) {
  .about-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .photo { max-width: 280px; }
}

/* ---------- FAQ ---------- */

.faq-inner { max-width: 760px; margin-inline: auto; }
.faq-inner .h2 { margin-bottom: 40px; }
.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  min-height: 64px; padding-block: 18px;
  font: 700 clamp(18px, 0.4vw + 14px, 20px)/1.35 var(--font-head); letter-spacing: -0.01em;
  cursor: pointer; list-style: none;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: ""; flex: none; width: 14px; height: 14px;
  background:
    linear-gradient(var(--ink), var(--ink)) center / 14px 2px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 2px 14px no-repeat;
}
.faq-list details[open] summary::after { background: linear-gradient(var(--ink), var(--ink)) center / 14px 2px no-repeat; }
.faq-list details p { padding-bottom: 24px; color: var(--muted); max-width: 680px; }

/* ---------- Final CTA (dark) ---------- */

.cta-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 64px; align-items: center; }
.cta-copy { display: flex; flex-direction: column; gap: 16px; max-width: 680px; }
.cta-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 16px; }
.cta-actions .btn-text { color: var(--paper); }
.cta-mark { width: 120px; height: 120px; }
@media (max-width: 767px) {
  .cta-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .cta-mark { width: 72px; height: 72px; order: -1; }
}

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--line); padding-block: 56px 40px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
.footer-brand { display: flex; flex-direction: column; gap: 8px; }
.footer-brand .logo svg { width: 28px; height: 28px; }
.footer-brand .logo-word { font-size: 22px; }
.footer-links { display: flex; flex-direction: column; align-items: flex-start; }
.footer-links a { display: inline-block; padding-block: 6px; min-height: 24px; text-decoration: none; }
.footer-links a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.footer-legal { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
@media (max-width: 767px) { .footer-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Simple pages (privacy, 404) ---------- */

.page { padding-block: 64px var(--section-pad); }
.prose { max-width: 720px; }
.prose .h1 { font-size: clamp(36px, 3vw + 16px, 48px); margin-bottom: 32px; }
.prose h2 { font: 700 22px/1.3 var(--font-head); letter-spacing: -0.01em; margin: 40px 0 12px; }
.prose p + p { margin-top: 12px; }
.prose ul { list-style: disc; padding-left: 1.25em; margin-top: 12px; }
.prose li + li { margin-top: 6px; }
.prose .updated { margin-top: 48px; font-size: 14px; color: var(--muted); }

.notfound { min-height: 60vh; display: flex; flex-direction: column; justify-content: center; gap: 24px; }

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
