/* ============================================================
   McCarthy Flooring — shared stylesheet
   Palette: burnt orange + true black + warm off-white
   Type: Archivo throughout, matched to the signage lockup
   ============================================================ */

:root {
  --ground:     #F5F2EE;
  --surface:    #FFFFFF;
  --sunken:     #EBE6E0;
  --ink:        #1E1A1A;
  --muted:      #6A625B;
  --hair:       #DDD6CE;
  --orange:     #E3590B;   /* exact, from the logo file */
  --orange-ink: #A63D05;   /* darkened for text contrast on light */
  --orange-dim: #F7E6DA;   /* tinted ground */
  --band:       #1E1A1A;   /* black bands */
  --band-ink:   #F5F2EE;
  --band-mute:  #A99F96;
  --band-hair:  #322C27;
  --band-accent:#E3590B;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground:     #131110;
    --surface:    #1C1917;
    --sunken:     #211D1A;
    --ink:        #F0ECE7;
    --muted:      #A69C93;
    --hair:       #332E29;
    --orange:     #E4661F;
    --orange-ink: #F0854A;
    --orange-dim: #2A1C13;
    --band:       #0C0A09;
    --band-ink:   #F0ECE7;
    --band-mute:  #A69C93;
    --band-hair:  #2A2521;
    --band-accent:#E3590B;
  }
}

:root[data-theme="dark"] {
  --ground:     #131110;
  --surface:    #1C1917;
  --sunken:     #211D1A;
  --ink:        #F0ECE7;
  --muted:      #A69C93;
  --hair:       #332E29;
  --orange:     #E4661F;
  --orange-ink: #F0854A;
  --orange-dim: #2A1C13;
  --band:       #0C0A09;
  --band-ink:   #F0ECE7;
  --band-mute:  #A69C93;
  --band-hair:  #2A2521;
  --band-accent:#E3590B;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: Archivo, system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 680px; }

a { color: var(--orange-ink); text-underline-offset: 3px; }
a:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 {
  font-family: Archivo, system-ui, -apple-system, sans-serif;
  font-weight: 700;
  letter-spacing: -0.028em;
  text-wrap: balance;
  margin: 0;
}

.label {
  font-family: Archivo, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ra { text-align: right; }
.sp { margin-top: 12px !important; }

/* ---------- status bar ---------- */

.status { background: var(--orange); color: #FFF; }
.status .wrap {
  display: flex; align-items: flex-start; gap: 11px;
  padding-top: 12px; padding-bottom: 12px;
}
.dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: #FFF; flex: none; margin-top: 8px;
}
.status p { flex: 1 1 auto; min-width: 0; max-width: 92ch; }
.status p { margin: 0; font-size: 14.5px; font-weight: 500; color: #FFF; }
.status strong { font-weight: 700; }

/* ---------- masthead ---------- */

.masthead { background: var(--band); color: var(--band-ink); padding: 22px 0; }
.masthead .wrap {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 16px 24px;
}
.wordmark { display: block; line-height: 0; text-decoration: none; }
.wordmark img { display: block; height: 46px; width: auto; }
@media (max-width: 520px) { .wordmark img { height: 38px; } }

.masthead-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; font-size: 15px; }
.masthead-nav a {
  color: var(--band-mute); text-decoration: none;
  border-bottom: 1px solid transparent; padding-bottom: 2px;
}
.masthead-nav a:hover { color: var(--band-ink); border-bottom-color: var(--band-accent); }
.masthead-nav a.phone {
  color: var(--band-ink); font-weight: 600;
  font-variant-numeric: tabular-nums;
  border: 1.5px solid var(--band-hair); padding: 7px 15px;
}
.masthead-nav a.phone:hover { border-color: var(--band-accent); background: var(--band-accent); color: #1E1A1A; }

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

.hero { padding: 76px 0 60px; border-bottom: 1px solid var(--hair); }
.hero-grid { display: block; }
.hero-copy { max-width: none; }
.hero .eyebrow { color: var(--orange-ink); margin: 0 0 20px; }
.hero h1 { font-size: clamp(36px, 5.4vw, 62px); line-height: 1.04; margin-bottom: 24px; max-width: 19ch; }
.hero .lede {
  font-size: clamp(17.5px, 1.6vw, 20px);
  color: var(--muted); max-width: 46ch; margin: 0 0 32px;
}

.hero-figure { margin-top: 52px; }
.hero-figure img { border: none; border-top: 3px solid var(--orange); }
.hero-figure figcaption { text-align: right; }

/* ---------- figures with graceful fallback ---------- */

.figure { margin: 0; }
.figure img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--hair);
  background: var(--sunken);
}
.figure figcaption {
  font-size: 13.5px; color: var(--muted);
  margin-top: 10px; font-style: italic;
}

/* when the image file is missing, draw a plank motif instead */
.figure.empty img { display: none; }
.figure.empty {
  position: relative;
  aspect-ratio: 8 / 5;
  border: 1px solid var(--hair);
  background-color: var(--sunken);
  background-image:
    repeating-linear-gradient(
      90deg,
      transparent 0 78px,
      color-mix(in srgb, var(--ink) 9%, transparent) 78px 79px
    ),
    repeating-linear-gradient(
      0deg,
      transparent 0 46px,
      color-mix(in srgb, var(--ink) 9%, transparent) 46px 47px
    );
}
.figure.empty::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: 34%; height: 6px; background: var(--orange);
}
.figure.empty figcaption { position: absolute; bottom: -30px; left: 0; }

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

