/* Draknar Webworks: shared base for every page ("One Build, One Day").
   Fonts, resets, type, buttons, header, footer, the dusk close band, the
   inner-page hero, long-form prose, tables and the contents rail. Page-only
   styles live next to each page (the home page keeps ../styles.css). */

@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/bricolage-grotesque-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/bricolage-grotesque-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 800; font-display: swap; src: url("fonts/bricolage-grotesque-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/source-sans-3-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/source-sans-3-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/source-sans-3-latin-700-normal.woff2") format("woff2"); }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: 5.5rem; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--font-body); font-size: var(--text-base); line-height: 1.55;
  font-feature-settings: "tnum" 1; overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; text-wrap: balance; }
h1 { font-size: var(--text-h1); font-weight: 700; line-height: 1.02; letter-spacing: -0.025em; }
h2 { font-size: var(--text-h2); font-weight: 700; line-height: 1.08; letter-spacing: -0.018em; }
h3 { font-size: var(--text-h3); font-weight: 600; line-height: 1.2; letter-spacing: -0.008em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: min(var(--wrap), 100% - 2.5rem); margin-inline: auto; }
#top-sentinel { position: absolute; top: 0; left: 0; width: 1px; height: 1px; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.band-ink :focus-visible, .site-foot :focus-visible, .where :focus-visible { outline-color: var(--focus-on-ink); }
.ask :focus-visible { outline-color: var(--focus); }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 100; padding: .6rem 1rem; background: var(--fg); color: var(--bg); border-radius: var(--radius-sm); font-weight: 600; }
.skip:focus { top: 1rem; }

.lead { font-size: var(--text-lg); line-height: 1.5; color: var(--muted); max-width: 60ch; text-wrap: pretty; }
.kicker { font-family: var(--font-display); font-weight: 600; font-size: var(--text-sm); letter-spacing: 0.02em; color: var(--muted); }
.small { font-size: var(--text-sm); color: var(--muted); }
.note { font-size: var(--text-sm); color: var(--muted); max-width: 70ch; margin-top: var(--space-6); }
.link { color: var(--fg); text-decoration: underline; text-underline-offset: .18em; text-decoration-thickness: 1px; text-decoration-color: var(--border-strong); transition: text-decoration-color var(--dur-fast); }
.link:hover { text-decoration-color: var(--fg); text-decoration-thickness: 2px; }
.link-ink { color: var(--on-ink); text-decoration: underline; text-underline-offset: .18em; text-decoration-color: var(--on-ink-muted); }
.link-ink:hover { text-decoration-thickness: 2px; text-decoration-color: var(--on-ink); }

.section { padding-block: clamp(4.5rem, 5vw + 2rem, 8rem); }
.section-alt { background: var(--surface-2); }
.section-head { max-width: 62rem; margin-bottom: var(--space-7); }
.section-head h2 { margin-bottom: var(--space-4); }

/* Dusk: the page ends on ink */
.band-ink { background: var(--ink); color: var(--on-ink); }
.band-ink-2 { background: var(--ink-2); }
.band-ink .lead, .band-ink .note, .band-ink .small { color: var(--on-ink-muted); }

