/* ==========================================================================
   Strait Dispatch marketing site
   One stylesheet for layouts/home_page and modules/content. No inline styles.
   ========================================================================== */

/* ---- Tokens ---- */
:root {
  --blue: #15579b;
  --blue-dark: #0e3f72;
  --blue-soft: #e8f0f8;
  --red: #ae2d2e;
  --red-dark: #8c2122;
  --ink: #1a1f26;
  --body: #3a434d;
  --muted: #5d6771;
  --line: #dde2e7;
  --soft: #f4f6f8;
  --white: #fff;
  --night: #121820;
  --focus: #f2b632;

  --font-body: "Lato", "Helvetica Neue", Arial, sans-serif;
  --font-head: "Noto Serif", Georgia, serif;

  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(16, 24, 32, .06), 0 8px 24px rgba(16, 24, 32, .08);
  --container: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
  --section: clamp(56px, 8vw, 96px);
  --header-h: 72px;
}

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--body);
  background: var(--white);
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 { font-family: var(--font-head); color: var(--ink); line-height: 1.2; margin: 0 0 .6em; font-weight: 700; }
h1 { font-size: clamp(2rem, 4.4vw, 3.25rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.4rem); }
h4 { font-size: 1.1rem; }

p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }

a { color: var(--blue); text-underline-offset: .18em; }
a:hover { color: var(--blue-dark); }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
main:focus { outline: none; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 12px 16px; background: var(--ink); color: var(--white); border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; color: var(--white); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---- Buttons ---- */
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.btn-row-center { justify-content: center; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 24px;
  font: 700 1rem/1.2 var(--font-body); letter-spacing: .01em; text-decoration: none; text-align: center;
  border: 2px solid transparent; border-radius: var(--radius-sm); cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--red); color: var(--white); }
.btn-primary:hover { background: var(--red-dark); color: var(--white); }
.btn-secondary { background: transparent; color: var(--blue); border-color: var(--blue); }
.btn-secondary:hover { background: var(--blue); color: var(--white); }
.btn-light { background: var(--white); color: var(--ink); }
.btn-light:hover { background: var(--blue-soft); color: var(--ink); }
.btn-outline-light { background: transparent; color: var(--white); border-color: var(--white); }
.btn-outline-light:hover { background: var(--white); color: var(--ink); }
.btn-link { min-height: 44px; padding: 10px 4px; color: var(--blue); text-decoration: underline; }
.btn-link:hover { color: var(--blue-dark); }

