/* ============================================================
   RF Carpets & Flooring — stylesheet
   Palette: deep forest green, muted sage, warm off-white,
   charcoal text and a restrained natural-wood accent.
   ============================================================ */

:root {
  /* Brand */
  --color-brand: #35483C;
  --color-brand-soft: #687968;
  --color-brand-light: #AEBBA9;
  --color-wood: #A18A68;

  /* Text */
  --color-ink: #242A26;
  --color-body: #3B433D;
  --color-muted: #747B74;

  /* Surfaces */
  --color-bg: #F7F7F3;
  --color-surface: #FFFFFF;
  --color-line: #DDE3DB;
  --color-placeholder: #E7EBE5;
  --color-white: #FFFFFF;
  --color-steel: #4E5A62;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --step--1: 0.8125rem;
  --step-0: 1rem;
  --step-1: 1.125rem;
  --step-2: clamp(1.35rem, 2vw, 1.65rem);
  --step-3: clamp(1.7rem, 2.6vw, 2.15rem);
  --step-4: clamp(1.95rem, 3.6vw, 3rem);

  --space-2xs: 0.35rem;
  --space-xs: 0.6rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.25rem;
  --space-xl: 3.5rem;
  --space-2xl: clamp(3.5rem, 8vw, 6.5rem);

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  --container: 1180px;
  --container-narrow: 760px;
  --header-height: 82px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- Reset and base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 1.25rem);
  /* clip, not hidden: prevents sideways scroll without turning the
     page into a scroll container and breaking the sticky header */
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-body);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.6em;
  color: var(--color-ink);
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.015em;
  font-optical-sizing: auto;
  overflow-wrap: break-word;
}

h1 {
  font-size: var(--step-4);
}

h2 {
  font-size: var(--step-3);
}

h3 {
  font-size: var(--step-2);
  line-height: 1.2;
}

p {
  margin: 0 0 1em;
  overflow-wrap: break-word;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--color-brand);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color 160ms var(--ease);
}

a:hover {
  color: var(--color-ink);
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

/* Remove 300ms tap delay on touch devices */
a,
button,
summary,
input,
select,
textarea,
label {
  touch-action: manipulation;
}

::selection {
  background: var(--color-brand);
  color: var(--color-white);
}

:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute !important;
  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;
  top: -100%;
  left: 1rem;
  z-index: 999;
  padding: 0.65rem 1rem;
  background: var(--color-brand);
  color: var(--color-bg);
  border-radius: var(--radius-sm);
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
  color: var(--color-bg);
}

/* Anchor targets land below the sticky header */
[id] {
  scroll-margin-top: calc(var(--header-height) + 1.5rem);
}

/* ---------- Overflow guard ----------
   Grid and flex items default to min-width: auto, which refuses to
   shrink below their content's intrinsic width. A long word then
   widens the track and produces horizontal scroll. Setting min-width
   to 0 lets the item shrink and the text wrap. */

.hero > *,
.split-layout > *,
.flooring-grid > *,
.why-grid > *,
.testimonials-grid > *,
.benefits-grid > *,
.recent-grid > *,
.gallery-grid > *,
.footer-grid > *,
.form-grid > *,
.process-step > *,
.section-head-row > *,
.cta-inner > *,
.flooring-card > *,
.contact-details > * {
  min-width: 0;
}

/* ---------- Shared layout ---------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 2rem);
}

.narrow {
  max-width: var(--container-narrow);
}

.section {
  padding-block: var(--space-2xl);
}

.section-head {
  max-width: 680px;
  margin-bottom: var(--space-xl);
}

.section-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-md);
  max-width: none;
}

.section-lead {
  color: var(--color-muted);
  font-size: var(--step-1);
  max-width: 62ch;
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--color-brand);
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.spaced-top {
  margin-top: var(--space-md);
}

/* ---------- Buttons and links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 46px;
  padding: 0.72rem 1.25rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background-color 160ms var(--ease), color 160ms var(--ease),
    border-color 160ms var(--ease);
}

.btn-primary {
  background: var(--color-brand);
  color: var(--color-white);
  border-color: var(--color-brand);
}

.btn-primary:hover {
  background: var(--color-ink);
  border-color: var(--color-ink);
  color: var(--color-white);
}

.btn-ghost {
  background: transparent;
  color: var(--color-ink);
  border-color: rgba(53, 72, 60, 0.38);
}

.btn-ghost:hover {
  background: var(--color-ink);
  border-color: var(--color-ink);
  color: var(--color-bg);
}

.btn-large {
  min-height: 54px;
  padding: 0.9rem 1.6rem;
  font-size: 1rem;
}

.text-link {
  display: inline-block;
  color: var(--color-brand);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
}

.text-link:hover {
  color: var(--color-ink);
}

/* ---------- Header and navigation ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  width: 100%;
  max-width: var(--container);
  min-height: var(--header-height);
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 2rem);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--color-ink);
  text-decoration: none;
  flex-shrink: 0;
  min-width: 0;
}

.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: var(--color-brand);
  color: var(--color-wood);
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.primary-nav {
  position: relative;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 2vw, 1.6rem);
}

.nav-list a {
  color: var(--color-ink);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}

.nav-list a:hover,
.nav-list a[aria-current="page"] {
  color: var(--color-brand);
}

.nav-list a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
}

.nav-list .nav-cta {
  color: var(--color-white);
  text-decoration: none;
}

.nav-list .nav-cta:hover {
  color: var(--color-white);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  margin-block: 4px;
  background: var(--color-ink);
  transition: transform 180ms var(--ease), opacity 180ms var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ---------- Image placeholders and injected photos ---------- */

