/* =========================================================
   DialogueScan: site styles
   Sister site to jpgrolle.com. Layout, spacing, buttons, header and
   footer mirror jpgrolle.com; colors and display type come from the
   brand brief in /brand (JP_Grolle_-_Brand.dotx). Body text is Inter,
   not the template's Source Serif 4: sans reads better on phones and
   matches jpgrolle.com. The serif stays in the Word reports.
   Rule of thumb: every selector is declared once. If a change doesn't
   take effect, look for a more specific selector, not a duplicate.
   ========================================================= */

@font-face {
  font-family: "Cal Sans";
  src: url("/assets/fonts/cal-sans-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Cal Sans";
  src: url("/assets/fonts/cal-sans-latin-ext-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* =========================================================
   DESIGN TOKENS
   ========================================================= */

:root {
  /* Brand (template) */
  --petrol: #285c71;
  --petrol-dark: #1f4a5b;
  --grey-blue: #9aa6ad; /* decorative only, ~2.4:1 on white */
  --ink: #1a1f26;
  --grey: #6b7280;
  --tint: #eef3f4;
  --paper: #ffffff;

  /* Shared with jpgrolle.com */
  --accent-amber: #f59e0b;
  --accent-amber-dark: #d97706;
  --border: #e5e7eb;
  --border-light: #f3f4f6;
  --hero-bg: #12171a;

  --font-display: "Cal Sans", system-ui, sans-serif;
  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: var(--font-ui);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-subtle: 0 1px 2px rgba(0, 0, 0, 0.05);

  --sp-xs: 4px;
  --sp-sm: 8px;
  --sp-md: 16px;
  --sp-lg: 24px;
  --sp-xl: 32px;
  --sp-2xl: 48px;
  --sp-3xl: 72px;

  --maxw: 1000px;

  --fs-2xs: 0.75rem;
  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-base: 1rem;
  --fs-lg: 1.1875rem;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* =========================================================
   BASE & TYPOGRAPHY
   H1/H2 = Cal Sans; H3, kicker, UI and body = Inter.
   ========================================================= */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.65;
  min-height: 100vh;
  display: flex; /* lets the footer sit at the bottom of short pages */
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2 {
  font-family: var(--font-display);
  font-weight: 400; /* Cal Sans has one weight: never fake bold */
  letter-spacing: 0.01em;
  line-height: 1.15;
  margin: 0 0 1.25rem;
  text-wrap: balance; /* no single word stranded on the last line */
}

h1 {
  font-size: clamp(2rem, 5.5vw, 3.25rem);
  color: var(--ink);
}

h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  color: var(--petrol);
}

h3 {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 1.125rem;
  line-height: 1.35;
  color: var(--petrol);
  margin: 0 0 0.5rem;
}

p {
  margin: 0 0 1rem;
  max-width: 68ch;
}

a {
  color: var(--petrol);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
a:hover {
  color: var(--petrol-dark);
}
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent-amber);
  outline-offset: 2px;
  border-radius: 2px;
}

ul,
ol {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
}
li + li {
  margin-top: 0.35rem;
}
li::marker {
  color: var(--petrol);
}

.kicker {
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--petrol);
  margin: 0 0 0.5rem;
}

.lead {
  font-size: var(--fs-lg);
  line-height: 1.55;
}

.note {
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  color: var(--grey);
}

/* Placeholder for copy not yet written. Highlight per the brand template. */
.placeholder {
  background: #fff1cc;
  padding: 0 0.2em;
  border-radius: 2px;
}

/* =========================================================
   LAYOUT
   ========================================================= */

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: var(--sp-3xl) 0;
}
.section--tint {
  background: var(--tint);
}
@media (max-width: 720px) {
  .section {
    padding: var(--sp-2xl) 0;
  }
}

/* No trailing margin at the end of a section or column: the section
   padding alone sets the space, so every section ends the same way. */
.wrap > :last-child,
.grid-2 > * > :last-child,
.grid-3 > * > :last-child {
  margin-bottom: 0;
}

/* Breathing room after a block (cards, steps, table) before the note or
   link that follows it */
:is(.grid-2, .grid-3, .steps, .table-scroll, .callout) + :is(p, .note) {
  margin-top: var(--sp-lg);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-lg);
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-xl);
}
@media (max-width: 820px) {
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
    gap: var(--sp-md);
  }
}

/* =========================================================
   HEADER (injected via partials.js)
   ========================================================= */

