/* Kaizen Roofing — landing page system
   Palette and type per Brand Direction Sheet v1 (2025-12-02) */

:root {
  --blue: #0050FF;
  --blue-hot: #2E6DFF;
  --black: #000000;
  --ink: #0A0B0D;
  --surface: #121417;
  --surface-2: #1A1D21;
  --slate: #444B54;        /* structural only: borders, dividers, decoration */
  --muted: #8E939A;        /* small body text on dark. 6.1:1 on --surface */
  --muted-dim: #808790;    /* input placeholders. 4.5:1 on --surface-2 */
  --blue-text: #4A80FF;    /* small text tint of --blue. 5.5:1 on --ink */
  --silver: #C7CACE;
  --white: #FFFFFF;
  --line: rgba(199, 202, 206, 0.18);
  --line-strong: rgba(199, 202, 206, 0.34);

  --display: "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --body: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --pad: clamp(20px, 5vw, 40px);
  --maxw: 560px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--white);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- shell ---------- */

.shell {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ---------- masthead ---------- */

.masthead {
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}

.masthead .shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Typographic wordmark. Swap this block for the real logomark when the
   brand asset folder lands: <img src="assets/logo.svg" alt="Kaizen Roofing"> */
.wordmark {
  display: inline-flex;
  flex-direction: column;
  line-height: 1;
  text-decoration: none;
  color: var(--white);
}

.wordmark .mark {
  font-family: var(--display);
  font-weight: 800;
  font-size: 21px;
  letter-spacing: -0.028em;
  text-transform: uppercase;
}

.wordmark .mark span { color: var(--blue); }

.wordmark .sub {
  font-family: var(--display);
  font-weight: 500;
  font-size: 8.5px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--silver);
  margin-top: 5px;
}

.masthead-tel {
  font-family: var(--display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.01em;
  color: var(--white);
  text-decoration: none;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.masthead-tel:hover { color: var(--blue-hot); }

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

.hero { padding: clamp(38px, 9vw, 64px) 0 clamp(26px, 5vw, 34px); }

.eyebrow {
  font-family: var(--display);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--blue-text);
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.eyebrow::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line-strong);
}

h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(38px, 10.5vw, 56px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  text-wrap: balance;
  margin: 0 0 20px;
}

h1 em {
  font-style: normal;
  color: var(--blue);
}

.subhead {
  font-size: clamp(16px, 4vw, 18px);
  line-height: 1.5;
  color: var(--silver);
  margin: 0;
  max-width: 40ch;
}

/* ---------- form ---------- */

.form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: clamp(20px, 5vw, 28px);
}

.form-card__label {
  font-family: var(--display);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--silver);
  margin: 0 0 18px;
}

.fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field { display: flex; flex-direction: column; gap: 7px; }

.field label {
  font-family: var(--display);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--silver);
}

.field input {
  font-family: var(--body);
  font-size: 16px; /* 16px minimum stops iOS Safari zooming on focus */
  color: var(--white);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 14px 14px;
  width: 100%;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.field input::placeholder { color: var(--muted-dim); }

.field input:focus {
  outline: none;
  border-color: var(--blue);
  background: #16191D;
}

.field input:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
}

.consent {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 11px;
  align-items: start;
  margin-top: 4px;
}

.consent input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--blue);
  flex-shrink: 0;
}

.consent input:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.consent label {
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

.consent a { color: var(--silver); }

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

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  font-family: var(--display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 17px 20px;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:focus-visible {
  outline: 2px solid var(--blue-hot);
  outline-offset: 2px;
}

.btn--primary {
  background: var(--blue);
  color: var(--white);
  margin-top: 20px;
}

.btn--primary:hover { background: var(--blue-hot); }

.btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

.btn:disabled:hover { background: var(--blue); }

.btn--call {
  background: transparent;
  color: var(--white);
  border-color: var(--line-strong);
}

.btn--call:hover {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.04);
}

.btn--call svg { width: 17px; height: 17px; flex-shrink: 0; }

/* ---------- alternate path ---------- */

.alt { padding: 22px 0 0; }

.alt__divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  font-family: var(--display);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--muted);
}

.alt__divider::before,
.alt__divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.alt__note {
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
  margin: 12px 0 0;
}

/* ---------- success state ---------- */

.success {
  display: none;
  background: var(--surface);
  border: 1px solid var(--blue);
  border-radius: 3px;
  padding: clamp(24px, 6vw, 34px);
  text-align: center;
}

/* Failure state. Deliberately uses the same weight as success rather than a
   shouty red panel: the job is to route them to the phone, not to alarm them. */
.failure {
  display: none;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--blue);
  border-radius: 3px;
  padding: clamp(24px, 6vw, 34px);
}

.failure.is-visible { display: block; }

.failure h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -0.025em;
  text-transform: uppercase;
  margin: 0 0 10px;
}

.failure p {
  color: var(--silver);
  margin: 0 0 18px;
  font-size: 15px;
}

.failure .btn { margin-top: 0; }

.success.is-visible { display: block; }
.form-card.is-hidden, .alt.is-hidden { display: none; }

.success h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 26px;
  letter-spacing: -0.025em;
  text-transform: uppercase;
  margin: 0 0 10px;
}

.success p { color: var(--silver); margin: 0; font-size: 15px; }

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

.footer {
  margin-top: auto;
  padding: 40px 0 32px;
  border-top: 1px solid var(--line);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.footer-links a {
  font-family: var(--display);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--silver);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}

.footer-links a:hover { color: var(--white); border-bottom-color: var(--blue); }

.footer-links a:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.footer-legal {
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}

.footer-legal .co {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--silver);
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
}

/* ---------- legal pages ---------- */

/* padding-block only. A `padding` shorthand here would override .shell's
   horizontal padding and push legal copy flush to the viewport edge. */
.legal {
  padding-block: clamp(40px, 8vw, 64px) clamp(30px, 6vw, 48px);
}

.legal h1 {
  font-size: clamp(30px, 7vw, 40px);
  margin-bottom: 10px;
}

.legal .updated {
  font-family: var(--display);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--blue-text);
  margin: 0 0 34px;
}

.legal h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  margin: 34px 0 10px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.legal h2:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }

.legal p, .legal li {
  color: var(--silver);
  font-size: 15px;
  line-height: 1.65;
}

.legal p { margin: 0 0 14px; }

.legal ul { margin: 0 0 14px; padding-left: 20px; }
.legal li { margin-bottom: 7px; }

.legal a { color: var(--blue-text); }

.legal .placeholder {
  background: var(--surface);
  border-left: 3px solid var(--blue);
  padding: 14px 16px;
  margin: 0 0 20px;
  font-size: 13.5px;
  color: var(--silver);
}

.legal .placeholder strong {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-size: 11px;
  color: var(--blue-text);
  display: block;
  margin-bottom: 5px;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--silver);
  text-decoration: none;
  margin-bottom: 30px;
}

.back:hover { color: var(--white); }
.back:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

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