/* =========================================================
   K&D Handyman Services — Design System
   ========================================================= */

:root {
  /* Color */
  --bg: #f6f2ec;
  --bg-alt: #efe8dd;
  --surface: #ffffff;
  --text: #141414;
  --text-muted: #6b6257;
  --accent: #a67c52;
  --accent-ink: #8a6240;
  --border: rgba(20, 20, 20, 0.08);
  --border-strong: rgba(20, 20, 20, 0.14);
  --shadow-sm: 0 1px 2px rgba(20, 20, 20, 0.04);
  --shadow-md: 0 6px 24px rgba(20, 20, 20, 0.06);

  /* Spacing (8px system) */
  --s-1: 8px;
  --s-2: 16px;
  --s-3: 24px;
  --s-4: 32px;
  --s-5: 40px;
  --s-6: 48px;
  --s-7: 64px;
  --s-8: 80px;
  --s-9: 96px;
  --s-10: 128px;

  /* Radius */
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-pill: 999px;

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 200ms;

  /* Container */
  --maxw: 1200px;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: clamp(16px, 1.05vw, 17px);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}

a:hover {
  color: var(--accent-ink);
}

button {
  font: inherit;
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
}

h1,
h2,
h3,
h4 {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 500;
  color: var(--text);
  margin: 0;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
  color: var(--text-muted);
}

ul,
ol,
dl {
  margin: 0;
  padding: 0;
  list-style: none;
}

::selection {
  background: var(--accent);
  color: #fff;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--text);
  color: #fff;
  padding: var(--s-1) var(--s-2);
  z-index: 1000;
}

.skip-link:focus {
  left: var(--s-2);
  top: var(--s-2);
}

/* =========================================================
   Layout
   ========================================================= */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--s-3);
}

.section {
  padding: var(--s-8) 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-head {
  max-width: 640px;
  margin: 0 auto var(--s-6);
  text-align: center;
}

.section-head-split {
  display: grid;
  gap: var(--s-3);
  max-width: none;
  text-align: left;
  margin-bottom: var(--s-6);
}

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--s-2);
}

.eyebrow-light {
  color: rgba(255, 255, 255, 0.85);
}

.section-title {
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.1;
  margin-bottom: var(--s-2);
}

.section-lead {
  max-width: 52ch;
  margin-inline: auto;
  color: var(--text-muted);
}

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-1);
  min-height: 44px;
  padding: 12px 22px;
  border-radius: var(--r-pill);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  transition: background var(--dur) var(--ease),
    color var(--dur) var(--ease), border-color var(--dur) var(--ease),
    transform var(--dur) var(--ease);
  white-space: nowrap;
  cursor: pointer;
}

.btn-lg {
  min-height: 52px;
  padding: 14px 28px;
  font-size: 16px;
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
}

.btn-primary:hover {
  background: var(--accent-ink);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.6);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-ghost:hover {
  border-color: var(--text);
  color: var(--text);
}

.btn .icon {
  width: 18px;
  height: 18px;
}

/* =========================================================
   Header / Nav
   ========================================================= */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: background var(--dur) var(--ease),
    border-color var(--dur) var(--ease), backdrop-filter var(--dur) var(--ease);
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  background: rgba(246, 242, 236, 0.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom-color: var(--border);
}

/* Transparent navbar over hero — light foreground (only before scroll) */
.site-header:not(.is-scrolled) .brand-name {
  color: rgba(255, 255, 255, 0.96);
}

.site-header:not(.is-scrolled) .brand-sub {
  color: rgba(255, 255, 255, 0.62);
}

.site-header:not(.is-scrolled) .brand:hover .brand-name {
  color: #fff;
}

.site-header:not(.is-scrolled) .brand:hover .brand-sub {
  color: rgba(255, 255, 255, 0.78);
}

.site-header:not(.is-scrolled) .nav-desktop a {
  color: rgba(255, 255, 255, 0.92);
}

.site-header:not(.is-scrolled) .nav-desktop a:hover {
  color: #fff;
}

.site-header:not(.is-scrolled) .nav-desktop a::after {
  background: rgba(255, 255, 255, 0.85);
}

.site-header:not(.is-scrolled) .header-actions .btn-ghost {
  color: rgba(255, 255, 255, 0.92);
  border-color: rgba(255, 255, 255, 0.42);
}

