/* Sehlam Home Care — design system v1 (design/visual-contract.md is the reference).
   One stylesheet, no framework. Tokens first, then base, layout, components, utilities.
   Contrast ratios in comments were measured (tools: scratch contrast script, 2026-10-01). */

@font-face {
  font-family: "Fraunces";
  font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/assets/fonts/fraunces-latin-opsz-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fraunces";
  font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/assets/fonts/fraunces-latin-ext-opsz-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("/assets/fonts/atkinson-hyperlegible-next-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-style: italic; font-weight: 200 800; font-display: swap;
  src: url("/assets/fonts/atkinson-hyperlegible-next-latin-wght-italic.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+2000-206F;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("/assets/fonts/atkinson-hyperlegible-next-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Brand (exact values sampled from the supplied logo) */
  --blue: #084DCF;        /* structure + primary actions. White on blue 7.06:1; blue on linen 6.67:1 */
  --blue-800: #063A9E;    /* hover/pressed. 9.97:1 on white */
  --blue-900: #0A2A6B;    /* utility strip, footer. White 13.49:1 */
  --blue-50: #EEF3FD;     /* tints. Blue on blue-50 6.35:1 */
  --turquoise: #02D1BD;   /* accent only. NEVER text on light, NEVER white text on it (1.93:1). Ink on it 8.42:1 */
  --teal-700: #00756A;    /* turquoise family that can carry small text: 5.60:1 white, 5.28:1 linen */
  --teal-50: #E6FAF7;     /* callout tint. Ink 15.03:1 */
  /* Neutrals: warm, home-like */
  --ink: #10203A;         /* body text 15.37:1 on linen */
  --ink-2: #44506A;       /* secondary text 7.62:1 linen, 6.93:1 sand */
  --linen: #FBF8F3;       /* page */
  --sand: #F3EDE3;        /* alternate sections */
  --white: #FFFFFF;
  --line: #DED7CB;        /* decorative borders (cards) */
  --line-strong: #8C8273; /* input borders: 3.57:1 on linen (non-text 3:1) */
  /* Status */
  --ok: #1E6B45; --ok-bg: #E7F4EC;      /* 6.47:1 on white */
  --err: #A4262C; --err-bg: #FBEAEA;    /* 7.26:1 on white */
  --warn: #7A4F00; --warn-bg: #FFF4DB;  /* 6.52:1 */
  --focus: var(--blue);
  /* Type */
  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: "Atkinson Hyperlegible Next", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --step--1: 0.95rem;
  --step-0: 1.125rem;                               /* 18px body: older readers, families on phones */
  --step-1: clamp(1.25rem, 1.15rem + 0.4vw, 1.45rem);
  --step-2: clamp(1.5rem, 1.3rem + 0.9vw, 1.95rem);
  --step-3: clamp(1.85rem, 1.5rem + 1.6vw, 2.6rem);
  --step-4: clamp(2.25rem, 1.7rem + 2.8vw, 3.75rem);
  --measure: 68ch;
  /* Space (4px base) */
  --s-1: 0.25rem; --s-2: 0.5rem; --s-3: 0.75rem; --s-4: 1rem; --s-5: 1.5rem; --s-6: 2rem; --s-7: 3rem; --s-8: 4rem; --s-9: 6rem;
  /* Shape: pills and half-discs from the logo's geometry */
  --r-sm: 8px; --r-md: 16px; --r-lg: 28px; --r-pill: 999px;
  --shadow-1: 0 1px 2px rgb(16 32 58 / 0.06), 0 2px 8px rgb(16 32 58 / 0.05);
  --shadow-2: 0 8px 28px rgb(16 32 58 / 0.10);
  --wrap: 1200px;
  --header-h: 72px;
  color-scheme: light;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 1rem; }
body {
  margin: 0; background: var(--linen); color: var(--ink);
  font-family: var(--font-body); font-size: var(--step-0); line-height: 1.65;
  font-variant-numeric: proportional-nums;
}
img, svg { max-width: 100%; height: auto; }
svg { flex-shrink: 0; }
h1, h2, h3, h4 { font-family: var(--font-display); font-optical-sizing: auto; color: var(--ink); line-height: 1.15; margin: 0 0 var(--s-4); text-wrap: balance; }
h1 { font-size: var(--step-4); font-weight: 600; letter-spacing: -0.015em; line-height: 1.06; }
h2 { font-size: var(--step-3); font-weight: 600; letter-spacing: -0.01em; }
h3 { font-size: var(--step-1); font-weight: 600; font-family: var(--font-body); letter-spacing: 0; line-height: 1.3; }
h4 { font-size: var(--step-0); font-family: var(--font-body); font-weight: 700; }
p, ul, ol, dl, blockquote { margin: 0 0 var(--s-4); }
p { text-wrap: pretty; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--blue-800); text-decoration-thickness: 2px; }
strong { font-weight: 700; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--s-6) 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.on-blue :focus-visible, .site-header :focus-visible, .cta-band :focus-visible, .site-footer :focus-visible { --focus: var(--turquoise); }
::selection { background: var(--turquoise); color: var(--ink); }
.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: var(--s-4); top: -100px; z-index: 100; background: var(--white); color: var(--blue); padding: var(--s-3) var(--s-4); border-radius: var(--r-sm); font-weight: 700; box-shadow: var(--shadow-2); }
.skip-link:focus { top: var(--s-3); }
.wrap { width: min(100% - 2rem, var(--wrap)); margin-inline: auto; }
.prose { max-width: var(--measure); }
.prose > * + h2 { margin-top: var(--s-7); }
.prose > * + h3 { margin-top: var(--s-6); }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li { margin-bottom: var(--s-2); }
.prose li::marker { color: var(--teal-700); }
.lede { font-size: var(--step-1); line-height: 1.55; color: var(--ink-2); max-width: 60ch; }
.eyebrow { display: inline-flex; align-items: center; gap: var(--s-2); font-size: var(--step--1); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--teal-700); margin-bottom: var(--s-3); }
.eyebrow::before { content: ""; width: 14px; height: 7px; background: var(--turquoise); border-radius: 14px 14px 0 0; }
.muted { color: var(--ink-2); }
.small { font-size: var(--step--1); }