.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  font-family: Archivo, sans-serif;
  font-size: 15px; font-weight: 600;
  padding: 14px 24px; text-decoration: none;
  border: 1.5px solid var(--ink);
  display: inline-block;
  transition: transform .12s ease, background .12s ease, color .12s ease, border-color .12s ease;
}
.btn-primary { background: var(--orange); color: #FFF; border-color: var(--orange); }
.btn-primary:hover { background: var(--ink); border-color: var(--ink); color: var(--ground); }
.btn-ghost { color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: var(--ground); }
@media (prefers-reduced-motion: no-preference) { .btn:hover { transform: translateY(-1px); } }

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

section { padding: 72px 0; border-bottom: 1px solid var(--hair); }
.section-label { color: var(--muted); margin: 0 0 14px; }
.section-title { font-size: clamp(27px, 3.4vw, 38px); line-height: 1.14; margin-bottom: 18px; }
.section-intro { color: var(--muted); max-width: 58ch; margin: 0 0 40px; font-size: 17.5px; }

/* ---------- materials ---------- */

.materials {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(232px, 1fr));
  gap: 1px; background: var(--hair); border: 1px solid var(--hair);
}
.material { background: var(--surface); padding: 30px 26px 32px; }
.material h3 { font-size: 23px; margin-bottom: 9px; }
.material p { margin: 0; color: var(--muted); font-size: 15.5px; line-height: 1.55; }
.material .swatch { height: 5px; width: 46px; margin-bottom: 20px; display: block; background: var(--orange); }
.material:nth-child(2) .swatch { background: #8A6234; }
.material:nth-child(3) .swatch { background: #4A6572; }
.material:nth-child(4) .swatch { background: #6E7A5B; }

.install-note { margin-top: 26px; font-size: 16px; color: var(--muted); max-width: 58ch; }

/* ---------- recent work ---------- */

.work-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 28px; margin-bottom: 28px;
}
.work-item img { width: 100%; height: auto; border: 1px solid var(--hair); }
.work-item figcaption { font-style: normal; font-size: 14.5px; }
.work-band { margin-top: 4px; }
.work-band img { width: 100%; height: auto; border: 1px solid var(--hair); }
.work-band figcaption { font-style: normal; font-size: 14.5px; }
.work-grid .figure figcaption, .work-band figcaption { color: var(--muted); }

/* ---------- measure teaser ---------- */

.measure-teaser { background: var(--orange-dim); }
.teaser-inner {
  display: grid; grid-template-columns: 1.15fr 1fr;
  gap: 52px; align-items: center;
}
@media (max-width: 860px) { .teaser-inner { grid-template-columns: 1fr; gap: 36px; } }

.teaser-steps { list-style: none; margin: 0; padding: 0; counter-reset: none; }
.teaser-steps li {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 15px 0; border-bottom: 1px solid var(--hair);
  font-size: 16.5px;
}
.teaser-steps li:last-child { border-bottom: none; }
.teaser-steps span {
  font-family: Archivo, sans-serif; font-weight: 700; font-size: 13px;
  background: var(--orange); color: #FFF;
  width: 25px; height: 25px; flex: none;
  display: grid; place-items: center; margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

/* ---------- visit ---------- */

.visit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 46px; align-items: start; }

.addr {
  font-family: Archivo, system-ui, sans-serif;
  font-size: clamp(24px, 2.8vw, 31px); line-height: 1.25;
  font-weight: 600; margin: 0 0 8px;
}
.addr-sub { color: var(--muted); margin: 0 0 24px; }

.contact-line { margin: 0 0 12px; }
.contact-line .label { color: var(--muted); display: block; margin-bottom: 2px; }
.contact-line a {
  font-weight: 600; font-size: 19px; text-decoration: none;
  border-bottom: 1.5px solid var(--orange);
  font-variant-numeric: tabular-nums;
}

table.hours { border-collapse: collapse; width: 100%; }
table.hours th {
  text-align: left; font-family: Archivo, sans-serif;
  font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); padding: 0 0 12px; border-bottom: 1px solid var(--hair);
}
table.hours th.ra { text-align: right; }
table.hours td {
  padding: 13px 0; border-bottom: 1px solid var(--hair);
  font-variant-numeric: tabular-nums; font-size: 16.5px;
}
table.hours td.ra { font-weight: 500; }
table.hours tr:last-child td { border-bottom: none; }
table.hours .closed { color: var(--muted); font-weight: 400; }

.early {
  margin-top: 18px; padding: 16px 18px;
  background: var(--surface); border-left: 3px solid var(--orange);
  font-size: 15.5px;
}
.early p { margin: 0; }
.early strong { font-family: Archivo, sans-serif; }

/* ---------- story ---------- */

.story { background: var(--surface); }
.story .section-title { max-width: 18ch; }
.story p { max-width: 58ch; margin: 0 0 18px; font-size: 17.5px; }
.story p:last-child { margin-bottom: 0; }

.pull {
  font-family: Archivo, system-ui, sans-serif;
  font-size: clamp(22px, 2.8vw, 29px); line-height: 1.3;
  color: var(--orange-ink);
  border-left: 3px solid var(--orange);
  padding-left: 24px; margin: 36px 0; max-width: 24ch; font-weight: 600;
}

/* ---------- kitchens ---------- */

.kitchens-inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 36px; align-items: center; }
.kitchens p { color: var(--muted); margin: 0 0 20px; max-width: 50ch; }

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

footer { background: var(--band); color: var(--band-mute); padding: 54px 0 40px; }
.foot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 34px; }
footer .label { color: var(--band-mute); display: block; margin-bottom: 12px; }
footer p { margin: 0 0 6px; font-size: 15.5px; color: #D8D1CA; }
footer a { color: var(--band-ink); text-decoration: none; border-bottom: 1px solid var(--band-hair); }
footer a:hover { border-bottom-color: var(--band-accent); }
.colophon {
  margin-top: 42px; padding-top: 22px; border-top: 1px solid var(--band-hair);
  font-size: 13.5px; color: var(--band-mute);
  display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between;
}

@media (max-width: 640px) {
  .hero { padding: 52px 0 46px; }
  section { padding: 54px 0; }
  .btn { flex: 1 1 auto; text-align: center; }
  .masthead-nav { gap: 8px 16px; font-size: 14px; }
}
