/* American Flooring NH — shared site styles
   Mobile-first, no framework, no build step. */

:root {
  --maroon: #5e0022;
  --maroon-dark: #430018;
  --maroon-light: #7d1236;
  --gold: #bd8524;
  --gold-light: #d9a648;
  --red: #df001f;

  --ink: #22181c;
  --ink-soft: #5a4c51;
  --paper: #ffffff;
  --shell: #f4f1ec;
  --line: #e2dcd3;

  --wrap: 1120px;
  --radius: 10px;
  --shadow-sm: 0 1px 2px rgba(34, 24, 28, .06), 0 2px 8px rgba(34, 24, 28, .06);
  --shadow-md: 0 4px 12px rgba(34, 24, 28, .08), 0 12px 32px rgba(34, 24, 28, .10);

  --step-0: clamp(1rem, .96rem + .2vw, 1.075rem);
  --step-1: clamp(1.15rem, 1.08rem + .35vw, 1.35rem);
  --step-2: clamp(1.45rem, 1.3rem + .75vw, 2rem);
  --step-3: clamp(1.85rem, 1.55rem + 1.5vw, 2.9rem);
}

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

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

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

body {
  margin: 0;
  background: var(--shell);
  color: var(--ink);
  font: var(--step-0)/1.65 "Helvetica Neue", Helvetica, Arial, sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

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

a { color: var(--maroon); }
a:hover, a:focus-visible { color: var(--red); }

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

h1, h2, h3 {
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.2;
  color: var(--maroon);
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: var(--step-3); }
h2 { font-size: var(--step-2); }
h3 { font-size: var(--step-1); }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

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

.visually-hidden {
  position: absolute;
  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: 100;
  background: var(--paper);
  color: var(--maroon);
  padding: .6rem 1rem;
  border-radius: 0 0 var(--radius) var(--radius);
  font-weight: 700;
  transition: top .15s ease;
}
.skip-link:focus { top: 0; }

/* ---------- Header ---------- */

.site-header {
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: .75rem;
}

/* Below the nav breakpoint the menu drops onto its own full-width row. */
.brand { display: block; flex: 1 1 auto; min-width: 0; max-width: 360px; }
.brand img { width: 100%; }
.site-nav { flex: 1 0 100%; }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--maroon);
  color: #fff;
  border: 0;
  border-radius: var(--radius);
  padding: .65rem .9rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  min-height: 44px;
}
.nav-toggle:hover { background: var(--maroon-light); }
.nav-toggle__bars {
  width: 20px; height: 2px;
  background: currentColor;
  position: relative;
  display: inline-block;
}
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px; height: 2px;
  background: currentColor;
}
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0 0 .75rem;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}

.site-nav a {
  display: block;
  padding: .75rem .25rem;
  text-decoration: none;
  font-weight: 700;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.site-nav a:hover { color: var(--red); }
.site-nav a[aria-current="page"] { color: var(--maroon); }

@media (max-width: 47.99em) {
  .site-nav[hidden] { display: none; }
}

@media (min-width: 48em) {
  .nav-toggle { display: none; }
  .site-nav { display: block !important; flex: 0 1 auto; }
  .site-nav ul {
    flex-direction: row;
    align-items: center;
    gap: 2rem;
    padding: 0;
  }
  .site-nav a {
    border-bottom: 3px solid transparent;
    padding: .35rem 0;
  }
  .site-nav a[aria-current="page"] { border-bottom-color: var(--gold); }
}

/* ---------- Contact strip ---------- */

.contact-strip {
  background: var(--maroon);
  color: #fff;
}
.contact-strip .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem 2rem;
  padding-block: .7rem;
  font-weight: 700;
}
.contact-strip a {
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}
.contact-strip a:hover { color: var(--gold-light); }

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

main { flex: 1; }

.section { padding-block: clamp(2rem, 5vw, 3.5rem); }
.section--paper { background: var(--paper); }

.lede { font-size: var(--step-1); color: var(--ink-soft); }

/* Hero */