.topbar {
  background: var(--petrol);
  height: 60px;
  display: flex;
  align-items: center;
  box-shadow: var(--shadow-subtle);
  position: sticky;
  top: 0;
  z-index: 100;
}
.topbar > .wrap {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand__link {
  display: inline-flex;
}
.logo {
  height: 36px;
  width: auto;
  display: block;
}
.topbar nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}
.topbar nav a {
  font-family: var(--font-ui);
  color: #ffffff;
  text-decoration: none;
  font-size: var(--fs-sm);
  font-weight: 500;
  position: relative;
  padding-bottom: 4px;
}
.topbar nav a:hover {
  opacity: 0.8;
}
.topbar nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--accent-amber);
  border-radius: 1px;
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
}
.nav-toggle__bar {
  display: block;
  width: 22px;
  height: 2px;
  margin: 4px 0;
  background: #ffffff;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle.is-open .nav-toggle__bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.nav-toggle.is-open .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle.is-open .nav-toggle__bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 720px) {
  .logo {
    height: 30px;
  }
  .nav-toggle {
    display: block;
  }
  .topbar nav {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--petrol);
    padding: 0.5rem 20px 1rem;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
  }
  .topbar nav.is-open {
    display: flex;
  }
  .topbar nav a {
    padding: 0.6rem 0;
    font-size: 1rem;
  }
}

/* =========================================================
   HERO
   ========================================================= */

.hero {
  color: #ffffff;
  background:
    radial-gradient(900px 420px at 85% 10%, rgba(40, 92, 113, 0.45), transparent 65%),
    var(--hero-bg);
  padding: var(--sp-3xl) 0;
  position: relative;
  overflow: hidden;
}
.hero__content {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: var(--sp-2xl);
  align-items: center;
}
@media (max-width: 900px) {
  .hero__content {
    grid-template-columns: 1fr;
  }
}
.hero .kicker {
  color: var(--grey-blue); /* large-enough contrast on the near-black hero */
}
.hero h1 {
  color: #ffffff;
}
.hero__sub {
  font-size: var(--fs-lg);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.88);
}
.hero__microcopy {
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  color: rgba(255, 255, 255, 0.65);
  margin-top: 0.75rem;
}

/* Hero illustration: a stylised transcript showing what the scan sees */
.scan-preview {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-lg);
  padding: var(--sp-lg);
  font-family: var(--font-ui);
  font-size: var(--fs-sm);
  line-height: 1.5;
}
.scan-preview__line {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 0.5rem;
  margin: 0 0 0.6rem;
  max-width: none;
  color: rgba(255, 255, 255, 0.85);
}
.scan-preview__who {
  color: var(--grey-blue);
  font-weight: 600;
}
.scan-preview__gap {
  color: rgba(255, 255, 255, 0.45);
  font-style: italic;
}
.scan-preview mark {
  background: rgba(245, 158, 11, 0.22);
  color: #ffffff;
  border-radius: 3px;
  padding: 0 0.15em;
}
.scan-preview__tally {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: var(--sp-md);
  padding-top: var(--sp-md);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.scan-preview__tag {
  font-size: var(--fs-2xs);
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  background: rgba(40, 92, 113, 0.5);
  border: 1px solid rgba(154, 166, 173, 0.4);
  color: rgba(255, 255, 255, 0.85);
}

/* =========================================================
   BUTTONS (same system as jpgrolle.com)
   ========================================================= */

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  color: #ffffff;
  background: var(--accent-amber);
  border: none;
  border-radius: var(--radius-md);
  padding: 0.9rem 1.4rem;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.25);
  transition: all 0.2s ease;
}
.cta:hover {
  color: #ffffff;
  background: var(--accent-amber-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.35);
}
.cta--secondary {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-subtle);
}
.cta--secondary:hover {
  background: var(--tint);
  color: var(--ink);
  border-color: var(--petrol);
  box-shadow: var(--shadow-subtle);
}

/* =========================================================
   COMPONENTS
   ========================================================= */

.card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--sp-lg);
}
.card p:last-child {
  margin-bottom: 0;
}

.step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--petrol);
  color: #ffffff;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: var(--fs-sm);
  margin-bottom: 0.75rem;
}

/* Callout: tinted box with a petrol edge (template component) */
.callout {
  background: var(--tint);
  border-left: 4px solid var(--petrol);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: var(--sp-md) var(--sp-lg);
  margin: var(--sp-lg) 0;
}
.callout p:last-child {
  margin-bottom: 0;
}

