/* Ipswich Mobile Car Locksmith — one-page site */

@font-face {
  font-family: Figtree;
  src: url("fonts/figtree.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #0e2442;
  --navy-2: #16345c;
  --ink: #1a2330;
  --muted: #4a5563;
  --paper: #f3f0e8;
  --paper-2: #e8e3d7;
  --white: #ffffff;
  --gold: #c9a24a;
  --gold-d: #8d6a28;
  --call: #0d6b45;
  --call-h: #0a5738;
  --fb: #1877f2;
  --line: #d9d3c6;
  --focus: #1d5fd0;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(14, 36, 66, 0.08);
  --header-h: 4.25rem;
  --sticky-h: 4.25rem;
  --max: 70rem;
  --space: clamp(1.25rem, 3vw, 2rem);
  --font: Figtree, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 0.75rem);
}

html:focus-within { scroll-behavior: smooth; }

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

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

img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy-2); text-underline-offset: 0.15em; }
a:hover { color: var(--call); }

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

.skip {
  position: absolute;
  left: 0.75rem;
  top: -3.5rem;
  z-index: 1000;
  background: var(--navy);
  color: var(--white);
  padding: 0.6rem 1rem;
  border-radius: 0 0 8px 8px;
  text-decoration: none;
}
.skip:focus { top: 0; }

.wrap {
  width: min(100% - 2 * var(--space), var(--max));
  margin-inline: auto;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(14, 36, 66, 0.96);
  backdrop-filter: blur(10px);
  color: var(--white);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: var(--header-h);
  padding-block: 0.5rem;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--white);
  text-decoration: none;
  flex: 1 1 auto;
  min-width: 0;
}
.wordmark-text span { white-space: nowrap; }
.wordmark:hover { color: var(--white); }
.wordmark-mark {
  flex: none;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
}
.wordmark-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.wordmark-text span:first-child { font-size: 0.95rem; }
.wordmark-text span:last-child { font-size: 0.8rem; font-weight: 600; color: #d9c58a; }

.nav {
  display: flex;
  align-items: center;
  gap: 0.15rem 1.15rem;
  margin-left: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.nav a {
  color: #e8e4db;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.25rem 0;
}
.nav a:hover { color: var(--gold); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-family: inherit;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.8rem 1.25rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.btn svg { width: 1.2em; height: 1.2em; flex: none; }
.btn:active { transform: translateY(1px); }

.btn-call {
  background: var(--call);
  color: var(--white);
  border-color: var(--call);
}
.btn-call:hover { background: var(--call-h); border-color: var(--call-h); color: var(--white); }

.btn-fb {
  background: var(--white);
  color: var(--navy);
  border-color: var(--white);
}
.btn-fb:hover { background: var(--paper); color: var(--navy); }

.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.45);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); color: var(--white); }

.btn-lg { padding: 0.95rem 1.45rem; font-size: 1.0625rem; }

.header-call { margin-left: 0.4rem; white-space: nowrap; padding: 0.65rem 1rem; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1200px 480px at 80% 0%, rgba(201, 162, 74, 0.1), transparent 60%),
    var(--paper);
  border-bottom: 1px solid var(--line);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding-block: clamp(1.75rem, 4vw, 3.5rem);
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--gold-d);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.75rem;
  margin: 0 0 0.85rem;
}
.eyebrow::before {
  content: "";
  width: 1.6rem;
  height: 2px;
  background: var(--gold);
}
.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 4.6vw, 3.15rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--navy);
  font-weight: 800;
}
.lede {
  margin: 0 0 1.1rem;
  font-size: 1.125rem;
  color: var(--ink);
  max-width: 38rem;
}
.hero p { margin: 0 0 1rem; color: var(--muted); max-width: 38rem; }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.4rem 0 1.15rem;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
}
.hero-meta li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.hero-meta svg { width: 1.15em; height: 1.15em; color: var(--navy); }

.hero-photo {
  margin: 0;
  position: relative;
}
.hero-photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center 45%;
  border-radius: 1rem;
  box-shadow: var(--shadow);
  background: var(--paper-2);
}
.hero-photo figcaption {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  margin: 0;
  background: rgba(14, 36, 66, 0.82);
  color: #f3f0e8;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
}

/* ---------- Trust bar ---------- */
.trust {
  background: var(--navy);
  color: #e8e4db;
}
.trust ul {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 1.25rem 0;
}
.trust li {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.35;
}
.trust svg { flex: none; width: 1.35rem; height: 1.35rem; color: var(--gold); margin-top: 0.1rem; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(2.75rem, 6vw, 5rem); }
.section h2 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.7rem, 3vw, 2.15rem);
  letter-spacing: -0.025em;
  color: var(--navy);
  font-weight: 800;
  line-height: 1.2;
}
.section-intro {
  margin: 0 0 2rem;
  color: var(--muted);
  max-width: 40rem;
  font-size: 1.0625rem;
}
.section.alt { background: var(--paper); }