.img-placeholder {
  position: relative;
  overflow: hidden;
  max-width: 100%;
  background: var(--color-placeholder);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
}

.img-placeholder::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: inherit;
}

.img-placeholder.has-image::after {
  display: none;
}

.img-placeholder img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.placeholder-label {
  position: absolute;
  left: 0.65rem;
  bottom: 0.65rem;
  z-index: 1;
  padding: 0.22rem 0.45rem;
  background: rgba(36, 42, 38, 0.82);
  color: var(--color-bg);
  border-radius: var(--radius-sm);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
  align-items: center;
  gap: clamp(1.5rem, 4vw, 4rem);
  max-width: var(--container);
  margin-inline: auto;
  padding: clamp(2.5rem, 6vw, 5.5rem) clamp(1.1rem, 4vw, 2rem)
    clamp(2rem, 5vw, 4rem);
}

.hero-content {
  order: 1;
  max-width: 34rem;
}

.hero-media {
  order: 2;
  min-height: 300px;
  aspect-ratio: 5 / 4;
}

.hero-sub {
  max-width: 40ch;
  color: var(--color-body);
  font-size: var(--step-1);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: var(--space-lg);
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-line);
  color: var(--color-muted);
  font-size: var(--step--1);
}

.hero-points li {
  position: relative;
  padding-left: 0.9rem;
}

.hero-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.58em;
  width: 5px;
  height: 5px;
  background: var(--color-brand-soft);
  border-radius: 50%;
}

.hero-points a {
  color: inherit;
  text-decoration: none;
}

.hero-points a:hover {
  color: var(--color-brand);
}

/* ---------- Benefits strip ---------- */

.benefits-strip {
  background: var(--color-brand);
  color: var(--color-bg);
  padding-block: clamp(2.4rem, 5vw, 3.5rem);
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1.2rem, 3vw, 2.5rem);
}

.benefit-item {
  padding-top: var(--space-sm);
  border-top: 1px solid rgba(247, 247, 243, 0.25);
}

.benefit-number {
  display: block;
  margin-bottom: 0.9rem;
  color: var(--color-brand-light);
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.benefit-title {
  margin-bottom: 0.35rem;
  color: var(--color-bg);
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.3;
}

.benefit-item p {
  color: rgba(247, 247, 243, 0.78);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ---------- Split introduction ---------- */

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.5rem, 5vw, 4rem);
}

.split-media {
  min-height: 320px;
  aspect-ratio: 4 / 3;
}

.split-text {
  max-width: 36rem;
}

.split-text .why-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 var(--space-md);
  margin-top: var(--space-md);
}

.split-form {
  align-items: start;
}

/* ---------- Flooring grid ---------- */

.flooring-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(1rem, 2.5vw, 1.8rem);
}

.flooring-card {
  display: flex;
  flex-direction: column;
  grid-column: span 4;
  padding-top: var(--space-sm);
  border-top: 1px solid var(--color-line);
}

.flooring-card:nth-child(1),
.flooring-card:nth-child(2) {
  grid-column: span 6;
}

.flooring-card:nth-child(6) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: var(--space-md);
  grid-column: span 12;
}

.card-media {
  min-height: 190px;
  aspect-ratio: 4 / 3;
  margin-bottom: var(--space-sm);
}

.flooring-card:nth-child(6) .card-media {
  margin-bottom: 0;
  aspect-ratio: 16 / 10;
}

.card-body h3 {
  margin-bottom: 0.4rem;
}

.card-body p {
  color: var(--color-muted);
  font-size: 0.95rem;
}

