/*
 * coe.apphero.tech, in the new apphero design (reference: apphero-tech, branch next-site, src/next/next.css).
 * Light, warm, editorial: cream ground, ink text, cyan as the single accent, navy for depth.
 * Source Serif 4 (SIL OFL 1.1, fonts/OFL.txt) for display, Inter for body.
 */
@font-face {
  font-family: "Source Serif 4"; font-style: normal; font-display: swap; font-weight: 200 900;
  src: url(/fonts/source-serif-4-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: "Source Serif 4"; font-style: normal; font-display: swap; font-weight: 200 900;
  src: url(/fonts/source-serif-4-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+0304, U+0308, U+0329, 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: "Source Serif 4"; font-style: italic; font-display: swap; font-weight: 200 900;
  src: url(/fonts/source-serif-4-latin-wght-italic.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;
}

:root {
  --nx-ground: #f6f3ec; --nx-paper: #fcfaf6; --nx-sand: #ede8de; --nx-line: #e1dbcf;
  --nx-ink: #17151c; --nx-ink-soft: #3b3842; --nx-muted: #6c675f;
  --nx-cyan: #01cafd; --nx-cyan-soft: rgba(1, 202, 253, 0.12); --nx-navy: #10004b;
  --nx-on-navy: #f4f1ea; --nx-on-navy-soft: #d9d4e8; --nx-on-navy-muted: #b9b3cf;
  --nx-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --nx-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh; background: var(--nx-ground); color: var(--nx-ink); font-family: var(--nx-sans);
  font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  line-height: 1.6;
}
::selection { background: var(--nx-cyan-soft); color: var(--nx-ink); }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--nx-cyan); outline-offset: 3px; }
ul, ol { list-style: none; }
[id] { scroll-margin-top: 96px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 60; background: var(--nx-ink); color: var(--nx-paper); padding: 8px 16px; border-radius: 999px; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 32px; }

/* Type */
.serif { font-family: var(--nx-serif); font-optical-sizing: auto; letter-spacing: -0.012em; }
.display { font-family: var(--nx-serif); font-weight: 400; line-height: 1.06; letter-spacing: -0.022em; font-size: clamp(2.5rem, 5.6vw, 4.75rem); text-wrap: balance; }
.h2 { font-family: var(--nx-serif); font-weight: 400; line-height: 1.12; letter-spacing: -0.016em; font-size: clamp(1.75rem, 3.2vw, 2.6rem); text-wrap: balance; }
.h3 { font-family: var(--nx-serif); font-weight: 500; line-height: 1.25; font-size: 1.3rem; }
.lead { font-size: clamp(1.1rem, 1.5vw, 1.3rem); line-height: 1.6; color: var(--nx-ink-soft); text-wrap: pretty; }
.body { font-size: 1rem; line-height: 1.7; color: var(--nx-ink-soft); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 0.5rem; height: 48px; padding: 0 24px; border-radius: 999px; font-size: 0.95rem; font-weight: 500; white-space: nowrap; transition: background-color .2s, border-color .2s; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-ink { background: var(--nx-ink); color: var(--nx-paper); }
.btn-ink:hover { background: var(--nx-navy); }
.btn-line { border: 1px solid rgba(23, 21, 28, 0.2); color: var(--nx-ink); }
.btn-line:hover { border-color: rgba(23, 21, 28, 0.5); background: var(--nx-paper); }
.btn-cyan { background: var(--nx-cyan); color: var(--nx-ink); }
.btn-cyan:hover { background: #5fdcfd; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 45; background: var(--nx-ground); border-bottom: 1px solid transparent; transition: border-color .3s, background-color .3s; }
.site-header.scrolled { border-bottom-color: var(--nx-line); background: rgba(246, 243, 236, 0.9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.site-header.open { background: var(--nx-ground); backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom-color: var(--nx-line); }
.site-header .bar { max-width: 1200px; margin: 0 auto; height: 72px; padding: 0 32px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand .mark { width: 28px; height: 28px; }
.brand .type { height: 19px; width: auto; }
.mainnav { display: flex; align-items: center; gap: 4px; }
.mainnav a { padding: 8px 14px; border-radius: 999px; font-size: 0.92rem; color: var(--nx-ink-soft); transition: color .2s; position: relative; }
.mainnav a:hover { color: var(--nx-ink); }
.mainnav a.on { color: var(--nx-ink); }
.mainnav a.on::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: -2px; height: 2px; border-radius: 999px; background: var(--nx-cyan); }
.tools { display: flex; align-items: center; gap: 8px; }
.langlink { padding: 8px 12px; border-radius: 999px; font-size: 0.82rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--nx-ink-soft); transition: background-color .2s, color .2s; }
.langlink:hover { background: var(--nx-sand); color: var(--nx-ink); }
.tools .btn { height: 40px; padding: 0 20px; font-size: 0.9rem; }
.menu-btn { display: none; background: none; border: 0; border-radius: 999px; padding: 8px; color: var(--nx-ink); cursor: pointer; }
.menu-btn:hover { background: var(--nx-sand); }
.menu-btn svg { width: 24px; height: 24px; display: block; }
.menu-btn .x { display: none; }
.site-header.open .menu-btn .x { display: block; }
.site-header.open .menu-btn .burger { display: none; }
.sheet { display: none; position: fixed; left: 0; right: 0; top: 72px; bottom: 0; overflow-y: auto; background: var(--nx-ground); padding: 16px 20px 40px; }
.site-header.open .sheet { display: block; }
.sheet a.sec { display: block; font-family: var(--nx-serif); font-size: 1.5rem; padding: 18px 0; border-bottom: 1px solid var(--nx-line); }
.sheet .btn { margin-top: 24px; width: 100%; justify-content: center; }

/* Hero */
.hero { padding: 120px 0 96px; }
.hero .display { max-width: 900px; }
.hero .lead { margin-top: 28px; max-width: 640px; }

/* Sections: a heading and the minimum */
.section { padding: 96px 0; }
.section.paper { background: var(--nx-paper); border-top: 1px solid var(--nx-line); border-bottom: 1px solid var(--nx-line); }
.section > .container > .h2 { max-width: 760px; margin-bottom: 48px; }
.section > .container > .h2:has(+ .sub) { margin-bottom: 0; }
.lead.sub { margin: 20px 0 48px; max-width: 720px; }

/* Hairline-topped columns */
.items { display: grid; gap: 40px 32px; }
.items.c4 { grid-template-columns: repeat(4, 1fr); }
.items.c3 { grid-template-columns: repeat(3, 1fr); }
.items > li { border-top: 1px solid rgba(23, 21, 28, 0.15); padding-top: 24px; }
.items .body, .tiles .body { margin-top: 10px; }

/* Tiles: paper cells separated by hairlines */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--nx-line); border: 1px solid var(--nx-line); border-radius: 22px; overflow: hidden; }
.tiles > li { background: var(--nx-ground); padding: 28px; }

/* Tiers */
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tier { background: var(--nx-paper); border: 1px solid var(--nx-line); border-radius: 22px; padding: 32px; }
.tier .lvl { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--nx-muted); }
.tier .h3 { margin-top: 10px; }
.tier ul { margin-top: 20px; }
.tier li { display: flex; gap: 12px; border-top: 1px solid var(--nx-line); padding: 12px 0; font-size: 0.97rem; line-height: 1.6; color: var(--nx-ink-soft); }
.tier li::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: var(--nx-cyan); flex: none; margin-top: 0.6rem; }
.tier li.inc { color: var(--nx-muted); font-style: italic; }
.tier li.inc::before { background: var(--nx-line); }
.tier.top { border-color: var(--nx-ink); }

