/* Inner-page components for the full site. Built on site.css tokens (--navy, --em, --ink, --muted,
   --paper, --line-l, --ink-d, --muted-d) so every page follows the Look and Accent switches.
   Usage notes live in _src/COMPONENTS.md. */

/* ---------- nav: full-site menu ---------- */
.nav-links > a[aria-current="page"], .nav-dd > button.is-current { opacity: 1; }
.nav-links > a[aria-current="page"]::after, .nav-dd > button.is-current::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 2px; border-radius: 1px; background: var(--em); }
.nav-links > a, .nav-dd > button { position: relative; }
.dd-panel.dd-wide { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; min-width: 760px; padding: 12px; }
.dd-panel.dd-wide[hidden] { display: none; }
.dd-col { display: grid; align-content: start; gap: 2px; }
.dd-h { margin: 6px 12px 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.dd-panel a span { font-weight: 600; }
.dd-panel a small { display: block; font-size: 13px; color: var(--muted); font-weight: 400; }
.dd-panel a.stack { display: block; }

/* ---------- page hero ---------- */
.page-hero { position: relative; padding: clamp(130px, 13vw, 170px) 0 clamp(72px, 8vw, 104px); overflow: hidden; }
.page-hero::before { content: ""; position: absolute; inset: -30% -10% auto auto; width: 60vw; height: 60vw; border-radius: 50%; background: radial-gradient(closest-side, rgba(47,191,138,.14), transparent); pointer-events: none; }
.page-hero .wrap { position: relative; }
.page-hero h1 { font-size: clamp(38px, 5vw, 72px); font-weight: 800; letter-spacing: -.02em; line-height: 1; max-width: 18ch; }
.page-hero .lede { font-size: clamp(18px, 1.45vw, 21px); color: var(--muted-d); max-width: 58ch; margin: 24px 0 0; }
.light.page-hero .lede, .page-hero.light .lede { color: var(--muted); }
.page-hero .actions { margin-top: 30px; }
.page-hero .hl { color: var(--em); }
.hero-split { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 4vw, 64px); align-items: center; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 22px; font-size: 14px; color: var(--muted-d); }
.crumbs a { color: inherit; text-decoration: none; } .crumbs a:hover { color: var(--ink-d); }

