/* ============================================
   Carpet Crafts LLC — custom design system
   Warm, established, trustworthy.
   linen / espresso / refined brick red
   ============================================ */

:root {
  --linen: #F7F3EC;        /* page background */
  --linen-deep: #EFE7DA;   /* alternate section background */
  --espresso: #2B241D;     /* primary text */
  --umber: #6B5D4D;        /* secondary text */
  --brick: #A93226;        /* accent — refined from original red */
  --brick-dark: #8C2A20;   /* accent hover */
  --white: #FFFFFF;
  --line: #E2D8C8;         /* hairline borders */

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;

  --radius: 10px;
  --shadow-soft: 0 2px 6px rgba(43, 36, 29, 0.06), 0 12px 32px rgba(43, 36, 29, 0.08);
  --container: 1120px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--espresso);
  background: var(--linen);
  line-height: 1.65;
  font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
}

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

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- type ---------- */

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 5.2vw, 3.9rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); margin-bottom: 0.5em; }
h3 { font-size: 1.22rem; margin-bottom: 0.35em; }

h1 em {
  font-style: italic;
  color: var(--brick);
}

.eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brick);
  margin-bottom: 0.9em;
}

.section-lede {
  color: var(--umber);
  max-width: 56ch;
  margin-bottom: 2.2rem;
}

a { color: var(--brick); text-decoration-thickness: 1px; text-underline-offset: 3px; }

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.72em 1.35em;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 1.05em; height: 1.05em; flex: none; }

.btn-lg { font-size: 1.02rem; padding: 0.85em 1.6em; }

.btn-primary { background: var(--brick); color: var(--white); }
.btn-primary:hover { background: var(--brick-dark); }

.btn-ghost {
  background: transparent;
  color: var(--espresso);
  border: 1.5px solid var(--espresso);
}
.btn-ghost:hover { background: var(--espresso); color: var(--linen); }

.btn-light { background: var(--white); color: var(--brick); }
.btn-light:hover { background: var(--linen); }

.btn-outline-light {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255, 255, 255, 0.65);
}
.btn-outline-light:hover { border-color: var(--white); background: rgba(255,255,255,0.1); }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 243, 236, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 72px;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--espresso);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.wordmark-mark { width: 26px; height: 26px; color: var(--brick); flex: none; }

.site-nav {
  display: flex;
  gap: 1.6rem;
  margin-left: auto;
}
.site-nav a {
  color: var(--umber);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}
.site-nav a:hover { color: var(--brick); }

.nav-toggle { display: none; }

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

.hero { padding: 4.5rem 0 5rem; }

.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 3.5rem;
  align-items: center;
}

.hero-copy .lede {
  font-size: 1.13rem;
  color: var(--umber);
  margin: 1.3rem 0 2rem;
  max-width: 46ch;
}

.hero-actions {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.review-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  margin-top: 1.5rem;
  text-decoration: none;
  color: var(--umber);
  font-size: 0.95rem;
}
.review-badge .stars {
  color: #E0A63C;
  letter-spacing: 0.1em;
  font-size: 1.05rem;
  line-height: 1;
}
.review-badge strong { color: var(--espresso); }
.review-badge:hover span:last-child { text-decoration: underline; text-underline-offset: 3px; }

.hero-hours {
  margin-top: 0.6rem;
  font-size: 0.9rem;
  color: var(--umber);
}

.hero-photo {
  position: relative;
}
.hero-photo img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  border: 6px solid var(--white);
}
.hero-photo figcaption {
  position: absolute;
  left: 18px;
  bottom: 18px;
  background: rgba(43, 36, 29, 0.82);
  color: var(--linen);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.45em 0.9em;
  border-radius: 6px;
  backdrop-filter: blur(4px);
}

/* ---------- trust strip ---------- */

.trust-strip {
  background: var(--espresso);
  color: var(--linen);
  padding: 1.6rem 0;
}

.trust-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.trust-item {
  display: flex;
  flex-direction: column;
  text-align: center;
  line-height: 1.35;
}
.trust-item strong {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 600;
}
.trust-item span {
  font-size: 0.84rem;
  color: rgba(247, 243, 236, 0.68);
}

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

.section { padding: 5rem 0; }
.section-alt { background: var(--linen-deep); }

