/* ============================================================
   Czapiewski & Sons — Painters & Decorators
   Heritage trade × modern editorial.
   Plaster cream · estate green · burnished brass.
   ============================================================ */

:root {
  --paper:        #F4EEE2;
  --paper-deep:   #EBE2D1;
  --ink:          #16241C;
  --green:        #1E3A2D;
  --green-deep:   #132A20;
  --brass:        #B8862B;
  --brass-soft:   #D8B25E;
  --terra:        #B4502E;
  --white-warm:   #FBF8F1;
  --line:         rgba(22, 36, 28, .14);

  --font-display: "Fraunces", "Georgia", serif;
  --font-body:    "Schibsted Grotesk", "Helvetica Neue", sans-serif;

  --ease-out:  cubic-bezier(.16, 1, .3, 1);
  --shadow-lift: 0 24px 48px -16px rgba(22, 36, 28, .28);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  font-size: 17px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--brass); color: var(--white-warm); }

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

.container { width: min(1240px, 92vw); margin-inline: auto; }
.section { padding-block: clamp(5rem, 10vw, 8.5rem); }

/* ---- film grain (static: animating this layer caused scroll jank) ---- */
.grain {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 9999; opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============ TYPE ============ */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 480;
  line-height: 1.04;
  letter-spacing: -.015em;
  text-wrap: balance;
}
h2 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); }
.swash {
  font-style: italic;
  font-weight: 420;
  color: var(--brass);
}
.compliance .swash, .coverage .swash { color: var(--brass-soft); }

.kicker {
  display: inline-flex; align-items: center; gap: .6rem;
  font-size: .78rem; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--green); margin-bottom: 1.1rem;
}
.kicker-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--brass); flex: none; position: relative;
}
.kicker-dot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: rgba(184,134,43,.4);
  animation: pulse 2.4s var(--ease-out) infinite;
}
@keyframes pulse {
  0%       { transform: scale(1); opacity: .7 }
  70%,100% { transform: scale(2.6); opacity: 0 }
}
.kicker-light { color: var(--paper); }
.section-head { max-width: 720px; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-sub { margin-top: 1.1rem; color: rgba(22,36,28,.72); max-width: 56ch; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--font-body); font-weight: 700; font-size: .98rem;
  padding: .95rem 1.7rem; border-radius: 999px;
  text-decoration: none; cursor: pointer; border: 1.5px solid transparent;
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out),
              background .25s, color .25s, border-color .25s;
}
.btn-arr { transition: transform .35s var(--ease-out); }
.btn:hover .btn-arr { transform: translateX(5px); }
.btn-solid { background: var(--green); color: var(--white-warm); }
.btn-solid:hover { background: var(--green-deep); transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--green); transform: translateY(-2px); }
.btn-brass { background: var(--brass); color: var(--green-deep); }
.btn-brass:hover { background: var(--brass-soft); transform: translateY(-2px); box-shadow: 0 20px 40px -14px rgba(0,0,0,.5); }
.btn-wide { width: 100%; justify-content: center; }