/* ---------- staging / preview furniture ---------- */
.env-bar { background: var(--ink); color: var(--white); font-size: var(--step--1); padding: var(--s-2) 0; }
.env-bar strong { color: var(--turquoise); }
.env-bar a { color: var(--white); }
mark.pending { background: var(--warn-bg); color: var(--warn); outline: 2px dashed var(--warn); outline-offset: 1px; border-radius: 3px; padding: 0 0.2em; }
.gap { border: 2px dashed var(--warn); background: var(--warn-bg); color: var(--warn); border-radius: var(--r-sm); padding: var(--s-3) var(--s-4); font-size: var(--step--1); }
.gap__tag { font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; margin-right: var(--s-2); }
.review-banner { background: var(--warn-bg); border: 1px solid #E8C77A; color: var(--warn); border-radius: var(--r-md); padding: var(--s-4) var(--s-5); margin-bottom: var(--s-6); }
.review-banner strong { display: block; margin-bottom: var(--s-1); }

/* ---------- header ---------- */
.site-header { background: var(--blue); color: var(--white); position: relative; z-index: 20; }
.utility { background: var(--blue-900); font-size: var(--step--1); }
.utility .wrap { display: flex; justify-content: flex-end; gap: var(--s-5); padding-block: var(--s-2); }
.utility a { color: var(--white); text-decoration: none; }
.utility a:hover { text-decoration: underline; color: var(--white); }
.masthead .wrap { display: flex; align-items: center; gap: var(--s-5); min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; flex-shrink: 0; padding-block: var(--s-2); }
.brand img { display: block; height: 52px; width: auto; }
.site-nav { margin-left: auto; }
.site-nav > ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: var(--s-1); }
.nav-link, .nav-toggle {
  display: inline-flex; align-items: center; gap: 0.35em; min-height: 44px; padding: 0 var(--s-3);
  color: var(--white); text-decoration: none; font: inherit; font-size: 1rem; font-weight: 600;
  background: none; border: 0; border-radius: var(--r-pill); cursor: pointer;
}
.nav-link:hover, .nav-toggle:hover, .nav-toggle[aria-expanded="true"] { background: rgb(255 255 255 / 0.12); color: var(--white); text-decoration: none; }
.nav-link[aria-current="page"], .nav-link[aria-current="true"] { box-shadow: inset 0 -3px 0 var(--turquoise); border-radius: 0; }
.nav-toggle svg { width: 16px; height: 16px; transition: transform 0.15s ease; }
.nav-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.has-panel { position: relative; }
.nav-panel {
  position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%);
  width: min(92vw, 640px); background: var(--white); color: var(--ink); border-radius: var(--r-lg); box-shadow: var(--shadow-2);
  padding: var(--s-5); display: none;
}
.js .nav-panel[data-open] { display: block; }
.nav-panel ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-1) var(--s-4); }
.nav-panel a { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-3); border-radius: var(--r-md); text-decoration: none; color: var(--ink); }
.nav-panel a:hover { background: var(--blue-50); color: var(--ink); }
.nav-panel a span { display: block; font-size: var(--step--1); color: var(--ink-2); line-height: 1.4; }
.nav-panel a strong { display: block; font-weight: 700; line-height: 1.3; color: var(--blue); }
.nav-panel .panel-foot { margin-top: var(--s-3); padding-top: var(--s-3); border-top: 1px solid var(--line); font-size: var(--step--1); }
.header-cta { flex-shrink: 0; }
.menu-toggle { display: none; }