/* ---- Header ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--white); border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 24px; min-height: var(--header-h); }
.brand img { width: 200px; height: auto; }

.nav-toggle {
  display: none; margin-left: auto; align-items: center; gap: 10px;
  min-height: 44px; min-width: 44px; padding: 8px 12px;
  background: transparent; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font: 700 .95rem var(--font-body); color: var(--ink); cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 20px; height: 2px; background: var(--ink); position: relative; content: "";
  transition: transform .2s ease, background-color .2s ease;
}
.nav-toggle-bars::before { position: absolute; top: -6px; }
.nav-toggle-bars::after { position: absolute; top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

.site-nav { display: flex; align-items: center; flex: 1; gap: 16px; }
.nav-list { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0 auto; padding: 0; }
.nav-item { position: relative; }
.nav-link {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 12px;
  font: 700 .95rem var(--font-body); color: var(--ink); text-decoration: none;
  background: none; border: 0; border-radius: var(--radius-sm); cursor: pointer;
}
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--blue); }
.has-menu > .nav-link::after {
  content: ""; width: 7px; height: 7px; margin-top: -3px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg);
}

.submenu {
  position: absolute; top: 100%; left: 0; z-index: 10; min-width: 260px; width: max-content;
  list-style: none; margin: 0; padding: 8px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  visibility: hidden; opacity: 0; transform: translateY(4px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s;
}
.submenu a {
  display: block; padding: 10px 12px; min-height: 44px; border-radius: var(--radius-sm);
  color: var(--ink); text-decoration: none; font-weight: 700; font-size: .95rem; white-space: nowrap;
}
.submenu a span { display: block; font-weight: 400; color: var(--muted); font-size: .85rem; }
.submenu a:hover, .submenu a[aria-current="page"] { background: var(--soft); color: var(--blue); }
.has-menu.is-open > .submenu,
.no-js .has-menu:hover > .submenu,
.no-js .has-menu:focus-within > .submenu { visibility: visible; opacity: 1; transform: none; }

.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-login { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 4px; font-weight: 700; font-size: .95rem; color: var(--ink); text-decoration: none; }
.nav-login:hover { color: var(--blue); }
.nav-actions .btn { min-height: 44px; padding: 10px 18px; }

@media (max-width: 1080px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    max-height: calc(100vh - var(--header-h)); overflow-y: auto;
    padding: 8px var(--gutter) 24px; background: var(--white); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  }
  .site-nav.is-open { display: flex; }
  .nav-list { flex-direction: column; align-items: stretch; margin: 0; }
  .nav-link { width: 100%; justify-content: space-between; padding: 12px 4px; font-size: 1.05rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .submenu { position: static; display: none; min-width: 0; width: auto; padding: 4px 0 8px 12px; border: 0; box-shadow: none; visibility: visible; opacity: 1; transform: none; }
  .has-menu.is-open > .submenu { display: block; }
  .submenu a { white-space: normal; }
  .nav-actions { flex-direction: column-reverse; align-items: stretch; margin-top: 16px; }
  .nav-actions .btn { min-height: 48px; }
  .nav-login { justify-content: center; }
}

/* ---- Sections ---- */
.section { padding: var(--section) 0; }
.section-soft { background: var(--soft); }
.section-dark { background: var(--night); color: #c9d1da; }
.section-dark h2, .section-dark h3 { color: var(--white); }
.section-dark a { color: #9cc6f2; }
.section-tight { padding: calc(var(--section) * .6) 0; }

.section-head { max-width: 760px; margin: 0 auto 40px; text-align: center; }
.section-head-left { margin-left: 0; text-align: left; }
.section-intro { font-size: 1.125rem; color: var(--muted); }
.section-dark .section-intro { color: #aab4bf; }

.eyebrow {
  margin: 0 0 10px; font: 900 .8rem/1.3 var(--font-body);
  letter-spacing: .12em; text-transform: uppercase; color: var(--red);
}
.section-dark .eyebrow, .hero-photo .eyebrow, .cta-band .eyebrow { color: #f0a3a4; }

.prose { max-width: 760px; }
.prose-center { margin-left: auto; margin-right: auto; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose h4 { margin-top: 1.2em; }
.lead { font-size: clamp(1.15rem, 2vw, 1.3rem); line-height: 1.55; color: var(--body); }

.check-list { list-style: none; padding: 0; margin: 0 0 1em; }
.check-list li { position: relative; padding-left: 28px; margin-bottom: 8px; }
.check-list li::before {
  content: ""; position: absolute; left: 4px; top: .45em; width: 7px; height: 12px;
  border-right: 3px solid var(--blue); border-bottom: 3px solid var(--blue); transform: rotate(45deg);
}

.inline-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.inline-links a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }

/* ---- Hero ---- */
.hero { position: relative; padding: clamp(48px, 8vw, 96px) 0; background: var(--soft); overflow: hidden; }
.hero-inner { position: relative; z-index: 1; }
.hero-copy { max-width: 720px; }
.hero h1 { margin-bottom: .45em; }
.hero .lead { margin-bottom: .8em; }
.hero-text { color: var(--muted); }
.hero-note { margin-top: 14px; font-size: .95rem; color: var(--muted); }
.hero-note a { font-weight: 700; }

.hero-split .hero-inner { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero-media img { width: 100%; border-radius: var(--radius); }
.hero-media-shadow img { box-shadow: var(--shadow); border: 1px solid var(--line); }

.hero-photo { background: var(--night); color: #dfe5eb; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .35; }
.hero-photo h1 { color: var(--white); }
.hero-photo .lead, .hero-photo .hero-text, .hero-photo .hero-note { color: #dfe5eb; }
.hero-photo .hero-note a { color: var(--white); }
.hero-photo .btn-secondary { color: var(--white); border-color: var(--white); }
.hero-photo .btn-secondary:hover { background: var(--white); color: var(--ink); }
.hero-photo .btn-link { color: var(--white); }
.hero-center .hero-copy { margin: 0 auto; text-align: center; }
.hero-center .btn-row { justify-content: center; }

@media (max-width: 900px) {
  .hero-split .hero-inner { grid-template-columns: 1fr; }
  .hero-media { max-width: 560px; }
}

/* ---- Cards ---- */
.cards { display: grid; gap: 24px; }
.cards-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card {
  display: flex; flex-direction: column; padding: 28px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
}
.section-soft .card { border-color: transparent; box-shadow: var(--shadow); }
.section-dark .card { background: #1b232d; border-color: #2a3542; color: #c9d1da; }
.card-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; margin-bottom: 16px;
  font-size: 1.3rem; color: var(--blue); background: var(--blue-soft); border-radius: 50%;
}
.section-dark .card-icon { background: #23344a; color: #9cc6f2; }
.card-title { font-size: 1.2rem; margin-bottom: .5em; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card-link { margin-top: auto; padding-top: 8px; font-weight: 700; display: inline-flex; align-items: center; min-height: 44px; }

@media (max-width: 1000px) {
  .cards-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .cards-2, .cards-3, .cards-4 { grid-template-columns: 1fr; }
  .card { padding: 22px; }
}

/* ---- Showcase (copy beside screenshot) ---- */
.showcase {
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(28px, 5vw, 64px); align-items: center;
}
.showcase + .showcase { margin-top: var(--section); }
.showcase-reverse .showcase-copy { order: 2; }
.showcase-copy h2, .showcase-copy h3 { margin-bottom: .5em; }

@media (max-width: 900px) {
  .showcase { grid-template-columns: 1fr; }
  .showcase-reverse .showcase-copy { order: 0; }
}

.screenshot { margin: 0; }
.screenshot a { display: block; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); cursor: zoom-in; }
.screenshot img { width: 100%; }
.screenshot figcaption { margin-top: 10px; font-size: .9rem; color: var(--muted); }

/* ---- Workflow steps ---- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; counter-reset: step; }
.steps-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.steps li {
  position: relative; padding: 24px 20px 20px; counter-increment: step;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
}
.steps li::before {
  content: counter(step); display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; margin-bottom: 12px; border-radius: 50%;
  font: 900 1rem var(--font-body); color: var(--white); background: var(--blue);
}
.steps h3 { font-size: 1.1rem; margin-bottom: .4em; }
.steps p { margin: 0; font-size: .97rem; }

@media (max-width: 1000px) {
  .steps, .steps-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .steps, .steps-4 { grid-template-columns: 1fr; }
}

/* ---- Proof / quote ---- */
.proof {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 24px 40px; align-items: center;
  max-width: 980px; margin: 0 auto; padding: clamp(28px, 4vw, 48px);
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); border-left: 6px solid var(--red);
}
.proof-stat { text-align: center; }
.proof-stat strong { display: block; font: 700 clamp(2.4rem, 6vw, 3.5rem)/1 var(--font-head); color: var(--blue); }
.proof-stat span { display: block; margin-top: 6px; font-size: .9rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.proof blockquote { margin: 0; }
.proof blockquote p { font: 600 clamp(1.15rem, 2vw, 1.35rem)/1.5 var(--font-head); color: var(--ink); }
.proof cite { font-style: normal; font-weight: 700; color: var(--muted); }

@media (max-width: 700px) {
  .proof { grid-template-columns: 1fr; text-align: left; }
  .proof-stat { text-align: left; }
}

/* ---- Pricing ---- */
.price-group + .price-group { margin-top: 56px; }
.price-group > h2 { margin-bottom: 8px; }
.price-group > p { color: var(--muted); }
.price-table { width: 100%; border-collapse: collapse; margin: 16px 0 0; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.price-table caption { text-align: left; padding: 0 0 10px; font-weight: 700; color: var(--ink); }
.price-table th, .price-table td { padding: 16px 20px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.price-table thead th { background: var(--ink); color: var(--white); font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; }
.price-table tbody th { color: var(--ink); width: 34%; }
.price-table .price { font: 700 1.35rem var(--font-head); color: var(--blue); white-space: nowrap; }
.price-table .unit { display: block; font-size: .85rem; color: var(--muted); font-weight: 400; font-family: var(--font-body); }
.price-table tr:last-child th, .price-table tr:last-child td { border-bottom: 0; }

.price-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.price-card { padding: 24px; text-align: center; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.price-card .price { display: block; font: 700 2rem/1.1 var(--font-head); color: var(--blue); margin-bottom: 8px; }
.price-card h3 { font-size: 1.1rem; margin-bottom: .4em; }
.price-card p { margin: 0; font-size: .95rem; color: var(--muted); }
.price-card .unit { display: block; margin-top: 10px; font-size: .85rem; font-weight: 700; color: var(--ink); }
.price-cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (max-width: 900px) {
  .price-cards, .price-cards-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .price-cards, .price-cards-3 { grid-template-columns: 1fr; }
  .price-table th, .price-table td { padding: 12px 14px; }
  .price-table tbody th { width: auto; }
}

.example { padding: 24px 28px; background: var(--white); border: 1px dashed var(--blue); border-radius: var(--radius); }
.example h3 { margin-bottom: .4em; }
.example table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.example td { padding: 8px 0; border-bottom: 1px solid var(--line); }
.example td:last-child { text-align: right; font-weight: 700; color: var(--ink); white-space: nowrap; }
.example tr.total td { border-bottom: 0; border-top: 2px solid var(--ink); font-size: 1.1rem; }

.footnotes { margin-top: 20px; font-size: .92rem; color: var(--muted); }
.footnotes p { margin-bottom: .5em; }

.definition-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 32px; margin: 0; }
.definition-list div { padding: 16px 0; border-top: 1px solid var(--line); }
.definition-list dt { font-weight: 900; color: var(--ink); margin-bottom: 4px; }
.definition-list dd { margin: 0; }
@media (max-width: 700px) { .definition-list { grid-template-columns: 1fr; } }

/* ---- FAQ ---- */
.faq { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item:last-child { border-bottom: 0; }
.faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 56px; padding: 14px 0; cursor: pointer; list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ""; flex: none; width: 10px; height: 10px; margin-right: 6px;
  border-right: 2px solid var(--blue); border-bottom: 2px solid var(--blue);
  transform: translateY(-3px) rotate(45deg); transition: transform .15s ease;
}
.faq-item[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.faq-item summary:hover .faq-q { color: var(--blue); }
.faq-q { margin: 0; font: 700 1.05rem/1.45 var(--font-body); color: var(--ink); }
.faq-a { padding: 0 40px 18px 0; color: var(--body); }
.faq-a p:last-child, .faq-a ul:last-child { margin-bottom: 0; }

/* FAQ page: topic menu beside grouped question cards */
.faq-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 40px; align-items: start; }
.faq-aside { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 20px; }
.faq-nav, .faq-help { padding: 22px; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); }
.faq-nav-title { margin: 0 0 12px; font: 900 .8rem var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.faq-nav ul { list-style: none; margin: 0; padding: 0; }
.faq-nav a {
  display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 10px;
  border-radius: var(--radius-sm); color: var(--ink); font-weight: 700; text-decoration: none;
}
.faq-nav a:hover { background: var(--blue-soft); color: var(--blue); }
.faq-nav a i { width: 18px; text-align: center; color: var(--blue); }
.faq-count { margin-left: auto; min-width: 26px; padding: 2px 8px; border-radius: 999px; background: var(--soft); color: var(--muted); font-size: .8rem; text-align: center; }
.faq-help p { margin-bottom: 8px; }
.faq-help .btn-row .btn { width: 100%; }
.faq-groups { display: grid; gap: 28px; }
.faq-group { padding: 28px 32px 12px; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); scroll-margin-top: calc(var(--header-h) + 24px); }
.faq-group-head { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.faq-group-head .card-icon { margin: 0; }
.faq-group-head h2 { margin: 0; font-size: 1.5rem; }
.faq-group .faq { border-top: 0; }

@media (max-width: 960px) {
  .faq-layout { grid-template-columns: 1fr; }
  .faq-aside { position: static; }
  .faq-nav ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
}
@media (max-width: 560px) {
  .faq-nav ul { grid-template-columns: 1fr; }
  .faq-group { padding: 22px 20px 8px; }
  .faq-a { padding-right: 0; }
}

/* ---- Forms ---- */
.form-panel { padding: clamp(24px, 4vw, 40px); background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.field { display: flex; flex-direction: column; }
.field-wide { grid-column: 1 / -1; }
.field label, .field legend { margin-bottom: 6px; font-weight: 700; color: var(--ink); }
.field .req { font-weight: 400; color: var(--muted); font-size: .9em; }
.field fieldset { margin: 0; padding: 0; border: 0; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 10px 12px;
  font: inherit; color: var(--ink); background: var(--white);
  border: 1px solid #aeb7c0; border-radius: var(--radius-sm);
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--blue); }
.field-help { margin: 6px 0 0; font-size: .9rem; color: var(--muted); }
.field-error input, .field-error select, .field-error textarea { border-color: var(--red); border-width: 2px; }
.field-message { margin: 6px 0 0; font-size: .92rem; font-weight: 700; color: var(--red); }
.field-message::before { content: "Error: "; }
.check { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; padding: 8px 0; font-weight: 400; cursor: pointer; }
.check input { flex: none; width: 20px; height: 20px; margin-top: 3px; accent-color: var(--blue); }
.form-alert { margin-bottom: 20px; padding: 14px 16px; border-left: 4px solid var(--red); background: #fbecec; color: var(--ink); font-weight: 700; border-radius: var(--radius-sm); }
.form-success { padding: clamp(24px, 4vw, 40px); background: #edf7ef; border-left: 6px solid #2f7d43; border-radius: var(--radius); }
.form-success h2 { margin-bottom: .4em; }
.form-note { margin: 18px 0; font-size: .9rem; color: var(--muted); }
.site-form .btn { margin-top: 8px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 64px); align-items: start; }
.split-even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 900px) { .split, .split-even { grid-template-columns: 1fr; } }

/* ---- Contact routes ---- */
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; }
.contact-list i { width: 20px; margin-top: 5px; color: var(--blue); text-align: center; }
.contact-list a { font-weight: 700; }

/* ---- App download ---- */
.store-badges { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0; list-style: none; padding: 0; }
.store-badges a { display: block; border-radius: var(--radius-sm); }
.store-badges img { width: 180px; height: auto; }

/* ---- Integration logos list ---- */
.tag-list { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0; }
.tag-list li { padding: 8px 14px; background: var(--white); border: 1px solid var(--line); border-radius: 999px; font-weight: 700; color: var(--ink); font-size: .95rem; }

/* ---- Timeline ---- */
.timeline { list-style: none; margin: 0; padding: 0; border-left: 3px solid var(--blue-soft); }
.timeline li { position: relative; padding: 0 0 32px 28px; }
.timeline li::before { content: ""; position: absolute; left: -9px; top: 6px; width: 15px; height: 15px; border-radius: 50%; background: var(--blue); }
.timeline .when { display: block; font: 900 .85rem var(--font-body); letter-spacing: .1em; text-transform: uppercase; color: var(--red); }
.timeline h3 { margin: 4px 0 .4em; }
.timeline p { margin: 0; }

/* ---- Legal ---- */
.legal { max-width: 820px; }
.legal h2 { font-size: 1.5rem; margin-top: 2em; }
.legal h3 { font-size: 1.2rem; margin-top: 1.6em; }
.legal h4 { font-size: 1.05rem; margin-top: 1.4em; font-family: var(--font-body); }
.legal-meta { color: var(--muted); }
.toc { margin: 24px 0 40px; padding: 20px 24px; background: var(--soft); border-radius: var(--radius); }
.toc h2 { margin: 0 0 10px; font-size: 1.1rem; font-family: var(--font-body); }
.toc ol { margin: 0; columns: 2; column-gap: 32px; }
.toc li { margin-bottom: 6px; break-inside: avoid; }
@media (max-width: 640px) { .toc ol { columns: 1; } }

/* ---- Breadcrumbs ---- */
.breadcrumbs { padding: 14px 0; font-size: .9rem; background: var(--white); border-bottom: 1px solid var(--line); }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.breadcrumbs li + li::before { content: "/"; margin-right: 6px; color: var(--muted); }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs [aria-current] { color: var(--ink); font-weight: 700; }

/* ---- CTA band ---- */
.cta-band { position: relative; padding: var(--section) 0; background: var(--blue); color: #e3edf7; text-align: center; }
.cta-band-inner { max-width: 760px; }
.cta-band h2 { color: var(--white); }
.cta-band p { font-size: 1.125rem; }
.cta-band .btn-secondary { color: var(--white); border-color: var(--white); }
.cta-band .btn-secondary:hover { background: var(--white); color: var(--blue); }
.cta-band .btn-primary { background: var(--white); color: var(--red); }
.cta-band .btn-primary:hover { background: #fbecec; color: var(--red-dark); }
.cta-note { margin: 16px 0 0; font-size: .95rem; }
.cta-note a { color: var(--white); font-weight: 700; }

/* ---- Footer ---- */
.site-footer { background: var(--night); color: #aab4bf; padding: 64px 0 24px; font-size: .97rem; }
.site-footer a { color: #dfe5eb; text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(4, minmax(0, 1fr)); gap: 32px; }
.footer-grid-3 { grid-template-columns: 1.4fr repeat(2, minmax(0, 1fr)); }
.footer-brand img { width: 72px; height: 72px; margin-bottom: 16px; border-radius: 50%; }
.footer-brand p { max-width: 340px; }
.footer-title { margin: 0 0 12px; font: 900 .8rem var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--white); }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li a { display: inline-flex; align-items: center; min-height: 36px; }
.footer-contact a { font-weight: 700; }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 48px; padding-top: 24px; border-top: 1px solid #2a3542; }
.footer-bottom p { margin: 0; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 4px 20px; list-style: none; margin: 0; padding: 0; }
.footer-legal a { display: inline-flex; align-items: center; min-height: 44px; }
.social { display: flex; gap: 8px; list-style: none; margin: 0; padding: 0; }
.social a {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border-radius: 50%; background: #1f2934; font-size: 1.05rem;
}
.social a:hover { background: var(--blue); text-decoration: none; }

@media (max-width: 1000px) {
  .footer-grid, .footer-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .footer-grid, .footer-grid-3 { grid-template-columns: 1fr; }
}

/* ---- Lightbox ---- */
.lightbox { width: min(1400px, 94vw); max-height: 92vh; padding: 0; border: 0; border-radius: var(--radius); background: var(--night); }
.lightbox::backdrop { background: rgba(10, 14, 20, .85); }
.lightbox img { width: 100%; max-height: 92vh; object-fit: contain; }
.lightbox-close {
  position: absolute; top: 8px; right: 8px; width: 44px; height: 44px;
  font-size: 1.8rem; line-height: 1; color: var(--white); background: rgba(0, 0, 0, .6); border: 0; border-radius: 50%; cursor: pointer;
}

/* ---- Utilities ---- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-lg { margin-top: 40px; }
.muted { color: var(--muted); }
.small { font-size: .92rem; }

/* ---- Motion ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* ---- Print ---- */
@media print {
  .site-header, .site-footer, .cta-band, .skip-link, .nav-toggle, .lightbox, .toc { display: none !important; }
  body { font-size: 11pt; color: #000; }
  a { color: #000; }
  .legal a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .85em; }
}

/* ---- Card images (QR codes, logos) ---- */
.card.text-center img { margin: 0 auto 10px; }

/* ---- Pricing table on phones: each row becomes a stacked card ---- */
@media (max-width: 640px) {
  .price-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .price-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .price-table tr:last-child { border-bottom: 0; }
  .price-table th, .price-table td { display: block; padding: 0; border: 0; }
  .price-table tbody th { width: auto; align-self: center; }
  .price-table td:nth-child(2) { text-align: right; }
  .price-table td:nth-child(3) { grid-column: 1 / -1; margin-top: 6px; font-size: .95rem; }
  .price-table .price { white-space: normal; }
}

/* ---- Heading size helper (keeps outline level, changes visual size) ---- */
.h3 { font-size: clamp(1.2rem, 2vw, 1.4rem); margin-top: 1.4em; }

/* ---- Photo heroes with media beside the copy ---- */
.hero-split h1 { font-size: clamp(2rem, 3.6vw, 2.85rem); }
.hero-photo { padding: clamp(56px, 9vw, 112px) 0; }
.hero-photo .hero-text { color: #c4cdd6; }

/* ---- Screenshot gallery ---- */
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px 32px; margin-top: 56px; align-items: start; }
@media (max-width: 760px) { .gallery { grid-template-columns: 1fr; } }
.screenshot a { background: var(--white); }
.gallery-wide { grid-column: 1 / -1; }

/* ---- Showcase with a full-width screenshot under the copy ---- */
.showcase-wide { grid-template-columns: 1fr; }
.showcase-wide .showcase-copy { max-width: 760px; }

/* ---- Gallery item: title and description above each screenshot ---- */
.gallery-title { margin: 0 0 6px; font-size: 1.25rem; }
.gallery-text { margin: 0 0 16px; max-width: 720px; color: var(--muted); }

/* ---- Space between a showcase and the block that follows it ---- */
.showcase + .cards, .showcase + .gallery, .showcase + .split { margin-top: clamp(40px, 6vw, 64px); }

/* ---- Highlight: a feature without a screenshot ---- */
.highlight {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px 28px; align-items: start;
  padding: clamp(24px, 4vw, 40px); background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow); border-left: 6px solid var(--blue);
}
.highlight + .highlight { margin-top: 28px; }
.highlight-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px;
  border-radius: 50%; background: var(--blue-soft); color: var(--blue); font-size: 1.6rem;
}
.highlight h2, .highlight h3 { margin-bottom: .4em; }
.highlight .check-list { columns: 2; column-gap: 32px; }
.highlight .check-list li { break-inside: avoid; }
@media (max-width: 700px) {
  .highlight { grid-template-columns: 1fr; }
  .highlight .check-list { columns: 1; }
}

/* ---- Jump-link pills (feature group menu) ---- */
.tag-nav li { padding: 0; border: 0; background: none; }
.tag-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 8px 18px;
  background: var(--white); border: 1px solid var(--line); border-radius: 999px;
  color: var(--ink); font-weight: 700; text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.tag-nav a:hover { background: var(--blue-soft); border-color: var(--blue); color: var(--blue); }

/* ---- Gallery rows: title, text and screenshot line up across each pair ---- */
@supports (grid-template-rows: subgrid) {
  .gallery-item { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 0; align-content: start; }
}

/* ---- Showcase with a tall screenshot kept at a readable width ---- */
.showcase-narrow .showcase-media { justify-self: center; width: 100%; max-width: 480px; }

/* ---- Flow chart (inputs, steps side by side, result) ---- */
.flow { margin: 0; padding: clamp(18px, 3vw, 26px); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.flow-label, .flow-stage { font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.flow-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.flow-chips li { padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--soft); font-size: .88rem; color: var(--ink); }
.flow-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.flow-steps li { position: relative; padding: 12px; border-radius: var(--radius-sm); background: var(--blue-soft); }
.flow-steps li + li::before { content: "\2192"; position: absolute; left: -18px; top: 50%; transform: translateY(-50%); color: var(--blue); font-weight: 700; }
.flow-steps strong { display: block; font-size: .95rem; color: var(--ink); line-height: 1.3; margin-bottom: 4px; }
.flow-steps span { display: block; font-size: .85rem; line-height: 1.45; color: var(--body); }
.flow-inputs::after, .flow-steps::after { content: "\2193"; display: block; grid-column: 1 / -1; text-align: center; color: var(--blue); font-weight: 700; line-height: 1; margin: 10px 0; }
/* The arrow under the steps sits in the grid, so pull it up past the row gap. */
.flow-steps::after { margin-top: -12px; }
.flow-result { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--blue); color: var(--white); }
.flow-result .flow-stage { color: var(--white); opacity: .85; margin-bottom: 4px; }
.flow-result .flow-formula { margin: 0; font-weight: 700; font-size: 1.02rem; }
.flow-note { margin: 12px 0 0; font-size: .85rem; color: var(--muted); }
@media (max-width: 560px) {
  .flow-steps { grid-template-columns: 1fr; gap: 18px; }
  .flow-steps::after { margin-top: -8px; }
  .flow-steps li + li::before { content: "\2193"; left: 50%; top: -17px; transform: translateX(-50%); }
}

/* ---- Space between a callout and a showcase that share a section ---- */
.highlight + .showcase, .showcase + .highlight { margin-top: clamp(40px, 6vw, 64px); }