/* ---------- question / topic chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; padding: 0; list-style: none; }
.chips li, .chips a { padding: 9px 15px; border-radius: 999px; font-size: 15px; font-weight: 500; text-decoration: none; background: rgba(127,147,168,.12); color: inherit; }
.light .chips li, .light .chips a { background: #fff; box-shadow: 0 0 0 1px var(--line-l); }
.chips a { transition: background-color 160ms ease; }
@media (hover: hover) and (pointer: fine) { .chips a:hover { background: rgba(47,191,138,.18); } }

/* ---------- cards ---------- */
.grid-2, .grid-3, .grid-4 { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { display: flex; flex-direction: column; gap: 10px; padding: clamp(22px, 2.4vw, 30px); border-radius: 24px; background: #fff; box-shadow: 0 0 0 1px var(--line-l); color: var(--ink); }
.light.alt .card, .card.tint { background: var(--paper); box-shadow: none; }
.dark .card { background: var(--navy-2); box-shadow: 0 0 0 1px rgba(127,147,168,.16); color: var(--ink-d); }
.card h3 { font-size: 21px; letter-spacing: -.02em; line-height: 1.2; }
.card p { margin: 0; color: var(--muted); font-size: 16px; }
.dark .card p { color: var(--muted-d); }
.card .k { font-size: 14px; font-weight: 600; color: var(--em-d); }
.dark .card .k { color: #8EF0C9; }
.card .k.neg { color: #B23431; } .dark .card .k.neg { color: #F08A87; }
.card .art { margin: 0 0 6px; }
.card .art svg { width: 100%; height: auto; display: block; }
.card .more { margin-top: auto; padding-top: 8px; font-weight: 600; color: var(--em-d); text-underline-offset: 4px; }
.dark .card .more { color: #8EF0C9; }
.card.feature { background: var(--navy); color: var(--ink-d); box-shadow: none; }
.card.feature p { color: var(--muted-d); } .card.feature .k { color: #8EF0C9; }
.card.accent { box-shadow: 0 0 0 2px var(--em); }

/* ---------- callout band ---------- */
.callout { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; margin-top: 28px; padding: clamp(22px, 2.6vw, 32px); border-radius: 24px; background: var(--navy); color: var(--ink-d); }
.callout h3 { font-size: clamp(22px, 2vw, 28px); }
.callout p { margin: 8px 0 0; color: var(--muted-d); max-width: 62ch; }

/* ---------- split, lists, notes ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
.split.center { align-items: center; }
.checks { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 12px; }
.checks li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; }
.checks li::before { content: ""; width: 12px; height: 7px; margin-top: .5em; border-left: 2px solid var(--em); border-bottom: 2px solid var(--em); transform: rotate(-45deg); }
.note { font-size: 14px; color: var(--muted); margin: 14px 0 0; }
.dark .note { color: var(--muted-d); }
.stat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.stat { display: grid; gap: 6px; padding-top: 16px; border-top: 2px solid var(--ink); }
.dark .stat { border-top-color: var(--ink-d); }
.stat b { font-size: clamp(32px, 3.4vw, 48px); font-weight: 800; letter-spacing: -.026em; line-height: 1; }
.stat span { color: var(--muted); font-size: 15px; } .dark .stat span { color: var(--muted-d); }

/* ---------- prose (legal, blog, long copy) ---------- */
.prose { max-width: 72ch; font-size: 18px; line-height: 1.7; color: #24364A; }
.prose h2 { font-size: clamp(26px, 2.4vw, 34px); margin: 2em 0 .6em; line-height: 1.15; color: var(--ink); }
.prose h3 { font-size: 21px; margin: 1.6em 0 .5em; color: var(--ink); }
.prose p { margin: 0 0 1.1em; }
.prose ul, .prose ol { margin: 0 0 1.2em; padding-left: 1.3em; }
.prose li { margin: .35em 0; }
.prose a { color: var(--em-d); text-underline-offset: 3px; }
.prose blockquote { margin: 1.4em 0; padding: 18px 22px; border-radius: 16px; background: var(--paper); color: var(--ink); font-size: 19px; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 15.5px; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line-l); vertical-align: top; }
.prose th { font-weight: 600; color: var(--ink); background: var(--paper); }
.prose img { border-radius: 16px; margin: 1.2em 0; }
.prose code { font: inherit; background: var(--paper); padding: 1px 6px; border-radius: 6px; }
.prose hr { border: 0; height: 1px; background: var(--line-l); margin: 2.4em 0; }
.toc { position: sticky; top: 96px; display: grid; gap: 4px; font-size: 14.5px; }
.toc a { color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 8px; }
.toc a:hover { background: var(--paper); color: var(--ink); }
.doc { display: grid; grid-template-columns: 240px 1fr; gap: 56px; align-items: start; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border-radius: 20px; box-shadow: 0 0 0 1px var(--line-l); background: #fff; }
table.data { width: 100%; border-collapse: collapse; font-size: 15.5px; min-width: 640px; }
table.data th, table.data td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line-l); vertical-align: top; }
table.data thead th { background: var(--paper); font-weight: 600; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data td.yes { color: var(--em-d); font-weight: 600; } table.data td.no { color: var(--muted); }

/* ---------- forms ---------- */
.form { display: grid; gap: 16px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.form input, .form select, .form textarea { font: inherit; font-size: 16px; font-weight: 400; color: var(--ink); padding: 12px 14px; min-height: 48px; border-radius: 12px; border: 1.5px solid var(--line-l); background: #fff; transition: border-color 160ms ease; }
.form textarea { min-height: 120px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--em-f); }
.form .hint { font-size: 13px; color: var(--muted); font-weight: 400; }
.dark .form label { color: var(--ink-d); }

/* ---------- blog ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.post-card { display: flex; flex-direction: column; border-radius: 22px; overflow: hidden; background: #fff; box-shadow: 0 0 0 1px var(--line-l); color: var(--ink); text-decoration: none; transition: transform 300ms var(--ease-out), box-shadow 300ms ease; }
@media (hover: hover) and (pointer: fine) { .post-card:hover { transform: translateY(-4px); box-shadow: 0 0 0 1px var(--line-l), 0 30px 50px -30px rgba(13,27,42,.35); } }
.post-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--paper); }
.post-card .pc-body { display: grid; gap: 8px; padding: 20px 22px 24px; }
.post-card .meta, .post-meta { font-size: 14px; color: var(--muted); }
.post-card h2 { font-size: 21px; line-height: 1.2; letter-spacing: -.02em; }
.post-card p { margin: 0; color: var(--muted); font-size: 15.5px; }
.post-card.lead { grid-column: 1 / -1; display: grid; grid-template-columns: 1.2fr 1fr; }
.post-card.lead img { height: 100%; aspect-ratio: auto; }
.post-card.lead h2 { font-size: clamp(26px, 2.6vw, 36px); }
.post-cover { width: 100%; max-width: 980px; border-radius: 24px; margin: 40px auto 0; display: block; }
.post-head { max-width: 860px; }
.post-head h1 { max-width: 22ch; }

/* ---------- inner-page spacing helpers ---------- */
.sec.tight { padding: clamp(64px, 7vw, 96px) 0; }
.sec + .sec.flush { padding-top: 0; }
.mt-0 { margin-top: 0; } .mt-l { margin-top: clamp(40px, 5vw, 64px); }
.center-text { text-align: center; } .center-text .lede, .center-text p { margin-left: auto; margin-right: auto; }


/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .dd-panel.dd-wide { min-width: 0; grid-template-columns: 1fr; }
  .hero-split, .split, .doc { grid-template-columns: 1fr; }
  .grid-3, .grid-4, .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post-card.lead { grid-template-columns: 1fr; }
  .toc { display: none; }
}
@media (max-width: 760px) {
  .grid-2, .grid-3, .grid-4, .post-grid, .form .row { grid-template-columns: 1fr; }
  .page-hero { padding-top: 112px; }
  .prose { font-size: 17px; }
}

/* ---------- footer (full site) ---------- */
.foot-cols { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 32px; }
.foot-cols p { margin: 0 0 10px; }
.foot-note { color: var(--muted-d); font-size: 14.5px; max-width: 40ch; }
.foot .fh { color: var(--ink-d); font-weight: 600; margin: 0 0 12px; }
.foot-cols nav a { display: block; color: var(--muted-d); text-decoration: none; font-size: 15px; padding: 4px 0; transition: color 160ms ease; }
.foot-cols nav a:hover { color: var(--ink-d); }
@media (max-width: 1080px) { .foot-cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .foot-cols { grid-template-columns: 1fr; } }

/* ---------- reveal (inner pages) ---------- */
.pre { opacity: 0; transform: translateY(18px); }
.pre.in { opacity: 1; transform: none; transition: opacity .5s ease-out, transform .6s cubic-bezier(0.23, 1, 0.32, 1); }
@media (prefers-reduced-motion: reduce) { .pre { opacity: 1; transform: none; } }

/* ---------- fixes: footer columns, SVG text, post spacing ---------- */
.foot-cols nav { display: block; max-width: none; }
svg text { stroke: none; }
.post-cover { margin-top: 0; }
.post-cover + .prose { margin-top: 40px !important; }

.doc > .prose { min-width: 0; }

/* blog post layout */
.post-body { margin: 48px auto 0; }
.post-body:not(.prose) { max-width: 760px; }
.post-meta-foot { max-width: 72ch; margin: 32px auto 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; }
.post-wide { max-width: 980px; margin: 56px auto 0; }
.post-wide.post-more { margin-top: 18px; }

/* enquiry form states (page.js) */
.form [hidden] { display: none !important; }
.form .form-error { margin: 4px 0 0; color: #B3261E; font-size: 14.5px; font-weight: 500; }
.form .form-error a { color: inherit; }
.form .form-success { margin: 0; padding: 18px 20px; border-radius: 16px; background: var(--mint); color: var(--em-d); font-weight: 600; line-height: 1.5; }
.form .form-success:focus { outline: none; }

/* whole-card links (post navigation, 404) */
a.card { color: inherit; text-decoration: none; transition: transform 300ms var(--ease-out), box-shadow 200ms ease; }
a.card .more { color: var(--em-d); font-weight: 600; }
@media (hover: hover) and (pointer: fine) { a.card:hover { transform: translateY(-3px); } a.card:hover .more { text-decoration: underline; text-underline-offset: 3px; } }
a.card:focus-visible { outline: 2px solid var(--em-f); outline-offset: 3px; }