@media (max-width: 1080px) {
  .utility { display: none; }
  .masthead .wrap { gap: var(--s-3); min-height: 64px; }
  .brand img { height: 44px; }
  .js .menu-toggle {
    display: inline-flex; align-items: center; gap: var(--s-2); margin-left: auto; min-height: 44px; padding: 0 var(--s-4);
    background: rgb(255 255 255 / 0.12); color: var(--white); border: 1px solid rgb(255 255 255 / 0.35); border-radius: var(--r-pill); font: inherit; font-weight: 700; cursor: pointer;
  }
  .js .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--blue); padding: var(--s-3) var(--s-4) var(--s-6); border-top: 1px solid rgb(255 255 255 / 0.2); max-height: calc(100dvh - 64px); overflow-y: auto; }
  .js .site-nav[data-open] { display: block; }
  .site-nav > ul { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-link, .nav-toggle { width: 100%; justify-content: space-between; border-radius: var(--r-md); min-height: 48px; font-size: var(--step-0); }
  .nav-link[aria-current="page"] { box-shadow: inset 4px 0 0 var(--turquoise); }
  .nav-panel { position: static; transform: none; width: auto; box-shadow: none; border-radius: var(--r-md); padding: var(--s-2); margin: var(--s-1) 0 var(--s-3); }
  .nav-panel ul { grid-template-columns: 1fr; }
  .nav-panel a span { display: none; }
  .mobile-only { display: block; }
  .site-header .header-cta { display: none; }
  .site-nav .nav-utility { border-top: 1px solid rgb(255 255 255 / 0.2); margin-top: var(--s-3); padding-top: var(--s-3); }
  .site-nav .nav-cta { margin-top: var(--s-4); }
}
@media (min-width: 1081px) { .mobile-only { display: none !important; } }
/* No-JS: the nav is a plain wrapped list, panels link to hub pages. */
html:not(.js) .site-nav > ul { flex-wrap: wrap; }
html:not(.js) .nav-panel { display: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 48px; padding: 0.7rem 1.35rem; border-radius: var(--r-pill); border: 2px solid transparent;
  font: inherit; font-weight: 700; line-height: 1.2; text-decoration: none; cursor: pointer; text-align: center;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn svg { width: 20px; height: 20px; }
.btn--primary { background: var(--blue); color: var(--white); }
.btn--primary:hover { background: var(--blue-800); color: var(--white); text-decoration: none; }
.btn--accent { background: var(--turquoise); color: var(--ink); }          /* ink on turquoise 8.42:1 */
.btn--accent:hover { background: #33DCCB; color: var(--ink); text-decoration: none; }
.btn--ghost { background: transparent; color: var(--blue); border-color: var(--blue); }
.btn--ghost:hover { background: var(--blue-50); color: var(--blue-800); text-decoration: none; }
.on-blue .btn--ghost, .cta-band .btn--ghost { color: var(--white); border-color: rgb(255 255 255 / 0.7); }
.on-blue .btn--ghost:hover, .cta-band .btn--ghost:hover { background: rgb(255 255 255 / 0.12); color: var(--white); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.6; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }
.link-arrow { display: inline-flex; align-items: center; gap: 0.35em; font-weight: 700; text-decoration: none; }
.link-arrow svg { width: 18px; height: 18px; transition: transform 0.15s ease; }
.link-arrow:hover svg { transform: translateX(3px); }

/* ---------- sections ---------- */
.section { padding-block: var(--s-8); }
.section--tight { padding-block: var(--s-7); }
.section--sand { background: var(--sand); }
.section--pebble { background: var(--sand); border-radius: 48px 48px 0 0; }
.section--white { background: var(--white); }
.section-head { max-width: 760px; margin-bottom: var(--s-6); }
.section-head p { color: var(--ink-2); font-size: var(--step-1); line-height: 1.5; }
.grid { display: grid; gap: var(--s-5); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }

/* ---------- hero ---------- */
.hero { padding-block: var(--s-8) var(--s-8); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: var(--s-7); align-items: center; }
.hero h1 { max-width: 15ch; }
.hero .lede { margin-bottom: var(--s-6); }
.hero__art { position: relative; aspect-ratio: 1 / 1; max-width: 480px; justify-self: end; width: 100%; }
.hero__art svg { width: 100%; height: 100%; display: block; overflow: visible; }
.hero__note { margin-top: var(--s-5); font-size: var(--step--1); color: var(--ink-2); display: flex; gap: var(--s-2); align-items: flex-start; }
.hero__note svg { width: 20px; height: 20px; color: var(--teal-700); margin-top: 2px; }
@media (max-width: 860px) {
  .hero { padding-block: var(--s-6) var(--s-7); }
  .hero .wrap { grid-template-columns: 1fr; gap: var(--s-5); }
  .hero__art { max-width: 240px; justify-self: center; }
}
.page-hero { padding-block: var(--s-6) var(--s-7); }
.page-hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-6); align-items: end; }
.page-hero h1 { max-width: 22ch; font-size: clamp(2.1rem, 1.6rem + 2.4vw, 3.25rem); }
.page-hero .lede { margin-bottom: var(--s-5); }
.page-hero__badge { width: 132px; height: 132px; }
@media (max-width: 760px) { .page-hero .wrap { grid-template-columns: 1fr; } .page-hero__badge { display: none; } }