/* ============ NAV ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background .35s, box-shadow .35s, padding .35s;
  padding-block: 1.1rem;
}
.nav.is-scrolled {
  background: rgba(244, 238, 226, .88);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
  padding-block: .6rem;
}
.nav-inner {
  width: min(1240px, 92vw); margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--ink); }
.brand-mark svg { width: 40px; height: 40px; }
.mark-bg { fill: var(--green); }
.mark-c { stroke: var(--brass-soft); stroke-width: 2.6; fill: none; stroke-linecap: round; }
.brand-text strong {
  font-family: var(--font-display); font-weight: 560; font-size: 1.12rem;
  display: block; line-height: 1.1; letter-spacing: -.01em;
}
.brand-text em { color: var(--brass); }
.brand-text small {
  font-size: .64rem; letter-spacing: .16em; text-transform: uppercase;
  color: rgba(22,36,28,.6); font-weight: 600;
}
.nav-links { display: flex; align-items: center; gap: 1.7rem; }
.nav-links a {
  text-decoration: none; color: var(--ink);
  font-weight: 600; font-size: .92rem; position: relative;
}
.nav-links a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 0; bottom: -5px;
  width: 100%; height: 2px; background: var(--brass);
  transform: scaleX(0); transform-origin: right;
  transition: transform .4s var(--ease-out);
}
.nav-links a:not(.nav-cta):hover::after { transform: scaleX(1); transform-origin: left; }
.nav-cta {
  background: var(--green); color: var(--white-warm) !important;
  padding: .6rem 1.25rem; border-radius: 999px;
  transition: background .25s, transform .3s var(--ease-out);
}
.nav-cta:hover { background: var(--green-deep); transform: translateY(-1px); }
.nav-burger { display: none; background: none; border: 0; cursor: pointer; padding: .4rem; }
.nav-burger span {
  display: block; width: 26px; height: 2.5px; background: var(--ink);
  margin: 5px 0; border-radius: 2px; transition: transform .3s, opacity .3s;
}

/* ============ HERO ============ */
.hero { position: relative; padding-top: clamp(7rem, 12vw, 9.5rem); overflow: hidden; }
.hero-wash {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(58% 48% at 82% 6%, rgba(184,134,43,.16), transparent 64%),
    radial-gradient(42% 38% at 6% 80%, rgba(30,58,45,.12), transparent 60%);
}
.hero-grid {
  position: relative; display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
}
.hero-title {
  font-size: clamp(2.9rem, 6.4vw, 5.4rem);
  margin-block: 1.2rem .4rem;
}
.hero-title .line { display: block; }
.hero-title .line:last-child { position: relative; display: inline-block; }
.stroke-under {
  position: absolute; left: -4%; bottom: -.18em;
  width: 108%; height: .34em; overflow: visible;
}
.stroke-under path {
  fill: none; stroke: var(--terra); stroke-width: 7; stroke-linecap: round;
  stroke-dasharray: 240; stroke-dashoffset: 240; opacity: .85;
  animation: draw-stroke 1s var(--ease-out) 1.1s forwards;
}
@keyframes draw-stroke { to { stroke-dashoffset: 0; } }
.hero-sub {
  max-width: 50ch; font-size: 1.08rem;
  color: rgba(22,36,28,.78); margin-block: 1.4rem 2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; }
.hero-ticks {
  display: flex; flex-wrap: wrap; gap: 1.4rem;
  list-style: none; margin-top: 2.1rem;
  font-size: .86rem; font-weight: 600; color: rgba(22,36,28,.7);
}
.hero-ticks li { display: flex; align-items: center; gap: .45rem; }
.hero-ticks li::before {
  content: "✓"; color: var(--brass); font-weight: 800;
}

/* hero visual */
.hero-visual { position: relative; }
.hero-photo {
  border-radius: 200px 200px 18px 18px; /* arched, like a Georgian doorway */
  overflow: hidden; box-shadow: var(--shadow-lift);
  border: 6px solid var(--white-warm);
  transform: rotate(1.2deg);
}
.hero-photo img { width: 100%; height: clamp(380px, 46vw, 560px); object-fit: cover; transition: transform 6s var(--ease-out); }
.hero-photo:hover img { transform: scale(1.05); }
.swatch-stack {
  position: absolute; left: -1.6rem; bottom: 2.2rem;
  display: flex; flex-direction: column; gap: .5rem;
}
.swatch {
  display: inline-flex; align-items: center; gap: .55rem;
  background: var(--white-warm); border-radius: 8px;
  padding: .5rem .85rem .5rem .55rem;
  font-size: .74rem; font-weight: 700; letter-spacing: .04em;
  box-shadow: 0 10px 24px -10px rgba(22,36,28,.35);
  animation: swatch-bob 5.5s ease-in-out infinite;
}
.swatch i { width: 22px; height: 22px; border-radius: 5px; }
.swatch.s1 i { background: var(--green); }
.swatch.s2 i { background: var(--paper-deep); border: 1px solid var(--line); }
.swatch.s3 i { background: var(--brass); }
.swatch.s1 { animation-delay: 0s; }
.swatch.s2 { animation-delay: .7s; margin-left: 1.1rem; }
.swatch.s3 { animation-delay: 1.4s; margin-left: .3rem; }
@keyframes swatch-bob { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-7px) } }

.hero-badge {
  position: absolute; top: -2.4rem; right: -1.4rem;
  width: 124px; height: 124px; display: grid; place-items: center;
}
.hero-badge svg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  animation: spin 22s linear infinite;
}
.hero-badge text {
  font-family: var(--font-body); font-size: 10.5px; font-weight: 700;
  letter-spacing: .22em; fill: var(--green);
}
.badge-core {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--green); color: var(--white-warm);
  display: grid; place-items: center;
  font-family: var(--font-display); font-size: 1.25rem; font-weight: 560;
}
.badge-core em { color: var(--brass-soft); font-style: normal; font-size: .85em; }
@keyframes spin { to { transform: rotate(360deg) } }