/* ---------- flooring cards ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem 1.6rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-soft);
}
.card p { font-size: 0.94rem; color: var(--umber); }

.card-icon {
  width: 46px;
  height: 46px;
  border-radius: 9px;
  background: var(--linen);
  color: var(--brick);
  display: grid;
  place-items: center;
  margin-bottom: 1.1rem;
}
.card-icon svg { width: 24px; height: 24px; }

.carousel-dots { display: none; }

/* lone card in the final row (Installation) spans full width as a closing banner */
.card-grid .card:last-child {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.card-grid .card:last-child .card-icon { margin-bottom: 0; flex: none; }

.card-accent { background: var(--espresso); border-color: var(--espresso); }
.card-accent h3 { color: var(--linen); }
.card-accent p { color: rgba(247, 243, 236, 0.75); }
.card-accent .card-icon { background: rgba(247, 243, 236, 0.1); color: var(--linen); }

/* ---------- why us ---------- */

.why-inner {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 3.5rem;
  align-items: start;
}

.why-copy > p { color: var(--umber); max-width: 58ch; }

.checklist {
  list-style: none;
  margin: 1.8rem 0 2.2rem;
  display: grid;
  gap: 1rem;
}
.checklist li {
  padding-left: 2rem;
  position: relative;
  color: var(--umber);
  font-size: 0.98rem;
}
.checklist li strong { color: var(--espresso); }
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.32em;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  background: var(--brick);
  -webkit-mask: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="black" d="M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm-1.2 14.5-4-4 1.4-1.4 2.6 2.6 5.6-5.6 1.4 1.4-7 7z"/></svg>') center / contain no-repeat;
          mask: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="black" d="M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm-1.2 14.5-4-4 1.4-1.4 2.6 2.6 5.6-5.6 1.4 1.4-7 7z"/></svg>') center / contain no-repeat;
}

.why-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.9rem 1.7rem;
  box-shadow: var(--shadow-soft);
  position: sticky;
  top: 96px;
}
.why-panel h3 { margin-bottom: 0.8rem; }
.why-panel hr { border: none; border-top: 1px solid var(--line); margin: 1.2rem 0; }

.hours-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.hours-table td { padding: 0.4em 0; color: var(--umber); }
.hours-table td:last-child { text-align: right; font-weight: 600; color: var(--espresso); }

.panel-line { font-size: 0.93rem; color: var(--umber); margin-bottom: 0.5rem; }
.panel-line strong {
  display: inline-block;
  min-width: 4.4em;
  color: var(--espresso);
}

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

.visit-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.4rem;
  align-items: stretch;
}

.map-frame {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  min-height: 340px;
}
.map-frame iframe {
  width: 100%;
  height: 100%;
  min-height: 340px;
  border: 0;
  display: block;
}

.visit-photo { margin: 0; }
.visit-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  border: 6px solid var(--white);
  box-shadow: var(--shadow-soft);
}

.visit-cta { margin-top: 1.6rem; }

/* ---------- contact band ---------- */

.contact-band {
  background: linear-gradient(135deg, var(--brick) 0%, var(--brick-dark) 100%);
  color: var(--white);
  padding: 4.5rem 0;
  text-align: center;
}
.contact-band h2 { color: var(--white); }
.contact-band p {
  color: rgba(255, 255, 255, 0.85);
  max-width: 46ch;
  margin: 0.6rem auto 2rem;
}
.contact-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

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

.site-footer {
  background: var(--espresso);
  color: rgba(247, 243, 236, 0.72);
  padding: 3rem 0 1.5rem;
  font-size: 0.92rem;
}
.site-footer a { color: var(--linen); }

.footer-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(247, 243, 236, 0.14);
}

.footer-wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--linen);
  margin-bottom: 0.3rem;
}

.footer-legal {
  padding-top: 1.4rem;
  font-size: 0.82rem;
  color: rgba(247, 243, 236, 0.45);
}

/* ---------- responsive ---------- */

@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .why-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .why-panel { position: static; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .trust-inner { grid-template-columns: repeat(2, 1fr); }
  .visit-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .header-cta { display: none; }

  .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    margin-left: auto;
    background: none;
    border: none;
    width: 44px;
    height: 44px;
    align-items: center;
    cursor: pointer;
  }
  .nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--espresso);
    border-radius: 2px;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--linen);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0;
  }
  .site-nav.open { display: flex; }
  .site-nav a {
    padding: 0.9rem 24px;
    font-size: 1.05rem;
  }

  .hero { padding: 3rem 0 3.5rem; }

  /* flooring cards become a swipeable scroll-snap carousel */
  .card-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-left: 24px;
    gap: 0.9rem;
    margin: 0 -24px;
    padding: 0.25rem 24px 0.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .card-grid::-webkit-scrollbar { display: none; }
  .card-grid .card {
    flex: 0 0 78%;
    scroll-snap-align: start;
  }
  .card-grid .card:hover { transform: none; box-shadow: none; }
  .card-grid .card:last-child {
    grid-column: auto;
    display: block;
  }
  .card-grid .card:last-child .card-icon { margin-bottom: 1.1rem; }

  .carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.55rem;
    margin-top: 1.1rem;
  }
  .carousel-dots .dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--line);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
  }
  .carousel-dots .dot.active {
    background: var(--brick);
    transform: scale(1.25);
  }
  .trust-inner { grid-template-columns: 1fr 1fr; gap: 1.2rem; }
  .section { padding: 3.5rem 0; }
  .footer-inner { grid-template-columns: 1fr; }
}