/* ---------- Buttons (actions: 8px radius) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .8rem 1.4rem; border-radius: var(--radius-sm);
  font-family: var(--font-display); font-weight: 600; font-size: 1rem; letter-spacing: 0.01em;
  text-decoration: none; border: 1.5px solid transparent; cursor: pointer; white-space: nowrap;
  transition: transform var(--dur-fast) var(--ease-out), background-color var(--dur-fast), border-color var(--dur-fast), color var(--dur-fast), box-shadow var(--dur-fast);
}
.btn:active { transform: scale(0.97); }
.btn-lg { min-height: 56px; padding: 1rem 1.7rem; font-size: 1.0625rem; }
.btn-sm { min-height: 40px; padding: .5rem 1rem; font-size: .9375rem; }
.btn-primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); box-shadow: 0 1px 0 oklch(100% 0 0 / .18) inset, var(--shadow-1); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--fg); background: var(--surface); }
.btn-ghost-ink { background: transparent; color: var(--on-ink); border-color: var(--ink-border-strong); }
.btn-ghost-ink:hover { border-color: var(--on-ink); background: oklch(100% 0 0 / .06); }
#nav-cta.is-solid { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
#nav-cta.is-solid:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

/* ---------- Header ---------- */
.site-head { position: sticky; top: 0; z-index: 50; background: oklch(97.6% 0.009 84 / 0.86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid transparent; transition: border-color var(--dur); }
.site-head.is-scrolled { border-bottom-color: var(--border); }
.head-row { display: flex; align-items: center; gap: var(--space-5); min-height: 4.25rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; }
.brand-mark { width: 36px; height: 36px; border-radius: 50%; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.125rem; letter-spacing: -0.01em; }
.site-nav { margin-left: auto; }
.site-nav ul { display: flex; gap: .25rem; }
.site-nav a { display: inline-block; padding: .55rem .8rem; border-radius: var(--radius-sm); text-decoration: none; font-weight: 600; font-size: .9375rem; color: var(--fg); transition: background-color var(--dur-fast); }
.site-nav a:hover { background: var(--surface-2); }
.site-nav a[aria-current="page"] { background: var(--surface-2); }
.nav-m { display: none; }
.head-actions { display: flex; align-items: center; gap: .75rem; }
.head-phone { font-weight: 600; text-decoration: none; font-variant-numeric: tabular-nums; padding: .5rem .25rem; }
.menu-btn { display: none; order: 3; align-items: center; gap: .5rem; min-height: 44px; padding: .5rem .8rem; border: 1.5px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); font-weight: 600; cursor: pointer; }
.menu-bars { display: inline-flex; flex-direction: column; gap: 4px; width: 18px; }
.menu-bars i { display: block; height: 2px; background: currentColor; border-radius: 2px; transition: transform var(--dur) var(--ease-out); }
.menu-btn[aria-expanded="true"] .menu-bars i:first-child { transform: translateY(3px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-bars i:last-child { transform: translateY(-3px) rotate(-45deg); }

/* ---------- Inner-page hero: the same dawn, held still ---------- */
.page-hero { position: relative; isolation: isolate; overflow: hidden; padding-block: clamp(3.5rem, 6vw, 6rem) clamp(6rem, 12vw, 9rem); }
.page-hero::before { content: ""; position: absolute; inset: 0; z-index: -2; background:
    radial-gradient(70% 45% at 78% 100%, oklch(94% 0.09 78 / .7), transparent 70%),
    linear-gradient(180deg, var(--sky-zenith) 0%, var(--sky-mid) 60%, var(--sky-horizon) 100%); }
.page-hero .ridge { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: clamp(60px, 9vw, 130px); z-index: -1; pointer-events: none; }
.page-hero .ridge-far { fill: var(--ridge-far); }
.page-hero .ridge-near { fill: var(--ridge-near); }
.page-hero h1 { font-size: clamp(2.2rem, 1.3rem + 3.6vw, 4rem); max-width: 22ch; margin-bottom: var(--space-5); }
.page-hero .lead { color: var(--fg); opacity: .86; max-width: 62ch; font-size: clamp(1.125rem, 1rem + .5vw, 1.35rem); }
.page-hero .kicker { margin-bottom: var(--space-4); }

/* ---------- Long-form prose ---------- */
.prose { max-width: 65ch; font-size: 1.125rem; line-height: 1.6; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem); margin-top: 2.2em; padding-top: 1.1em; border-top: 1px solid var(--border); scroll-margin-top: 6rem; }
.prose h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.prose h2 + * { margin-top: .8em; }
.prose a { color: var(--fg); text-decoration: underline; text-underline-offset: .18em; text-decoration-thickness: 1px; text-decoration-color: var(--border-strong); }
.prose a:hover { text-decoration-color: var(--fg); text-decoration-thickness: 2px; }
.prose ul, .prose ol { display: flex; flex-direction: column; gap: .55em; padding-left: 1.4em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li::marker { color: var(--muted); }
.prose strong { font-weight: 700; }
.band-ink .prose { color: var(--on-ink); }
.band-ink .prose h2 { border-top-color: var(--ink-border); }
.band-ink .prose a { color: var(--on-ink); text-decoration-color: var(--on-ink-muted); }
.band-ink .prose a:hover { text-decoration-color: var(--on-ink); }
.band-ink .prose li::marker { color: var(--on-ink-muted); }

/* A pull-out: a list lifted onto its own surface (no coloured edge, no radius on the edge) */
.callout { list-style: none !important; padding: var(--space-5) var(--space-6) !important; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); gap: .8em !important; }
.section-alt .callout { background: var(--bg); }
.callout li { position: relative; padding-left: 1.5rem; }
.callout li::before { content: ""; position: absolute; left: 0; top: .62em; width: .55rem; height: .55rem; border-radius: 50%; background: var(--accent); }
.band-ink .callout { background: var(--ink-2); border-color: var(--ink-border); }

/* ---------- Tables ---------- */
.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.compare { width: 100%; min-width: 640px; border-collapse: collapse; font-size: var(--text-sm); }
.compare caption { text-align: left; }
.compare th, .compare td { padding: .9rem 1rem; text-align: left; vertical-align: top; border-top: 1px solid var(--border); }
.compare thead th, .compare tr:first-child th { border-top: 0; font-family: var(--font-display); font-weight: 600; color: var(--muted); }
.compare tbody th, .compare tr:not(:first-child) th { font-weight: 700; }
.compare .us { background: var(--accent-soft); }
.compare thead .us, .compare tr:first-child .us { color: var(--fg); }
.compare tbody th[scope="row"] { white-space: normal; }
/* Yes / No matrix cells keep their words and gain a mark */
.matrix td { font-weight: 700; white-space: nowrap; }
.matrix td.yes::before, .matrix td.no::before { content: ""; display: inline-block; vertical-align: middle; margin-right: .5rem; }
.matrix td.yes { color: var(--ok); }
.matrix td.yes::before { width: .7rem; height: .4rem; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-.15rem) rotate(-45deg); }
.matrix td.no { color: var(--muted); font-weight: 400; }
.matrix td.no::before { width: .6rem; height: .6rem; background: linear-gradient(45deg, transparent 44%, currentColor 44% 56%, transparent 56%), linear-gradient(-45deg, transparent 44%, currentColor 44% 56%, transparent 56%); opacity: .7; }
.pull { margin: var(--space-6) 0 0; padding: var(--space-5) var(--space-6); border-left: 3px solid var(--accent); }
.pull p { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 600; line-height: 1.3; max-width: 40ch; }
.pull footer { margin-top: .5rem; color: var(--muted); font-size: var(--text-sm); }