.card-body .text-link {
  margin-top: var(--space-xs);
  font-size: 0.9rem;
}

/* ---------- Why section ---------- */

.why-section {
  background: var(--color-surface);
  border-block: 1px solid var(--color-line);
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 clamp(1.5rem, 3vw, 2.5rem);
}

.why-item {
  padding-block: var(--space-md);
  border-top: 1px solid var(--color-line);
}

.why-item h3 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.35rem;
}

.why-item p {
  color: var(--color-muted);
  font-size: 0.93rem;
}

/* ---------- Process ---------- */

.process-list {
  max-width: 860px;
  counter-reset: process;
}

.process-step {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr);
  gap: var(--space-md);
  padding-block: var(--space-md);
  border-top: 1px solid var(--color-line);
}

.process-step:last-child {
  border-bottom: 1px solid var(--color-line);
}

.step-number {
  color: var(--color-brand);
  font-family: var(--font-display);
  font-size: 1.7rem;
  line-height: 1;
}

.process-step h3 {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.process-step p {
  color: var(--color-muted);
  max-width: 58ch;
}

/* ---------- Recent work ---------- */

.recent-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0.9rem;
}

.recent-item {
  grid-column: span 3;
  min-height: 160px;
  aspect-ratio: 1 / 1;
}

.recent-item:nth-child(1) {
  grid-column: span 6;
  aspect-ratio: 16 / 10;
}

.recent-item:nth-child(2),
.recent-item:nth-child(3) {
  grid-column: span 3;
}

.recent-item:nth-child(4) {
  grid-column: span 12;
  min-height: 150px;
  aspect-ratio: 21 / 6;
}

.fine-print {
  margin-top: var(--space-sm);
  color: var(--color-muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

/* ---------- Testimonials ---------- */

.testimonials-section {
  background: var(--color-surface);
  border-block: 1px solid var(--color-line);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-lg) clamp(1.5rem, 3vw, 2.5rem);
}

.testimonial {
  margin: 0;
  padding-left: var(--space-md);
  border-left: 2px solid var(--color-brand-soft);
}

.testimonial p {
  color: var(--color-body);
  font-size: 0.96rem;
  line-height: 1.65;
}

.testimonial .stars {
  margin-bottom: 0.5rem;
  color: var(--color-wood);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
}

.testimonial footer {
  margin-top: var(--space-sm);
  font-size: 0.82rem;
}

.testimonial cite {
  display: block;
  color: var(--color-ink);
  font-style: normal;
  font-weight: 600;
}

.testimonial footer span {
  color: var(--color-muted);
}

/* ---------- Service area ---------- */

.area-section {
  text-align: left;
}

.area-section p {
  max-width: 58ch;
}

.area-section .btn {
  margin-top: var(--space-md);
}

/* ---------- FAQ ---------- */

.faq-list {
  border-top: 1px solid var(--color-line);
}

.faq-item {
  border-bottom: 1px solid var(--color-line);
}

.faq-item summary {
  position: relative;
  padding: 1.1rem 2.5rem 1.1rem 0;
  color: var(--color-ink);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-brand);
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  padding: 0 0 1.2rem;
  max-width: 64ch;
  color: var(--color-muted);
  font-size: 0.95rem;
}

/* ---------- Final CTA ---------- */

.cta-section {
  background: var(--color-brand);
  color: var(--color-bg);
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
}

.cta-inner h2 {
  color: var(--color-bg);
}

.cta-inner p {
  color: rgba(247, 247, 243, 0.82);
  max-width: 50ch;
}

.cta-inner .eyebrow {
  color: var(--color-brand-light);
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--color-brand);
  color: rgba(247, 247, 243, 0.78);
  padding-top: var(--space-xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 1.2fr;
  gap: var(--space-lg);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid rgba(247, 247, 243, 0.18);
}

