/* ==========================================================================
   Saez Automation — site styles

   Single stylesheet, no build step, no framework. Edited by hand.

   The palette is fixed by docs/04_Design_System.md and is not a style choice:
     cream #FAF8F4  background, site-wide
     navy  #1E3A52  all text and headlines
     amber #B8703F  buttons and small accents ONLY — never a background area

   Mobile-first is mandatory (CLAUDE.md §10/§12): every rule below is written
   for narrow screens first, and widened inside min-width media queries. Real
   bugs have been caught this way before — form-field overflow on the Start
   page, empty placeholder blocks on the homepage.
   ========================================================================== */

/* --------------------------------------------------------------- tokens */

:root {
  --cream: #faf8f4;
  --navy: #1e3a52;
  --amber: #b8703f;

  /* Darker amber for button fills ONLY.
     WHY THIS EXISTS: white text on #B8703F measures 3.87:1 contrast, which
     fails WCAG AA for body-size text (needs 4.5:1). White on #9A5A2E measures
     5.42:1 and passes. docs/11_Accessibility guidance in CLAUDE.md §11 says to
     run an audit before a major relaunch — this is that relaunch, and this is
     the finding. #B8703F remains the brand accent everywhere it sits on cream. */
  --amber-deep: #9a5a2e;

  /* Tints of navy. Kept as explicit hexes rather than opacity so text never
     renders over an unexpected backdrop at reduced contrast. */
  --navy-70: #52697c;
  --navy-15: #d7dde2;
  --navy-08: #e9edf0;

  --measure: 68ch;
  --radius: 10px;
  --gutter: 1.25rem;

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-display: ui-serif, Georgia, "Times New Roman", serif;
}

/* ----------------------------------------------------------------- base */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--navy);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.2;
  margin: 0 0 0.5em;
  font-weight: 600;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 6vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.125rem); }
h3 { font-size: 1.1875rem; font-family: var(--font); font-weight: 650; }

p { margin: 0 0 1rem; max-width: var(--measure); }

a { color: var(--navy); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--amber-deep); }

/* A visible focus ring on every interactive element. Non-negotiable: without
   it the site is unusable by keyboard, and nothing about the brand requires
   hiding it. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--amber-deep);
  outline-offset: 2px;
  border-radius: 4px;
}

img, svg { max-width: 100%; height: auto; display: block; }

/* The [hidden] attribute only sets `display: none` via a low-specificity UA
   rule, so ANY `display` declaration in this file silently defeats it. That bit
   a real element: an empty "Phone" row on a portal lead stayed visible because
   `.lead__meta div { display: flex }` outranked it. Making it !important here
   means `el.hidden = true` reliably hides things, which is what every bit of JS
   in this project assumes. */
[hidden] { display: none !important; }

hr { border: 0; border-top: 1px solid var(--navy-15); margin: 3rem 0; }

/* ------------------------------------------------------------- utilities */

.wrap {
  width: 100%;
  max-width: 68rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap--narrow { max-width: 44rem; }

.section { padding-block: 3rem; }
@media (min-width: 48rem) { .section { padding-block: 4.5rem; } }

.section--tint { background: var(--navy-08); }

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

.lede { font-size: 1.1875rem; color: var(--navy-70); }

.center { text-align: center; }
.center p { margin-inline: auto; }

/* Screen-reader-only, but focusable — used by the skip link. */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -4rem;
  z-index: 100;
  background: var(--navy);
  color: var(--cream);
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  transition: top 0.15s ease;
}
.skip-link:focus { top: 0.5rem; color: var(--cream); }

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8125rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 650;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  /* 44px minimum touch target — thumbs, not mice (CLAUDE.md §10). */
  min-height: 44px;
}

.btn--primary { background: var(--amber-deep); color: #fff; border-color: var(--amber-deep); }
.btn--primary:hover { background: #854d27; border-color: #854d27; color: #fff; }

.btn--secondary { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn--secondary:hover { background: var(--navy); color: var(--cream); }

.btn--block { width: 100%; }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.btn-row--center { justify-content: center; }

/* ------------------------------------------------------------------- nav */

.site-header {
  border-bottom: 1px solid var(--navy-15);
  background: var(--cream);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 68px;
}

.nav__logo {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--navy);
  flex-shrink: 0;
}
.nav__logo:hover { color: var(--navy); }
.nav__logo-mark { width: 30px; height: 30px; flex-shrink: 0; }
.nav__logo-sub {
  display: block;
  font-family: var(--font);
  font-size: 0.5625rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--navy-70);
  font-weight: 600;
  margin-top: -2px;
}

.nav__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: 1px solid var(--navy-15);
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
  font: inherit;
  font-size: 0.9375rem;
  color: var(--navy);
  min-height: 44px;
}