.hero { display: grid; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
@media (min-width: 56em) {
  .hero { grid-template-columns: 1fr 1fr; }
}
.hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .8rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: .5rem;
}
.hero__media img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 48px;
  padding: .75rem 1.5rem;
  border: 2px solid var(--maroon);
  border-radius: var(--radius);
  background: var(--maroon);
  color: #fff;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.btn:hover, .btn:focus-visible { background: var(--maroon-light); border-color: var(--maroon-light); color: #fff; }
.btn--ghost { background: transparent; color: var(--maroon); }
.btn--ghost:hover, .btn--ghost:focus-visible { background: var(--maroon); color: #fff; }

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

/* Feature cards */

.cards {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.section--paper .card { background: var(--shell); }
.card h3 { margin-bottom: .35rem; }
.card p { color: var(--ink-soft); }

/* Brand logo grid */

.brands {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}
.brands li {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  min-height: 6.5rem;
}
.brands a { display: block; }
.brands img {
  max-height: 4.5rem;
  width: auto;
  transition: transform .15s ease;
}
.brands a:hover img { transform: scale(1.05); }

/* ---------- Gallery ---------- */

.gallery {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}
.gallery button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform .2s ease;
}
.gallery button:hover img,
.gallery button:focus-visible img { transform: scale(1.04); }

/* Lightbox */

.lightbox {
  border: 0;
  padding: 0;
  max-width: 100vw;
  max-height: 100dvh;
  width: 100%;
  height: 100%;
  /* The dialog fills the viewport, so it carries the dim itself rather than
     relying on ::backdrop, which some engines composite inconsistently. */
  background: rgba(10, 5, 8, .94);
  overflow: hidden;
}
.lightbox::backdrop { background: rgba(10, 5, 8, .94); }
.lightbox__inner {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 3.5rem .5rem;
}
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  object-fit: contain;
  border-radius: 6px;
}
.lightbox__btn {
  position: absolute;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 50%;
  width: 48px; height: 48px;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.lightbox__btn:hover { background: rgba(255, 255, 255, .28); }
.lightbox__close { top: .75rem; right: .75rem; }
.lightbox__prev { left: .75rem; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: .75rem; top: 50%; transform: translateY(-50%); }
.lightbox__count {
  position: absolute;
  bottom: .9rem;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: .9rem;
  letter-spacing: .05em;
}

/* ---------- Contact page ---------- */

.contact-grid {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
}
@media (min-width: 52em) {
  .contact-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

/* Primary contact actions: two large tap targets, stacked on phones. */

.contact-actions {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  margin-bottom: 2rem;
}
.contact-actions .btn {
  width: 100%;
  flex-direction: column;
  gap: .2rem;
  min-height: 5.25rem;
  padding: 1rem 1.25rem;
  line-height: 1.3;
  text-align: center;
}
.contact-actions .btn strong { font-size: 1.2rem; }
.contact-actions .btn small {
  font-size: .875rem;
  font-weight: 400;
  opacity: .85;
  overflow-wrap: anywhere;
}

.info-list { list-style: none; margin: 0 0 1.5rem; padding: 0; }
.info-list li { display: flex; gap: .6rem; padding: .35rem 0; }
.info-list dt { font-weight: 700; }

.hours { border-collapse: collapse; width: 100%; max-width: 22rem; }
.hours th, .hours td {
  text-align: left;
  padding: .45rem 0;
  border-bottom: 1px solid var(--line);
}
.hours td { text-align: right; color: var(--ink-soft); }

.map-embed {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background: var(--line);
}
.map-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- CTA band ---------- */

.cta-band {
  background: var(--maroon);
  color: #fff;
  text-align: center;
}
.cta-band .wrap { padding-block: clamp(2rem, 5vw, 3rem); }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255, 255, 255, .85); }
.cta-band .btn {
  background: var(--gold);
  border-color: var(--gold);
  color: #2b1b06;
}
.cta-band .btn:hover, .cta-band .btn:focus-visible {
  background: var(--gold-light);
  border-color: var(--gold-light);
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--maroon-dark);
  color: rgba(255, 255, 255, .8);
  padding-block: 2rem;
  font-size: .95rem;
}
.site-footer a { color: #fff; }
.site-footer__cols {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
}
.site-footer h2 {
  color: var(--gold-light);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-family: inherit;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { padding: .2rem 0; }
.site-footer__legal {
  margin-top: 1.75rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, .15);
  font-size: .85rem;
}