/* ---------- Services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.service {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem 1.2rem 1.25rem;
  box-shadow: 0 1px 0 rgba(14, 36, 66, 0.03);
}
.service-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.7rem;
  background: var(--paper);
  color: var(--navy);
  display: grid;
  place-items: center;
  margin-bottom: 0.85rem;
}
.service-icon svg { width: 1.3rem; height: 1.3rem; }
.service h3 {
  margin: 0 0 0.35rem;
  font-size: 1.08rem;
  letter-spacing: -0.015em;
  color: var(--navy);
}
.service p { margin: 0; color: var(--muted); font-size: 0.98rem; }

/* ---------- How it works ---------- */
.steps {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.step {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.25rem 1.35rem 1.35rem;
  display: grid;
  gap: 0.45rem;
}
.step h3 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--navy);
  padding-left: 3rem;
}
.step p { margin: 0; color: var(--muted); padding-left: 3rem; }
.step-num {
  position: absolute;
  left: 1.2rem;
  top: 1.25rem;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-weight: 800;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
}

/* ---------- Gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin: 0;
}
.gallery figure { margin: 0; }
.gallery img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center 72%;
  border-radius: 0.7rem;
  background: var(--paper-2);
}

/* ---------- Areas ---------- */
.areas-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.areas-list li {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--navy);
}

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 0.65rem; }
.faq details {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  color: var(--navy);
  padding: 1rem 2.8rem 1rem 1.15rem;
  position: relative;
  line-height: 1.4;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  right: 1.15rem;
  top: 50%;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid var(--navy);
  border-bottom: 2px solid var(--navy);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.15s ease;
}
.faq details[open] summary::after {
  transform: translateY(-30%) rotate(225deg);
}
.faq details p {
  margin: 0;
  padding: 0 1.15rem 1.15rem;
  color: var(--muted);
}
.faq a { font-weight: 700; }