/* ---------- Contents rail (guides) ---------- */
.with-toc { display: grid; grid-template-columns: minmax(200px, 16rem) minmax(0, 1fr); gap: var(--space-8); align-items: start; }
.toc { position: sticky; top: 6rem; }
.toc-h { font-family: var(--font-display); font-weight: 600; font-size: var(--text-sm); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: var(--space-3); }
.toc ol { display: flex; flex-direction: column; border-left: 1px solid var(--border); }
.toc a { display: block; padding: .45rem 0 .45rem 1rem; margin-left: -1px; border-left: 2px solid transparent; font-size: var(--text-sm); line-height: 1.35; color: var(--muted); text-decoration: none; transition: color var(--dur-fast), border-color var(--dur-fast); }
.toc a:hover { color: var(--fg); }
.toc a.is-current { color: var(--fg); border-left-color: var(--accent); font-weight: 600; }

/* ---------- Related guides ---------- */
.related { margin-top: var(--space-7); padding: var(--space-5) var(--space-6); border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); font-size: var(--text-base); }
.related a { font-family: var(--font-display); font-weight: 600; }

/* ---------- Close band (the day ends at dusk) ---------- */
.ready { padding-block: clamp(5rem, 8vw, 9rem); text-align: center; }
.ready-inner { display: flex; flex-direction: column; align-items: center; gap: var(--space-5); }
.ready h2 { font-size: clamp(2.4rem, 1.5rem + 4vw, 4.5rem); }
.ready .lead { text-align: center; }
.ready-actions { display: flex; flex-direction: column; align-items: center; gap: var(--space-4); }
.ready-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-3); }
.ready-call { color: var(--on-ink-muted); }