/* ---------- breadcrumbs ---------- */
.breadcrumbs { font-size: var(--step--1); padding-top: var(--s-5); }
.breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-2); }
.breadcrumbs li { display: inline-flex; align-items: center; gap: var(--s-2); color: var(--ink-2); }
.breadcrumbs li + li::before { content: ""; width: 6px; height: 6px; border-top: 2px solid var(--line-strong); border-right: 2px solid var(--line-strong); transform: rotate(45deg); }
.breadcrumbs a { color: var(--ink-2); }
.breadcrumbs [aria-current] { color: var(--ink); font-weight: 600; }

/* ---------- cards ---------- */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-5); box-shadow: var(--shadow-1); display: flex; flex-direction: column; gap: var(--s-3); }
.card h3 { margin: 0; }
.card p { margin: 0; color: var(--ink-2); }
.card--link { position: relative; transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease; }
.card--link:hover { border-color: var(--blue); box-shadow: var(--shadow-2); }
.card--link a.stretch { text-decoration: none; color: var(--ink); }
.card--link a.stretch::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card--link a.stretch:focus-visible { outline: none; }
.card--link:has(a.stretch:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }
.card .more { margin-top: auto; padding-top: var(--s-2); font-weight: 700; color: var(--blue); display: inline-flex; align-items: center; gap: 0.35em; }
.card .more svg { width: 18px; height: 18px; }
/* Half-disc icon tile: echoes the semicircles of the logo */
.tile { width: 64px; height: 32px; border-radius: 64px 64px 0 0; background: var(--teal-50); position: relative; display: grid; place-items: end center; margin-bottom: var(--s-2); }
.tile svg { width: 26px; height: 26px; color: var(--blue); margin-bottom: 2px; }
.tile--blue { background: var(--blue-50); }

/* ---------- lists ---------- */
.check-list, .minus-list, .plain-list { list-style: none; padding: 0; margin: 0 0 var(--s-4); }
.check-list li, .minus-list li { position: relative; padding-left: 2rem; margin-bottom: var(--s-2); }
.check-list li::before { content: ""; position: absolute; left: 0; top: 0.3em; width: 1.2rem; height: 1.2rem; border-radius: 50%; background: var(--teal-50) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300756A' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 0.8rem no-repeat; }
.minus-list li::before { content: ""; position: absolute; left: 0.2rem; top: 0.75em; width: 0.8rem; height: 3px; border-radius: 2px; background: var(--ink-2); }
.tag-row { display: flex; flex-wrap: wrap; gap: var(--s-2); padding: 0; margin: 0; list-style: none; }
.tag { display: inline-flex; align-items: center; gap: 0.35em; font-size: var(--step--1); font-weight: 700; padding: 0.2rem 0.7rem; border-radius: var(--r-pill); background: var(--blue-50); color: var(--blue); }
.tag--clinical { background: var(--teal-50); color: var(--teal-700); }
.tag svg { width: 14px; height: 14px; }

/* ---------- service catalogue entries ---------- */
.svc-nav { display: flex; flex-wrap: wrap; gap: var(--s-2); list-style: none; padding: 0; margin: 0 0 var(--s-6); }
.svc-nav a { display: inline-block; padding: 0.45rem 0.95rem; border-radius: var(--r-pill); background: var(--white); border: 1px solid var(--line); text-decoration: none; font-weight: 600; font-size: var(--step--1); color: var(--ink); }
.svc-nav a:hover { border-color: var(--blue); color: var(--blue); }
.svc { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-6); margin-bottom: var(--s-5); scroll-margin-top: var(--s-5); }
.svc__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-3); }
.svc__head h3 { font-family: var(--font-display); font-size: var(--step-2); margin: 0; }
.svc__summary { font-size: var(--step-1); line-height: 1.5; color: var(--ink); max-width: 62ch; }
.svc__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: var(--s-5) var(--s-6); margin-top: var(--s-5); }
.svc__cols h4 { margin-bottom: var(--s-2); font-size: var(--step--1); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2); }
.svc__cols p { margin-bottom: 0; }
.svc__limits { background: var(--sand); border-radius: var(--r-md); padding: var(--s-4) var(--s-5); }
.svc__limits ul { margin-bottom: 0; }
.svc__foot { margin-top: var(--s-5); padding-top: var(--s-4); border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-5); justify-content: space-between; align-items: center; }

