/*
 * Site kit — base styles. Colours come from app/config/site.php as CSS variables (--brand, --accent, --paper, --ink),
 * printed by every layout, so a new site rarely needs to edit this file. Add site-specific styles in
 * assets/css/features/*.css (loaded after this file on every page, sorted by name).
 */
:root {
  --brand: #0B1F3B; --accent: #0A5BD0; --paper: #FAF8F4; --ink: #141A23;
  --muted: color-mix(in srgb, var(--ink) 62%, var(--paper));
  --line: color-mix(in srgb, var(--ink) 12%, var(--paper));
  --card: color-mix(in srgb, #fff 70%, var(--paper));
  --ok: #1a7f4b; --warn: #a15c00; --err: #b42318;
  --radius: 14px; --wrap: 1120px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Noto Sans", "Noto Sans Devanagari", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 400 17px/1.6 var(--font); color: var(--ink); background: var(--paper); text-rendering: optimizeLegibility; }
img, svg { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { color: var(--brand); line-height: 1.2; letter-spacing: -0.015em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); font-weight: 750; }
h2, .h2 { font-size: clamp(1.45rem, 2.6vw, 1.9rem); font-weight: 700; }
h3, .h3 { font-size: 1.2rem; font-weight: 650; }
.h4 { font-size: 1.02rem; font-weight: 650; }
p { margin: 0 0 1em; }
code { font: .9em ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--line); padding: .1em .35em; border-radius: 6px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.sr, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--brand); color: #fff; padding: .6rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.narrow { max-width: 760px; }
.lede { font-size: 1.18rem; color: var(--muted); max-width: 62ch; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 650; color: var(--accent); margin-bottom: .8rem; }
.mt { margin-top: 1rem; }
.spacer { flex: 1; }

/* Header */
.head { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.head__bar { display: flex; align-items: center; gap: 1.25rem; min-height: 68px; }
.logo { display: inline-flex; align-items: center; gap: .6rem; color: var(--brand); font-weight: 750; font-size: 1.12rem; text-decoration: none; margin-right: auto; }
.nav { display: flex; align-items: center; gap: 1.4rem; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 520; }
.nav a[aria-current="page"] { color: var(--accent); }
.nav a.btn { color: #fff; }
.menu { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; font-size: 1.3rem; padding: .25rem .7rem; color: var(--brand); cursor: pointer; }
@media (max-width: 820px) {
  .menu { display: inline-block; }
  .nav { display: none; position: absolute; inset: 68px 0 auto; flex-direction: column; align-items: stretch; gap: 0; background: var(--paper); border-bottom: 1px solid var(--line); padding: .5rem 1.25rem 1.25rem; }
  .nav.is-open { display: flex; }
  .nav a { padding: .8rem 0; border-bottom: 1px solid var(--line); }
  .nav__cta { margin-top: .8rem; text-align: center; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 44px; padding: .6rem 1.25rem; border-radius: 999px; border: 1px solid transparent;
  font: 600 1rem/1.2 var(--font); text-decoration: none; cursor: pointer; background: var(--line); color: var(--ink); transition: transform .15s ease, background .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: color-mix(in srgb, var(--accent) 86%, #000); }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--brand); }
.btn--light { background: #fff; color: var(--brand); }
.btn--sm { min-height: 36px; padding: .35rem .9rem; font-size: .9rem; }

/* Hero */
.hero { padding-block: clamp(3.5rem, 10vw, 7rem) clamp(2.5rem, 6vw, 4rem); background:
  radial-gradient(60rem 30rem at 85% -10%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%),
  radial-gradient(40rem 24rem at -10% 110%, color-mix(in srgb, var(--brand) 10%, transparent), transparent 70%); }
.hero h1 { max-width: 18ch; }
.hero__cta { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.6rem; }

/* Cards and grids */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.1rem, 2.5vw, 1.6rem); margin-bottom: 1.25rem; }
.grid2, .grid3 { display: grid; gap: 1.25rem; }
.grid2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid2 > .card, .grid3 > .card { margin-bottom: 0; }
.post-card h2 a { color: var(--brand); text-decoration: none; }
.post-card h2 a:hover { color: var(--accent); }
.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { padding-left: 1.5rem; position: relative; margin: .3rem 0; }
.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.steps { padding-left: 1.2rem; } .steps li { margin: .6rem 0; }
.tags a { margin-right: .5rem; }

/* Prose (blog posts, legal pages) */
.prose { font-size: 1.06rem; } .prose h2 { margin-top: 2rem; } .prose ul, .prose ol { padding-left: 1.3rem; } .prose li { margin: .35rem 0; }

/* CTA band */
.band { background: var(--brand); color: #fff; }
.band__in { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; flex-wrap: wrap; padding-block: 2.5rem; }
.band h2 { color: #fff; margin: 0; }

/* Forms */
.stack > * + * { margin-top: .9rem; }
.field { display: grid; gap: .35rem; margin-bottom: .9rem; }
.field label, .check-label { font-weight: 600; font-size: .95rem; }
input, select, textarea { width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1px solid color-mix(in srgb, var(--ink) 20%, var(--paper)); border-radius: 10px; padding: .65rem .8rem; min-height: 44px; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: 3px solid color-mix(in srgb, var(--accent) 22%, transparent); }
[aria-invalid="true"] { border-color: var(--err); }
.field__err { color: var(--err); font-size: .88rem; margin: 0; }
.row2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 1rem; }
.check-label { display: flex; gap: .5rem; align-items: center; } .check-label input { width: auto; min-height: 0; }
.inline { display: inline-flex; gap: .4rem; align-items: center; flex-wrap: wrap; } .inline input, .inline select { width: auto; }

/* Flash messages */
.flash { border-radius: 10px; padding: .75rem 1rem; margin: 1rem 0; border: 1px solid; }
.flash--ok { background: color-mix(in srgb, var(--ok) 9%, #fff); border-color: color-mix(in srgb, var(--ok) 30%, #fff); color: var(--ok); }
.flash--warn { background: color-mix(in srgb, var(--warn) 9%, #fff); border-color: color-mix(in srgb, var(--warn) 30%, #fff); color: var(--warn); }
.flash--err { background: color-mix(in srgb, var(--err) 8%, #fff); border-color: color-mix(in srgb, var(--err) 30%, #fff); color: var(--err); }
ul.flash { padding-left: 2rem; }

/* Footer */
.foot { border-top: 1px solid var(--line); margin-top: 2rem; padding-top: 2.5rem; font-size: .95rem; }
.foot__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; }
.foot__grid nav, .foot__grid > div:last-child { display: grid; gap: .35rem; align-content: start; }
.foot a { color: var(--ink); text-decoration: none; } .foot a:hover { color: var(--accent); }
.foot__name { font-weight: 750; color: var(--brand); margin-bottom: .3rem; }
.foot__legal { display: flex; flex-wrap: wrap; gap: 1.2rem; align-items: center; border-top: 1px solid var(--line); margin-top: 2rem; padding-block: 1.2rem 2rem; color: var(--muted); font-size: .88rem; }
.switch { display: inline-flex; align-items: center; gap: .5rem; background: none; border: 0; font: inherit; color: inherit; cursor: pointer; padding: 0; }
.switch::before { content: ""; width: 34px; height: 20px; border-radius: 999px; background: var(--line); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 18%, transparent);
  transition: background .2s; background-image: radial-gradient(circle at 10px 50%, #fff 7px, transparent 7.5px); }
.switch[aria-checked="true"]::before { background-color: var(--accent); background-image: radial-gradient(circle at 24px 50%, #fff 7px, transparent 7.5px); }

.error-page main { min-height: 70vh; display: grid; align-content: center; }

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