.site-header:not(.is-scrolled) .header-actions .btn-ghost:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.85);
}

.site-header:not(.is-scrolled) .nav-toggle {
  border-color: rgba(255, 255, 255, 0.42);
}

.site-header:not(.is-scrolled) .nav-toggle span {
  background: #fff;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: var(--s-3);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
}

.brand-wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  min-width: 0;
}

.brand-name {
  font-family: "Playfair Display", serif;
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
}

.brand-sub {
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 2px;
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: var(--s-4);
}

.nav-desktop a {
  font-size: 14.5px;
  color: var(--text);
  position: relative;
}

.nav-desktop a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width var(--dur) var(--ease);
}

.nav-desktop a:hover::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--s-1);
}

.hide-mobile {
  display: none;
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px 10px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-strong);
  background: transparent;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.25px;
  background: var(--text);
  transition: transform var(--dur) var(--ease),
    opacity var(--dur) var(--ease);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6.25px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6.25px) rotate(-45deg);
}

/* Mobile drawer */
.nav-mobile {
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
  transform: translateY(-12px);
  opacity: 0;
  pointer-events: none;
  transition: transform 220ms var(--ease), opacity 220ms var(--ease);
  padding: var(--s-3);
  max-height: calc(100vh - 72px);
  overflow-y: auto;
}

.nav-mobile.is-open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.nav-mobile nav {
  display: flex;
  flex-direction: column;
}

.nav-mobile nav a {
  display: block;
  padding: var(--s-2) 0;
  font-size: 17px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.nav-mobile nav a:last-child {
  border-bottom: 0;
}

.nav-mobile-cta {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
  margin-top: var(--s-3);
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  box-sizing: border-box;
  /* Single viewport height — content sized to fit without scrolling past hero */
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  padding-top: calc(72px + env(safe-area-inset-top, 0px));
  padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  color: #fff;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
      180deg,
      rgba(10, 10, 10, 0.55) 0%,
      rgba(10, 10, 10, 0.35) 40%,
      rgba(10, 10, 10, 0.7) 100%
    );
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 820px;
  width: 100%;
}

.hero-inner > .eyebrow {
  margin-bottom: clamp(6px, 2vw, 14px);
}

.hero-title {
  color: #fff;
  font-size: clamp(1.65rem, 5.2vw + 0.4rem, 4.5rem);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.015em;
  margin-bottom: clamp(10px, 2.5vw, 22px);
}

.hero-lead {
  color: rgba(255, 255, 255, 0.82);
  max-width: 52ch;
  font-size: clamp(14px, 2.8vw, 18px);
  line-height: 1.45;
  margin-bottom: clamp(12px, 3vw, 28px);
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(8px, 2vw, 14px);
  margin-bottom: clamp(14px, 3.5vw, 36px);
}

/* Slightly tighter buttons inside hero so block fits one screen on phones */
.hero .btn-lg {
  min-height: 44px;
  padding: 11px 20px;
  font-size: 15px;
}

.trust-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(8px, 2vw, 18px);
  padding-top: clamp(10px, 2.5vw, 20px);
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  max-width: 640px;
}

