/* NDIScribe front door. Static, no JS, mobile-first. */

:root {
  --paper: #F7F9FC;
  --surface: #FFFFFF;
  --brand: #255C91;
  --brand-deep: #1B4570;
  --ink: #132238;
  --muted: #52657A;
  --separator: #E5EBF1;
  --focus: #255C91;
  color-scheme: light;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

.container {
  max-width: 66rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.narrow { max-width: 46rem; }
.center { text-align: center; }

/* Skip link */
.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--brand);
  color: #fff;
  padding: 0.7rem 1rem;
  border-radius: 0.4rem;
  text-decoration: none;
}
.skip:focus { top: 1rem; }

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--separator);
}

.header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}

.wordmark {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--brand);
  text-decoration: none;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
}

.nav-list a:hover { color: var(--brand); text-decoration: underline; }

/* Links */
main a, .site-footer a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
main a:hover, .site-footer a:hover { color: var(--brand-deep); }

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.55rem 1.1rem;
  border-radius: 0.5rem;
  font-weight: 600;
  text-decoration: none;
}

.button-primary {
  background: var(--brand);
  color: #fff;
}
.button-primary:hover { background: var(--brand-deep); color: #fff; }

.button-secondary {
  background: var(--surface);
  color: var(--brand);
  border: 1px solid var(--brand);
}
.button-secondary:hover { background: #EDF3F9; color: var(--brand-deep); }

/* Ensure button-styled links in main keep their colours */
main .button-primary { color: #fff; text-decoration: none; }
main .button-secondary { color: var(--brand); text-decoration: none; }

/* App Store badge (text-only, no Apple artwork bundled) */
.store-badge {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-height: 52px;
  padding: 0.45rem 1.3rem;
  border-radius: 0.65rem;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  line-height: 1.2;
}
.store-badge:hover { background: #0C1626; }

.store-badge-small {
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}

.store-badge-large {
  font-size: 1.15rem;
  font-weight: 700;
}

/* Hero */
.hero {
  background: var(--surface);
  border-bottom: 1px solid var(--separator);
  padding: 3rem 0 3.5rem;
}

.eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.85rem, 4.5vw, 2.9rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  max-width: 24ch;
}

.lede {
  max-width: 58ch;
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0 0 1.75rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem;
}

.center-row { justify-content: center; }

/* Sections */
.section { padding: 3.25rem 0; }

.section-alt {
  background: var(--surface);
  border-top: 1px solid var(--separator);
  border-bottom: 1px solid var(--separator);
}

h2 {
  margin: 0 0 1.25rem;
  font-size: clamp(1.45rem, 3vw, 1.9rem);
  line-height: 1.2;
}

h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

/* Cards */
.card-grid {
  display: grid;
  gap: 1.25rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--separator);
  border-radius: 0.75rem;
  padding: 1.5rem;
}

.section-alt .card { background: var(--paper); }

/* Steps */
.steps {
  display: grid;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  background: var(--paper);
  border: 1px solid var(--separator);
  border-radius: 0.75rem;
  padding: 1.5rem;
}

.steps h3::before {
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  margin-right: 0.6rem;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 0.95rem;
}

/* Lists */
ul { padding-left: 1.25rem; }
li { margin: 0.35rem 0; }

.plain-list {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
}

.plain-list li {
  margin: 0 0 1rem;
  padding-left: 1.1rem;
  border-left: 3px solid var(--separator);
}

.card .plain-list li {
  margin-bottom: 0.75rem;
  border-left-color: var(--brand);
}

/* Split layout */
.split {
  display: grid;
  gap: 1.5rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--separator);
  padding: 2.25rem 0 2.75rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.4rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.fine-print {
  max-width: 62ch;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Thin legal pages */
.thin-page {
  max-width: 34rem;
  margin: 4rem auto;
  padding: 0 1.25rem;
}

/* Focus visibility */
a:focus-visible, .button:focus-visible, .store-badge:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* Wider screens */
@media (min-width: 700px) {
  .container { padding: 0 2rem; }
  .card-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .split { grid-template-columns: minmax(0, 3fr) minmax(16rem, 2fr); align-items: start; }
  .hero { padding: 4.5rem 0 5rem; }
  .section { padding: 4rem 0; }
}
