/* =========================================================================
   AMF Home Renovation: landing page
   Layout concept: a near-black page holding one large rounded hero, then
   numbered sections on dark, light-gray, rust and tan panels, glass overlays
   and pill-shaped controls.
   ========================================================================= */

:root {
  /* Color: page surface. Dark is the default; the light values are further down. */
  --ink: #10100f;                          /* page background */
  --ink-2: #181816;                        /* raised panel on the page */
  --ink-3: #22221f;                        /* image placeholder */
  --line: rgba(243, 242, 238, 0.14);
  --text: #f3f2ee;
  --muted: rgba(243, 242, 238, 0.66);
  --paper: #d9d8d3;                        /* light cards: Why Choose Us and the form */
  --field-bg: #f4f3ef;
  --card-edge: transparent;
  --ctrl-line: rgba(255, 255, 255, 0.3);   /* outlined controls sitting on the page */
  --ctrl-line-hover: rgba(255, 255, 255, 0.7);
  --ctrl-bg: rgba(0, 0, 0, 0.18);
  --ctrl-bg-hover: rgba(255, 255, 255, 0.14);
  --ctrl-fill: rgba(255, 255, 255, 0.1);
  --ctrl-fill-hover: rgba(255, 255, 255, 0.2);
  --underline: rgba(255, 255, 255, 0.4);
  --solid-bg: #f5f4f0;                     /* solid button on the page (floating CTA) */
  --solid-bg-hover: #fff;
  --solid-fg: #111;
  --focus: #f3b777;

  /* Color: fixed in both themes (light cards, photo overlays, brand) */
  --paper-ink: #141412;
  --paper-muted: rgba(20, 20, 18, 0.64);
  --rust: #a8381a;
  --rust-bright: #d2532b;
  --rust-deep: #4a170b;
  --tan: #a99277;
  --tan-ink: #171310;
  --glass: rgba(255, 255, 255, 0.1);
  --glass-line: rgba(255, 255, 255, 0.3);
  --danger: #a3260f;

  /* Dark values reused inside the hero and the rust panel, which stay dark in light mode */
  --dk-text: #f3f2ee;
  --dk-muted: rgba(243, 242, 238, 0.66);
  --dk-line: rgba(243, 242, 238, 0.14);

  /* Type */
  --sans: "Instrument Sans", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --serif: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;

  /* Shape and rhythm */
  --r-xl: 32px;
  --r-lg: 24px;
  --r-md: 16px;
  --gutter: clamp(16px, 2.4vw, 32px);
  --section-y: clamp(64px, 9vw, 128px);

  color-scheme: dark;
}