.nav__links {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Mobile: the menu opens as a stacked panel below the bar. Driven by a
   data attribute set in JS, so with JS disabled the links stay visible via
   the no-js rule at the bottom of this file rather than being unreachable. */
.nav__links[data-open="true"] {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: var(--cream);
  border-bottom: 1px solid var(--navy-15);
  padding: 0.5rem var(--gutter) 1.25rem;
}

.nav__links a {
  display: block;
  padding: 0.75rem 0;
  text-decoration: none;
  font-weight: 550;
  border-bottom: 1px solid var(--navy-08);
}

.nav__links .btn { margin-top: 0.75rem; }

@media (min-width: 56rem) {
  .nav__toggle { display: none; }
  .nav__links,
  .nav__links[data-open="true"] {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1.75rem;
    position: static;
    padding: 0;
    border: 0;
    background: none;
  }
  .nav__links a { padding: 0; border: 0; }
  .nav__links .btn { margin-top: 0; padding: 0.625rem 1.25rem; }
}

/* ------------------------------------------------------------------ hero */

.hero { padding-block: 3rem 2.5rem; }
@media (min-width: 48rem) { .hero { padding-block: 5rem 4rem; } }

.hero h1 { max-width: 16ch; }
.hero .lede { max-width: 52ch; font-size: 1.25rem; }

/* ----------------------------------------------------------------- cards */

/* Shared base class. docs/04 records a hard Webflow lesson that carried over
   as a naming convention here: DO NOT add page-specific rules to `.card`.
   Scope them with a modifier (.card--pricing) so the change cannot bleed into
   every other page using the base. */
.card {
  background: var(--cream);
  border: 1px solid var(--navy-15);
  border-radius: var(--radius);
  padding: 1.5rem;
}
@media (min-width: 48rem) { .card { padding: 2rem; } }

.card h3 { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }

.grid { display: grid; gap: 1.25rem; }
@media (min-width: 48rem) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}

/* --------------------------------------------------------------- pricing */

.card--pricing { display: flex; flex-direction: column; }

.card--pricing .price {
  font-family: var(--font-display);
  font-size: 2.75rem;
  font-weight: 600;
  line-height: 1;
  margin: 0.5rem 0 0.25rem;
}
.card--pricing .price span {
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 500;
  color: var(--navy-70);
}

.card--pricing .price-alt {
  font-size: 0.9375rem;
  color: var(--navy-70);
  margin-bottom: 1.25rem;
}

.card--pricing ul {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  flex-grow: 1;
}
.card--pricing li {
  padding-left: 1.625rem;
  margin-bottom: 0.625rem;
  position: relative;
}
.card--pricing li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.6em;
  width: 0.75rem; height: 0.4rem;
  border-left: 2px solid var(--amber);
  border-bottom: 2px solid var(--amber);
  transform: rotate(-45deg);
}

/* Honest labelling for the tier that is not built yet (CLAUDE.md §0). */
.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--amber-deep);
  border: 1px solid var(--amber);
  border-radius: 999px;
  padding: 0.25rem 0.625rem;
  margin-bottom: 0.5rem;
}

/* -------------------------------------------------------- billing toggle */

.billing-toggle { border: 0; margin: 0 0 2rem; padding: 0; }

.billing-toggle__options {
  display: inline-flex;
  border: 1px solid var(--navy-15);
  border-radius: 999px;
  padding: 4px;
  background: var(--navy-08);
}

/* The radios themselves are visually hidden but still focusable and still the
   thing being clicked — the labels are the visible control. Keeps arrow-key
   navigation and screen-reader semantics for free. */
.billing-toggle input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.billing-toggle label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.125rem;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  min-height: 40px;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.billing-toggle label span {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--amber-deep);
}

.billing-toggle input:checked + label {
  background: var(--cream);
  box-shadow: 0 1px 3px rgba(30, 58, 82, 0.12);
}
.billing-toggle input:checked + label span { color: var(--amber-deep); }