/* ---------- Contact CTA ---------- */
.cta {
  background: var(--navy);
  color: #e8e4db;
  padding-block: clamp(2.75rem, 6vw, 4.5rem);
}
.cta h2 { color: var(--white); margin-bottom: 0.7rem; }
.cta p { color: #ddd8cd; max-width: 36rem; margin: 0 0 1.35rem; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1.25rem; }
.cta-hours { margin: 0; font-weight: 600; color: #d9c58a; }

/* ---------- Footer ---------- */
.site-footer {
  background: #0a1a30;
  color: #d6d0c4;
  padding: 2rem 0 calc(1.5rem + env(safe-area-inset-bottom, 0px));
  font-size: 0.95rem;
}
.footer-inner {
  display: grid;
  gap: 0.85rem;
}
.footer-brand { color: var(--white); font-weight: 700; font-size: 1.05rem; }
.site-footer a { color: #e8e4db; }
.site-footer a:hover { color: var(--gold); }
.footer-legal { margin: 0.4rem 0 0; color: #b7b1a4; font-size: 0.85rem; }

/* ---------- Sticky mobile call bar ---------- */
.sticky-call {
  display: none;
}

/* ---------- Desktop ---------- */
@media (min-width: 720px) {
  .trust ul { grid-template-columns: repeat(4, 1fr); padding: 1.15rem 0; }
  .services-grid { grid-template-columns: 1fr 1fr; }
  .service:last-child {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 1rem;
    align-items: start;
  }
  .service:last-child .service-icon { grid-row: 1 / span 2; margin-bottom: 0; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 1.15rem; }
  .gallery { grid-template-columns: repeat(4, 1fr); gap: 0.85rem; }
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(16rem, 0.85fr);
    gap: clamp(2rem, 5vw, 4rem);
    padding-block: clamp(2.5rem, 5vw, 4.5rem);
  }
  .services-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Mobile nav + sticky call ---------- */
@media (max-width: 799px) {
  .nav { display: none; }
  .header-call { margin-left: auto; padding: 0.6rem 0.95rem; }
  .header-call .call-num { display: none; }
  .hero-actions .btn,
  .cta-actions .btn { width: 100%; }

  /* compact text-link row under the brand on small screens */
  .mobile-nav {
    display: flex;
    gap: 0.9rem;
    overflow-x: auto;
    padding: 0 0 0.7rem;
    margin: 0;
    list-style: none;
    -webkit-overflow-scrolling: touch;
  }
  .mobile-nav a {
    color: #e8e4db;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
  }
  .mobile-nav a:hover { color: var(--gold); }

  .sticky-call {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    background: var(--call);
    padding: 0.65rem 1rem calc(0.65rem + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -6px 20px rgba(14, 36, 66, 0.18);
  }
  .sticky-call a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    color: var(--white);
    text-decoration: none;
    font-weight: 800;
    font-size: 1.1rem;
    min-height: 2.75rem;
  }
  .sticky-call svg { width: 1.3rem; height: 1.3rem; }
  body { padding-bottom: calc(var(--sticky-h) + env(safe-area-inset-bottom, 0px)); }
  .site-footer { padding-bottom: 1.25rem; }
}

@media (min-width: 800px) {
  .mobile-nav { display: none; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .sticky-call, .hero-actions, .cta-actions { display: none !important; }
  body { padding: 0; color: #000; background: #fff; }
  a[href^="tel:"]::after { content: " (" attr(href) ")"; }
  .hero, .section, .cta, .site-footer { background: #fff; color: #000; }
}

/* ---------- Quote form ---------- */
.btn-quote {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}
.btn-quote:hover { background: var(--navy-2); border-color: var(--navy-2); color: var(--white); }

.quote-layout {
  display: grid;
  gap: 1.5rem;
}
.quote-copy { max-width: 40rem; }
.quote-note {
  margin: 0 0 1rem;
  color: var(--muted);
}
.quote-note strong { color: var(--navy); font-weight: 700; }
.quote-copy .btn { margin-top: 0.25rem; }

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

.quote-grid {
  display: grid;
  gap: 0.95rem;
}
.quote-field {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}
.quote-field-span { min-width: 0; }
.quote-field label {
  font-weight: 700;
  color: var(--navy);
  font-size: 0.95rem;
}
.req {
  color: #9b2c2c;
  font-weight: 700;
}
.hint {
  display: block;
  font-weight: 500;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.4;
}
.quote-field input,
.quote-field select,
.quote-field textarea {
  width: 100%;
  font-family: inherit;
  font-size: 1.0625rem;
  line-height: 1.4;
  color: var(--ink);
  background: var(--white);
  border: 1px solid #cfc8b8;
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  appearance: none;
  -webkit-appearance: none;
}
.quote-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%230e2442' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  background-size: 1.1rem;
  padding-right: 2.4rem;
}
.quote-field textarea { resize: vertical; min-height: 6.5rem; }
.quote-field input:focus-visible,
.quote-field select:focus-visible,
.quote-field textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-color: var(--focus);
}
.quote-field input[aria-invalid="true"],
.quote-field select[aria-invalid="true"],
.quote-field textarea[aria-invalid="true"] {
  border-color: #9b2c2c;
}
.field-error {
  min-height: 1.15em;
  color: #9b2c2c;
  font-size: 0.85rem;
  font-weight: 600;
}

.hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.quote-estimate {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: 10px;
  padding: 0.9rem 1rem;
}
.quote-estimate[hidden] { display: none; }
.quote-estimate-label {
  margin: 0 0 0.2rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold-d);
}
.quote-estimate-figure {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--navy);
  line-height: 1.3;
}
.quote-estimate-figure.is-call {
  font-size: 1.15rem;
}
.quote-estimate-caveat {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.quote-estimate-caveat a { font-weight: 700; }
.quote-estimate { margin-top: 1rem; }
#quote-details-field[hidden],
#quote-message-field[hidden] { display: none; }


.quote-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 0.35rem;
}
.quote-actions .btn { min-height: 3rem; }
.quote-form-status {
  margin: 0.35rem 0 0;
  font-weight: 600;
  color: var(--muted);
  min-height: 1.2em;
}
.quote-form-status.is-error { color: #9b2c2c; }

.quote-success {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.2rem;
  box-shadow: var(--shadow);
}
.quote-success[hidden] { display: none; }
.quote-success h3 {
  margin: 0 0 0.5rem;
  color: var(--navy);
  font-size: 1.25rem;
}
.quote-success p { margin: 0 0 1rem; color: var(--muted); }
.quote-success .btn { margin-top: 0.25rem; }

@media (min-width: 720px) {
  .quote-grid {
    grid-template-columns: 1fr 1fr;
  }
  .quote-field-span { grid-column: 1 / -1; }
}

@media (min-width: 900px) {
  .quote-layout {
    grid-template-columns: minmax(16rem, 0.85fr) minmax(0, 1.15fr);
    gap: clamp(1.5rem, 4vw, 2.75rem);
    align-items: start;
  }
}

@media (max-width: 799px) {
  .quote-actions .btn { width: 100%; }
}

.cta a.cta-inline { color: #f3f0e8; font-weight: 700; }
.cta a.cta-inline:hover { color: var(--gold); }
