/* Always-On Agents companion brand kit.
   Identity from the book cover: sky blue fading through deep current and abyss to black,
   Modern Glitch Clean for the title, Modern Glitch for the word ON only,
   hard-edged glitch bars, Norwester Pro for section heads, Poppins for everything else. */

@font-face { font-family: "Modern Glitch Clean"; src: url("fonts/ModernGlitchClean-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Modern Glitch"; src: url("fonts/ModernGlitch-Bold-ON.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Norwester Pro"; src: url("fonts/NorwesterPro-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("fonts/Poppins-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("fonts/Poppins-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("fonts/Poppins-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("fonts/Poppins-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --sky: #1F97D4;
  --current: #135C7F;
  --abyss: #09283A;
  --black: #000000;
  --white: #FFFFFF;
  --ember: #FA4731;          /* the red half of the cover face: used for "stopped", "closed", "flaw" */
  --ember-deep: #C3301E;
  --ink: #000000;
  --ink-soft: #3B4650;
  --muted: #5E6B75;
  --rule: #D3DEE6;
  --mist: #EEF5FA;
  --cover: linear-gradient(180deg, #1F97D4 0%, #1F97D4 34%, #135C7F 58%, #09283A 74%, #000000 92%);
  --cover-h: linear-gradient(90deg, #000000 0%, #09283A 24%, #135C7F 44%, #1F97D4 62%, #1F97D4 100%);
  --display: "Modern Glitch Clean", "Norwester Pro", Impact, sans-serif;
  --head: "Norwester Pro", Impact, sans-serif;
  --body: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1180px;
  --pad: clamp(18px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; font-variant-ligatures: none; font-feature-settings: "liga" 0, "clig" 0, "dlig" 0, "calt" 0; }
body { margin: 0; font-family: var(--body); font-size: 16px; line-height: 1.6; color: var(--ink); background: var(--white); }
img { max-width: 100%; display: block; }
a { color: var(--sky); text-underline-offset: 3px; }
a:hover { color: var(--current); }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; }
.on-dark :focus-visible, .aoa-hero :focus-visible, .aoa-foot :focus-visible { outline-color: var(--white); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
h1, h2, h3 { margin: 0; font-weight: 400; }
h2 { font-family: var(--head); font-size: clamp(26px, 3.4vw, 40px); line-height: 1; letter-spacing: .01em; text-transform: uppercase; font-variant-ligatures: none; }
h3 { font-family: var(--body); font-weight: 600; font-size: 18px; line-height: 1.35; }
p { margin: 0 0 1em; max-width: 68ch; }

/* ---- Title lockup ------------------------------------------------------ */
.aoa-lockup { font-family: var(--display); font-weight: 700; line-height: .86; letter-spacing: .01em; text-transform: uppercase; color: var(--white); font-variant-ligatures: none; margin: 0; }
.aoa-lockup .on { font-family: "Modern Glitch", var(--display); position: relative; display: inline-block; }
.aoa-lockup--inline .on { font-size: 1.22em; line-height: .7; }
.aoa-lockup--stack .l3 { word-spacing: -.18em; }
.aoa-lockup--inline { font-size: 21px; word-spacing: 0; display: inline-flex; gap: .28em; align-items: baseline; white-space: nowrap; }
.aoa-lockup--stack { display: grid; font-size: clamp(54px, 9.5vw, 128px); }
.aoa-lockup--stack .l1 { font-size: 1em; }
.aoa-lockup--stack .on { font-size: 1.32em; line-height: .8; position: relative; z-index: 1; justify-self: start; }
.aoa-lockup--stack .l3 { font-size: .68em; }

/* Hard-edged glitch bars, as on the cover: rectangles, no blur, no smear. */
.glitch { position: relative; isolation: isolate; }
.glitch-bars { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.glitch-bars i { position: absolute; display: block; height: var(--h, 8px); left: var(--x); width: var(--w); top: var(--y); background: var(--c, var(--abyss)); }
@media (prefers-reduced-motion: no-preference) {
  .glitch-bars.jolt i { animation: jolt .9s steps(1, end) 1 both; animation-delay: var(--d, 0s); }
  @keyframes jolt { 0% { transform: translateX(0); } 20% { transform: translateX(var(--j, 14px)); } 40% { transform: translateX(calc(var(--j, 14px) * -0.6)); } 60% { transform: translateX(0); } }
}

/* ---- Top bar ----------------------------------------------------------- */
.aoa-top { background: var(--black); color: var(--white); }
.aoa-top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 58px; }
.aoa-top a.home { color: var(--white); text-decoration: none; }
.aoa-top nav { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.aoa-top nav a.navlink { color: #C9DCE8; text-decoration: none; font-size: 14px; padding: 6px 10px; }
.aoa-top nav a.navlink:hover, .aoa-top nav a.navlink[aria-current="page"] { color: var(--white); }
.aoa-top nav a.navlink[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--sky); }
@media (max-width: 760px) { .aoa-top nav a.navlink { display: none; } }

/* ---- Buttons ----------------------------------------------------------- */
.btn { --bg: var(--sky); --fg: var(--white); display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 0 22px; border: 2px solid var(--bg); background: var(--bg); color: var(--fg); font: 600 15px/1 var(--body); text-decoration: none; cursor: pointer; border-radius: 0; transition: background .15s, color .15s, border-color .15s; }
.btn:hover { --bg: var(--current); color: var(--fg); }
.btn:disabled, .btn[aria-disabled="true"] { --bg: #AEBBC5; cursor: not-allowed; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--white); }
.on-dark .btn--ghost, .aoa-hero .btn--ghost { color: var(--white); border-color: var(--white); }
.on-dark .btn--ghost:hover, .aoa-hero .btn--ghost:hover { background: var(--white); color: var(--black); }
.btn--white { --bg: var(--white); --fg: var(--black); }
.btn--white:hover { --bg: var(--mist); --fg: var(--black); }
.btn--small { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn--strong { box-shadow: 6px 6px 0 var(--black); }
.btn--strong:hover { box-shadow: 3px 3px 0 var(--black); transform: translate(3px, 3px); }

/* ---- Hero: the cover gradient ---------------------------------------- */
.aoa-hero { background: var(--cover); color: var(--white); position: relative; overflow: hidden; }
.aoa-hero .wrap { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: clamp(24px, 5vw, 72px); align-items: end; padding-top: clamp(40px, 7vw, 96px); padding-bottom: clamp(40px, 6vw, 80px); }
.aoa-hero .kicker { font: 500 15px/1.4 var(--body); color: #E6F4FC; margin-bottom: 18px; max-width: 46ch; }
.aoa-hero .lede { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.55; color: var(--white); max-width: 46ch; margin-top: 28px; }
.aoa-hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.aoa-hero .cover { justify-self: end; width: min(300px, 100%); box-shadow: 18px 18px 0 rgba(0,0,0,.55); }
.aoa-hero .cover img { width: 100%; height: auto; }
@media (max-width: 820px) {
  .aoa-hero .wrap { grid-template-columns: 1fr; }
  .aoa-hero .cover { justify-self: start; width: 170px; order: -1; box-shadow: 10px 10px 0 rgba(0,0,0,.55); }
}

/* ---- Footer ------------------------------------------------------------ */
.aoa-foot { background: var(--black); color: #B9C7D1; font-size: 14px; margin-top: 0; }
.aoa-foot .wrap { display: grid; grid-template-columns: 1fr auto; gap: 24px; padding-top: 40px; padding-bottom: 40px; align-items: end; }
.aoa-foot a { color: var(--white); }
.aoa-foot .ib { width: 220px; height: auto; margin-bottom: 14px; }
.aoa-foot .links { display: flex; gap: 18px; flex-wrap: wrap; justify-content: flex-end; }
.aoa-foot .legal { grid-column: 1 / -1; font-size: 12px; color: #8696A2; border-top: 1px solid #1d2a33; padding-top: 18px; }
@media (max-width: 700px) { .aoa-foot .wrap { grid-template-columns: 1fr; } .aoa-foot .links { justify-content: flex-start; } }

/* ---- Shared parts ------------------------------------------------------ */
.section { padding: clamp(40px, 6vw, 80px) 0; }
.section--mist { background: var(--mist); }
.note { font-size: 13px; color: var(--muted); }
.panel { border: 2px solid var(--black); background: var(--white); padding: clamp(18px, 3vw, 28px); }
.state { display: inline-flex; align-items: center; gap: 7px; font: 600 13px/1 var(--body); }
.state::before { content: ""; width: 10px; height: 10px; background: var(--sky); flex: none; }
.state--black::before { background: var(--black); }
.state--ember::before { background: var(--ember); }
.state--outline::before { background: transparent; box-shadow: inset 0 0 0 2px var(--sky); }
.state--grey::before { background: transparent; box-shadow: inset 0 0 0 2px #9AA8B3; }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label, .field legend { font-weight: 600; font-size: 14px; }
.field input[type=text], .field input[type=email], .field input[type=date], .field select, .field input[type=file], .field input[type=password] { font: 400 16px/1.4 var(--body); padding: 11px 12px; border: 2px solid var(--black); border-radius: 0; background: var(--white); color: var(--ink); width: 100%; }
.field .hint { font-size: 13px; color: var(--muted); }
.check { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; margin: 10px 0; font-size: 15px; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--sky); }
.alert { border-left: 6px solid var(--ember); background: #FFF1EE; padding: 12px 16px; margin: 12px 0; }
.ok { border-left: 6px solid var(--sky); background: var(--mist); padding: 12px 16px; margin: 12px 0; }
table.data { border-collapse: collapse; width: 100%; font-size: 15px; }
table.data th, table.data td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.data th { font-weight: 600; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Modern Glitch Clean sets a wide word space; tighten it wherever the display face sets more than one word. */
.band h1, .store-title, .shop-title, .results-head h2, .res-head h2, .aoa-lockup--stack .l3 { word-spacing: -.22em; }
.aoa-top .btn { white-space: nowrap; }
@media (max-width: 420px) { .aoa-lockup--inline { font-size: 17px; } .aoa-top .btn--small { padding: 0 10px; font-size: 13px; } }

/* Brand rule: no ligatures anywhere. The font shorthand resets feature settings per element, so this has to be universal. */
*, *::before, *::after { font-variant-ligatures: none !important; font-feature-settings: "liga" 0, "clig" 0, "dlig" 0, "calt" 0 !important; }

/* The book title is hyphenated: Always-On Agents. The dash closes the gap to ON. */
.aoa-lockup--inline .dash { margin-right: -.2em; }

/* No orphans: body copy avoids a lone last word, headings balance their lines. */
body { text-wrap: pretty; }
h1, h2, h3, h4, h5, h6, .lede, .verdict, .weak, blockquote { text-wrap: balance; }

/* "Always-On" stays on one line. */
.ao-nb { white-space: nowrap; }