/* hero stats */
.hero-stats {
  margin-top: clamp(3rem, 6vw, 5rem);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(251,248,241,.5);
}
.stats-row {
  display: grid; grid-template-columns: repeat(4, 1fr);
  text-align: left;
}
.stat {
  padding: 1.6rem 1.2rem;
  border-left: 1px solid var(--line);
}
.stat:first-child { border-left: 0; padding-left: 0; }
.stat-num, .stat-plus {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.9rem, 3.4vw, 2.8rem); line-height: 1;
  color: var(--green);
}
.stat-plus { color: var(--brass); }
.stat p { font-size: .84rem; color: rgba(22,36,28,.65); margin-top: .35rem; }

/* ============ MARQUEE ============ */
.marquee-band {
  background: var(--green); color: var(--paper);
  padding-block: 1.05rem; overflow: hidden;
  transform: rotate(-1.1deg) scale(1.02);
  margin-block: clamp(2.5rem, 5vw, 4rem);
  box-shadow: 0 14px 34px -18px rgba(19,42,32,.6);
}
.marquee { overflow: hidden; }
.marquee-track {
  display: flex; align-items: center; gap: 2.6rem;
  width: max-content;
  animation: marquee 30s linear infinite;
  will-change: transform;
}
.marquee-band:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
  font-family: var(--font-display); font-style: italic;
  font-size: 1.18rem; white-space: nowrap; letter-spacing: .02em;
}
.marquee-track i { color: var(--brass-soft); font-style: normal; font-size: .8rem; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ============ SERVICES ============ */
.service-list { display: flex; flex-direction: column; }
.service {
  display: grid;
  grid-template-columns: 90px 340px 1fr;
  gap: clamp(1.4rem, 3vw, 3rem);
  align-items: center;
  padding-block: clamp(1.8rem, 3.4vw, 2.8rem);
  border-top: 1px solid var(--line);
  transition: background .35s;
}
.service:last-child { border-bottom: 1px solid var(--line); }
.service:hover { background: rgba(251,248,241,.65); }
.service-no {
  font-family: var(--font-display); font-style: italic;
  font-size: clamp(1.7rem, 2.6vw, 2.3rem); color: var(--brass);
  align-self: start; line-height: 1;
}
.service-media {
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 16px 32px -16px rgba(22,36,28,.35);
}
.service-media img {
  width: 100%; height: 210px; object-fit: cover;
  transition: transform .8s var(--ease-out);
}
.service:hover .service-media img { transform: scale(1.06) rotate(.4deg); }
.service-body h3 { font-size: clamp(1.4rem, 2.2vw, 1.85rem); margin-bottom: .6rem; }
.service-body p { color: rgba(22,36,28,.74); max-width: 58ch; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.chips li {
  font-size: .76rem; font-weight: 700; letter-spacing: .03em;
  padding: .32rem .8rem; border-radius: 999px;
  border: 1px solid var(--line); color: var(--green);
  background: var(--white-warm);
  transition: background .25s, color .25s, border-color .25s;
}
.service:hover .chips li { border-color: rgba(184,134,43,.5); }

/* ============ COMPLIANCE ============ */
.compliance {
  background:
    radial-gradient(60% 60% at 90% 10%, rgba(184,134,43,.18), transparent 60%),
    var(--green-deep);
  color: var(--paper);
}
.compliance-grid {
  display: grid; grid-template-columns: 1fr 1.05fr;
  gap: clamp(2.5rem, 6vw, 5.5rem); align-items: center;
}
.compliance-copy p { color: rgba(244,238,226,.78); margin-block: 1.3rem 1.9rem; max-width: 52ch; }
.compliance-list { list-style: none; display: flex; flex-direction: column; gap: 1.1rem; }
.compliance-list li {
  display: flex; gap: 1.1rem; align-items: flex-start;
  background: rgba(251,248,241,.06);
  border: 1px solid rgba(251,248,241,.14);
  border-radius: 16px; padding: 1.25rem 1.4rem;
  transition: background .3s, transform .35s var(--ease-out), border-color .3s;
}
.compliance-list li:hover {
  background: rgba(251,248,241,.11);
  border-color: rgba(216,178,94,.45);
  transform: translateX(8px);
}
.tick {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: var(--brass); color: var(--green-deep);
  display: grid; place-items: center; font-weight: 800; font-size: .9rem;
}
.compliance-list h4 { font-family: var(--font-body); font-size: 1.02rem; font-weight: 700; }
.compliance-list p { font-size: .9rem; color: rgba(244,238,226,.66); margin-top: .2rem; }

/* ============ FAMILY ============ */
.family-grid {
  display: grid; grid-template-columns: .9fr 1.1fr;
  gap: clamp(2.5rem, 6vw, 5rem); align-items: center;
}
.family-photo { position: relative; }
.family-photo img {
  width: 100%; height: clamp(380px, 42vw, 540px); object-fit: cover;
  border-radius: 18px 130px 18px 18px;
  box-shadow: var(--shadow-lift); border: 6px solid var(--white-warm);
  transform: rotate(-1.2deg);
}
.family-photo figcaption {
  position: absolute; bottom: 1.4rem; left: 1.4rem;
  background: var(--green); color: var(--paper);
  font-size: .8rem; font-weight: 700; letter-spacing: .06em;
  padding: .5rem 1rem; border-radius: 999px;
}
.family-copy p { color: rgba(22,36,28,.76); margin-top: 1.2rem; max-width: 56ch; }
.family-copy h2 { margin-top: .2rem; }
.family-quote {
  margin-top: 1.8rem; padding: 1.5rem 1.7rem;
  border-left: 4px solid var(--brass);
  background: var(--white-warm); border-radius: 0 16px 16px 0;
  font-family: var(--font-display); font-style: italic;
  font-size: 1.2rem; line-height: 1.45; color: var(--green);
}
.family-quote cite {
  display: block; margin-top: .7rem;
  font-family: var(--font-body); font-style: normal;
  font-size: .8rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: rgba(22,36,28,.55);
}

/* ============ WORK ============ */
.work { background: var(--paper-deep); }
.work-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 230px; gap: 1.1rem;
}
.work-item {
  position: relative; overflow: hidden; border-radius: 16px;
  box-shadow: 0 14px 30px -16px rgba(22,36,28,.3);
}
.work-item.w-tall { grid-row: span 2; }
.work-item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .9s var(--ease-out);
}
.work-item:hover img { transform: scale(1.07); }
.work-item figcaption {
  position: absolute; left: .9rem; right: .9rem; bottom: .9rem;
  background: rgba(251,248,241,.92); backdrop-filter: blur(6px);
  color: var(--green); font-size: .82rem; font-weight: 700;
  padding: .55rem .9rem; border-radius: 10px;
  transform: translateY(130%); opacity: 0;
  transition: transform .45s var(--ease-out), opacity .45s;
}
.work-item:hover figcaption { transform: translateY(0); opacity: 1; }