/* ---------- comparison (visiting vs live-in) ---------- */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-5); }
.compare__col { background: var(--white); border-radius: var(--r-lg); padding: var(--s-6); border: 1px solid var(--line); }
.compare__col h3 { font-family: var(--font-display); font-size: var(--step-2); }
.compare__col dl { margin: 0; }
.compare__col dt { font-weight: 700; margin-top: var(--s-4); }
.compare__col dd { margin: var(--s-1) 0 0; color: var(--ink-2); }
@media (max-width: 760px) { .compare { grid-template-columns: 1fr; } }

/* ---------- steps ---------- */
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; display: grid; gap: var(--s-4); }
.steps > li { counter-increment: step; display: grid; grid-template-columns: 3rem 1fr; gap: var(--s-4); align-items: start; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-5); }
.steps > li::before { content: counter(step); display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%; background: var(--blue); color: var(--white); font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; }
.steps h3 { margin-bottom: var(--s-2); }
.steps p { margin: 0; color: var(--ink-2); }
.steps--row { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.steps--row > li { grid-template-columns: 1fr; }

/* ---------- callouts ---------- */
.callout { background: var(--teal-50); border-radius: var(--r-md); padding: var(--s-5); margin: var(--s-5) 0; border-left: 6px solid var(--turquoise); }
.callout > :last-child { margin-bottom: 0; }
.callout--warn { background: var(--warn-bg); border-left-color: #E0A100; }
.callout h2, .callout h3 { font-size: var(--step-1); font-family: var(--font-body); margin-bottom: var(--s-2); }
.emergency { display: flex; gap: var(--s-3); align-items: flex-start; background: var(--white); border: 2px solid var(--err); border-radius: var(--r-md); padding: var(--s-4) var(--s-5); }
.emergency svg { width: 28px; height: 28px; color: var(--err); margin-top: 2px; }
.emergency p { margin: 0; }
.emergency strong { color: var(--err); }

/* ---------- CTA band ---------- */
.cta-band { background: var(--blue); color: var(--white); border-radius: var(--r-lg); padding: var(--s-7) var(--s-6); display: grid; grid-template-columns: 1fr auto; gap: var(--s-5); align-items: center; position: relative; overflow: hidden; }
.cta-band::after { content: ""; position: absolute; right: -60px; bottom: -120px; width: 260px; height: 260px; border-radius: 50%; border: 36px solid rgb(2 209 189 / 0.35); pointer-events: none; }
.cta-band h2 { color: var(--white); margin-bottom: var(--s-2); font-size: var(--step-3); }
.cta-band p { margin: 0; color: rgb(255 255 255 / 0.92); max-width: 56ch; }
.cta-band a:not(.btn) { color: var(--white); }
.cta-band .btn-row { position: relative; z-index: 1; }
@media (max-width: 760px) { .cta-band { grid-template-columns: 1fr; padding: var(--s-6) var(--s-5); } }

/* ---------- page layout with aside ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--s-7); align-items: start; }
.layout__aside { position: sticky; top: var(--s-5); display: grid; gap: var(--s-4); }
@media (max-width: 980px) { .layout { grid-template-columns: minmax(0, 1fr); } .layout__aside { position: static; } }
.layout > *, .grid > *, .compare > * { min-width: 0; }
.aside-box { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-5); }
.aside-box h2 { font-size: var(--step-1); font-family: var(--font-body); margin-bottom: var(--s-3); }
.aside-box > :last-child { margin-bottom: 0; }
.toc ol { list-style: none; padding: 0; margin: 0; }
.toc li { margin-bottom: var(--s-2); }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

/* ---------- article ---------- */
.byline { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); font-size: var(--step--1); color: var(--ink-2); margin-bottom: var(--s-5); }
.byline span { display: inline-flex; align-items: center; gap: var(--s-2); }
.byline svg { width: 16px; height: 16px; }
.refs { font-size: var(--step--1); color: var(--ink-2); }
.refs ol { padding-left: 1.25em; }
.refs a { word-break: break-word; }

/* ---------- FAQ (native details, no JS) ---------- */
.faq { display: grid; gap: var(--s-3); max-width: 860px; }
.faq details { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); }
.faq summary { cursor: pointer; list-style: none; padding: var(--s-4) var(--s-5); font-weight: 700; display: flex; justify-content: space-between; gap: var(--s-4); align-items: center; min-height: 48px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex-shrink: 0; width: 12px; height: 12px; border-right: 3px solid var(--blue); border-bottom: 3px solid var(--blue); transform: rotate(45deg); margin-top: -6px; transition: transform 0.15s ease; }
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: 6px; }
.faq details > div { padding: 0 var(--s-5) var(--s-4); }
.faq details > div > :last-child { margin-bottom: 0; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; margin: var(--s-5) 0; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--white); }
table { border-collapse: collapse; width: 100%; font-size: var(--step--1); min-width: 520px; }
th, td { text-align: left; vertical-align: top; padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--line); }
thead th { background: var(--sand); font-weight: 700; }
tbody th { font-weight: 700; }
tr:last-child > * { border-bottom: 0; }