/* Tables: hairlines, no verticals, Inter caps header with petrol rule */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}
.table th {
  font-family: var(--font-ui);
  font-size: var(--fs-2xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--petrol);
  text-align: left;
  padding: 0.6rem 0.75rem 0.6rem 0;
  border-bottom: 2px solid var(--petrol);
}
.table td {
  padding: 0.75rem 0.75rem 0.75rem 0;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.cta-band {
  text-align: center;
}
.cta-band p {
  margin-left: auto;
  margin-right: auto;
}

/* =========================================================
   FOOTER (injected via partials.js)
   ========================================================= */

footer {
  margin-top: auto;
  background: var(--petrol);
  color: #ffffff;
  padding: 2.75rem 0 1.75rem;
  font-family: var(--font-ui);
  font-size: var(--fs-sm);
}
footer a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
}
footer a:hover {
  color: #ffffff;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 2.25rem;
  align-items: start;
}
@media (max-width: 720px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
}
.footer-col p {
  margin: 0 0 0.5rem;
}
.footer-col-label {
  font-size: var(--fs-2xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.6);
}
.footer-logo {
  height: 30px;
  width: auto;
  display: block;
  margin-bottom: 0.9rem;
}
.footer-about .copyright {
  font-size: var(--fs-xs);
  color: rgba(255, 255, 255, 0.75);
}
.footer-touch__cta {
  color: #ffffff;
  font-weight: 700;
}
.footer-legal {
  margin-top: 2.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: var(--fs-xs);
  color: rgba(255, 255, 255, 0.6);
}
.footer-legal span {
  margin: 0 0.5rem;
}

/* Keep anchor targets clear of the sticky header */
[id] {
  scroll-margin-top: 72px;
}

/* =========================================================
   INNER PAGES
   ========================================================= */

/* Shorter dark header for every page except the homepage */
.page-hero {
  color: #ffffff;
  background:
    radial-gradient(900px 420px at 85% 10%, rgba(40, 92, 113, 0.45), transparent 65%),
    var(--hero-bg);
  padding: var(--sp-2xl) 0;
}
.page-hero h1 {
  color: #ffffff;
  max-width: 22ch;
}
.page-hero .kicker {
  color: var(--grey-blue);
}
.page-hero .hero__sub {
  max-width: 60ch;
  margin-bottom: 0;
}

/* Text column for long-form pages */
.prose {
  max-width: 720px;
}
.prose h2 {
  margin-top: var(--sp-2xl);
}
.prose h2:first-child {
  margin-top: 0;
}
.prose h3 {
  margin-top: var(--sp-lg);
}

/* Audience cards on the homepage: whole card is the link */
.audience {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.audience:hover {
  color: var(--ink);
  border-color: var(--petrol);
  transform: translateY(-2px);
}
.audience__more {
  margin-top: auto; /* links line up at the bottom of equal-height cards */
  padding-top: var(--sp-sm);
  font-family: var(--font-ui);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--petrol);
}

/* Numbered steps, petrol numerals per the template */
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: step;
  display: grid;
  gap: var(--sp-lg);
}
.steps > li {
  counter-increment: step;
  display: grid;
  align-content: start; /* shorter steps don't spread out to match taller ones */
  grid-template-columns: 2.5rem 1fr;
  gap: var(--sp-md);
}
.steps > li::before {
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--petrol);
  color: #ffffff;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: var(--fs-sm);
}
.steps p {
  margin-bottom: 0.25rem;
}
.steps > li + li {
  margin-top: 0;
}
@media (min-width: 900px) {
  .steps--row {
    grid-template-columns: repeat(4, 1fr);
  }
  .steps--row > li {
    grid-template-columns: 1fr;
    gap: var(--sp-sm);
  }
}

/* Small label, e.g. "Pilot" or "Optional" */
.badge {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: var(--fs-2xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--petrol);
  background: var(--tint);
  border: 1px solid rgba(40, 92, 113, 0.25);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  margin-bottom: 0.75rem;
}

.check-list {
  list-style: none;
  padding: 0;
}
.check-list li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: 0.5rem;
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.55em;
  width: 0.7rem;
  height: 0.35rem;
  border-left: 2px solid var(--petrol);
  border-bottom: 2px solid var(--petrol);
  transform: rotate(-45deg);
}

.table-scroll {
  overflow-x: auto;
}

/* =========================================================
   FORMS (pilot request)
   ========================================================= */

.form {
  max-width: 640px;
  font-family: var(--font-ui);
  font-size: var(--fs-sm);
}
.form__field {
  margin-bottom: var(--sp-lg);
}
.form label,
.form legend {
  display: block;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.4rem;
}
.form fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 var(--sp-lg);
}
.form__hint {
  display: block;
  font-weight: 400;
  color: var(--grey);
  font-size: var(--fs-xs);
  margin-top: 0.15rem;
}
.form input[type="text"],
.form input[type="email"],
.form select,
.form textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid #cbd2d6;
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.8rem;
}
.form textarea {
  min-height: 7rem;
  resize: vertical;
}
.form input:focus,
.form select:focus,
.form textarea:focus {
  outline: 2px solid var(--petrol);
  outline-offset: 1px;
  border-color: var(--petrol);
}
.form__choice {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-weight: 400 !important;
  margin-bottom: 0.5rem !important;
  cursor: pointer;
}
.form__choice input {
  margin-top: 0.25rem;
  accent-color: var(--petrol);
}
.form__honeypot {
  position: absolute;
  left: -9999px;
}

footer .footer-learn a[aria-current="page"] {
  color: #ffffff;
  font-weight: 700;
}