/* ============ TESTIMONIALS ============ */
.testimonial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; }
.testimonial {
  background: var(--white-warm); border: 1px solid var(--line);
  border-radius: 18px; padding: 1.9rem 1.7rem;
  display: flex; flex-direction: column; gap: 1rem;
  transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out);
}
.testimonial:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); }
.t-stars { color: var(--brass); letter-spacing: .2em; font-size: .9rem; }
.testimonial p {
  font-family: var(--font-display); font-style: italic;
  font-size: 1.06rem; line-height: 1.5; color: var(--ink); flex: 1;
}
.testimonial footer {
  font-size: .78rem; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: rgba(22,36,28,.55);
}

/* ============ COVERAGE ============ */
.coverage {
  background:
    radial-gradient(50% 70% at 12% 20%, rgba(216,178,94,.14), transparent 60%),
    var(--green);
  color: var(--paper); text-align: center;
}
.coverage-inner { max-width: 880px; }
.coverage .kicker { justify-content: center; width: 100%; }
.coverage-sub { color: rgba(244,238,226,.75); margin: 1.3rem auto 2.4rem; max-width: 58ch; }
.coverage-places {
  list-style: none; display: flex; flex-wrap: wrap;
  justify-content: center; gap: .7rem;
}
.coverage-places li {
  padding: .6rem 1.3rem; border-radius: 999px;
  border: 1px solid rgba(251,248,241,.25);
  font-weight: 600; font-size: .94rem;
  transition: background .3s, transform .3s var(--ease-out), border-color .3s;
}
.coverage-places li:hover {
  background: rgba(251,248,241,.1);
  border-color: var(--brass-soft);
  transform: translateY(-3px);
}
.coverage-places .is-home { background: var(--brass); color: var(--green-deep); border-color: var(--brass); font-weight: 800; }
.coverage-places .is-home small { font-size: .68em; vertical-align: super; margin-left: .3em; letter-spacing: .1em; }
.coverage-places .is-uk { border-style: dashed; color: var(--brass-soft); }