/* ---------- forms ---------- */
.form { display: grid; gap: var(--s-5); max-width: 720px; }
.form fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.form legend, .form label.field__label { font-weight: 700; display: block; margin-bottom: var(--s-2); line-height: 1.35; }
.field__optional { font-weight: 400; color: var(--ink-2); }
.field__hint { color: var(--ink-2); font-size: var(--step--1); margin: calc(-1 * var(--s-1)) 0 var(--s-2); }
.field__error { color: var(--err); font-weight: 700; font-size: var(--step--1); margin: 0 0 var(--s-2); display: flex; gap: var(--s-2); align-items: flex-start; }
.field__error svg { width: 18px; height: 18px; margin-top: 2px; }
.field__error:empty { display: none; }
input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="search"], select, textarea {
  width: 100%; min-height: 52px; padding: 0.7rem 0.9rem; font: inherit; color: var(--ink);
  background: var(--white); border: 2px solid var(--line-strong); border-radius: var(--r-sm);
}
textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310203A' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.8rem center; background-size: 1.1rem; padding-right: 2.6rem; }
input:hover, select:hover, textarea:hover { border-color: var(--ink-2); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-color: var(--blue); }
[aria-invalid="true"] { border-color: var(--err) !important; background-color: var(--err-bg); }
.choices { display: grid; gap: var(--s-2); }
.choice { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-3) var(--s-4); background: var(--white); border: 2px solid var(--line); border-radius: var(--r-sm); cursor: pointer; min-height: 52px; }
.choice:hover { border-color: var(--line-strong); }
.choice:has(input:checked) { border-color: var(--blue); background: var(--blue-50); }
.choice input { width: 22px; height: 22px; margin: 0.15rem 0 0; accent-color: var(--blue); flex-shrink: 0; }
.choice--check { background: transparent; border: 0; padding: 0; min-height: 0; }
.choice--check:has(input:checked) { background: transparent; }
fieldset[aria-invalid="true"] .choice { border-color: var(--err); }
.counter { font-size: var(--step--1); color: var(--ink-2); text-align: right; margin-top: var(--s-1); }
.form__actions { display: flex; flex-wrap: wrap; gap: var(--s-4); align-items: center; }
.form__privacy { font-size: var(--step--1); color: var(--ink-2); }
.hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
[hidden] { display: none !important; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 3px solid rgb(255 255 255 / 0.4); border-top-color: var(--white); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.error-summary { border: 3px solid var(--err); border-radius: var(--r-md); padding: var(--s-4) var(--s-5); background: var(--white); }
.error-summary h2 { font-size: var(--step-1); font-family: var(--font-body); color: var(--err); margin-bottom: var(--s-2); }
.error-summary ul { margin: 0; padding-left: 1.25em; }
.error-summary a { color: var(--err); font-weight: 700; }
.status { border-radius: var(--r-md); padding: var(--s-4) var(--s-5); display: flex; gap: var(--s-3); align-items: flex-start; }
.status svg { width: 24px; height: 24px; flex-shrink: 0; margin-top: 2px; }
.status p { margin: 0; }
.status p + p { margin-top: var(--s-2); }
.status--ok { background: var(--ok-bg); color: var(--ok); border: 2px solid var(--ok); }
.status--err { background: var(--err-bg); color: var(--err); border: 2px solid var(--err); }
.status--warn { background: var(--warn-bg); color: var(--warn); border: 2px solid #E0A100; }
.status--info { background: var(--blue-50); color: var(--blue-800); border: 2px solid var(--blue); }
.status strong { display: block; }
.flash { display: none; }
.flash:target { display: flex; }
.reference { font-family: var(--font-display); font-size: var(--step-3); font-weight: 700; letter-spacing: 0.02em; color: var(--blue); }

/* ---------- confirmation ---------- */
.confirm-card { background: var(--white); border-radius: var(--r-lg); border: 1px solid var(--line); padding: var(--s-7) var(--s-6); max-width: 760px; }

/* ---------- sticky assessment action (mobile) ---------- */
.sticky-cta { display: none; }
@media (max-width: 760px) {
  .js .sticky-cta { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: var(--s-3) var(--s-4) calc(var(--s-3) + env(safe-area-inset-bottom)); background: rgb(251 248 243 / 0.97); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgb(16 32 58 / 0.08); transform: translateY(110%); transition: transform 0.2s ease; }
  .js .sticky-cta[data-show] { transform: translateY(0); }
  .js .sticky-cta .btn { width: 100%; }
  .js body.has-sticky { padding-bottom: 84px; }
}

/* ---------- footer ---------- */
.site-footer { background: var(--blue-900); color: rgb(255 255 255 / 0.9); margin-top: var(--s-8); padding-block: var(--s-8) var(--s-6); font-size: 1rem; }
.site-footer a { color: var(--white); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-top { display: grid; grid-template-columns: 1.2fr repeat(4, 1fr); gap: var(--s-6); }
.footer-top h2 { font-family: var(--font-body); font-size: 1rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--turquoise); margin-bottom: var(--s-3); }
.footer-top ul { list-style: none; padding: 0; margin: 0; }
.footer-top li { margin-bottom: var(--s-2); }
.footer-brand img { height: 48px; width: auto; display: block; margin-bottom: var(--s-4); background: var(--blue); border-radius: var(--r-sm); padding: 6px 10px; box-sizing: content-box; }
.footer-brand p { color: rgb(255 255 255 / 0.85); font-size: var(--step--1); }
.footer-emergency { margin-top: var(--s-7); padding: var(--s-4) var(--s-5); border: 1px solid rgb(255 255 255 / 0.3); border-radius: var(--r-md); display: flex; gap: var(--s-3); align-items: flex-start; }
.footer-emergency svg { width: 24px; height: 24px; color: var(--turquoise); flex-shrink: 0; margin-top: 2px; }
.footer-emergency p { margin: 0; }
.footer-bottom { margin-top: var(--s-6); padding-top: var(--s-5); border-top: 1px solid rgb(255 255 255 / 0.2); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-4); font-size: var(--step--1); }
.footer-bottom ul { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s-4); margin: 0; padding: 0; }
.footer-credit { margin: var(--s-4) 0 0; font-size: 0.875rem; color: rgb(255 255 255 / 0.78); text-align: center; }
.footer-credit a { text-decoration: underline; text-underline-offset: 2px; }
.site-footer mark.pending { color: var(--warn); }
@media (max-width: 980px) { .footer-top { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .footer-top { grid-template-columns: 1fr; } }

/* ---------- state gallery (staging only) ---------- */
.state-grid { display: grid; gap: var(--s-6); }
.state-grid > section { background: var(--white); border: 1px dashed var(--line-strong); border-radius: var(--r-lg); padding: var(--s-5); }
.state-grid h2 { font-size: var(--step-1); font-family: var(--font-body); }

/* ---------- motion & print ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .sticky-cta, .cta-band, .env-bar, .skip-link { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  a { color: #000; }
  .prose a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; }
}

/* Printable checklist squares (from Markdown task lists) */
.prose ul:has(> li > .box) { list-style: none; padding-left: 0; }
.box { display: inline-block; width: 1.05em; height: 1.05em; border: 2px solid var(--ink-2); border-radius: 4px; vertical-align: -0.15em; margin-right: 0.55em; background: var(--white); }

/* Utilities (CSP: style-src 'self' forbids inline style attributes) */
.sprite { display: none; }
.mt-2 { margin-top: var(--s-2); } .mt-4 { margin-top: var(--s-4); } .mt-5 { margin-top: var(--s-5); } .mt-6 { margin-top: var(--s-6); } .mt-7 { margin-top: var(--s-7); }
.maxw-760 { max-width: 760px; } .measure-60 { max-width: 60ch; }
.h-step-2 { font-size: var(--step-2); }
.h-small { font-size: var(--step-1); font-family: var(--font-body); }
.inline-icon { vertical-align: -4px; color: var(--teal-700); }
.stack-2 { display: grid; gap: var(--s-2); }
.commitment { color: var(--ink); font-size: var(--step-1); line-height: 1.45; }
.badge-icon { color: var(--blue); }
.svc__cols h4 + p + h4 { margin-top: var(--s-5); }

/* ---------- motion: subtle life (owner request 2026-10-01) ----------
   Only transform/opacity; nothing already on screen at load is ever hidden (LCP, CLS unaffected);
   all of it is skipped when the visitor asks for reduced motion. The homepage ambience (2D canvas in
   main.js) starts after the page loads, on wide screens only. */
.hero { position: relative; isolation: isolate; }
.hero > .wrap { position: relative; z-index: 1; }
.hero-ambient { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: 0; transition: opacity 1.6s ease; }
.hero-ambient.is-ready { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  /* the hero illustration draws itself, then the tea steams */
  .js .hero-svg .draw, .js .hero-svg .hero-window { stroke-dasharray: 1; stroke-dashoffset: 1; animation: sh-draw 1.1s cubic-bezier(.65,0,.35,1) forwards; }
  .js .hero-svg .hero-window { animation-delay: .15s; }
  .js .hero-svg .d2 { animation-delay: .35s; } .js .hero-svg .d3 { animation-delay: .55s; } .js .hero-svg .d4 { animation-delay: .75s; }
  .js .hero-svg .d5 { animation-delay: .9s; } .js .hero-svg .d6 { animation-delay: 1.05s; }
  .js .hero-svg .hero-dome { transform-origin: 240px 336px; animation: sh-rise .9s cubic-bezier(.2,.8,.2,1) both; }
  .hero-svg .hero-crescent { transform-box: fill-box; transform-origin: 0% 50%; animation: sh-rock 9s ease-in-out infinite alternate; }
  .hero-svg .steam { opacity: 0; animation: sh-steam 3.4s ease-in-out 1.6s infinite; }
  .hero-svg .s2 { animation-delay: 3.3s; }
  .hero__art { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .8s cubic-bezier(.2,.8,.2,1); }

  /* sections, cards and steps fade up as they come into view (class added by main.js) */
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.2,.8,.2,1), transform .7s cubic-bezier(.2,.8,.2,1); transition-delay: var(--reveal-delay, 0s); }
  .js .reveal.is-in { opacity: 1; transform: none; }
  .js .steps > li.reveal::before { transform: scale(.55); transition: transform .55s cubic-bezier(.34,1.56,.64,1) calc(var(--reveal-delay, 0s) + .15s); }
  .js .steps > li.reveal.is-in::before { transform: none; }

  /* small interactions */
  .card--link:hover { transform: translateY(-4px); }
  .tile svg { transition: transform .35s cubic-bezier(.34,1.56,.64,1); }
  .card--link:hover .tile svg, .card:hover .tile svg { transform: translateY(-2px) rotate(-8deg); }
  .btn { transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .12s ease; }
  .btn:active { transform: scale(.97); }
  .svc { transition: box-shadow .25s ease, border-color .25s ease; }
  .svc:target { border-color: var(--turquoise); box-shadow: 0 0 0 4px var(--teal-50); }
  .prose a, .faq a { transition: text-decoration-color .2s ease, color .2s ease; }
  .faq details[open] > div { animation: sh-fade .35s ease-out; }
  .cta-band::after { border-right-color: transparent; animation: sh-turn 48s linear infinite; }
  .page-hero__badge { animation: sh-float 7s ease-in-out infinite alternate; }
  .choice { transition: border-color .15s ease, background-color .15s ease; }
  .reference { animation: sh-pop .6s cubic-bezier(.34,1.56,.64,1) .2s both; }
}
@media (prefers-reduced-motion: no-preference) and (min-width: 1081px) {
  .js .nav-panel[data-open] { animation: sh-panel .18s ease-out; }
}
@keyframes sh-draw { to { stroke-dashoffset: 0; } }
@keyframes sh-rise { from { transform: scaleY(.9); opacity: 0; } }
@keyframes sh-rock { from { transform: rotate(-3deg); } to { transform: rotate(3deg); } }
@keyframes sh-steam { 0% { opacity: 0; transform: translateY(5px); } 35% { opacity: .95; } 100% { opacity: 0; transform: translateY(-10px); } }
@keyframes sh-turn { to { transform: rotate(360deg); } }
@keyframes sh-float { to { transform: translateY(-7px); } }
@keyframes sh-fade { from { opacity: 0; transform: translateY(-4px); } }
@keyframes sh-pop { from { opacity: 0; transform: scale(.9); } }
@keyframes sh-panel { from { opacity: 0; transform: translate(-50%, -6px); } }
@media print { .reveal { opacity: 1 !important; transform: none !important; } .hero-ambient { display: none; } }
