/* ==========================================================================
   Lewis Total Comfort — Base styles & primitives
   Reset, typography, buttons, form fields, small utility components.
   Requires tokens.css to be loaded first.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font: 400 var(--text-body)/1.55 var(--font-body);
  background: var(--surface);
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
img { max-width: 100%; display: block; }
p { margin: 0; }

/* ---- Layout container ---- */
.wrap {
  width: min(var(--wrap), calc(100% - 48px));
  margin: auto;
}

/* ---- Type ---- */
h1, h2, h3 {
  font-family: var(--font-display);
  margin: 0;
  letter-spacing: -.035em;
}
h1 { font-size: var(--text-h1); line-height: .98; }
h2 { font-size: var(--text-h2); line-height: 1.05; }
h3 { font-size: var(--text-h3); line-height: 1.2; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--blue);
  font: 800 var(--text-tiny)/1 var(--font-body);
  text-transform: uppercase;
  letter-spacing: .16em;
}
.eyebrow::before {
  content: "";
  width: 34px;
  height: 4px;
  background: var(--orange);
}

/* ---- Buttons ---- */
.btn {
  min-height: 52px;
  padding: 0 22px;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  white-space: nowrap;
  font: 700 14px/1 var(--font-display);
  cursor: pointer;
  transition: background var(--ease), transform var(--ease), box-shadow var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--brand-orange-dark); box-shadow: var(--shadow-cta); }
.btn-outline { border-color: #9fb6c9; color: var(--lewis); background: var(--surface); }
.btn-white { border-color: rgba(255, 255, 255, .62); color: #fff; background: transparent; }

/* ---- Focus & accessibility ---- */
.btn:focus-visible, a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--orange);
  color: #fff;
  padding: 10px 18px;
  z-index: 200;
  font-weight: 700;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ---- Check pip ---- */
.check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--blue);
  display: inline-grid;
  place-items: center;
  color: #fff;
  font-size: 11px;
}

/* ---- Avatar ---- */
.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--orange);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
}

/* ---- Form fields (light surfaces) ---- */
.field label, .form label {
  display: grid;
  gap: 7px;
  font-weight: 800;
  font-size: var(--text-tiny);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.field input, .field select, .field textarea,
.form input, .form select, .form textarea {
  width: 100%;
  border: 1px solid #aebfce;
  border-radius: var(--radius-sm);
  padding: 13px;
  color: var(--ink);
  background: var(--surface);
  text-transform: none;
  letter-spacing: 0;
  transition: border-color var(--ease), box-shadow var(--ease);
}
.field input:focus, .field select:focus, .field textarea:focus,
.form input:focus, .form select:focus, .form textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--focus-ring);
}
.form textarea { min-height: 108px; resize: vertical; }
.form-note {
  color: var(--muted);
  font-size: 11px;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}

/* ---- Honeypot (spam trap — visually hidden) ---- */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

/* ---- Alerts ---- */
.alert { display: none; padding: 22px; }
.alert-success { background: var(--success-bg); border-left: 5px solid var(--success-line); color: var(--success-ink); }
.alert-error { background: var(--error-bg); border-left: 5px solid var(--error-line); color: var(--error-ink); }