/* ============ CONTACT ============ */
.contact-grid {
  display: grid; grid-template-columns: .95fr 1.05fr;
  gap: clamp(2.5rem, 6vw, 5.5rem); align-items: start;
}
.contact-copy p { color: rgba(22,36,28,.75); margin-top: 1.2rem; max-width: 46ch; }
.contact-details { list-style: none; margin-top: 2.2rem; display: flex; flex-direction: column; gap: 1.1rem; }
.contact-details li { display: flex; align-items: baseline; gap: 1.1rem; }
.cd-label {
  flex: none; width: 56px; font-size: .72rem; font-weight: 800;
  letter-spacing: .14em; text-transform: uppercase; color: var(--brass);
}
.contact-details a {
  color: var(--green); font-weight: 700; text-decoration: none;
  border-bottom: 2px solid rgba(184,134,43,.35);
  transition: border-color .25s;
}
.contact-details a:hover { border-color: var(--brass); }

.contact-form {
  background: var(--white-warm); border: 1px solid var(--line);
  border-radius: 22px; padding: clamp(1.6rem, 3vw, 2.4rem);
  box-shadow: 0 30px 60px -30px rgba(22,36,28,.3);
  display: flex; flex-direction: column; gap: 1.1rem;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.contact-form label {
  display: flex; flex-direction: column; gap: .45rem;
  font-size: .8rem; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; color: rgba(22,36,28,.6);
}
.contact-form input, .contact-form select, .contact-form textarea {
  font-family: var(--font-body); font-size: 1rem; color: var(--ink);
  background: var(--paper); border: 1.5px solid var(--line);
  border-radius: 12px; padding: .85rem 1rem; outline: none;
  transition: border-color .25s, box-shadow .25s;
}
.contact-form textarea { resize: vertical; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus {
  border-color: var(--brass);
  box-shadow: 0 0 0 4px rgba(184,134,43,.16);
}
.form-note { font-size: .78rem; color: rgba(22,36,28,.5); text-align: center; }
.form-note.is-sent { color: var(--green); font-weight: 700; }

/* ============ FOOTER ============ */
.footer {
  background: var(--ink); color: rgba(244,238,226,.75);
  padding-block: 3.2rem;
}
.footer-grid {
  display: grid; grid-template-columns: 1.2fr 1fr .8fr;
  gap: 2rem; align-items: start;
}
.footer-brand strong {
  font-family: var(--font-display); font-size: 1.3rem; color: var(--paper);
}
.footer-brand em { color: var(--brass-soft); }
.footer-brand p { font-size: .88rem; margin-top: .6rem; }
.footer-links { display: flex; flex-direction: column; gap: .55rem; }
.footer-links a {
  color: rgba(244,238,226,.75); text-decoration: none;
  font-size: .92rem; width: fit-content;
  transition: color .25s, transform .3s var(--ease-out);
}
.footer-links a:hover { color: var(--brass-soft); transform: translateX(4px); }
.footer-meta { font-size: .82rem; text-align: right; }

/* ============ MOTION SYSTEM ============ */
.load-rise { opacity: 0; transform: translateY(26px); animation: rise .9s var(--ease-out) var(--d, 0s) forwards; }
.load-fade { opacity: 0; animation: fade 1.1s var(--ease-out) var(--d, 0s) forwards; }
@keyframes rise { to { opacity: 1; transform: translateY(0); } }
@keyframes fade { to { opacity: 1; } }

.reveal { opacity: 0; transform: translateY(34px); transition: opacity .9s var(--ease-out) var(--d, 0s), transform .9s var(--ease-out) var(--d, 0s); }
.reveal.is-in { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  .load-rise, .load-fade, .reveal { opacity: 1; transform: none; }
  .marquee-track { animation: none; }
}

/* ============ CALCULATOR ============ */
.calc-hero { padding-top: clamp(8rem, 13vw, 11rem); }
.calc-hero h1 { font-size: clamp(2.8rem, 6vw, 4.8rem); margin-bottom: 1rem; }
.calc-hero-sub { max-width: 56ch; font-size: 1.08rem; color: rgba(22,36,28,.78); }

.calc-app { padding-top: clamp(2rem, 4vw, 3rem); }
.calc-layout {
  display: grid; grid-template-columns: 1.45fr .85fr;
  gap: clamp(1.6rem, 3.5vw, 3rem); align-items: start;
}

.calc-toolbar {
  display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap;
  margin-bottom: 1.4rem;
}
.unit-toggle {
  display: inline-flex; background: var(--white-warm);
  border: 1.5px solid var(--line); border-radius: 999px; padding: .3rem;
}
.unit-btn {
  border: 0; background: transparent; cursor: pointer;
  font-family: var(--font-body); font-weight: 700; font-size: .9rem;
  padding: .5rem 1.3rem; border-radius: 999px; color: rgba(22,36,28,.6);
  transition: background .25s, color .25s;
}
.unit-btn.is-active { background: var(--green); color: var(--white-warm); }
.calc-toolbar-hint { font-size: .82rem; color: rgba(22,36,28,.55); }

.calc-rows { display: flex; flex-direction: column; gap: 1.1rem; }
.calc-row {
  background: var(--white-warm); border: 1px solid var(--line);
  border-radius: 18px; padding: 1.2rem 1.3rem;
  box-shadow: 0 12px 28px -18px rgba(22,36,28,.25);
  animation: rise .5s var(--ease-out);
}
.row-head { display: flex; align-items: center; gap: .8rem; margin-bottom: 1rem; }
.row-label {
  flex: 1; font-family: var(--font-display); font-size: 1.15rem; font-weight: 520;
  border: 0; border-bottom: 2px dashed transparent; background: transparent;
  color: var(--green); padding: .15rem 0; outline: none;
  transition: border-color .25s;
}
.row-label:hover, .row-label:focus { border-color: rgba(184,134,43,.5); }
.row-del {
  flex: none; width: 32px; height: 32px; border-radius: 50%;
  border: 1.5px solid var(--line); background: transparent;
  color: rgba(22,36,28,.55); font-size: 1.1rem; cursor: pointer; line-height: 1;
  transition: background .25s, color .25s, border-color .25s, transform .3s var(--ease-out);
}
.row-del:hover { background: var(--terra); border-color: var(--terra); color: #fff; transform: rotate(90deg); }
.row-fields {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem;
}
.row-fields label {
  display: flex; flex-direction: column; gap: .3rem;
  font-size: .68rem; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: rgba(22,36,28,.55);
}
.row-fields input, .row-fields select {
  font-family: var(--font-body); font-size: .95rem; color: var(--ink);
  background: var(--paper); border: 1.5px solid var(--line);
  border-radius: 10px; padding: .6rem .7rem; outline: none; width: 100%;
  transition: border-color .25s, box-shadow .25s;
}
.row-fields input:focus, .row-fields select:focus {
  border-color: var(--brass); box-shadow: 0 0 0 3px rgba(184,134,43,.15);
}
.row-fields select:disabled { opacity: .5; }
.row-job { grid-column: span 2; }
.row-out {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-top: 1rem; padding-top: .9rem; border-top: 1px dashed var(--line);
}
.row-area { font-weight: 700; color: var(--green); font-size: .95rem; }
.row-area small { color: rgba(22,36,28,.5); font-weight: 600; }
.row-price {
  font-family: var(--font-display); font-style: italic;
  font-size: 1.2rem; color: var(--brass);
}
.calc-add-bar { display: flex; gap: .8rem; margin-top: 1.3rem; flex-wrap: wrap; }

.calc-summary {
  position: sticky; top: 96px;
  background: var(--green-deep); color: var(--paper);
  border-radius: 22px; padding: 1.8rem 1.7rem;
  box-shadow: var(--shadow-lift);
}
.calc-summary-title {
  font-size: 1.5rem; margin-bottom: 1.2rem;
  color: var(--paper);
}
.sum-lines { display: flex; flex-direction: column; gap: .55rem; margin-bottom: 1.1rem; }
.sum-line { display: flex; justify-content: space-between; align-items: baseline; }
.sum-line dt { font-size: .88rem; color: rgba(244,238,226,.7); }
.sum-line dt small { color: rgba(244,238,226,.45); }
.sum-line dd { font-weight: 700; }
.sum-sub dd { font-size: .8rem; color: rgba(244,238,226,.5); font-weight: 500; }
.sum-total { border-top: 1px solid rgba(251,248,241,.18); padding-top: .8rem; margin-top: .4rem; }
.sum-total dd {
  font-family: var(--font-display); font-style: italic;
  font-size: 1.7rem; color: var(--brass-soft);
}
.sum-breakdown { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1.2rem; }
.bd-line {
  display: flex; justify-content: space-between; gap: 1rem;
  font-size: .8rem; color: rgba(244,238,226,.65);
}
.bd-line strong { color: rgba(244,238,226,.9); font-weight: 600; white-space: nowrap; }
.sum-note { font-size: .78rem; color: rgba(244,238,226,.55); margin-bottom: 1.2rem; }
.calc-call {
  display: block; text-align: center; margin-top: .9rem;
  color: var(--brass-soft); font-weight: 700; font-size: .9rem; text-decoration: none;
}
.calc-call:hover { text-decoration: underline; }

.calc-guide { background: var(--paper-deep); }
.guide-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.3rem; }
.guide-card {
  background: var(--white-warm); border: 1px solid var(--line);
  border-radius: 18px; padding: 1.7rem 1.6rem;
  transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out);
}
.guide-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lift); }
.guide-card h3 { font-size: 1.35rem; margin-bottom: .7rem; }
.guide-card p { font-size: .95rem; color: rgba(22,36,28,.74); }
.rate-list { list-style: none; display: flex; flex-direction: column; }
.rate-list li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding-block: .5rem; border-bottom: 1px dashed var(--line);
  font-size: .92rem;
}
.rate-list li:last-child { border-bottom: 0; }
.rate-list span { color: rgba(22,36,28,.7); }
.rate-list strong { color: var(--green); white-space: nowrap; }