/* ---------- Footer ---------- */
.site-foot { background: var(--ink); color: var(--on-ink-muted); padding-block: var(--space-8) var(--space-7); border-top: 1px solid var(--ink-border); }
.foot-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: var(--space-7); }
.foot-brand img { width: 96px; height: 96px; border-radius: var(--radius-md); margin-bottom: var(--space-4); }
.foot-brand p { color: var(--on-ink); }
.foot-links { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; margin-top: var(--space-4); }
.foot-h { font-family: var(--font-display); font-weight: 600; color: var(--on-ink); margin-bottom: var(--space-3); }
.foot-services ul { columns: 2; column-gap: var(--space-5); }
.site-foot a { color: inherit; text-decoration: none; display: inline-block; padding: .2rem 0; }
.site-foot a:hover { color: var(--on-ink); text-decoration: underline; text-underline-offset: .18em; }

/* ---------- Responsive (shared) ---------- */
@media (max-width: 1024px) {
  .foot-grid { grid-template-columns: 1fr; }
  .with-toc { grid-template-columns: 1fr; gap: var(--space-6); }
  .toc { position: static; }
  .toc ol { border-left: 0; flex-direction: row; flex-wrap: wrap; gap: .25rem .5rem; }
  .toc a { padding: .4rem .8rem; margin: 0; border: 1px solid var(--border); border-radius: var(--radius-pill); }
  .toc a.is-current { border-color: var(--fg); }
}
@media (max-width: 900px) {
  .site-nav { position: fixed; inset: 4.25rem 0 auto 0; margin: 0; padding: var(--space-4) var(--space-5) var(--space-6); background: var(--bg); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-2); transform: translateY(-8px); opacity: 0; visibility: hidden; transition: transform var(--dur) var(--ease-out), opacity var(--dur), visibility 0s linear var(--dur); }
  .site-nav.is-open { transform: none; opacity: 1; visibility: visible; transition-delay: 0s; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav a { display: block; padding: .9rem .5rem; font-size: 1.1rem; border-bottom: 1px solid var(--border); border-radius: 0; }
  .head-actions { order: 2; margin-left: auto; }
  .head-phone { display: none; }
  .nav-m { display: block; }
  .menu-btn { display: inline-flex; }
}
@media (max-width: 600px) {
  .wrap { width: min(var(--wrap), 100% - 2rem); }
  .head-row { gap: var(--space-3); }
  .brand-name { font-size: 1rem; }
  #nav-cta { display: none; }
  .prose { font-size: 1.0625rem; }
  .compare { min-width: 560px; }
  .ready-btns .btn { width: 100%; }
  .foot-services ul { columns: 1; }
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- Print (legal pages and long reads) ---------- */
@media print {
  .site-head, .site-foot, .skip, .toc, .ready, .menu-btn, #top-sentinel { display: none !important; }
  .page-hero { padding: 0 0 1.5rem; }
  .page-hero::before, .page-hero .ridge { display: none; }
  .page-hero h1 { font-size: 22pt; }
  .with-toc { display: block; }
  .prose { max-width: none; font-size: 11pt; line-height: 1.45; color: #000; }
  .prose h2 { break-after: avoid; page-break-after: avoid; font-size: 14pt; }
  .prose p, .prose li { orphans: 3; widows: 3; }
  .prose a { color: #000; text-decoration: underline; }
  .prose a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; }
  .callout, .related, .table-scroll { border: 1px solid #000; background: none; box-shadow: none; }
  body { background: #fff; color: #000; }
}
