/* My Miller Lights - public site styles.
   OWNER: builder "public-side". Plain CSS, mobile first, no external assets.
   Colour pairs used for text meet WCAG 4.5:1 or better (noted beside each token). */

:root {
  color-scheme: light;

  --cream: #fbf6ee;        /* page background */
  --paper: #ffffff;        /* cards and inputs */
  --ink: #1f1a17;          /* body text, 16:1 on cream */
  --muted: #5c5047;        /* secondary text, 7.2:1 on cream */
  --line: #e3d8ca;         /* decorative borders */
  --line-strong: #8c7f73;  /* input borders, 3.9:1 on white (non-text) */

  --brand: #9b1c1c;        /* cranberry; white text on it is 8.1:1 */
  --brand-dark: #7a1515;
  --pine: #14231c;         /* night hero background */
  --pine-2: #1d3328;
  --snow: #fdf8ef;         /* text on pine, 15:1 */
  --snow-muted: #d9cdb8;   /* secondary text on pine, 10:1 */
  --gold: #f4c152;         /* glow button; dark text on it is 10:1 */
  --gold-dark: #e2a93a;

  --ok-bg: #eaf4ec;
  --ok-ink: #1d4d2c;       /* 8.6:1 on ok-bg */
  --error: #a3161a;        /* 7.6:1 on white */
  --error-bg: #fdecec;
  --focus: #1d4ed8;

  --radius: 0.75rem;
  --shadow: 0 1px 2px rgb(31 26 23 / 6%), 0 4px 16px rgb(31 26 23 / 6%);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
}

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

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 1rem/1.55 var(--sans);
  overflow-wrap: break-word;
}