.trust-row li {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.trust-value {
  font-family: "Playfair Display", serif;
  font-size: clamp(1rem, 2.2vw, 1.65rem);
  color: #fff;
  line-height: 1;
}

.trust-label {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-size: clamp(10px, 2.4vw, 12.5px);
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.02em;
  line-height: 1.25;
}

.stars {
  display: inline-flex;
  gap: 2px;
  color: var(--accent);
  flex-shrink: 0;
}

.star {
  width: clamp(9px, 2.2vw, 12px);
  height: clamp(9px, 2.2vw, 12px);
}

.hero-scroll {
  position: absolute;
  bottom: max(12px, env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 44px;
  background: rgba(255, 255, 255, 0.35);
  z-index: 1;
  overflow: hidden;
  display: none;
}

.hero-scroll span {
  position: absolute;
  top: -50%;
  left: 0;
  width: 100%;
  height: 50%;
  background: #fff;
  animation: scrollLine 2.2s ease-in-out infinite;
}

@keyframes scrollLine {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(200%);
  }
}

/* Hero — mobile: block centered in viewport (vertical + horizontal) */
@media (max-width: 767.98px) {
  .hero {
    justify-content: center;
    align-items: center;
    padding-top: calc(72px + env(safe-area-inset-top, 0px));
    padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
  }

  .hero-video {
    object-position: 50% 28%;
  }

  .hero-inner {
    flex: 0 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    max-width: 100%;
  }

  .hero-inner > .eyebrow {
    margin-bottom: 8px;
  }

  .hero-title {
    font-size: clamp(1.75rem, 6.5vw + 0.35rem, 2.35rem);
    margin-bottom: 10px;
    max-width: min(34ch, 100%);
    margin-left: auto;
    margin-right: auto;
  }

  .hero-lead {
    max-width: 38ch;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: var(--s-3);
    font-size: 15px;
    line-height: 1.5;
  }

  .hero-ctas {
    flex-direction: column;
    align-items: stretch;
    align-self: center;
    width: 100%;
    max-width: min(22rem, 100%);
    gap: var(--s-2);
    margin-bottom: var(--s-3);
  }

  .hero .btn-lg {
    width: 100%;
    min-height: 52px;
    padding: 14px 22px;
    font-size: 16px;
    justify-content: center;
  }

  .trust-row {
    margin-top: var(--s-3);
    align-self: stretch;
    width: 100%;
    max-width: 22rem;
    margin-left: auto;
    margin-right: auto;
    padding-top: var(--s-2);
    gap: var(--s-1);
  }

  .trust-row li {
    align-items: center;
    text-align: center;
  }

  .trust-label {
    justify-content: center;
    text-align: center;
  }
}

/* =========================================================
   Cards + carousels
   ========================================================= */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--s-4);
  transition: border-color var(--dur) var(--ease),
    transform var(--dur) var(--ease);
}

.card:hover {
  border-color: var(--border-strong);
}

.service-card h3 {
  font-size: 1.35rem;
  margin-bottom: var(--s-1);
}

.service-card p {
  font-size: 15px;
  color: var(--text-muted);
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-sm);
  background: var(--bg-alt);
  color: var(--accent-ink);
  margin-bottom: var(--s-2);
}

.section-alt .card-icon {
  background: var(--bg);
}

.card-icon svg {
  width: 22px;
  height: 22px;
}

/* Carousel wrapper */
.carousel {
  position: relative;
}

.carousel-track {
  display: flex;
  gap: var(--s-2);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: var(--s-1) var(--s-3) var(--s-3);
  margin-inline: calc(-1 * var(--s-3));
  scroll-padding-inline: var(--s-3);
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-track > * {
  flex: 0 0 86vw;
  max-width: 380px;
  scroll-snap-align: start;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: var(--s-2);
}

.carousel-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-3);
  margin-top: var(--s-2);
}

.carousel-footer .carousel-dots {
  margin-top: 0;
}

/* Expandable carousels: show first 6 only until expanded */
.carousel[data-expand-state="preview"] .carousel-track > *:nth-child(n + 7) {
  display: none !important;
}

.btn-expand {
  min-height: 44px;
  padding: 10px 4px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(20, 20, 20, 0.18);
  border-radius: 0;
  cursor: pointer;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.btn-expand:hover {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.btn-expand:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(166, 124, 82, 0.22);
  border-radius: var(--r-sm);
}

.btn-expand[hidden] {
  display: none !important;
}

.carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border-strong);
  padding: 0;
  transition: background var(--dur) var(--ease),
    width var(--dur) var(--ease);
}

.carousel-dot.is-active {
  background: var(--accent);
  width: 22px;
  border-radius: 999px;
}

/* Work cards */
.work-card {
  margin: 0;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  aspect-ratio: 4 / 5;
}

.work-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms var(--ease);
}

.work-card:hover img {
  transform: scale(1.03);
}

/* Step cards */
.step-card {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
}

.step-card h3 {
  font-size: 1.35rem;
}

.step-card p {
  font-size: 15px;
}

.step-num {
  font-family: "Playfair Display", serif;
  font-size: 28px;
  color: var(--accent);
  line-height: 1;
  margin-bottom: var(--s-2);
}

/* =========================================================
   About
   ========================================================= */
.about-grid {
  display: grid;
  gap: var(--s-6);
}

.about-copy p {
  margin-top: var(--s-2);
  max-width: 56ch;
}

