/* ==========================================================================
   Briggs Air Conditioning — Desert Family Trade design system
   Shared styles for every page: tokens, reset, type, header/nav, footer,
   buttons, cards, section bands, dividers, seals, accordion, hero, motion.
   ========================================================================== */

/* -- Tokens --------------------------------------------------------------- */
:root {
  --sand: #F6EFE3;
  --ink: #20303C;
  --terracotta: #C0512B;
  --terracotta-deep: #A8431F; /* small-text terracotta on sand (AA at <18px) */
  --sunset: #E89A3C;
  --sunset-bright: #F2B25C;   /* small-text amber on cool-deep (AA at <18px) */
  --cool: #2E6E8E;
  --cool-deep: #1E4A61;
  --sand-deep: #EAE0CC;
  --white: #FFFFFF;

  --s1: 4px;
  --s2: 8px;
  --s3: 16px;
  --s4: 24px;
  --s5: 40px;
  --s6: 64px;
  --s7: 96px;

  --radius-sm: 6px;
  --radius-pill: 999px;

  --font-display: 'Fraunces', serif;
  --font-body: 'Atkinson Hyperlegible', sans-serif;

  --shadow-soft: 0 8px 24px rgba(32, 48, 60, 0.14);

  --content-max: 1100px;
  --prose-max: 68ch;

  --header-h: 76px;
  --call-bar-h: 56px;
}

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

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

body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  overflow-x: hidden;
}

@media (min-width: 768px) {
  body { font-size: 20px; }
}

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

a { color: var(--cool); }
a:hover { color: var(--cool-deep); }

ul, ol { padding: 0; margin: 0; list-style: none; }
p { margin: 0 0 var(--s3); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.12;
  color: var(--ink);
  margin: 0 0 var(--s3);
}

h1 { font-size: clamp(2.2rem, 5vw + 1rem, 5rem); font-weight: 900; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.7rem, 3vw + 1rem, 2.75rem); letter-spacing: -0.015em; }
h3 { font-size: clamp(1.25rem, 1.4vw + 1rem, 1.6rem); }

.prose { max-width: var(--prose-max); }

/* -- Shared utilities (promoted from page files) -------------------------- */
/* Flat warm card surface: used by credential cards, the checker panel, the
   offer card and the contact block. */
.surface {
  background: var(--white);
  border: 1px solid var(--sand-deep);
  border-radius: var(--radius-sm);
}

/* Hairline rule above a closing note/tagline inside a surface. */
.divider-top {
  border-top: 1px solid var(--sand-deep);
  padding-top: var(--s4);
}

.text-lead { font-size: 1.15rem; }
.stack-top { margin-top: var(--s4); }
.stack-top-lg { margin-top: var(--s5); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
  margin-top: var(--s4);
}

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

/* Visible focus states everywhere */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--terracotta);
  outline-offset: 3px;
}

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

.skip-link {
  position: absolute;
  left: var(--s3);
  top: -100px;
  background: var(--cool-deep);
  color: var(--white);
  padding: var(--s2) var(--s4);
  border-radius: var(--radius-sm);
  z-index: 200;
  transition: top .15s ease;
}
.skip-link:focus { top: var(--s3); }

.container {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--s4);
}

/* -- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  min-height: 48px;
  padding: var(--s3) var(--s4);
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .1s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--cool);
  border-color: var(--cool);
  color: var(--white);
}
.btn-primary:hover { background: var(--cool-deep); border-color: var(--cool-deep); color: var(--white); }

.btn-secondary {
  background: transparent;
  border-color: var(--white);
  color: var(--white);
}
.btn-secondary:hover { background: var(--white); color: var(--cool-deep); }

.btn-outline-ink {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}
.btn-outline-ink:hover { background: var(--ink); color: var(--sand); }

/* -- Header / Nav ---------------------------------------------------------*/
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--sand);
  border-bottom: 1px solid var(--sand-deep);
}