img {
  max-width: 100%;
  display: block;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  line-height: 1.15;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 { font-size: clamp(2rem, 7vw, 3.1rem); }
h2 { font-size: clamp(1.45rem, 4.5vw, 1.9rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; }

a {
  color: var(--brand);
  text-underline-offset: 0.15em;
}

a:hover { color: var(--brand-dark); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  background: var(--paper);
  color: var(--ink);
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
}

.skip-link:focus { top: 1rem; }

.wrap {
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 max(1rem, env(safe-area-inset-left)) 0 max(1rem, env(safe-area-inset-right));
}

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

/* ---------------------------------------------------------------- header */

.site-header {
  background: var(--pine);
  color: var(--snow);
}

.site-header .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.5rem;
  padding-top: env(safe-area-inset-top);
}

.brand {
  color: var(--snow);
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.brand:hover { color: #fff; }

.header-call {
  color: var(--snow);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.25rem;
  white-space: nowrap;
}

.header-call:hover { color: var(--gold); }

.site-header :focus-visible,
.hero :focus-visible {
  outline-color: var(--gold);
}

/* A string of lights, drawn with gradients: a scalloped wire plus
   warm bulbs in four repeating colours. Purely decorative. */
.lights {
  --gap: 44px;
  height: 30px;
  background:
    radial-gradient(ellipse 60% 55% at 50% 0, transparent 88%, #0b140f 90% 100%, transparent 101%) 0 0 / var(--gap) 14px repeat-x,
    radial-gradient(circle at 50% 21px, #ffe7a8 0 5px, transparent 6px) 0 0 / calc(var(--gap) * 4) 30px repeat-x,
    radial-gradient(circle at 50% 21px, #ff6b5e 0 5px, transparent 6px) var(--gap) 0 / calc(var(--gap) * 4) 30px repeat-x,
    radial-gradient(circle at 50% 21px, #fff4d6 0 5px, transparent 6px) calc(var(--gap) * 2) 0 / calc(var(--gap) * 4) 30px repeat-x,
    radial-gradient(circle at 50% 21px, #7fd1a0 0 5px, transparent 6px) calc(var(--gap) * 3) 0 / calc(var(--gap) * 4) 30px repeat-x,
    var(--pine);
  filter: drop-shadow(0 0 6px rgb(255 214 120 / 55%));
}

@media (prefers-reduced-motion: no-preference) {
  .lights { animation: twinkle 3.2s ease-in-out infinite alternate; }
  @keyframes twinkle {
    from { filter: drop-shadow(0 0 4px rgb(255 214 120 / 40%)); }
    to { filter: drop-shadow(0 0 9px rgb(255 214 120 / 75%)); }
  }
}

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

.hero {
  background:
    radial-gradient(120% 80% at 50% 0, var(--pine-2), var(--pine) 70%);
  color: var(--snow);
  padding: 2.5rem 0 3rem;
}

.hero p { color: var(--snow-muted); font-size: 1.125rem; max-width: 34rem; }
.hero h1 { color: var(--snow); max-width: 44rem; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gold) !important;
  margin-bottom: 0.75rem;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.75rem 1.4rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font: 600 1.0625rem/1.2 var(--sans);
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

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

.btn-glow {
  background: var(--gold);
  color: #1d1606;
  box-shadow: 0 0 0 0 rgb(244 193 82 / 0%), 0 6px 24px rgb(244 193 82 / 35%);
}

.btn-glow:hover { background: var(--gold-dark); color: #1d1606; }

.btn-big { min-height: 56px; font-size: 1.1875rem; padding: 0.9rem 2rem; }

.btn-ghost {
  background: transparent;
  color: var(--snow);
  border-color: rgb(253 248 239 / 55%);
}

.btn-ghost:hover { border-color: var(--snow); color: #fff; }

.btn-outline {
  background: var(--paper);
  color: var(--brand);
  border-color: var(--brand);
}

.btn-outline:hover { background: #fff5f5; color: var(--brand-dark); }

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.6;
  cursor: progress;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

@media (max-width: 30rem) {
  .btn-row .btn { flex: 1 1 100%; }
}

/* -------------------------------------------------------------- sections */

.section { padding: 2.5rem 0; }
.section + .section { border-top: 1px solid var(--line); }

.lead { font-size: 1.125rem; color: var(--muted); }

.cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  padding: 0;
  margin: 1.5rem 0 0;
  list-style: none;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.card p:last-child { margin-bottom: 0; }

.step-number {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--pine);
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.services {
  display: grid;
  gap: 0.5rem 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  padding: 0;
  margin: 1rem 0 0;
  list-style: none;
}

.services li {
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
}

.services li::before,
.area-list li::before {
  content: "";
  flex: none;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 6px rgb(226 169 58 / 80%);
  transform: translateY(-0.05rem);
}

.area-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  margin: 1rem 0 0;
  list-style: none;
}

.area-list li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
}

.area-list li.first {
  background: var(--pine);
  color: var(--snow);
  border-color: var(--pine);
  font-weight: 600;
}

.after-list { margin-top: 1rem; }

.contact-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  gap: 0.5rem;
}

.contact-list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
  font-size: 1.125rem;
}

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

.site-footer {
  background: var(--pine);
  color: var(--snow-muted);
  padding: 1.5rem 0 calc(1.5rem + env(safe-area-inset-bottom));
  font-size: 0.9375rem;
}

.site-footer a { color: var(--snow); }
.site-footer a:hover { color: var(--gold); }
.site-footer :focus-visible { outline-color: var(--gold); }

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

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

/* ------------------------------------------------------------ quote page */

.page-head { padding: 2rem 0 0.5rem; }

.minimums {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1.25rem 0 0;
}

.minimums ul { margin: 0; padding-left: 1.2rem; }
.minimums li + li { margin-top: 0.35rem; }

.notice {
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1rem 0;
  background: var(--paper);
  border: 1px solid var(--line);
}

.notice-error {
  background: var(--error-bg);
  border-color: #efb8b8;
  color: var(--ink);
}

.notice-error h2 { font-size: 1.125rem; color: var(--error); font-family: var(--sans); }
.notice-error ul { margin: 0.25rem 0 0; padding-left: 1.2rem; }
.notice-error a { color: var(--error); font-weight: 600; }

form.quote { margin: 1.5rem 0 3rem; }

fieldset.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1rem 0.5rem;
  margin: 0 0 1.25rem;
  min-width: 0;
}

@media (min-width: 36rem) {
  fieldset.panel { padding: 1.5rem 1.5rem 0.75rem; }
}

fieldset.panel > legend {
  float: left;
  width: 100%;
  padding: 0;
  margin: 0 0 1rem;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 700;
}

fieldset.panel > legend + * { clear: left; }

.field { margin: 0 0 1.25rem; }

.field > label,
.group-label,
fieldset.group > legend {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

fieldset.group {
  border: 0;
  padding: 0;
  margin: 0 0 1.25rem;
  min-width: 0;
}

fieldset.group > legend { padding: 0; }

.hint {
  display: block;
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 400;
  margin: -0.15rem 0 0.45rem;
}

.optional { color: var(--muted); font-weight: 400; }

input[type="text"],
input[type="tel"],
input[type="email"],
select,
textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.85rem;
  font: 1rem/1.35 var(--sans); /* 16px stops iOS zooming on focus */
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 0.55rem;
  -webkit-appearance: none;
  appearance: none;
}

select {
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ink) 50%),
    linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 1.15rem) 55%, calc(100% - 0.8rem) 55%;
  background-size: 0.35rem 0.35rem;
  background-repeat: no-repeat;
  padding-right: 2.25rem;
}

textarea { min-height: 6.5rem; resize: vertical; }

input[readonly] { background: #f4efe7; color: var(--muted); }

input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border: 2px solid var(--error);
}

.field-error {
  display: block;
  color: var(--error);
  font-weight: 600;
  font-size: 0.9375rem;
  margin-top: 0.35rem;
}

.field-error:empty { display: none; }

.row {
  display: grid;
  gap: 0 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 30rem) {
  .row.city-zip { grid-template-columns: 1fr 5.5rem 7.5rem; }
}

/* Radio and checkbox "choices" with generous tap targets. */
.choices {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
}

.choices.stack { grid-template-columns: 1fr; }

.choice {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 48px;
  padding: 0.55rem 0.85rem;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 0.55rem;
  cursor: pointer;
  font-weight: 500;
}

.choice input {
  flex: none;
  width: 1.3rem;
  height: 1.3rem;
  margin: 0;
  accent-color: var(--brand);
}

.choice input:checked + span { font-weight: 700; }

.choice:has(input:checked) {
  border: 2px solid var(--brand);
  background: #fff7f5;
  padding: calc(0.55rem - 1px) calc(0.85rem - 1px);
}

.choice:has(input:focus-visible) {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.choice small { display: block; color: var(--muted); font-weight: 400; }

.choices[aria-invalid="true"] .choice { border-color: var(--error); }

/* Swatches beside the colour choices (decorative). */
.swatch {
  flex: none;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  border: 1px solid rgb(0 0 0 / 25%);
  margin-left: auto;
}

.swatch-pure-white { background: #ffffff; box-shadow: 0 0 6px rgb(160 190 255 / 90%); }
.swatch-bright-white { background: #fff3cf; box-shadow: 0 0 6px rgb(255 205 110 / 90%); }
.swatch-red { background: #d7261e; }
.swatch-multi { background: conic-gradient(#d7261e 0 25%, #2e9d52 0 50%, #2f6fe0 0 75%, #f4c152 0); }

/* Number steppers for counts. */
.counts {
  display: grid;
  gap: 0.75rem 1rem;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  margin-bottom: 1.25rem;
}

.count-field label { display: block; font-weight: 600; margin-bottom: 0.35rem; }

.stepper {
  display: flex;
  align-items: stretch;
  max-width: 11rem;
}

.stepper input {
  text-align: center;
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  min-width: 0;
}

.stepper button {
  flex: none;
  width: 48px;
  min-height: 48px;
  font: 700 1.35rem/1 var(--sans);
  color: var(--brand);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  cursor: pointer;
  touch-action: manipulation;
}

.stepper button:first-child { border-radius: 0.55rem 0 0 0.55rem; }
.stepper button:last-child { border-radius: 0 0.55rem 0.55rem 0; }
.stepper button:active { background: #fff1ee; }

/* Photos. */
.photo-picker {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  min-height: 6rem;
  padding: 1rem;
  text-align: center;
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius);
  background: #fffdf9;
  cursor: pointer;
  font-weight: 600;
  color: var(--brand);
}

.photo-picker:hover { border-color: var(--brand); }

.photo-picker input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.photo-picker:has(input:focus-visible) {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.photo-picker[aria-disabled="true"] {
  color: var(--muted);
  cursor: not-allowed;
  border-style: solid;
}

.photo-picker small { color: var(--muted); font-weight: 400; }

.photo-list {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
  padding: 0;
  margin: 1rem 0;
  list-style: none;
}

.photo-list li {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  overflow: hidden;
}

.photo-list img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #eee6da;
}

.photo-list .no-preview {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  background: #eee6da;
  color: var(--muted);
  font-size: 0.875rem;
}

.photo-list .photo-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem;
  padding: 0.15rem 0.15rem 0.15rem 0.6rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.photo-list button {
  min-width: 44px;
  min-height: 44px;
  padding: 0 0.6rem;
  background: none;
  border: 0;
  color: var(--error);
  font: 600 0.9375rem/1 var(--sans);
  cursor: pointer;
}

.photo-list li.processing img { opacity: 0.45; }

.photo-tips { margin: 0 0 1rem; padding-left: 1.2rem; }

/* Consent. */
.consent .choice { align-items: flex-start; }
.consent .choice input { margin-top: 0.15rem; }

.turnstile-box { min-height: 70px; margin: 0 0 1rem; }

/* Progress while sending. */
.progress {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 0 0 1rem;
}

.progress progress {
  width: 100%;
  height: 0.75rem;
  margin-top: 0.5rem;
  accent-color: var(--brand);
}

/* Thank-you state. */
.thanks {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 6px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem 1.25rem;
  margin: 1.5rem 0 3rem;
}

.thanks .promise {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ok-ink);
  background: var(--ok-bg);
  border-radius: 0.55rem;
  padding: 0.85rem 1rem;
}

.thanks h2:focus { outline: none; }

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

.prose { padding: 2rem 0 3rem; max-width: 42rem; }
.prose h2 { margin-top: 1.75rem; font-size: 1.4rem; }
.prose ul { padding-left: 1.2rem; }
.prose li + li { margin-top: 0.35rem; }
.updated { color: var(--muted); }

[hidden] { display: none !important; }