/* The radio is invisible, so its focus ring has to be drawn on the label. */
.billing-toggle input:focus-visible + label {
  outline: 3px solid var(--amber-deep);
  outline-offset: 2px;
}

@media (max-width: 26rem) {
  /* Two full-width rows rather than a cramped pill on small phones. */
  .billing-toggle__options { display: flex; width: 100%; border-radius: var(--radius); }
  .billing-toggle label { flex: 1; justify-content: center; border-radius: calc(var(--radius) - 2px); }
}

/* ----------------------------------------------------------------- steps */

.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; }

.step { counter-increment: step; position: relative; padding-left: 3.25rem; margin-bottom: 2rem; }
.step::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 0;
  width: 2.25rem; height: 2.25rem;
  border-radius: 50%;
  border: 2px solid var(--amber);
  color: var(--amber-deep);
  font-family: var(--font-display);
  font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.step h3 { margin-bottom: 0.25rem; }
.step p { margin-bottom: 0; }

/* ----------------------------------------------------------------- forms */

.form { display: grid; gap: 1.125rem; }

.field { display: grid; gap: 0.375rem; }

.field label { font-weight: 600; font-size: 0.9375rem; }
.field .hint { font-size: 0.875rem; color: var(--navy-70); }

.field input,
.field select,
.field textarea {
  /* width:100% + border-box is what stops the overflow bug that mobile QA
     caught on this form before. Do not remove either half. */
  width: 100%;
  font: inherit;
  color: var(--navy);
  background: #fff;
  border: 1px solid var(--navy-15);
  border-radius: var(--radius);
  padding: 0.75rem 0.875rem;
  min-height: 44px;
}

.field textarea { min-height: 8rem; resize: vertical; }

.field input:focus,
.field select:focus,
.field textarea:focus { border-color: var(--amber-deep); }

.form__note { font-size: 0.875rem; color: var(--navy-70); }

.form-status { border-radius: var(--radius); padding: 0.875rem 1rem; font-size: 0.9375rem; }
.form-status[hidden] { display: none; }
.form-status--ok { background: var(--navy-08); border: 1px solid var(--navy-15); }
.form-status--error { background: #fdf3ee; border: 1px solid var(--amber); }

/* ------------------------------------------------------------------- faq */

.faq details {
  border-bottom: 1px solid var(--navy-15);
  padding: 1.125rem 0;
}
.faq summary {
  cursor: pointer;
  font-weight: 650;
  font-size: 1.0625rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  color: var(--amber-deep);
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
}
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin-top: 0.75rem; margin-bottom: 0; color: var(--navy-70); }

/* ---------------------------------------------------------------- prose */

/* Legal pages. Narrow measure, clear hierarchy, nothing decorative. */
.prose h2 { margin-top: 2.5rem; font-size: 1.375rem; }
.prose h3 { margin-top: 1.75rem; }
.prose ul, .prose ol { max-width: var(--measure); padding-left: 1.25rem; }
.prose li { margin-bottom: 0.5rem; }
.prose__meta { color: var(--navy-70); font-size: 0.9375rem; }

/* ---------------------------------------------------------------- footer */

.site-footer {
  border-top: 1px solid var(--navy-15);
  padding-block: 2.5rem;
  margin-top: 1rem;
  font-size: 0.9375rem;
}

.site-footer__inner { display: grid; gap: 1.5rem; }
@media (min-width: 48rem) {
  .site-footer__inner { grid-template-columns: 2fr 1fr; align-items: start; }
}

.site-footer p { color: var(--navy-70); margin-bottom: 0.5rem; }

/* Legal links only. Blog/Docs/Guides/Careers/Press/News and social icons were
   deliberately removed from the old site because they pointed nowhere — dead
   links contradict the honesty brand value (docs/03, docs/05). Do not add a
   link here until the page it points at actually exists. */
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.25rem; flex-wrap: wrap; }

/* ------------------------------------------------------------ flow figure */

.flow { margin: 2rem 0; }
.flow svg { width: 100%; height: auto; }
.flow figcaption { font-size: 0.9375rem; color: var(--navy-70); margin-top: 0.75rem; }

/* --------------------------------------------------------------- no-js */

/* If JS never runs, the mobile menu button cannot work — so hide the button
   and show the links inline instead. A visitor on a broken connection still
   gets a fully navigable site. */
.no-js .nav__toggle { display: none; }
.no-js .nav__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}
.no-js .nav__links a { border: 0; padding: 0; }