/* Light theme: follows the device setting, or the toggle (html[data-theme]) when the visitor picked one */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --ink: #ebeae5;
    --ink-2: #f6f5f1;
    --ink-3: #d8d6cf;
    --line: rgba(20, 20, 18, 0.14);
    --text: #161512;
    --muted: rgba(22, 21, 18, 0.68);
    --paper: #f6f5f1;
    --field-bg: #fff;
    --card-edge: rgba(20, 20, 18, 0.1);
    --ctrl-line: rgba(20, 20, 18, 0.3);
    --ctrl-line-hover: rgba(20, 20, 18, 0.7);
    --ctrl-bg: transparent;
    --ctrl-bg-hover: rgba(20, 20, 18, 0.07);
    --ctrl-fill: rgba(20, 20, 18, 0.05);
    --ctrl-fill-hover: rgba(20, 20, 18, 0.1);
    --underline: rgba(20, 20, 18, 0.4);
    --solid-bg: #141210;
    --solid-bg-hover: #000;
    --solid-fg: #f3f2ee;
    --focus: #9a3416;
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --ink: #ebeae5;
  --ink-2: #f6f5f1;
  --ink-3: #d8d6cf;
  --line: rgba(20, 20, 18, 0.14);
  --text: #161512;
  --muted: rgba(22, 21, 18, 0.68);
  --paper: #f6f5f1;
  --field-bg: #fff;
  --card-edge: rgba(20, 20, 18, 0.1);
  --ctrl-line: rgba(20, 20, 18, 0.3);
  --ctrl-line-hover: rgba(20, 20, 18, 0.7);
  --ctrl-bg: transparent;
  --ctrl-bg-hover: rgba(20, 20, 18, 0.07);
  --ctrl-fill: rgba(20, 20, 18, 0.05);
  --ctrl-fill-hover: rgba(20, 20, 18, 0.1);
  --underline: rgba(20, 20, 18, 0.4);
  --solid-bg: #141210;
  --solid-bg-hover: #000;
  --solid-fg: #f3f2ee;
  --focus: #9a3416;
  color-scheme: light;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
}
/* Lenis (script.js) smooths the scroll itself; the browser only does it when Lenis is not running */
@media (prefers-reduced-motion: no-preference) {
  html:not(.lenis) { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 400 1rem/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, ul, dl, dd, figure { margin: 0; }
ul { padding: 0; list-style: none; }
[hidden] { display: none !important; }
section[id], header[id] { scroll-margin-top: 16px; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: #fff;
  color: #111;
  text-decoration: none;
  font-weight: 500;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}
.skip-link:focus { top: max(16px, env(safe-area-inset-top, 0px)); }

.wrap {
  width: 100%;
  max-width: 1360px;
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
  padding-block: 0 32px;
}

.i {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Shared controls ---------- */

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  min-height: 46px;
  padding: 0.55rem 1.25rem;
  border: 1px solid var(--glass-line);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font: 500 0.9rem/1 var(--sans);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}
.pill:hover { border-color: rgba(255, 255, 255, 0.7); }
.pill--sm { min-height: 38px; padding: 0.4rem 1rem; font-size: 0.82rem; }
.pill--glass {
  background: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
}
.pill--glass:hover { background: rgba(255, 255, 255, 0.2); }
.pill--light { background: #f5f4f0; border-color: transparent; color: #111; }
.pill--light:hover { background: #fff; }
.pill--outline { background: rgba(0, 0, 0, 0.18); }
.pill--outline:hover { background: rgba(255, 255, 255, 0.16); }
.pill--dark { background: #141210; border-color: transparent; color: #f3f2ee; padding-right: 0.45rem; }
.pill--dark:hover { background: #000; }
.pill--block { width: 100%; }
.pill--lg { min-height: 54px; padding: 0.45rem 0.5rem 0.45rem 1.5rem; font-size: 0.95rem; }
.pill--lg-ghost { min-height: 50px; padding: 0.35rem 1.4rem 0.35rem 0.4rem; border-radius: 999px; }

.dot {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #111;
  color: #fff;
  flex: none;
}
.dot--light { background: #f3f2ee; color: #111; }

.round-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--ctrl-line);
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.2s, border-color 0.2s, opacity 0.2s;
}
.round-btn:hover:not(:disabled) { background: var(--ctrl-bg-hover); border-color: var(--ctrl-line-hover); }
.round-btn:disabled { opacity: 0.35; cursor: default; }
.round-btn--light { background: #f5f4f0; color: #111; border-color: transparent; }
.round-btn--light:hover { background: #fff !important; }

.orb {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  background: rgba(30, 28, 26, 0.7);
  color: #fff;
  font-size: 0.8rem;
}
.orb--lg { width: 44px; height: 44px; font-size: 1rem; }
.orb--sm { width: 34px; height: 34px; background: #f3f2ee; color: #111; border-color: transparent; }

.label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.3;
}
.label b { font-size: 1rem; font-weight: 500; color: var(--text); }
.label--dark { color: var(--paper-muted); }
.label--dark b { color: var(--paper-ink); }
.label--tan { color: rgba(23, 19, 16, 0.7); }
.label--tan b { color: var(--tan-ink); }

.section { padding-block: var(--section-y) 0; }

em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.005em; }

/* =========================================================================
   HERO
   ========================================================================= */

/* The hero is a full-screen, full-width box that is clipped to a rounded frame (--hero-p: 0).
   Scrolling opens the frame until the hero fills the whole screen (--hero-p: 1). */
@property --hero-p { syntax: '<number>'; inherits: false; initial-value: 0; }

.hero {
  /* Where the frame sits inside the full-screen box: the page gutter, or the 1360px content column when the screen is wider */
  --frame-x: max(var(--gutter), env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px), calc((100% - 1360px) / 2 + var(--gutter)));
  --frame-y: var(--gutter);
  --open: calc(1 - var(--hero-p, 0));
  position: relative;
  isolation: isolate;
  height: max(100svh, calc(580px + 2 * var(--frame-y)));
  overflow: hidden;
  background: #18203f;
  clip-path: inset(
    calc(var(--frame-y) * var(--open))
    calc(var(--frame-x) * var(--open))
    calc(var(--frame-y) * var(--open))
    calc(var(--frame-x) * var(--open))
    round calc(var(--r-xl) * var(--open))
  );
}

/* The content keeps the position it had inside the frame, so only the photo is revealed as the frame opens */
.hero-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: calc(100% - 2 * var(--frame-y));
  margin: var(--frame-y) var(--frame-x);
}

/* Pin the hero while it opens: the stage adds the scroll distance the animation needs.
   Short screens and reduced-motion visitors get the plain framed hero. */
@media (min-height: 700px) and (prefers-reduced-motion: no-preference) {
  .hero-stage {
    --hero-runway: 60svh;
    height: calc(100svh + var(--hero-runway));
  }
  .hero {
    position: sticky;
    top: 0;
  }
}

@keyframes hero-open { to { --hero-p: 1; } }

/* Scroll-driven animation where supported; script.js drives --hero-p elsewhere */
@supports ((animation-timeline: scroll()) and (animation-range: 0% 100%)) {
  @media (min-height: 700px) and (prefers-reduced-motion: no-preference) {
    .hero {
      animation: hero-open auto linear both;
      animation-timeline: scroll(root block);
      animation-range: 0px var(--hero-runway);
    }
  }
}

/* The hero, the service cards and the rust panel sit on photos and dark gradients, so they keep the dark palette in light mode */
.hero,
.card,
.panel--rust {
  --text: var(--dk-text);
  --muted: var(--dk-muted);
  --line: var(--dk-line);
  --ctrl-line: var(--glass-line);
  --ctrl-line-hover: rgba(255, 255, 255, 0.7);
  --ctrl-bg-hover: rgba(255, 255, 255, 0.14);
  --focus: #f3b777;
  color: var(--text);
}

.hero-img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 50% 62%;
  animation: settle 1.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
@keyframes settle { from { transform: scale(1.06); } to { transform: scale(1); } }

.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to top, rgba(8, 8, 8, 0.9) 0%, rgba(8, 8, 8, 0.55) 30%, rgba(8, 8, 8, 0) 62%),
    linear-gradient(to bottom, rgba(8, 10, 24, 0.55) 0%, rgba(8, 10, 24, 0) 24%);
}

/* nav */
.nav {
  position: absolute;
  inset: clamp(16px, 2.4vw, 32px) clamp(16px, 2.6vw, 36px) auto;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: clamp(8px, 2vw, 28px);
  text-decoration: none;
  color: #fff;
}
.brand-mark { width: 38px; height: 38px; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-text b { font-size: 1.55rem; font-weight: 600; letter-spacing: 0.02em; }
.brand-text span { margin-top: 4px; font-size: 0.58rem; font-weight: 500; letter-spacing: 0.26em; text-transform: uppercase; opacity: 0.8; }

.nav-pills { display: flex; gap: 8px; }
.nav-line { flex: 1; min-width: 24px; height: 1px; margin-inline: 8px; background: linear-gradient(90deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.12)); }
.nav-actions { display: flex; gap: 8px; }
.nav .pill { font-size: 0.82rem; font-weight: 400; }
.nav .pill .i { width: 1em; height: 1em; }
.nav .pill--light { font-weight: 500; }

.menu-btn { display: none; margin-left: auto; }

.theme-btn {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--glass-line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  color: #fff;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}
.theme-btn:hover { background: rgba(255, 255, 255, 0.2); border-color: rgba(255, 255, 255, 0.7); }
.theme-btn .i { width: 1.1rem; height: 1.1rem; }

.mobile-menu {
  position: absolute;
  z-index: 6;
  top: 76px;
  left: clamp(16px, 2.6vw, 36px);
  right: clamp(16px, 2.6vw, 36px);
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--glass-line);
  border-radius: 24px;
  background: rgba(16, 16, 15, 0.72);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
  backdrop-filter: blur(22px) saturate(1.3);
}
.mobile-menu a {
  display: block;
  padding: 14px 18px;
  border-radius: 16px;
  text-decoration: none;
  font-size: 1.05rem;
}
.mobile-menu a:hover { background: rgba(255, 255, 255, 0.1); }
.mobile-menu .mobile-menu-cta { margin-top: 4px; background: #f5f4f0; color: #111; text-align: center; font-weight: 500; border-radius: 999px; }
.mobile-menu .mobile-menu-cta:hover { background: #fff; }

/* hero body */
.hero-body {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  padding: clamp(20px, 3vw, 44px);
}

.hero-copy { min-width: 0; max-width: 780px; }

h1 {
  font: 500 clamp(2.5rem, 5.2vw, 4.6rem)/1 var(--sans);
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.h1-line { display: block; }
.h1-line:first-child { display: flex; align-items: center; flex-wrap: wrap; column-gap: 0.28em; }
h1 em { font-size: 1.12em; letter-spacing: -0.015em; padding-right: 0.08em; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px 6px 6px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(20, 18, 16, 0.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  font-size: 1rem;
  letter-spacing: 0;
  font-weight: 400;
}
.orbs { display: inline-flex; }
.orbs .orb { width: 34px; height: 34px; margin-left: -9px; font-size: 0.9rem; }
.orbs .orb:first-child { margin-left: 0; background: var(--rust); }
.orbs .orb:nth-child(2) { background: #8a7459; }
.orbs .orb:nth-child(3) { background: #2a2825; }
.badge-text { display: flex; flex-direction: column; line-height: 1.15; }
.badge-text b { font-size: 0.82rem; font-weight: 500; }
.badge-text small { font-size: 0.66rem; opacity: 0.75; }

.hero-sub {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px 22px;
  margin-top: clamp(16px, 2vw, 26px);
}
.hero-sub p { max-width: 30ch; font-size: 0.95rem; line-height: 1.4; color: rgba(255, 255, 255, 0.88); }

.glass-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 22px;
  background: rgba(20, 18, 16, 0.42);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  backdrop-filter: blur(18px) saturate(1.3);
  max-width: 420px;
}
.glass-card-text { flex: 1; min-width: 0; font-size: 0.82rem; line-height: 1.3; color: rgba(255, 255, 255, 0.85); }

/* =========================================================================
   01 ABOUT
   ========================================================================= */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 96px);
}
.about-left { display: flex; flex-direction: column; justify-content: space-between; gap: 56px; min-width: 0; }
.small-copy { max-width: 36ch; font-size: 0.95rem; color: var(--muted); }

.about-right { min-width: 0; }
.lead {
  font-size: clamp(1.45rem, 2.7vw, 2.45rem);
  line-height: 1.18;
  letter-spacing: -0.022em;
  text-wrap: pretty;
}

.icon-row { display: flex; gap: 10px; margin-top: 32px; }

/* Outlined pills that sit on the page surface (not on photos) follow the theme */
.about-cta .pill--glass,
.sec-tools .pill--outline {
  border-color: var(--ctrl-line);
  color: var(--text);
}
.about-cta .pill--glass { background: var(--ctrl-fill); }
.about-cta .pill--glass:hover { background: var(--ctrl-fill-hover); }
.sec-tools .pill--outline { background: var(--ctrl-bg); }
.sec-tools .pill--outline:hover { background: var(--ctrl-bg-hover); }
.about-cta .pill--glass:hover,
.sec-tools .pill--outline:hover { border-color: var(--ctrl-line-hover); }
.about-cta .orb--sm { background: var(--solid-bg); color: var(--solid-fg); }

.about-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin-top: clamp(40px, 6vw, 80px);
}
.about-cta p { max-width: 34ch; font-size: 0.95rem; color: var(--muted); }

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: clamp(32px, 4vw, 56px);
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.stats > div { display: grid; grid-template-areas: "num" "label"; align-content: start; gap: 6px; }
.stats dt { grid-area: label; font-size: 0.82rem; color: var(--muted); }
.stats dd { grid-area: num; font-size: clamp(2.2rem, 4.4vw, 3.6rem); line-height: 1; letter-spacing: -0.04em; font-weight: 500; font-variant-numeric: tabular-nums; }

/* =========================================================================
   02 SERVICES
   ========================================================================= */

.sec-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.sec-tools { display: flex; align-items: center; gap: 10px; }

.scroller {
  margin-top: clamp(20px, 3vw, 40px);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  border-radius: var(--r-lg);
}
.scroller::-webkit-scrollbar { display: none; }
.scroller:focus-visible { outline-offset: 6px; }

.cards { display: flex; align-items: flex-end; gap: 18px; }
.card-wrap { flex: 0 0 clamp(236px, 22vw, 296px); scroll-snap-align: start; min-width: 0; }

.card {
  position: relative;
  isolation: isolate;
  aspect-ratio: 4 / 5;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--ink-3);
}
.card img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top, rgba(8, 8, 8, 0.82) 0%, rgba(8, 8, 8, 0.4) 42%, rgba(8, 8, 8, 0) 66%);
}

.card-glass {
  position: absolute;
  inset: auto 10px 10px;
  display: grid;
  gap: 8px;
  padding: 14px 14px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  background: rgba(24, 22, 20, 0.34);
  -webkit-backdrop-filter: blur(14px) saturate(1.25);
  backdrop-filter: blur(14px) saturate(1.25);
}
.card-glass h3 { font-size: 1.02rem; font-weight: 500; letter-spacing: -0.01em; line-height: 1.2; }
.card-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 0.66rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.82);
}
.chip--solid { border-color: transparent; background: rgba(255, 255, 255, 0.16); color: #fff; font-weight: 500; }
.card-line { font-size: 0.7rem; line-height: 1.4; color: rgba(255, 255, 255, 0.72); }

.card-caption { padding: 16px 4px 0; }
.card-caption h3 { font-size: 0.95rem; font-weight: 500; }
.card-caption p { margin-top: 4px; font-size: 0.85rem; color: var(--muted); }

.lines {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: clamp(40px, 5vw, 72px);
}
.line {
  padding: clamp(22px, 3vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--ink-2);
}
.line h3 { font-size: clamp(1.3rem, 2vw, 1.75rem); font-weight: 500; letter-spacing: -0.02em; line-height: 1.15; }
.line > p { max-width: 42ch; margin-top: 10px; color: var(--muted); }
.ticks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 20px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.ticks li { display: flex; align-items: flex-start; gap: 10px; font-size: 0.92rem; line-height: 1.35; }
.ticks .i { margin-top: 1px; padding: 3px; width: 1.3rem; height: 1.3rem; border-radius: 50%; background: var(--rust); color: #fff; stroke-width: 2.4; }

.fineprint { margin-top: 20px; font-size: 0.82rem; color: var(--muted); }

/* =========================================================================
   03 WHY CHOOSE US + panels
   ========================================================================= */

.panel { border-radius: var(--r-xl); }
.panel--paper,
.form-card { box-shadow: 0 0 0 1px var(--card-edge); }

.why-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  gap: 18px;
}

.panel--paper {
  padding: clamp(24px, 3.6vw, 52px);
  background: var(--paper);
  color: var(--paper-ink);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.panel--paper :focus-visible { outline-color: var(--paper-ink); }
.why-main h2 {
  max-width: 18ch;
  font-size: clamp(1.9rem, 3.4vw, 3rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.why-list { margin-top: clamp(16px, 3vw, 40px); border-top: 1px solid rgba(20, 20, 18, 0.16); }
.why-list li {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid rgba(20, 20, 18, 0.16);
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  line-height: 1.3;
}
.why-ic {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--paper-ink);
  color: #f3f2ee;
  font-size: 0.9rem;
}
.why-ic .i { stroke-width: 2.2; }
.why-ic--lg { width: 56px; height: 56px; font-size: 1.3rem; }

.panel--rust {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  min-height: 460px;
  padding: clamp(24px, 3.6vw, 48px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(110% 80% at 12% 0%, #b73c1c 0%, #7c2812 34%, #2a0f08 62%, #0f0e0d 88%),
    #0f0e0d;
}
.rust-copy { max-width: 30ch; font-size: clamp(1.1rem, 1.7vw, 1.4rem); line-height: 1.3; letter-spacing: -0.01em; }

.tag-cloud { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 12px; padding-bottom: 4px; }
.tag {
  padding: 0.7rem 1.15rem;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  background: rgba(8, 8, 8, 0.78);
  color: #fff;
  font-size: 0.88rem;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1), background-color 0.2s;
}
.tag:nth-child(1) { transform: rotate(-6deg); }
.tag:nth-child(2) { transform: rotate(8deg); }
.tag:nth-child(3) { transform: rotate(-3deg); }
.tag:nth-child(4) { transform: rotate(7deg); }
.tag:nth-child(5) { transform: rotate(-8deg); }
.tag:nth-child(6) { transform: rotate(3deg); }
.tag:hover { transform: rotate(0) scale(1.05); background: #000; }

/* =========================================================================
   04 SERVICE AREA
   ========================================================================= */

.panel--tan {
  background: var(--tan);
  color: var(--tan-ink);
}
.area-panel {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
  padding: clamp(24px, 4vw, 64px);
  overflow: hidden;
}
.area-panel :focus-visible { outline-color: var(--tan-ink); }
.area-copy { display: grid; gap: 20px; justify-items: start; min-width: 0; }
.area-copy h2 {
  max-width: 20ch;
  font-size: clamp(1.8rem, 3.5vw, 3.1rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.area-copy p:not(.label) { max-width: 40ch; font-size: 1.02rem; color: rgba(23, 19, 16, 0.82); }
.area-copy .pill { margin-top: 8px; }

.rings svg { width: 100%; max-width: 420px; margin-inline: auto; overflow: visible; }
.ring { fill: rgba(23, 19, 16, 0.07); stroke: rgba(23, 19, 16, 0.5); stroke-width: 1.4; }
.ring--3 { stroke-dasharray: 3 7; stroke-linecap: round; fill: rgba(23, 19, 16, 0.05); }
.ring--2 { stroke-dasharray: 8 6; fill: rgba(23, 19, 16, 0.07); }
.ring--1 { fill: rgba(168, 56, 26, 0.28); stroke: var(--tan-ink); stroke-width: 1.6; }
.ring-label text { font: 500 13px var(--sans); fill: var(--tan-ink); }
.pin-halo { fill: rgba(23, 19, 16, 0.12); }
.pin-body { fill: var(--tan-ink); }
.pin-dot { fill: var(--tan); }

/* =========================================================================
   05 ESTIMATE
   ========================================================================= */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.contact-copy { display: grid; gap: 20px; min-width: 0; }
.contact-copy h2 {
  font-size: clamp(2.2rem, 4.6vw, 4rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.contact-copy h2 em { font-size: 1.12em; }
.contact-lead { font-size: 1.1rem; color: var(--muted); }

.contact-info { display: grid; margin-top: 12px; border-top: 1px solid var(--line); }
.contact-info > div {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.contact-info dt { font-size: 0.82rem; color: var(--muted); padding-top: 2px; }
.contact-info dd { overflow-wrap: anywhere; }
.contact-info a { text-decoration-color: var(--underline); text-underline-offset: 3px; }
.contact-info a:hover { text-decoration-color: currentColor; }
.placeholder { color: var(--muted); font-style: italic; }
.closing { max-width: 36ch; margin-top: 8px; font-size: 1.05rem; line-height: 1.4; }

.form-card {
  padding: clamp(20px, 3.2vw, 44px);
  border-radius: var(--r-xl);
  background: var(--paper);
  color: var(--paper-ink);
}
.form-card :focus-visible { outline-color: var(--paper-ink); }
.form-card form { display: grid; gap: 18px; }
.form-hint { font-size: 0.8rem; color: var(--paper-muted); }
.row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.field label { font-size: 0.86rem; font-weight: 500; }
.field label span { color: var(--danger); }

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 52px;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(20, 20, 18, 0.2);
  border-radius: 14px;
  background: var(--field-bg);
  color: var(--paper-ink);
  font: 400 1rem/1.35 var(--sans);
  transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: rgba(20, 20, 18, 0.45); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--paper-ink); box-shadow: 0 0 0 3px rgba(20, 20, 18, 0.14); }

.select-wrap { position: relative; }
.select-wrap select { appearance: none; -webkit-appearance: none; padding-right: 2.8rem; cursor: pointer; }
.select-wrap .i { position: absolute; right: 1rem; top: 50%; translate: 0 -50%; pointer-events: none; color: var(--paper-ink); }
.field select:required:invalid { color: rgba(20, 20, 18, 0.55); }
.field select option, .field select optgroup { color: var(--paper-ink); }

.error-msg { display: none; font-size: 0.82rem; font-weight: 500; color: var(--danger); }
.error-msg::before { content: "! "; font-weight: 700; }
.field input:user-invalid,
.field select:user-invalid,
.field textarea:user-invalid { border-color: var(--danger); background: #fbeeea; }
.field input:user-invalid + .error-msg,
.field textarea:user-invalid + .error-msg,
.field:has(select:user-invalid) > .error-msg { display: block; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 60px;
  margin-top: 6px;
  padding: 0.5rem 0.5rem 0.5rem 1.6rem;
  border: 0;
  border-radius: 999px;
  background: #0c0b0a;
  color: #f3f2ee;
  font: 500 1rem/1 var(--sans);
  cursor: pointer;
  transition: background-color 0.2s;
}
.submit:hover:not(:disabled) { background: #000; }
.submit:disabled { opacity: 0.6; cursor: progress; }

.form-status { min-height: 1.3em; font-size: 0.88rem; color: var(--paper-muted); }
.form-status.is-error { color: var(--danger); font-weight: 500; }

.form-success { display: grid; justify-items: start; gap: 14px; padding-block: clamp(8px, 3vw, 32px); }
.form-success h3 { font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 500; letter-spacing: -0.03em; line-height: 1.05; }
.form-success h3:focus { outline: none; }
.form-success p { max-width: 40ch; color: var(--paper-muted); }
.preview-note { padding: 10px 14px; border: 1px dashed rgba(20, 20, 18, 0.4); border-radius: 12px; font-size: 0.85rem; }

/* =========================================================================
   FOOTER + floating CTA
   ========================================================================= */

.footer { margin-top: var(--section-y); padding-top: clamp(32px, 4vw, 56px); border-top: 1px solid var(--line); }
.footer-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px 48px; flex-wrap: wrap; }
.footer-line { max-width: 30ch; font-size: clamp(1.6rem, 3.2vw, 2.7rem); line-height: 1.1; letter-spacing: -0.03em; text-wrap: balance; }
.footer-line em { font-size: 1.1em; }
.footer nav ul { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer nav a { font-size: 0.92rem; color: var(--muted); text-decoration: none; }
.footer nav a:hover { color: var(--text); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 32px;
  margin-top: clamp(32px, 5vw, 64px);
  font-size: 0.8rem;
  color: var(--muted);
}
.footer-bottom a { text-decoration: none; }
.footer-bottom a:hover { color: var(--text); }

.fab {
  position: fixed;
  z-index: 40;
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: max(16px, env(safe-area-inset-bottom, 0px));
  padding: 0.4rem 0.4rem 0.4rem 1.2rem;
  background: var(--solid-bg);
  color: var(--solid-fg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}
.fab:hover { background: var(--solid-bg-hover); }
.fab .dot { background: var(--solid-fg); color: var(--solid-bg); }

/* =========================================================================
   RESPONSIVE
   ========================================================================= */

@media (min-width: 1081px) {
  .glass-card {
    position: absolute;
    right: clamp(20px, 3vw, 44px);
    bottom: clamp(20px, 3vw, 44px);
    width: 390px;
  }
}

@media (max-width: 1080px) {
  .nav-pills { display: none; }
  .nav-line { display: none; }
  .nav-actions .pill--glass { display: none; }
  .nav-actions { margin-left: auto; }
}

@media (max-width: 900px) {
  .nav-actions { display: none; }
  .theme-btn { margin-left: auto; }
  .menu-btn { display: inline-flex; margin-left: 0; }

  .about-grid,
  .contact-grid,
  .why-grid,
  .area-panel { grid-template-columns: minmax(0, 1fr); }
  .about-left { gap: 20px; }
  .lines { grid-template-columns: minmax(0, 1fr); }
  .rings svg { max-width: 360px; }
  .panel--rust { min-height: 400px; }
}

@media (max-width: 480px) {
  /* the theme toggle takes room in the nav, so tighten the brand block */
  .nav { gap: 8px; }
  .brand { gap: 8px; margin-right: 0; }
  .brand-text span { letter-spacing: 0.18em; white-space: nowrap; }
}

@media (max-width: 380px) {
  /* icon-only menu button on very narrow phones; the label stays available to screen readers */
  .menu-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .menu-btn { padding-inline: 0.7rem; }
}

@media (max-width: 640px) {
  .hero { height: max(100svh, calc(640px + 2 * var(--frame-y))); }
  .hero-img { object-position: 52% 70%; }
  .hero-body { flex-direction: column; align-items: stretch; }
  .glass-card { max-width: none; }
  .hero-sub { align-items: flex-start; flex-direction: column; }
  .row { grid-template-columns: minmax(0, 1fr); }
  .ticks { grid-template-columns: minmax(0, 1fr); }
  .stats { gap: 12px; }
  .contact-info > div { grid-template-columns: 5.5rem minmax(0, 1fr); }
  .card-wrap { flex-basis: 78vw; }
  .sec-tools .round-btn { width: 40px; height: 40px; }
  .fab { padding-left: 1rem; }
}

/* =========================================================================
   REVEAL ON SCROLL
   script.js adds .reveal-ready to <html> once it is watching the page and adds .is-in to each
   [data-reveal] element as it scrolls into view. Without the script, or with reduced motion,
   nothing is hidden. Only opacity, translate and scale move, so it stays on the compositor.
   ========================================================================= */

@media (prefers-reduced-motion: no-preference) {
  .reveal-ready [data-reveal] {
    --reveal-y: 36px;
    --reveal-scale: 1;
    opacity: 0;
    translate: 0 var(--reveal-y);
    scale: var(--reveal-scale);
  }
  .reveal-ready [data-reveal="scale"] { --reveal-y: 24px; --reveal-scale: 0.96; }
  /* cards sit inside the sideways scroller, so they must not add vertical overflow to it */
  .reveal-ready [data-reveal="pop"] { --reveal-y: 0px; --reveal-scale: 0.94; }
  .reveal-ready [data-reveal="fade"] { --reveal-y: 0px; }

  /* The transition lives on the revealed state, so adding .reveal-ready hides items without animating them */
  .reveal-ready [data-reveal].is-in {
    opacity: 1;
    translate: none;
    scale: none;
    transition:
      opacity 0.9s cubic-bezier(0.2, 0.7, 0.2, 1),
      translate 0.9s cubic-bezier(0.2, 0.7, 0.2, 1),
      scale 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
    /* items that come into view together cascade: script.js numbers them with --i */
    transition-delay: calc(var(--i, 0) * 90ms);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