.about-copy .btn {
  margin-top: var(--s-4);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-2);
  margin-top: var(--s-5);
  padding-top: var(--s-4);
  border-top: 1px solid var(--border);
}

.stat dt {
  font-family: "Playfair Display", serif;
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  color: var(--text);
  line-height: 1;
}

.stat dd {
  margin: 6px 0 0;
  font-size: 12.5px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.about-media {
  margin: 0;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
}

.about-media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.about-media figcaption {
  padding: var(--s-2) var(--s-3);
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

/* =========================================================
   Contact
   ========================================================= */
.contact-grid {
  display: grid;
  gap: var(--s-6);
}

.contact-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--s-2);
  margin-top: var(--s-4);
}

.contact-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  box-shadow: var(--shadow-sm);
}

.contact-label {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.contact-value,
.contact-card > a {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--text);
}

.contact-list a {
  align-self: flex-start;
  border-bottom: 1px solid transparent;
}

.contact-list a:hover {
  border-bottom-color: var(--accent);
  color: var(--accent-ink);
}

.contact-form {
  display: grid;
  gap: var(--s-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--s-4);
}

.field {
  display: grid;
  gap: 8px;
}

.field-row {
  display: grid;
  gap: var(--s-2);
}

.field label {
  font-size: 12.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.field input,
.field select,
.field textarea {
  font: inherit;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 14px 16px;
  color: var(--text);
  min-height: 48px;
  transition: border-color var(--dur) var(--ease),
    background var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  width: 100%;
}

.field textarea {
  resize: vertical;
  min-height: 120px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(166, 124, 82, 0.15);
}

.form-note {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  margin-top: var(--s-1);
}

.form-note a {
  color: var(--text);
  border-bottom: 1px solid var(--border-strong);
}

/* =========================================================
   Footer (editorial 3-column + base bar)
   ========================================================= */
.site-footer {
  --footer-rule: rgba(255, 255, 255, 0.1);
  --footer-muted: rgba(255, 255, 255, 0.48);
  background: #0d0d0d;
  color: rgba(255, 255, 255, 0.78);
  padding: var(--s-8) 0 max(var(--s-5), env(safe-area-inset-bottom, 0px));
  margin-top: var(--s-6);
}

.footer-main {
  display: grid;
  gap: var(--s-5);
  padding-bottom: var(--s-6);
  border-bottom: 1px solid var(--footer-rule);
  text-align: center;
  justify-items: center;
}

.footer-col {
  min-width: 0;
}

.footer-col + .footer-col {
  padding-top: var(--s-5);
  border-top: 1px solid var(--footer-rule);
}

.footer-brand-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  margin-bottom: var(--s-3);
}

.footer-mark {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex-shrink: 0;
}

.footer-name {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  font-weight: 500;
  color: #fff;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.footer-tagline {
  margin: 0 auto;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.65;
  color: var(--footer-muted);
  max-width: 36ch;
}

.footer-heading {
  margin: 0 0 var(--s-3);
  width: 100%;
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--footer-muted);
  text-align: center;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.footer-nav a {
  color: rgba(255, 255, 255, 0.92);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.35;
  padding: 10px 0;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.footer-nav a:hover {
  color: #fff;
  border-bottom-color: rgba(255, 255, 255, 0.25);
}

.footer-contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.footer-contact a {
  color: rgba(255, 255, 255, 0.92);
  font-size: 15px;
  line-height: 1.45;
  padding: 6px 0;
  word-break: break-word;
  max-width: 100%;
  border-bottom: 1px solid transparent;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.footer-contact a:hover {
  color: #fff;
  border-bottom-color: rgba(255, 255, 255, 0.25);
}

.footer-address-block {
  margin: var(--s-1) 0 0;
  font-size: 15px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.92);
}

.footer-base {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: var(--s-4);
}

.footer-copy {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.42);
  letter-spacing: 0.02em;
  max-width: 48ch;
}

/* =========================================================
   Reveal animation (subtle)
   ========================================================= */
[data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 420ms var(--ease), transform 420ms var(--ease);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hero-scroll span {
    animation: none;
  }
}

/* =========================================================
   Tablet
   ========================================================= */