.site-header__inner {
  max-width: var(--content-max);
  margin-inline: auto;
  min-height: var(--header-h);
  padding-inline: var(--s4);
  display: flex;
  align-items: center;
  gap: var(--s3);
}

.wordmark {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  margin-right: auto;
  line-height: 1.1;
}
.wordmark__mark {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.6rem;
  letter-spacing: .04em;
  color: var(--ink);
}
.wordmark__tagline {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--cool);
}

.header-tel {
  display: none;
  text-decoration: none;
  text-align: right;
  line-height: 1.15;
}
.header-tel__label {
  display: block;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--terracotta-deep);
}
.header-tel__number {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--ink);
}

.hamburger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--sand-deep);
  border-radius: var(--radius-sm);
  background: var(--white);
  cursor: pointer;
}
.hamburger__box { position: relative; width: 22px; height: 16px; }
.hamburger__line,
.hamburger__line::before,
.hamburger__line::after {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}
.hamburger__line { top: 7px; }
.hamburger__line::before { content: ""; top: -7px; }
.hamburger__line::after { content: ""; top: 7px; }

.site-nav {
  display: none;
  background: var(--sand);
  border-top: 1px solid var(--sand-deep);
}
.site-nav.is-open { display: block; }
.site-nav__list {
  display: flex;
  flex-direction: column;
  padding: var(--s2) var(--s4) var(--s4);
}
.site-nav__list li + li { border-top: 1px solid var(--sand-deep); }
.site-nav__list a {
  display: block;
  padding: var(--s3) 0;
  min-height: 48px;
  display: flex;
  align-items: center;
  text-decoration: none;
  font-weight: 700;
  color: var(--ink);
}
.site-nav__list a[aria-current="page"] { color: var(--cool); }
.site-nav__list a:hover { color: var(--cool-deep); }

@media (min-width: 900px) {
  .header-tel { display: block; }
  .hamburger { display: none; }
  .site-nav {
    display: block !important;
    background: transparent;
    border-top: none;
  }
  .site-nav__list {
    flex-direction: row;
    align-items: center;
    max-width: var(--content-max);
    margin-inline: auto;
    padding: 0 var(--s4);
    gap: var(--s4);
  }
  .site-nav__list li + li { border-top: none; }
  .site-nav__list a {
    min-height: auto;
    padding: var(--s2) 0;
    font-size: .95rem;
  }
  .site-header__inner { flex-wrap: wrap; row-gap: var(--s2); }
  .site-nav { padding-bottom: var(--s2); }
}

/* -- Sticky mobile call bar ------------------------------------------------*/
.call-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 150;
  border-top: 3px solid;
  border-image: linear-gradient(90deg, var(--terracotta), var(--cool)) 1;
  background: var(--white);
}
.call-bar__link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--call-bar-h);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  text-decoration: none;
  color: var(--ink);
}
body { padding-bottom: var(--call-bar-h); }

@media (min-width: 900px) {
  .call-bar { display: none; }
  body { padding-bottom: 0; }
}

/* -- Section bands --------------------------------------------------------*/
.band { padding-block: var(--s6); position: relative; }
@media (min-width: 900px) {
  .band { padding-block: var(--s7); }
}
.band-sand { background: var(--sand); }
.band-sand-deep { background: var(--sand-deep); }
.band-cool-deep { background: var(--cool-deep); color: var(--sand); }
.band-cool-deep h2, .band-cool-deep h3 { color: var(--white); }
.band-cool-deep a:not(.btn) { color: var(--sunset); }

/* Diagonal dividers (~2.3deg — heat-shimmer, not zigzag) */
.band-cut-top {
  clip-path: polygon(0 4vw, 100% 0, 100% 100%, 0 100%);
  margin-top: calc(-1 * 4vw);
  padding-top: calc(var(--s6) + 4vw);
}
/* -- Cards ------------------------------------------------------------- */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s4);
}
@media (min-width: 640px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1000px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
}