.footer-logo {
  margin-bottom: 0.5rem;
  color: var(--color-bg);
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.footer-note {
  max-width: 30ch;
  font-size: 0.88rem;
  color: rgba(247, 247, 243, 0.62);
}

.footer-heading {
  margin-bottom: 0.8rem;
  color: var(--color-bg);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.footer-links {
  display: grid;
  gap: 0.2rem;
}

.footer-links a,
.footer-contact a {
  display: inline-block;
  padding-block: 0.3rem;
  color: rgba(247, 247, 243, 0.78);
  font-size: 0.9rem;
  text-decoration: none;
}

.footer-links a:hover,
.footer-contact a:hover {
  color: var(--color-brand-light);
}

.footer-contact,
.site-footer p {
  font-size: 0.9rem;
}

.footer-small {
  margin-top: 0.6rem;
  color: rgba(247, 247, 243, 0.55);
  font-size: 0.78rem;
  max-width: 34ch;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: var(--space-md);
  padding-block: var(--space-md);
  font-size: 0.78rem;
  color: rgba(247, 247, 243, 0.55);
}

.footer-bottom p {
  margin: 0;
}

/* ---------- Forms ---------- */

.form {
  display: grid;
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-md);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field-full {
  grid-column: 1 / -1;
}

.field label,
.field legend {
  color: var(--color-ink);
  font-size: 0.9rem;
  font-weight: 600;
}

.field .hint {
  color: var(--color-muted);
  font-size: 0.78rem;
  font-weight: 400;
}

/* 16px prevents iOS from zooming the whole page when a field is
   focused on an iPhone */
.field input,
.field select,
.field textarea,
.message-box {
  width: 100%;
  min-height: 46px;
  padding: 0.65rem 0.75rem;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
  color: var(--color-ink);
  font-size: 1rem;
  transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease);
}

.field textarea {
  min-height: 140px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.message-box:focus {
  border-color: var(--color-brand);
  outline: 2px solid rgba(53, 72, 60, 0.2);
  outline-offset: 1px;
}

.field input:invalid:not(:placeholder-shown),
.field textarea:invalid:not(:placeholder-shown) {
  border-color: #a23b2a;
}

.form-note,
.status-message {
  padding: 0.9rem 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
  color: var(--color-muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.form-note strong {
  color: var(--color-ink);
}

.status-message:empty {
  display: none;
}

.status-message {
  margin: 0;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
}

.form-result {
  display: grid;
  gap: var(--space-sm);
  padding: var(--space-md);
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
}

.form-result[hidden] {
  display: none;
}

.form-result label {
  color: var(--color-ink);
  font-size: 0.9rem;
  font-weight: 600;
}

.message-box {
  min-height: 220px;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  resize: vertical;
  white-space: pre-wrap;
}

.form-result .form-actions {
  margin: 0;
}

.contact-details {
  display: grid;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.contact-details h2 {
  margin: 0 0 0.25rem;
  font-size: var(--step-2);
}

.contact-detail {
  padding-top: var(--space-sm);
  border-top: 1px solid var(--color-line);
}

.contact-detail h3 {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.contact-detail p {
  color: var(--color-muted);
  font-size: 0.92rem;
}

/* ---------- Gallery ---------- */

.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: var(--space-lg);
}

/* 44px meets the WCAG 2.5.5 minimum touch target size */
.filter-btn {
  min-height: 44px;
  padding: 0.5rem 0.9rem;
  background: transparent;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
  color: var(--color-ink);
  font-size: 0.875rem;
  font-weight: 600;
}

.filter-btn[aria-pressed="true"],
.filter-btn:hover {
  background: var(--color-brand);
  border-color: var(--color-brand);
  color: var(--color-bg);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0.9rem;
}

.gallery-item {
  grid-column: span 4;
  min-height: 220px;
  aspect-ratio: 4 / 3;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: var(--color-placeholder);
  text-align: left;
  cursor: pointer;
}

.gallery-item:nth-child(4n + 1) {
  grid-column: span 6;
  aspect-ratio: 16 / 10;
}

.gallery-item[hidden] {
  display: none;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-item:hover,
.gallery-item:focus-visible {
  border-color: var(--color-brand);
}

/* Lightbox */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: var(--space-md);
  background: rgba(36, 42, 38, 0.92);
}

.lightbox[hidden] {
  display: none;
}

.lightbox-panel {
  position: relative;
  width: min(720px, 100%);
  max-height: 85vh;
  overflow: auto;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  display: grid;
  gap: var(--space-sm);
}

.lightbox-close {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  width: 44px;
  height: 44px;
  background: var(--color-brand);
  color: var(--color-bg);
  border: 0;
  border-radius: var(--radius-sm);
  font-size: 1.3rem;
  line-height: 1;
  z-index: 1;
}

.lightbox-media {
  min-height: 260px;
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  color: var(--color-muted);
  font-size: 0.85rem;
  text-align: center;
  padding: var(--space-md);
  overflow: hidden;
}

.lightbox-media img {
  position: static;
  width: 100%;
  height: auto;
  max-height: 70vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.lightbox-caption {
  margin: 0;
  color: var(--color-ink);
  font-size: 0.98rem;
  font-weight: 500;
}

.lightbox-note {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.78rem;
}

/* ---------- Subtle reveal on scroll ---------- */

.will-reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 420ms var(--ease), transform 420ms var(--ease);
}

.is-revealed {
  opacity: 1;
  transform: none;
}

/* ---------- Motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .will-reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Responsive: tablet ---------- */

@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .hero-content,
  .hero-media {
    order: initial;
  }

  .hero-content {
    max-width: 42rem;
  }

  .hero-media {
    aspect-ratio: 16 / 9;
    min-height: 260px;
  }

  .benefits-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split-layout {
    grid-template-columns: 1fr;
  }

  .split-media {
    aspect-ratio: 16 / 9;
    min-height: 240px;
  }

  .split-text {
    max-width: none;
  }

  .split-text .why-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .flooring-card,
  .flooring-card:nth-child(1),
  .flooring-card:nth-child(2) {
    grid-column: span 6;
  }

  .flooring-card:nth-child(6) {
    grid-column: span 12;
    grid-template-columns: 1fr;
  }

  .flooring-card:nth-child(6) .card-media {
    aspect-ratio: 16 / 9;
    margin-bottom: var(--space-sm);
  }

  .why-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .testimonials-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .recent-item:nth-child(1) {
    grid-column: span 12;
    aspect-ratio: 16 / 8;
  }

  .recent-item:nth-child(2),
  .recent-item:nth-child(3) {
    grid-column: span 6;
    aspect-ratio: 16 / 10;
  }

  .recent-item:nth-child(4) {
    grid-column: span 12;
    aspect-ratio: 16 / 6;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid > div:first-child {
    grid-column: 1 / -1;
  }
}

/* ---------- Responsive: mobile navigation and layout ---------- */

@media (max-width: 820px) {
  :root {
    --header-height: 72px;
  }

  .header-inner {
    position: relative;
  }

  .primary-nav {
    position: static;
  }

  .nav-toggle {
    display: block;
  }

  .nav-list {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
    padding: 0.5rem 0 0.75rem;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-line);
  }

  .primary-nav.nav-open .nav-list {
    display: flex;
  }

  .nav-list li {
    border-top: 1px solid var(--color-line);
  }

  .nav-list li:first-child {
    border-top: 0;
  }

  /* Larger tap targets in the dropdown */
  .nav-list a {
    display: block;
    padding: 0.95rem 1.1rem;
    font-size: 1rem;
  }

  .nav-list .nav-cta {
    margin: 0.65rem 1.1rem 0.2rem;
    padding: 0.75rem 1rem;
  }

  .section-head-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .cta-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .gallery-item,
  .gallery-item:nth-child(4n + 1) {
    grid-column: span 6;
    aspect-ratio: 1 / 1;
  }

  /* Footer links already have block padding; keep columns tidy */
  .footer-links {
    gap: 0;
  }

  .footer-small,
  .fine-print {
    font-size: 0.82rem;
  }
}

@media (max-width: 620px) {
  .benefits-grid,
  .why-grid,
  .split-text .why-grid,
  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  .benefit-item {
    padding-top: var(--space-sm);
  }

  .flooring-card,
  .flooring-card:nth-child(1),
  .flooring-card:nth-child(2),
  .flooring-card:nth-child(6) {
    grid-column: span 12;
  }

  .flooring-card:nth-child(6) {
    display: flex;
  }

  .hero-media {
    min-height: 220px;
  }

  .split-media {
    min-height: 200px;
  }

  .hero-points {
    font-size: 0.875rem;
  }

  .process-step {
    grid-template-columns: 2.5rem minmax(0, 1fr);
    gap: var(--space-sm);
    padding-block: 1.15rem;
  }

  .step-number {
    font-size: 1.35rem;
  }

  .recent-item,
  .recent-item:nth-child(1),
  .recent-item:nth-child(2),
  .recent-item:nth-child(3),
  .recent-item:nth-child(4) {
    grid-column: span 12;
    aspect-ratio: 16 / 10;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid > div:first-child {
    grid-column: auto;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 0.4rem;
  }

  .gallery-item,
  .gallery-item:nth-child(4n + 1) {
    grid-column: span 12;
    aspect-ratio: 4 / 3;
  }

  .lightbox-panel {
    padding: var(--space-sm);
  }
}

@media (max-width: 420px) {
  .hero-actions .btn,
  .form-actions .btn {
    width: 100%;
  }

  .hero {
    padding-top: 2rem;
    padding-bottom: 2.5rem;
  }

  .hero-points {
    gap: 0.4rem 1rem;
  }

  .logo-text {
    display: none;
  }

  .section {
    padding-block: 3rem;
  }
}