@media (min-width: 768px) {
  .section {
    padding: var(--s-9) 0;
  }

  .container {
    padding: 0 var(--s-4);
  }

  .hero {
    justify-content: center;
    align-items: stretch;
    padding-top: calc(72px + env(safe-area-inset-top, 0px));
    padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
  }

  .hero-video {
    object-position: 50% 50%;
  }

  .hero-inner {
    flex: none;
    display: block;
    align-items: stretch;
    justify-content: initial;
    text-align: initial;
    min-height: 0;
  }

  .hero-title {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
  }

  .hero-lead {
    max-width: 52ch;
    margin-left: 0;
    margin-right: 0;
  }

  .hero-ctas {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    width: auto;
    max-width: none;
    gap: var(--s-2);
  }

  .hero .btn-lg {
    width: auto;
    min-height: 48px;
    padding: 12px 24px;
    font-size: 15px;
    justify-content: center;
  }

  .trust-row {
    margin-top: 0;
    margin-left: 0;
    margin-right: 0;
    max-width: 640px;
  }

  .trust-row li {
    align-items: flex-start;
    text-align: initial;
  }

  .trust-label {
    justify-content: flex-start;
    text-align: initial;
  }

  .section-head-split {
    grid-template-columns: 1fr 1fr;
    align-items: end;
    gap: var(--s-5);
  }

  .section-head-split p {
    max-width: 46ch;
  }

  .about-grid {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: var(--s-7);
  }

  .contact-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--s-7);
    align-items: start;
  }

  .field-row {
    grid-template-columns: 1fr 1fr;
  }

  .footer-main {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.85fr) minmax(0, 1fr);
    align-items: start;
    gap: 0;
    column-gap: var(--s-6);
    padding-bottom: var(--s-7);
    text-align: initial;
    justify-items: stretch;
  }

  .footer-brand-row {
    justify-content: flex-start;
  }

  .footer-tagline {
    margin: 0;
  }

  .footer-heading {
    text-align: initial;
  }

  .footer-nav {
    align-items: flex-start;
  }

  .footer-contact {
    align-items: flex-start;
    text-align: initial;
  }

  .footer-col + .footer-col {
    padding-top: 0;
    border-top: 0;
    border-left: 1px solid var(--footer-rule);
    padding-left: var(--s-6);
    margin-left: 0;
  }

  .hero-scroll {
    display: block;
  }
}

/* =========================================================
   Desktop
   ========================================================= */
@media (min-width: 1024px) {
  .nav-desktop {
    display: flex;
  }

  .hide-mobile {
    display: inline-flex;
  }

  .nav-toggle {
    display: none;
  }

  .nav-mobile {
    display: none;
  }

  .header-inner {
    min-height: 80px;
  }

  .hero {
    padding-top: calc(80px + env(safe-area-inset-top, 0px));
  }

  .hero .btn-lg {
    min-height: 52px;
    padding: 14px 28px;
    font-size: 16px;
  }

  .brand-mark {
    width: 44px;
    height: 44px;
  }

  .brand-name {
    font-size: 17px;
  }

  /* Disable mobile carousel behaviour → grid */
  .carousel-track {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--s-3);
    overflow: visible;
    scroll-snap-type: none;
    padding: 0;
    margin-inline: 0;
  }

  .carousel-track > * {
    flex: unset;
    max-width: none;
    scroll-snap-align: unset;
  }

  .carousel-track-work {
    grid-template-columns: repeat(3, 1fr);
  }

  .carousel-track-steps {
    grid-template-columns: repeat(4, 1fr);
  }

  .carousel-dots {
    display: none;
  }

  .stats {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--s-4);
  }
}

@media (min-width: 1200px) {
  .carousel-track {
    gap: var(--s-3);
  }
}

/* Short viewports — must load after tablet/desktop hero rules */
@media (max-height: 560px) {
  .hero-title {
    font-size: clamp(1.35rem, 4vh + 0.5rem, 2.25rem);
    margin-bottom: 6px;
  }

  .hero-lead {
    font-size: 13px;
    margin-bottom: 8px;
    line-height: 1.35;
  }

  .hero-ctas {
    margin-bottom: 10px;
    gap: 6px;
  }

  .hero .btn-lg {
    min-height: 40px;
    padding: 8px 16px;
    font-size: 14px;
  }

  .trust-row {
    padding-top: 8px;
    gap: 6px;
  }

  .hero-scroll {
    display: none;
  }
}