.calc-strip {
  background: var(--brass); color: var(--green-deep);
  padding-block: 2.6rem;
}
.calc-strip-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap;
}
.calc-strip h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
.calc-strip .btn { background: var(--green-deep); color: var(--paper); }
.calc-strip .btn:hover { background: var(--ink); transform: translateY(-2px); }

@media (max-width: 1020px) {
  .calc-layout { grid-template-columns: 1fr; }
  .calc-summary { position: static; }
  .guide-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .row-fields { grid-template-columns: 1fr 1fr; }
  .row-job { grid-column: span 2; }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1020px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 560px; }
  .hero-badge { right: .5rem; }
  .service { grid-template-columns: 56px 1fr; grid-template-rows: auto auto; }
  .service-media { grid-column: 2; }
  .service-body { grid-column: 2; }
  .compliance-grid, .family-grid, .contact-grid { grid-template-columns: 1fr; }
  .work-grid { grid-template-columns: 1fr 1fr; }
  .testimonial-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-meta { text-align: left; }
}
@media (max-width: 720px) {
  /* When the menu is open, drop the blur: backdrop-filter turns .nav into a
     containing block, which would trap the fixed overlay inside the nav bar. */
  .nav.menu-open, .nav.menu-open.is-scrolled {
    backdrop-filter: none; -webkit-backdrop-filter: none;
    background: var(--paper);
  }
  .nav-links {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw; height: 100dvh; z-index: -1;
    background: var(--paper);
    flex-direction: column; justify-content: center; align-items: center;
    font-size: 1.3rem; gap: 2rem;
    opacity: 0; pointer-events: none; transition: opacity .35s;
  }
  .nav-links a { font-size: 1.25rem; }
  .nav.menu-open .nav-links { opacity: 1; pointer-events: auto; z-index: 99; }
  .nav-burger { display: block; position: relative; z-index: 100; }
  .nav.menu-open .nav-burger span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .nav.menu-open .nav-burger span:nth-child(2) { opacity: 0; }
  .nav.menu-open .nav-burger span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .stat { border-left: 0; padding-left: 0; }
  .work-grid { grid-template-columns: 1fr; grid-auto-rows: 240px; }
  .work-item.w-tall { grid-row: span 1; }
  .form-row { grid-template-columns: 1fr; }
  .swatch-stack { left: .6rem; }
  .brand-text small { display: none; }
}
