/* AIW 2026 — main stylesheet */
:root {
  --ink: #0b1b33;
  --ink-2: #26364f;
  --muted: #5a6a82;
  --line: #e2e8f1;
  --bg: #ffffff;
  --bg-soft: #f4f7fb;
  --brand: #1f4fd1;
  --brand-dark: #173fa8;
  --brand-tint: #e9effd;
  --accent: #f2b416;
  --accent-dark: #d89c00;
  --navy: #0b1b33;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(11, 27, 51, .05), 0 8px 24px rgba(11, 27, 51, .06);
  --shadow-lg: 0 24px 60px rgba(11, 27, 51, .14);
  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Inter Tight", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --wrap: 1200px;
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; height: auto; }
a { color: var(--brand); text-underline-offset: .18em; }
a:hover { color: var(--brand-dark); }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .6em; font-weight: 700; }
h1 { font-size: clamp(2.2rem, 5.2vw, 3.9rem); letter-spacing: -.035em; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); letter-spacing: -.03em; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--ink); color: #fff; padding: .7rem 1rem; border-radius: 8px; }
.skip-link:focus { top: 1rem; color: #fff; }
.icon { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(16px, 4vw, 32px); }
.wrap-narrow { max-width: 820px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 46px; padding: .7em 1.25em;
  font: 600 1rem/1.2 var(--font); text-decoration: none; white-space: nowrap;
  border-radius: 999px; border: 1.5px solid transparent; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s, transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-lg { min-height: 54px; padding: .85em 1.6em; font-size: 1.05rem; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 18px rgba(31, 79, 209, .28); }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-accent { background: var(--accent); color: var(--ink); }
.btn-accent:hover { background: var(--accent-dark); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }
.btn-ghost-light:hover { border-color: #fff; color: #fff; }
.btn .icon { transition: transform .15s; }
.btn:hover .icon { transform: translateX(2px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.86);
  backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 4px 20px rgba(11,27,51,.05); }
.admin-bar .site-header { top: 32px; }
.header-row { display: flex; align-items: center; gap: 1.5rem; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--ink); text-decoration: none; margin-right: auto; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 36px; height: 36px; color: var(--ink); }
.brand-name { font: 700 1.12rem/1 var(--font-display); letter-spacing: -.02em; }
.brand-name span { color: var(--brand); }

.site-nav { display: flex; align-items: center; gap: 1.25rem; }
.nav-list { display: flex; align-items: center; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.nav-item { position: relative; }
.nav-link {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .55rem .8rem; border: 0; background: none; border-radius: 8px;
  font: 500 .98rem/1.2 var(--font); color: var(--ink-2); text-decoration: none; cursor: pointer;
}
.nav-link:hover, .nav-link[aria-expanded="true"], .nav-link[aria-current="page"] { color: var(--ink); background: var(--bg-soft); }
.nav-link .icon { width: 1rem; height: 1rem; transition: transform .2s; }
.nav-link[aria-expanded="true"] .icon { transform: rotate(180deg); }
.nav-sub {
  position: absolute; top: calc(100% + 10px); left: 50%; transform: translate(-50%, 6px);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .16s, transform .16s, visibility .16s;
}
.nav-item.is-open > .nav-sub { opacity: 1; visibility: visible; pointer-events: auto; transform: translate(-50%, 0); }
.dropdown, .mega {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg);
}
.dropdown { list-style: none; margin: 0; padding: .5rem; min-width: 270px; }
.dropdown a, .mega a { display: block; padding: .55rem .75rem; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-size: .96rem; }
.dropdown a:hover, .mega a:hover, .dropdown a[aria-current], .mega a[aria-current] { background: var(--brand-tint); color: var(--brand-dark); }
.mega { display: grid; grid-template-columns: repeat(4, minmax(190px, 1fr)); gap: .5rem 1rem; padding: 1.25rem; width: min(980px, 92vw); }
.mega ul { list-style: none; margin: 0; padding: 0; }
.mega-title { margin: 0 0 .35rem; padding: 0 .75rem; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.mega a.mega-all { grid-column: 1 / -1; display: inline-flex; align-items: center; gap: .4rem; justify-self: start; margin-top: .4rem; font-weight: 600; color: var(--brand); }
.header-row { position: relative; }
.nav-item.is-mega { position: static; }
.is-mega > .nav-sub { left: clamp(16px, 4vw, 32px); right: clamp(16px, 4vw, 32px); top: calc(100% - 6px); transform: translateY(6px); }
.is-mega.is-open > .nav-sub { transform: none; }
.is-mega .mega { width: auto; }

.nav-toggle { display: none; }

@media (max-width: 1080px) {
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 46px; height: 46px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); cursor: pointer;
  }
  .nav-toggle .icon { width: 22px; height: 22px; }
  .nav-toggle-close, .nav-open .nav-toggle-open { display: none; }
  .nav-open .nav-toggle-close { display: inline-flex; }
  .site-nav {
    position: fixed; inset: var(--header-h) 0 0 0; z-index: 49;
    flex-direction: column; align-items: stretch; gap: 1rem;
    padding: 1rem clamp(16px, 4vw, 32px) 2rem; background: #fff; overflow-y: auto;
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity .2s, transform .2s, visibility .2s;
  }
  .admin-bar .site-nav { top: calc(var(--header-h) + 46px); }
  .nav-open .site-nav { visibility: visible; opacity: 1; transform: none; }
  .nav-open { overflow: hidden; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-item { border-bottom: 1px solid var(--line); }
  .nav-link { width: 100%; justify-content: space-between; padding: 1rem .25rem; font-size: 1.1rem; border-radius: 0; }
  .nav-link:hover, .nav-link[aria-expanded="true"] { background: none; }
  .nav-sub, .is-mega > .nav-sub, .is-mega.is-open > .nav-sub, .nav-item.is-open > .nav-sub {
    position: static; transform: none; opacity: 1; visibility: visible; pointer-events: auto; display: none;
  }
  .nav-item.is-open > .nav-sub { display: block; padding-bottom: .75rem; }
  .dropdown, .mega { border: 0; box-shadow: none; padding: 0; width: auto; min-width: 0; }
  .mega { grid-template-columns: 1fr; gap: .75rem; }
  .mega-title { padding: 0 .25rem; }
  .dropdown a, .mega a { padding: .6rem .25rem; }
  .nav-cta { width: 100%; }
}
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }

/* ---------- Generic sections ---------- */
.site-main { outline: none; }
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-tight { padding-top: clamp(32px, 5vw, 56px); padding-bottom: clamp(56px, 8vw, 96px); }
.section-soft { background: var(--bg-soft); }
.section-dark { background: var(--navy); color: #c7d2e3; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-head { max-width: 720px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head p:last-child { color: var(--muted); font-size: 1.1rem; margin-bottom: 0; }
.section-dark .section-head p:last-child { color: #9fb0c8; }
.section-more { margin: 2.5rem 0 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem; margin: 0 0 1rem;
  font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--brand);
}
.eyebrow::before { content: ""; width: 18px; height: 2px; background: var(--accent); border-radius: 2px; }
.eyebrow a { color: inherit; text-decoration: none; }
.section-dark .eyebrow { color: var(--accent); }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.25rem); color: var(--muted); max-width: 62ch; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(48px, 8vw, 104px) 0 clamp(64px, 9vw, 120px);
  background:
    radial-gradient(900px 480px at 85% -10%, rgba(31, 79, 209, .13), transparent 60%),
    radial-gradient(700px 420px at -10% 110%, rgba(242, 180, 22, .14), transparent 60%),
    linear-gradient(#fff, #f7f9fd);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(11,27,51,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(11,27,51,.045) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at 70% 30%, #000 10%, transparent 70%); mask-image: radial-gradient(ellipse at 70% 30%, #000 10%, transparent 70%);
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero h1 { max-width: 16ch; }
.hl { background: linear-gradient(transparent 62%, rgba(242, 180, 22, .45) 62%, rgba(242, 180, 22, .45) 90%, transparent 90%); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.hero-card {
  background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-lg);
  padding: 0 0 .5rem; transform: rotate(1.2deg);
}
.hero-card-bar { display: flex; align-items: center; gap: 6px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.hero-card-bar span { width: 10px; height: 10px; border-radius: 50%; background: #e3e8f0; }
.hero-card-bar span:first-child { background: #ff6b5e; } .hero-card-bar span:nth-child(2) { background: #ffc23d; } .hero-card-bar span:nth-child(3) { background: #39c86a; }
.hero-card-bar em { margin-left: auto; font-style: normal; font-size: .82rem; color: var(--muted); background: var(--bg-soft); padding: 3px 10px; border-radius: 99px; }
.hero-checks { list-style: none; margin: 0; padding: 10px 18px; }
.hero-checks li { display: flex; gap: .85rem; align-items: flex-start; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.hero-checks li:last-child { border-bottom: 0; }
.hero-checks .icon { width: 28px; height: 28px; padding: 5px; border-radius: 8px; color: #138a43; background: #e4f6ec; }
.hero-checks span { display: flex; flex-direction: column; font-size: .95rem; color: var(--muted); line-height: 1.4; }
.hero-checks strong { color: var(--ink); font-size: 1rem; }

/* ---------- Cards ---------- */
.card-grid { display: grid; gap: clamp(16px, 2vw, 24px); }
.card-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card {
  position: relative; display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.card:hover { border-color: #cbd6e6; box-shadow: var(--shadow); transform: translateY(-2px); }
.card p { color: var(--muted); font-size: 1rem; }
.card-icon { display: inline-grid; place-items: center; width: 48px; height: 48px; margin-bottom: 1.2rem; border-radius: 12px; background: var(--brand-tint); color: var(--brand); }
.card-icon .icon { width: 24px; height: 24px; }
.link-list { list-style: none; margin: auto 0 0; padding: .75rem 0 0; border-top: 1px solid var(--line); }
.link-list a { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .4rem 0; color: var(--ink-2); font-weight: 500; font-size: .96rem; text-decoration: none; }
.link-list a .icon { opacity: 0; transform: translateX(-4px); transition: .15s; color: var(--brand); }
.link-list a:hover { color: var(--brand); }
.link-list a:hover .icon { opacity: 1; transform: none; }

/* ---------- Build tiles ---------- */
.build-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.1); border-radius: var(--radius); overflow: hidden; }
.build-tile { display: flex; flex-direction: column; padding: 2rem 1.6rem; background: var(--navy); color: #9fb0c8; text-decoration: none; transition: background-color .2s; min-height: 300px; }
.build-tile:hover { background: #12274a; color: #c7d2e3; }
.build-tile p { font-size: .98rem; }
.build-num { font: 600 .9rem/1 var(--font-display); color: var(--accent); margin-bottom: 2.5rem; }
.build-more { margin-top: auto; display: inline-flex; align-items: center; gap: .4rem; color: #fff; font-weight: 600; font-size: .95rem; }
.build-tile:hover .build-more .icon { transform: translateX(3px); }
.build-more .icon { transition: transform .15s; }

/* ---------- Steps ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 2vw, 24px); counter-reset: s; }
.steps li { position: relative; padding-top: 1.5rem; border-top: 2px solid var(--line); }
.steps li::before { content: ""; position: absolute; top: -2px; left: 0; width: 48px; height: 2px; background: var(--brand); }
.step-num { display: inline-grid; place-items: center; width: 40px; height: 40px; margin-bottom: 1rem; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 700; }
.steps p { color: var(--muted); font-size: 1rem; }

/* ---------- Why ---------- */
.why-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
.why-grid > div > p { color: var(--muted); font-size: 1.1rem; margin-bottom: 1.75rem; }
.why-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.why-list li { display: flex; gap: 1.1rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; }
.why-list li > .icon { width: 44px; height: 44px; padding: 10px; border-radius: 12px; background: var(--ink); color: var(--accent); }
.why-list h3 { margin-bottom: .3rem; font-size: 1.1rem; }
.why-list p { margin: 0; color: var(--muted); font-size: 1rem; }

/* ---------- Posts ---------- */
.post-card { padding: 0; overflow: hidden; }
.post-card-media img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.post-card-body { padding: 1.4rem 1.5rem 1.6rem; }
.post-card h3 { font-size: 1.15rem; line-height: 1.3; }
.post-card h3 a { color: var(--ink); text-decoration: none; }
.post-card h3 a::after { content: ""; position: absolute; inset: 0; }
.post-card h3 a:hover { color: var(--brand); }
.post-meta { font-size: .85rem; color: var(--muted); margin-bottom: .6rem; }
.post-meta span { color: var(--brand); font-weight: 600; }

/* ---------- Homepage hosting partner ---------- */
.hosting-partner { margin-bottom: clamp(32px, 6vw, 72px); }
.hosting-partner-link {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: .8rem 1.5rem; padding: clamp(14px, 3vw, 22px);
  border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--ink); background: var(--bg-soft); text-decoration: none;
  transition: border-color .15s, background-color .15s;
}
.hosting-partner-link:hover { border-color: var(--brand); background: var(--brand-tint); }
.hosting-partner-brand { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; min-width: 0; }
.hosting-partner-label { font-size: .88rem; font-weight: 600; color: var(--muted); }
.hosting-partner-brand img {
  display: block; width: 234px; clip-path: inset(1px round 3px);
}
.hosting-partner-action {
  display: inline-flex; align-items: center; gap: .45rem;
  color: var(--brand-dark); font-weight: 600; font-size: .95rem;
}
.hosting-partner-link:hover .hosting-partner-action { text-decoration: underline; }

/* ---------- CTA band + footer ---------- */
.cta-band { background: linear-gradient(120deg, #0b1b33 0%, #142e5c 60%, #1f4fd1 130%); color: #c7d2e3; padding: clamp(48px, 7vw, 80px) 0; }
.cta-band-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2rem; }
.cta-band h2 { color: #fff; margin-bottom: .4rem; }
.cta-band p { margin: 0; max-width: 56ch; }
.cta-band-actions { display: flex; flex-wrap: wrap; gap: .75rem; }

.site-footer { background: #07142a; color: #93a3bb; font-size: .96rem; padding-top: clamp(48px, 7vw, 72px); }
.site-footer a { color: #c7d2e3; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 2rem; padding-bottom: 3rem; }
.site-footer .brand, .site-footer .brand:hover { color: #fff; margin-bottom: 1rem; }
.site-footer .brand-mark { color: var(--brand); }
.footer-about p { max-width: 36ch; }
.footer-contacts, .footer-col ul, .footer-bottom ul { list-style: none; margin: 0; padding: 0; }
.footer-contacts li { display: flex; align-items: center; gap: .6rem; padding: .25rem 0; }
.footer-contacts .icon { color: var(--accent); }
.footer-col h2 { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: #fff; margin-bottom: 1rem; }
.footer-col li { padding: .3rem 0; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-top: 1.5rem; padding-bottom: 1.5rem; border-top: 1px solid rgba(255,255,255,.08); font-size: .88rem; }
.footer-bottom p { margin: 0; }
.footer-bottom ul { display: flex; gap: 1.25rem; }

/* ---------- Inner pages ---------- */
.page-hero { padding: clamp(40px, 6vw, 80px) 0 clamp(24px, 4vw, 40px); background: linear-gradient(#f7f9fd, #fff); border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); max-width: 22ch; margin-bottom: .3em; }
.page-hero .lead { margin-bottom: 0; }
.page-body { padding-top: clamp(32px, 5vw, 56px); padding-bottom: clamp(56px, 8vw, 96px); }
.prose { max-width: 820px; color: var(--ink-2); }
.page-body.prose { margin-left: auto; margin-right: auto; }
.prose h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-top: 2em; }
.prose h3 { margin-top: 1.6em; }
.prose img { border-radius: var(--radius-sm); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .35em; }
.prose blockquote { margin: 1.5em 0; padding: .5em 1.25em; border-left: 3px solid var(--accent); color: var(--ink); background: var(--bg-soft); border-radius: 0 8px 8px 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: .96rem; display: block; overflow-x: auto; }
.prose th, .prose td { padding: .6em .8em; border-bottom: 1px solid var(--line); text-align: left; }
.prose pre { overflow-x: auto; background: var(--ink); color: #e6edf7; padding: 1rem; border-radius: 10px; }
.article-cover { margin-top: 2rem; margin-bottom: 0; }
.article-cover img { display: block; width: 100%; border-radius: var(--radius); }
.article .prose { padding-top: 2.5rem; padding-bottom: 2rem; }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; padding-bottom: clamp(56px, 8vw, 96px); }
.post-nav-link { display: flex; flex-direction: column; gap: .3rem; padding: 1.2rem; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; font-weight: 600; line-height: 1.35; }
.post-nav-link span { font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.post-nav-link.is-next { grid-column: 2; text-align: right; }
.post-nav-link:hover { border-color: var(--brand); color: var(--brand); }
.pagination { margin-top: 2.5rem; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: .5rem; }
.pagination .page-numbers { display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 .8rem; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink); }
.pagination .page-numbers.current { background: var(--ink); color: #fff; border-color: var(--ink); }
.search-again { margin: 1.5rem 0 2rem; }
.search-form { display: flex; gap: .5rem; max-width: 520px; }
.search-form label { flex: 1; }
.search-field { width: 100%; min-height: 48px; padding: .6rem 1rem; font: inherit; border: 1px solid var(--line); border-radius: 999px; }
.search-submit { min-height: 48px; padding: 0 1.3rem; font: 600 1rem var(--font); color: #fff; background: var(--brand); border: 0; border-radius: 999px; cursor: pointer; }
.notfound h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
.empty { color: var(--muted); }

/* ---------- Service pages (content generated by the aiw-commercial-services mu-plugin) ---------- */
.is-service .aiw-service {
  --aiw-ink: var(--ink); --aiw-dim: var(--muted); --aiw-accent: var(--brand); --aiw-line: var(--line);
  max-width: none; margin: 0;
}
.is-service .aiw-service h2, .is-service .aiw-service h3 { font-family: var(--font-display); }
.is-service .aiw-service-hero {
  background: radial-gradient(600px 300px at 100% 0, rgba(31,79,209,.12), transparent 70%), var(--bg-soft);
  border: 1px solid var(--line); border-radius: 20px;
}
.is-service .aiw-service a.aiw-service-button { border-radius: 999px; padding: .8rem 1.4rem; background: var(--brand); box-shadow: 0 6px 18px rgba(31,79,209,.25); }
.is-service .aiw-service a.aiw-service-button:hover { background: var(--brand-dark); }
.is-service .aiw-service-grid section, .is-service .aiw-service-cards article, .is-service .aiw-journey-steps > li { border-radius: var(--radius); }
.is-service .aiw-service-cards article { transition: border-color .2s, box-shadow .2s, transform .2s; }
.is-service .aiw-service-cards article:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.is-service .aiw-service-cards h3 a { color: var(--ink); text-decoration: none; }
.is-service .aiw-service-cards h3 a:hover { color: var(--brand); }
.is-service .aiw-service-faq details { padding: 1rem 0; }
.is-service .aiw-service-faq summary { font-size: 1.05rem; color: var(--ink); }
.is-service .aiw-service-related ul { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; }
.is-service .aiw-service-related li a { display: inline-block; padding: .45rem .9rem; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-size: .95rem; }
.is-service .aiw-service-related li a:hover { border-color: var(--brand); }

/* Elementor pages keep their own layout; just neutralize the old theme's spacing assumptions. */
.elementor-shell { min-height: 40vh; }

/* ---------- Reveal on scroll (content is visible without JS) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
  .js .reveal.is-visible { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .card-grid-4, .build-grid, .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-about { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .hero-grid, .why-grid { grid-template-columns: 1fr; }
  .hero-card { transform: none; max-width: 520px; }
  .card-grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  body { font-size: 1rem; }
  .card-grid-4, .build-grid, .steps { grid-template-columns: 1fr; }
  .build-tile { min-height: 0; }
  .build-num { margin-bottom: 1.25rem; }
  .hero-actions .btn { width: 100%; }
  .cta-band-actions, .cta-band-actions .btn { width: 100%; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav-link.is-next { grid-column: auto; }
  .search-form { flex-direction: column; }
}

/* Plugin leftovers that the old theme used to hide or style */
#loftloader-wrapper { display: none !important; }

/* Service hero: page title as a small H1, the offer headline as the display line */
.is-service { padding-top: clamp(20px, 3vw, 32px); }
.is-service .aiw-service-hero .service-kicker { font-size: 1.05rem; letter-spacing: -.01em; color: var(--muted); font-weight: 600; margin: 0 0 .6rem; max-width: none; }
.is-service .aiw-service-hero .service-headline { font: 700 clamp(2rem, 4.6vw, 3.4rem)/1.1 var(--font-display); letter-spacing: -.035em; color: var(--ink); max-width: 20ch; margin: 0 0 1.1rem; }
.is-service .aiw-service-hero > p:not(.eyebrow):not(.service-headline) { font-size: 1.15rem; }

/* ---------- Legacy (ex-Elementor) pages ---------- */
.legacy { padding: clamp(24px, 4vw, 48px) 0 clamp(56px, 8vw, 96px); }
.legacy > * + * { margin-top: clamp(40px, 6vw, 72px); }
.legacy-text .prose { margin: 0 auto; }
.legacy-split { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.legacy-split.is-flipped .legacy-figure { order: -1; }
.legacy-split .prose { max-width: 640px; }
.legacy-figure, .legacy-media figure { margin: 0; }
.legacy-figure img, .legacy-media img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 18px; box-shadow: var(--shadow); }
.legacy-media { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 2vw, 24px); }
.legacy-media img { aspect-ratio: 16 / 10; }
.legacy-statement { font: 600 clamp(1.15rem, 1.8vw, 1.35rem)/1.5 var(--font-display); color: var(--ink); letter-spacing: -.01em; }
.prose > :first-child { margin-top: 0; }
.legacy .prose h2 { margin-top: 0; }
.legacy .prose h3 { margin-top: 1.6em; }
.legacy .prose ul { list-style: none; padding-left: 0; }
.legacy .prose ul li { position: relative; padding-left: 1.7em; }
.legacy .prose ul li::before { content: ""; position: absolute; left: .2em; top: .55em; width: .65em; height: .35em; border-left: 2px solid var(--brand); border-bottom: 2px solid var(--brand); transform: rotate(-45deg); }
.faq { margin-top: 1.5rem; border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary { display: flex; justify-content: space-between; gap: 1rem; padding: 1.1rem 0; cursor: pointer; font-weight: 600; color: var(--ink); list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--brand); transition: transform .2s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item > :not(summary) { color: var(--muted); }
.legacy-posts { margin-top: 1.5rem; }
.legacy-text .prose:has(.legacy-posts) { max-width: none; }
.legacy-embed iframe { display: block; width: 100%; border: 0; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(20px, 3vw, 32px); align-items: start; padding-top: clamp(32px, 5vw, 56px); padding-bottom: clamp(56px, 8vw, 96px); }
.contact-aside { display: grid; gap: clamp(16px, 2vw, 24px); position: sticky; top: calc(var(--header-h) + 24px); }
.contact-card:hover, .contact-form:hover { transform: none; box-shadow: none; border-color: var(--line); }
.contact-card h2 { font-size: 1.2rem; }
.contact-steps { margin: 0; padding-left: 1.2em; color: var(--muted); }
.contact-steps li + li { margin-top: .6rem; }
.contact-steps strong { color: var(--ink); }
.contact-list { color: var(--muted); }
.contact-list a { color: var(--ink); text-decoration: none; }
.contact-list .icon { color: var(--brand); }
.contact-form { padding: clamp(8px, 1.5vw, 16px); }
.contact-form iframe { min-height: 640px; }

@media (max-width: 860px) {
  .legacy-split, .contact-grid { grid-template-columns: 1fr; }
  .legacy-split.is-flipped .legacy-figure { order: 0; }
  .contact-aside { position: static; order: 2; }
}
@media (max-width: 600px) { .legacy-media { grid-template-columns: 1fr; } }
.legacy .prose [style*="justify"] { text-align: left !important; }
.legacy .prose em:only-child { font-style: normal; }
/* backdrop-filter makes the header a containing block for the fixed mobile menu; drop it while the menu is open */
.nav-open .site-header { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