.card {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  background: var(--white);
  border: 1px solid var(--sand-deep);
  border-radius: var(--radius-sm);
  padding: var(--s4);
  text-decoration: none;
  color: var(--ink);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-soft);
  border-color: var(--cool);
}
.card__icon { width: 40px; height: 40px; }
.card__title { margin: 0; font-size: 1.2rem; }
.card__text { margin: 0; font-size: .95rem; color: var(--ink); }
.card__link {
  margin-top: auto;
  font-weight: 700;
  color: var(--cool);
  font-size: .9rem;
}

/* -- Seals / badges / pills -------------------------------------------- */
.seal {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 168px;
  height: 168px;
  border-radius: var(--radius-pill);
  border: 3px solid var(--sunset);
  outline: 1px solid var(--sunset);
  outline-offset: -8px;
  color: var(--sand);
  background: var(--terracotta);
  transform: rotate(-6deg);
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.2;
  padding: var(--s3);
}
.seal__line { font-size: .85rem; letter-spacing: .03em; }
.seal__line + .seal__line { margin-top: var(--s1); }

.pill {
  display: inline-block;
  padding: var(--s1) var(--s3);
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: .85rem;
  background: var(--sunset);
  color: var(--ink);
}

/* -- Offer band (senior discount) --------------------------------------- */
.offer-band {
  background: var(--cool-deep);
  color: var(--white);
  text-align: center;
}
.offer-band__figure {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.5rem, 8vw, 4rem);
  color: var(--sunset);
  line-height: 1;
  margin-bottom: var(--s2);
}
.offer-band__text { font-size: 1.15rem; max-width: 46ch; margin-inline: auto; }

/* -- Accordion (styled <details>) --------------------------------------- */
.accordion { border-top: 1px solid var(--sand-deep); }
.accordion-item {
  border-bottom: 1px solid var(--sand-deep);
}
.accordion-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  min-height: 48px;
  padding: var(--s3) 0;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  list-style: none;
}
.accordion-item summary::-webkit-details-marker { display: none; }
.accordion-item summary::after {
  content: "+";
  flex-shrink: 0;
  font-size: 1.4rem;
  color: var(--cool);
}
.accordion-item[open] summary::after { content: "\2212"; }
.accordion-item p { padding-bottom: var(--s3); color: var(--ink); }

/* -- Hero ------------------------------------------------------------- */
.hero {
  /* Dusk scrim over the hot→cool gradient keeps sand/white copy at AA
     contrast across the amber midsection without abandoning the concept. */
  background:
    linear-gradient(rgba(32, 48, 60, .32), rgba(32, 48, 60, .32)),
    linear-gradient(160deg, var(--terracotta) 0%, var(--sunset) 32%, var(--cool) 68%, var(--cool-deep) 100%);
  color: var(--white);
  padding-block: var(--s7) var(--s6);
}
.hero__inner {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--s4);
  display: flex;
  flex-direction: column;
  gap: var(--s4);
  align-items: flex-start;
}
.hero__eyebrow {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .85rem;
  color: var(--sand);
}
.hero__headline { color: var(--white); max-width: 18ch; }
.hero__sub { max-width: 52ch; font-size: 1.15rem; color: var(--sand); }
.hero__meta { font-weight: 700; color: var(--sand); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--s3); }
.hero__seal-wrap { align-self: center; margin-top: var(--s3); }

@media (min-width: 900px) {
  .hero__inner { flex-direction: row; align-items: center; justify-content: space-between; }
  .hero__copy { max-width: 60%; }
  .hero__seal-wrap { margin-top: 0; }
}

/* -- Brands strip -------------------------------------------------------- */
.brands-strip { text-align: center; }
.brands-strip__label {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .85rem;
  color: var(--cool);
  margin-bottom: var(--s4);
}
.brands-strip__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s3);
}
.brands-strip__list li {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  padding: var(--s2) var(--s4);
  border: 1px solid var(--sand-deep);
  border-radius: var(--radius-sm);
  background: var(--white);
}