/* Track record placeholder — to be replaced with confirmed facts before deployment */
.ref { position: relative; border: 1.5px dashed var(--nx-muted); border-radius: 22px; padding: 44px 36px 36px; display: grid; grid-template-columns: 1fr 1.3fr; gap: 48px; background: var(--nx-ground); }
.ref .flag { position: absolute; top: -13px; left: 28px; background: #ffb020; color: var(--nx-ink); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; padding: 5px 12px; border-radius: 999px; }
.ref .body { margin-top: 12px; }
.ref dl > div { border-top: 1px solid var(--nx-line); padding: 14px 0; }
.ref dl > div:first-child { border-top: 0; padding-top: 0; }
.ref dt { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--nx-muted); }
.ref dd { margin-top: 4px; font-size: 0.97rem; color: var(--nx-ink-soft); font-style: italic; }

/* Jurisdictions: one row */
.jur { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 32px; border-top: 1px solid rgba(23, 21, 28, 0.15); }
.jur > div { padding-top: 20px; }
.jur dt { font-family: var(--nx-serif); font-weight: 500; font-size: 1.2rem; }
.jur dd { margin-top: 4px; font-size: 0.95rem; color: var(--nx-ink-soft); }

/* Closing band — the page's single call to action */
.cta-band { padding: 32px 0 96px; }
.cta-band .box { background: var(--nx-navy); color: var(--nx-on-navy); border-radius: 28px; padding: 64px 56px; display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; }
.cta-band .box > div { max-width: 640px; }
.cta-band .contact { margin-top: 20px; font-size: 0.95rem; line-height: 1.8; color: var(--nx-on-navy-soft); }
.cta-band .contact a { color: var(--nx-on-navy); }
.cta-band .contact a:hover { text-decoration: underline; text-decoration-color: var(--nx-cyan); text-underline-offset: 4px; }
.cta-band .contact small { color: var(--nx-on-navy-muted); font-size: 0.85rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--nx-line); padding: 64px 0 48px; }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 48px; }
.site-footer .label { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--nx-muted); }
.site-footer .tagline { margin-top: 20px; max-width: 300px; font-size: 1.15rem; line-height: 1.35; color: var(--nx-ink-soft); }
.site-footer ul { margin-top: 16px; display: grid; gap: 10px; font-size: 0.93rem; }
.site-footer li, .site-footer address { color: var(--nx-ink-soft); font-style: normal; }
.site-footer address { margin-top: 16px; font-size: 0.93rem; line-height: 1.7; }
.site-footer a { color: var(--nx-ink-soft); }
.site-footer a:hover { color: var(--nx-ink); }
.site-footer .mt { margin-top: 32px; }
.site-footer .copy { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--nx-line); font-size: 0.82rem; color: var(--nx-muted); }

@media (max-width: 1023px) {
  .mainnav { display: none; }
  .menu-btn { display: inline-flex; }
  .items.c4, .tiles, .jur { grid-template-columns: repeat(2, 1fr); }
  .jur { row-gap: 20px; }
  .items.c3, .tiers { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  .container, .site-header .bar { padding: 0 20px; }
  .tools .btn { display: none; }
  .hero { padding: 64px 0 56px; }
  .section { padding: 64px 0; }
  .section > .container > .h2 { margin-bottom: 32px; }
  .lead.sub { margin-bottom: 32px; }
  .items.c4, .tiles { grid-template-columns: 1fr; }
  .ref { grid-template-columns: 1fr; gap: 24px; padding: 48px 24px 28px; }
  .ref .flag { left: 20px; right: 20px; text-align: center; }
  .cta-band { padding: 0 0 64px; }
  .cta-band .box { flex-direction: column; align-items: flex-start; padding: 48px 28px; }
  .site-footer .cols { grid-template-columns: 1fr; gap: 40px; }
}