/* -- Contact strip --------------------------------------------------------*/
.contact-strip__grid {
  display: grid;
  gap: var(--s4);
}
@media (min-width: 700px) {
  .contact-strip__grid { grid-template-columns: repeat(2, 1fr); }
}
.contact-strip__grid dt { font-weight: 700; color: var(--cool); font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; }
.contact-strip__grid dd { margin: 0 0 var(--s3); }

/* -- Footer ------------------------------------------------------------- */
.site-footer {
  background: var(--ink);
  color: var(--sand);
}
.site-footer__inner {
  max-width: var(--content-max);
  margin-inline: auto;
  padding: var(--s6) var(--s4) var(--s4);
  display: grid;
  gap: var(--s5);
}
@media (min-width: 700px) {
  .site-footer__inner { grid-template-columns: 1.2fr 1fr 1fr; }
}
.site-footer .wordmark__mark { color: var(--white); }
.site-footer .wordmark__tagline { color: var(--sunset); }
.footer-nav ul { display: flex; flex-direction: column; gap: var(--s2); }
.footer-nav a { color: var(--sand); text-decoration: none; font-weight: 700; }
.footer-nav a:hover { color: var(--sunset); }
.footer-contact a { color: var(--sand); }
.footer-contact p { margin: 0 0 var(--s2); font-size: .95rem; }

.site-footer__legal {
  border-top: 1px solid rgba(246, 239, 227, 0.2);
  padding: var(--s4);
  text-align: center;
  font-size: .8rem;
  color: rgba(246, 239, 227, 0.75);
}
.site-footer__legal p { margin: 0 0 var(--s1); }

/* -- Motion (restrained; gated behind reduced-motion preference) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero__eyebrow,
  .hero__headline,
  .hero__sub,
  .hero__meta,
  .hero__actions,
  .hero__seal-wrap {
    opacity: 0;
    animation: hero-in .35s ease-out both;
  }
  .hero__eyebrow { animation-delay: 0ms; }
  .hero__headline { animation-delay: 60ms; }
  .hero__sub { animation-delay: 120ms; }
  .hero__meta { animation-delay: 180ms; }
  .hero__actions { animation-delay: 240ms; }
  .hero__seal-wrap { animation-delay: 240ms; }

  @keyframes hero-in {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
  }

  .card:hover .card__icon { transform: scale(1.06); }
  .card__icon { transition: transform .15s ease; }

  .reveal {
    opacity: 0;
    transform: translateY(12px);
    animation: reveal-in linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 30%;
  }
  @keyframes reveal-in {
    to { opacity: 1; transform: none; }
  }
  @supports not (animation-timeline: view()) {
    .reveal { opacity: 1; transform: none; animation: none; }
  }
}

/* -- Client-photo frames (from Briggs's current site) ---------------------- */
/* Small, authentic evidence photos — never upscaled, rendered at/under
   native size. Reuses .surface's border/radius convention with white
   padding around the image so the frame reads as a card, not a raw photo. */
.photo-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s4);
  margin-top: var(--s4);
}
.photo-frame {
  background: var(--white);
  border: 1px solid var(--sand-deep);
  border-radius: var(--radius-sm);
  padding: var(--s2);
  display: inline-flex;
  flex-direction: column;
  gap: var(--s2);
  max-width: 100%;
}
.photo-frame img {
  border-radius: 2px;
  height: auto;
  max-width: 100%;
}
.photo-frame figcaption {
  font-size: .8rem;
  color: var(--ink);
  opacity: .7;
  text-align: center;
}

/* -- Interior page hero (shared by all non-home pages) ---------------------*/
.page-hero {
  background: linear-gradient(135deg, var(--cool-deep) 0%, var(--cool) 90%);
  color: var(--sand);
  padding: var(--s6) 0 var(--s7);
}
.page-hero__eyebrow {
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--sunset-bright);
  margin-bottom: var(--s3);
}
.page-hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.1rem, 5.5vw, 3.4rem);
  line-height: 1.08;
  margin: 0 0 var(--s4);
  color: var(--white);
}
.page-hero__lede {
  max-width: 62ch;
  font-size: 1.15rem;
  margin: 0;
}
