/* ============================================================
   AAI — GLOBAL FOUNDATION
   ============================================================ */

/* ---- Self-hosted webfonts ----
   Previously loaded from fonts.googleapis.com, which put two extra
   third-party origins (DNS + TCP + TLS) and one render-blocking
   stylesheet on the critical path. Serving them from our own origin
   removes all of that; unicode-range means a browser still only
   downloads the subset it actually needs. */

@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
  src: url("../assets/fonts/fraunces-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
  src: url("../assets/fonts/fraunces-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../assets/fonts/fraunces-normal-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../assets/fonts/fraunces-normal-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url("../assets/fonts/jost-normal-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url("../assets/fonts/jost-normal-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Inter is the metric-near fallback for Jost, so text is readable at
   first paint before the webfont resolves. Not preloaded — it is only
   fetched if it is actually used. */
@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/Inter-VariableFont.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

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

/* ============================================================
   TOKENS
   ============================================================ */

:root {
  color-scheme: light;

  /* ---- Palette: Alabaster & Ink ----------------------------
     Gallery white ground. Warmth comes from the brass and the
     photography rather than from the paper, so flat colour reads
     crisp instead of beige. */
  --background: 0 0% 100%; /* #FFFFFF gallery white         */
  --surface: 40 33% 99%; /* #FDFCFA barely-warm panel     */
  --card: 40 33% 99%;
  --card-foreground: 26 12% 8%;
  --foreground: 26 12% 8%; /* #17140F espresso ink          */

  --muted: 36 25% 97%; /* #F9F7F4 alternating band      */
  --muted-foreground: 30 7% 35%; /* #605B54 — 6.6:1 on white      */

  --border: 36 18% 91%; /* #EBE7E1 hairline              */
  --hairline: 34 13% 84%; /* #DBD5CD stronger rule         */
  --input: 36 18% 91%;

  /* Ink is the primary surface: buttons, fills, emphasis.
     Black-on-white is the signature of the segment. */
  --primary: 26 14% 10%; /* #1D1915 */
  --primary-foreground: 0 0% 100%;

  --secondary: 30 7% 35%;
  --secondary-foreground: 0 0% 100%;

  /* Brass carries the luxury signal: eyebrows, rules, numerals,
     hover states. This value clears 5.3:1 on white, so it is safe
     for text and not only decoration. */
  --accent: 38 59% 34%; /* #8A6524 aged brass */
  --accent-foreground: 0 0% 100%;
  --accent-soft: 38 45% 55%; /* #C89B54 decorative only */

  /* Ink band: contrast sections, footer, feature panels. Kept a
     shade off the text colour so a band never reads as a typo. */
  --deep: 26 14% 9%; /* #1A1712 */
  --deep-foreground: 40 25% 96%;
  --deep-muted: 36 9% 70%;

  --ring: 38 59% 34%;
  --destructive: 6 62% 41%;

  /* ---- Geometry ------------------------------------------- */
  /* Near-square. Kept at 2px rather than 0 so inputs and images
     do not read as accidentally unstyled. */
  --radius: 2px;
  --radius-pill: 999px;

  /* ---- Type ------------------------------------------------ */
  --font-display: "Fraunces", "Playfair Display", Georgia,
    "Times New Roman", serif;
  --font-sans: "Jost", "Inter", system-ui, -apple-system,
    BlinkMacSystemFont, sans-serif;

  /* Fluid scale, spacious. --step-0 is 17px because Jost runs a
     small x-height; 16px reads undersized in body copy. */
  --step--2: 0.6875rem;
  --step--1: 0.8125rem;
  --step-0: 1.0625rem;
  --step-1: 1.1875rem;
  --step-2: clamp(1.375rem, 1.2rem + 0.7vw, 1.75rem);
  --step-3: clamp(1.75rem, 1.4rem + 1.6vw, 2.5rem);
  --step-4: clamp(2.25rem, 1.6rem + 2.9vw, 3.75rem);
  --step-5: clamp(2.75rem, 1.5rem + 5.4vw, 6rem);

  --tracking-caps: 0.18em;
  --tracking-tight: -0.02em;

  /* ---- Space (spacious rhythm) ----------------------------- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;
  --space-32: 8rem;

  --gutter: clamp(1.25rem, 5vw, 4rem);
  --container: 1240px;
  --measure: 68ch;

  /* Vertical rhythm between major sections. */
  --section-y: clamp(4.5rem, 9vw, 9rem);

  /* ---- Elevation ------------------------------------------
     Used sparingly. The system leans on hairlines; shadow only
     appears on hover to signal lift. */
  --shadow-lift: 0 24px 48px -28px hsl(34 19% 7% / 0.35);
  --shadow-header: 0 1px 0 hsl(var(--border));

  /* ---- Motion ---------------------------------------------- */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 160ms;
  --dur-base: 260ms;
  --dur-slow: 620ms;
}

/* Dark mode is a tonal reinterpretation, not an inversion. Ink
   buttons flip to bone-white; brass is lifted so it keeps its
   contrast against the dark ground. */
[data-theme="dark"] {
  color-scheme: dark;

  --background: 30 7% 5%; /* #0D0C0B */
  --surface: 30 6% 9%; /* #181614 */
  --card: 30 6% 9%;
  --card-foreground: 40 25% 95%;
  --foreground: 40 25% 95%; /* #F4F1EB */

  --muted: 30 6% 12%; /* #201E1B */
  --muted-foreground: 36 11% 71%; /* #BBB4A8 — 9.4:1 on ground */

  --border: 32 7% 18%; /* #312D29 */
  --hairline: 32 7% 27%;
  --input: 32 7% 18%;

  --primary: 40 25% 95%; /* bone — inverted ink button */
  --primary-foreground: 30 7% 5%;

  --secondary: 36 11% 71%;
  --secondary-foreground: 30 7% 5%;

  --accent: 38 58% 63%; /* #CCA05C — 8.2:1 on ground */
  --accent-foreground: 30 7% 5%;
  --accent-soft: 38 44% 52%;

  --deep: 30 6% 9%;
  --deep-foreground: 40 25% 95%;
  --deep-muted: 36 11% 69%;

  --ring: 38 55% 62%;
  --destructive: 6 70% 60%;

  --shadow-lift: 0 24px 48px -28px hsl(0 0% 0% / 0.7);
}

/* ============================================================
   BASE
   ============================================================ */

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

body {
  font-family: var(--font-sans);
  font-size: var(--step-0);
  font-weight: 400;
  line-height: 1.7;
  color: hsl(var(--foreground));
  background-color: hsl(var(--background));
  transition: background-color var(--dur-slow) ease, color var(--dur-slow) ease;
  min-width: 320px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* `text-rendering: optimizeLegibility` was removed deliberately — it
     forces kerning and ligature work over the whole document and is a
     measurable cost on low-powered phones for no visible gain here. */
}

/* Removes the 300ms tap delay some mobile browsers still apply, which is
   the difference between a tap feeling instant and feeling laggy. */
a,
button,
label,
summary,
[role="button"],
input,
select,
textarea {
  touch-action: manipulation;
}

/* Paper grain. Fixed, non-interactive, and dialled low enough that
   it reads as texture rather than noise. Gives flat colour fields
   the tactility that sells "premium" on a photo-led site. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  /* Dialled well down on a white ground — enough to take the plastic
     edge off flat fields, not enough to read as texture. */
  opacity: 0.22;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.28'/%3E%3C/svg%3E");
}

[data-theme="dark"] body::after {
  mix-blend-mode: overlay;
  opacity: 0.28;
}

/* A full-viewport fixed layer with mix-blend-mode forces the compositor to
   re-blend the whole screen on every frame. On a phone that cost is real
   and the texture is barely perceptible at that size — so it is dropped
   below the tablet breakpoint. */
@media (max-width: 900px) {
  body::after {
    display: none;
  }
}

/* ---- Headings ---- */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: var(--tracking-tight);
  color: hsl(var(--foreground));
  font-variation-settings: "opsz" 144;
  text-wrap: balance;
}

h1 {
  font-size: var(--step-4);
}
h2 {
  font-size: var(--step-3);
}
h3 {
  font-size: var(--step-2);
  line-height: 1.2;
}
h4 {
  font-size: var(--step-1);
  line-height: 1.3;
}

/* Small headings sit in running text, so they take the sans and
   optical sizing for text rather than display. */
h5,
h6 {
  font-family: var(--font-sans);
  font-weight: 500;
  letter-spacing: 0;
}

p {
  text-wrap: pretty;
}

a {
  color: inherit;
}

input,
button,
select,
textarea,
option {
  font-family: inherit;
  font-size: inherit;
}

img,
iframe,
video {
  max-width: 100%;
}

img {
  /* Warm the photography very slightly so stock imagery sits in the
     same temperature as the palette. */
  filter: saturate(0.94);
}

html,
body {
  overflow-x: hidden;
}

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Distance from a full-bleed element's edge to the container's text
   edge. Full-width sections use this so their copy still lines up
   with everything inside .container. */
.bleed-inset {
  padding-inline: max(
    var(--gutter),
    calc((100% - var(--container)) / 2 + var(--gutter))
  );
}

.container-narrow {
  width: 100%;
  max-width: 820px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container-wide {
  width: 100%;
  max-width: 1560px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ============================================================
   EDITORIAL PRIMITIVES
   ============================================================ */

/* Wide-tracked brass label with a leading rule. The recurring
   signature of the system — used above every section heading. */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  font-family: var(--font-sans);
  font-size: var(--step--2);
  font-weight: 500;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: hsl(var(--accent));
  margin-bottom: var(--space-6);
}

.eyebrow::before {
  content: "";
  width: 2.5rem;
  height: 1px;
  background: hsl(var(--accent));
  flex: none;
}

.eyebrow--center {
  justify-content: center;
}

.eyebrow--plain::before {
  display: none;
}

/* Section heading block. Left-aligned by default — centred headings
   are the template look this design moves away from. */
.section-header {
  max-width: var(--measure);
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}

.section-header h2 {
  font-size: var(--step-3);
  margin-bottom: var(--space-4);
}

.section-header > p {
  font-size: var(--step-1);
  line-height: 1.7;
  color: hsl(var(--muted-foreground));
  max-width: 58ch;
}

.section-header--center {
  margin-inline: auto;
  text-align: center;
}

.section-header--center > p {
  margin-inline: auto;
}

/* Hairline rule with optional brass segment at its head. */
.rule {
  border: none;
  height: 1px;
  background: hsl(var(--border));
  margin: 0;
}

/* Lead paragraph — larger, looser, for opening copy. */
.lede {
  font-size: var(--step-2);
  line-height: 1.55;
  font-weight: 300;
  color: hsl(var(--muted-foreground));
  max-width: 46ch;
}

/* Tabular numerals wherever figures line up in columns. */
.tabular {
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   INTERIOR PAGE MASTHEAD
   ------------------------------------------------------------
   Every page except the homepage opens with the same editorial
   masthead: brass eyebrow, oversized serif title, hairline close.
   The selector list covers the per-page hero classes that already
   exist in the markup so the treatment is consistent site-wide.
   ============================================================ */

.page-masthead,
.about-intro,
.services-hero,
.products-hero,
.wishlist-hero,
.booking-hero,
.feedback-page-hero,
.contact-page-hero,
.blog-page .header,
.projects-page .header {
  position: relative;
  padding-block: calc(var(--section-y) + 5rem) var(--section-y);
  padding-inline: var(--gutter);
  background: hsl(var(--background));
  border-bottom: 1px solid hsl(var(--border));
  text-align: left;
  overflow: hidden;
}

/* Faint oversized brass numeral / wordmark ghost in the corner. */
.page-masthead::after,
.about-intro::after,
.services-hero::after,
.blog-page .header::after,
.projects-page .header::after {
  content: "";
  position: absolute;
  right: calc(var(--gutter) * -0.5);
  bottom: -30%;
  width: 34vw;
  max-width: 420px;
  aspect-ratio: 1;
  border: 1px solid hsl(var(--accent) / 0.16);
  border-radius: 50%;
  pointer-events: none;
}

.page-masthead > *,
.about-intro > *,
.services-hero > *,
.products-hero > *,
.wishlist-hero > *,
.booking-hero > *,
.feedback-page-hero > *,
.contact-page-hero > *,
.blog-page .header > *,
.projects-page .header > * {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin-inline: auto;
}

.page-masthead h1,
.about-intro h1,
.services-hero h1,
.products-hero h1,
.wishlist-hero h1,
.booking-hero h1,
.feedback-page-hero h1,
.contact-page-hero h1,
.blog-page .header .header-title,
.projects-page .header .header-title {
  font-family: var(--font-display);
  font-size: var(--step-5);
  font-weight: 300;
  line-height: 1;
  letter-spacing: var(--tracking-tight);
  margin-bottom: var(--space-6);
  max-width: 16ch;
}

.page-masthead > p,
.about-intro > p,
.services-hero > p,
.products-hero > p,
.wishlist-hero > p,
.booking-hero > p,
.feedback-page-hero > p,
.contact-page-hero > p,
.blog-page .header .header-subtitle,
.projects-page .header .header-subtitle {
  font-size: var(--step-1);
  font-weight: 300;
  line-height: 1.65;
  color: hsl(var(--muted-foreground));
  max-width: 52ch;
}

/* ============================================================
   HEADER / NAVIGATION
   ============================================================ */

.top-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 50;
  /* Opaque at rest: the hero photography runs under the bar, and a
     translucent header leaves a visible seam where the image starts. */
  background-color: hsl(var(--background));
  border-bottom: 1px solid transparent;
  transition: background-color var(--dur-base) ease,
    border-color var(--dur-base) ease, box-shadow var(--dur-base) ease;
}

.top-header.is-scrolled {
  background-color: hsl(var(--background) / 0.94);
  backdrop-filter: saturate(1.4) blur(16px);
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
  border-bottom-color: hsl(var(--border));
}

/* Brass reading-progress hairline along the header's bottom edge.
   Width is driven by --scroll-progress, set from motion.js. */
.top-header::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 1px;
  width: var(--scroll-progress, 0%);
  background: hsl(var(--accent));
  transition: width 90ms linear;
  pointer-events: none;
}

.nav-container {
  max-width: 1560px;
  margin: 0 auto;
  padding-block: 1.125rem;
  padding-inline: max(
    var(--gutter),
    calc((100% - var(--container)) / 2 + var(--gutter))
  );
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: padding var(--dur-base) var(--ease-out);
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: hsl(var(--foreground));
  flex: none;
}

.logo img {
  display: block;
  height: 56px;
  width: auto;
  filter: none;
  transition: height var(--dur-base) var(--ease-out);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2.25rem;
  align-items: center;
}

/* Wide-tracked uppercase — the navigation voice of the segment. */
.nav-links > li > a {
  position: relative;
  text-decoration: none;
  color: hsl(var(--muted-foreground));
  font-size: var(--step--2);
  font-weight: 500;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  padding-block: 0.35rem;
  transition: color var(--dur-fast) ease;
  white-space: nowrap;
}

.nav-links > li > a:hover {
  color: hsl(var(--foreground));
}

/* Brass underline, drawn from the left on hover / current page. */
.nav-links > li > a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: hsl(var(--accent));
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--dur-base) var(--ease-out);
}

.nav-links > li > a:hover::after,
.nav-links > li > a[aria-current="page"]::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-links > li > a[aria-current="page"] {
  color: hsl(var(--foreground));
}

/* ---- Mobile toggle ---- */
.menu-toggle {
  display: none;
  cursor: pointer;
  z-index: 61;
  background: none;
  border: none;
  color: hsl(var(--foreground));
  padding: 0.5rem;
  margin-right: -0.5rem;
  transition: color var(--dur-base) ease;
}

.menu-toggle svg {
  width: 26px;
  height: 26px;
  stroke-width: 1.5;
}

.menu-icon {
  display: block;
}

.close-icon {
  display: none;
}

.menu-toggle.active .menu-icon {
  display: none;
}

.menu-toggle.active .close-icon {
  display: block;
}

/* ---- Theme toggle ---- */
.theme-toggle {
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: hsl(var(--muted-foreground));
  transition: color var(--dur-fast) ease, border-color var(--dur-fast) ease;
  position: relative;
  gap: 0.5rem;
}

.theme-text {
  display: none;
  font-size: var(--step--2);
  font-weight: 500;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  white-space: nowrap;
}

.theme-toggle:hover {
  color: hsl(var(--accent));
  border-color: hsl(var(--border));
}

.theme-toggle svg {
  width: 19px;
  height: 19px;
  stroke-width: 1.5;
}

.theme-icon {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity var(--dur-base) ease, transform var(--dur-base) ease;
}

.theme-icon.hidden {
  opacity: 0;
  transform: rotate(90deg) scale(0.5);
  pointer-events: none;
}

.theme-icon.visible {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

/* ---- Nav call + quote CTA ---- */
.nav-cta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-call {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--step--1);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: hsl(var(--foreground));
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--dur-fast) ease;
}

.nav-call:hover {
  color: hsl(var(--accent));
}

.nav-call svg {
  width: 15px;
  height: 15px;
  stroke-width: 1.5;
  color: hsl(var(--accent));
}

.nav-quote-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.nav-quote-btn svg {
  width: 15px;
  height: 15px;
}

/* ============================================================
   BUTTONS
   ------------------------------------------------------------
   Square, uppercase, wide-tracked. Ink fill for the single
   primary action per view; hairline outline for everything else.
   ============================================================ */

.btn {
  position: relative;
  padding: 1rem 1.75rem;
  font-family: var(--font-sans);
  font-size: var(--step--2);
  font-weight: 500;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  line-height: 1;
  border-radius: 0;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  border: 1px solid transparent;
  transition: background-color var(--dur-base) ease,
    border-color var(--dur-base) ease, color var(--dur-base) ease,
    transform var(--dur-fast) var(--ease-out);
}

.btn svg {
  width: 15px;
  height: 15px;
  stroke-width: 1.75;
  transition: transform var(--dur-base) var(--ease-out);
}

.btn:hover svg {
  transform: translateX(3px);
}

.btn > * {
  position: relative;
  z-index: 1;
}

.btn-primary {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground)) !important;
  border-color: hsl(var(--primary));
  overflow: hidden;
}

/* Brass sweeps up from the base rather than the whole chip swapping
   colour — the fill reads as a material, not a state toggle. */
.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: hsl(var(--accent));
  transform: translateY(101%);
  transition: transform 420ms var(--ease-out);
  z-index: 0;
}

.btn-primary:hover::before {
  transform: translateY(0);
}

.btn-primary:hover {
  border-color: hsl(var(--accent));
}

/* Outline buttons fill from the left. */
.btn-outline {
  overflow: hidden;
}

.btn-outline::before {
  content: "";
  position: absolute;
  inset: 0;
  background: hsl(var(--foreground));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 420ms var(--ease-out);
  z-index: 0;
}

.btn-outline:hover::before {
  transform: scaleX(1);
}

.btn-outline {
  background: transparent;
  color: hsl(var(--foreground));
  border-color: hsl(var(--hairline));
  transition: color var(--dur-base) ease, border-color var(--dur-base) ease;
}

.btn-outline:hover {
  border-color: hsl(var(--foreground));
  color: hsl(var(--background));
}

/* Text button with a brass rule that extends on hover. */
.btn-ghost {
  padding: 0.5rem 0;
  border: none;
  background: none;
  color: hsl(var(--foreground));
  gap: 0.75rem;
}

.btn-ghost::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: hsl(var(--accent));
  transform: scaleX(0.35);
  transform-origin: left;
  transition: transform var(--dur-base) var(--ease-out);
}

.btn-ghost:hover::after {
  transform: scaleX(1);
}

.btn:active {
  transform: translateY(1px);
  transition-duration: 90ms;
}

.btn[disabled],
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* On dark panels the outline button has to invert. */
.on-deep .btn-outline {
  color: hsl(var(--deep-foreground));
  border-color: hsl(var(--deep-foreground) / 0.35);
}

.on-deep .btn-outline:hover {
  background: hsl(var(--deep-foreground));
  color: hsl(var(--deep));
  border-color: hsl(var(--deep-foreground));
}

/* ============================================================
   SHARED SURFACES
   ============================================================ */

.card {
  background: hsl(var(--surface));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--dur-base) ease,
    box-shadow var(--dur-base) ease, transform var(--dur-base) var(--ease-out);
}

.card:hover {
  border-color: hsl(var(--hairline));
  box-shadow: var(--shadow-lift);
}

/* Deep forest band — used for CTA panels and the footer. */
.on-deep {
  background: hsl(var(--deep));
  color: hsl(var(--deep-foreground));
}

.on-deep h1,
.on-deep h2,
.on-deep h3,
.on-deep h4 {
  color: hsl(var(--deep-foreground));
}

.on-deep p {
  color: hsl(var(--deep-muted));
}

.on-deep .eyebrow {
  color: hsl(var(--accent-soft));
}

.on-deep .eyebrow::before {
  background: hsl(var(--accent-soft));
}

/* ============================================================
   FOOTER
   ============================================================ */

footer {
  background: hsl(var(--deep));
  color: hsl(var(--deep-foreground));
  padding: clamp(4rem, 8vw, 7rem) var(--gutter) 2.5rem;
  border-top: 1px solid hsl(var(--border));
  transition: background-color var(--dur-slow) ease;
}

/* The footer supplies its own gutter, so the inner blocks are capped at
   the container's *content* width — otherwise footer copy sits ~60px
   left of every section above it. */
.footer-grid {
  max-width: calc(var(--container) - var(--gutter) * 2);
  margin: 0 auto 4rem;
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr 1.3fr;
  gap: clamp(2.5rem, 5vw, 4rem);
}

/* Footer column titles sit at h2 so pages without a body-level h2
   (booking, feedback) still have a valid heading outline. */
.footer-section h2,
.footer-section h3 {
  font-family: var(--font-sans);
  font-size: var(--step--2);
  font-weight: 500;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: hsl(var(--accent-soft));
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid hsl(var(--deep-foreground) / 0.14);
}

.footer-section p {
  color: hsl(var(--deep-muted));
  font-size: var(--step--1);
  line-height: 1.8;
  margin-bottom: var(--space-4);
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.625rem;
}

.footer-section a {
  color: hsl(var(--deep-muted));
  text-decoration: none;
  font-size: var(--step--1);
  transition: color var(--dur-fast) ease, transform var(--dur-fast) var(--ease-out);
  display: inline-block;
}

.footer-section a:hover {
  color: hsl(var(--accent-soft));
  transform: translateX(4px);
}

/* ---- Social ---- */
.social-links {
  display: flex;
  gap: 0.5rem;
  margin-top: var(--space-6);
}

.social-links a {
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid hsl(var(--deep-foreground) / 0.2);
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: hsl(var(--deep-foreground));
  transition: background-color var(--dur-fast) ease,
    border-color var(--dur-fast) ease, color var(--dur-fast) ease,
    transform var(--dur-fast) var(--ease-out);
}

.social-links a:hover {
  background: hsl(var(--accent-soft));
  color: hsl(var(--deep));
  border-color: hsl(var(--accent-soft));
  transform: none;
}

.social-links a svg {
  width: 17px;
  height: 17px;
  stroke-width: 1.5;
  display: block;
}

.social-links a.social-whatsapp:hover {
  background: #25d366;
  border-color: #25d366;
  color: #fff;
}

/* Site-wide links to the city landing pages. */
.footer-areas {
  font-size: var(--step--1);
  color: hsl(var(--deep-muted));
  margin-top: calc(var(--space-4) * -1);
}

.footer-areas a {
  color: hsl(var(--accent-soft));
  text-decoration: none;
  border-bottom: 1px solid hsl(var(--accent-soft) / 0.35);
  transition: border-color var(--dur-fast) ease;
}

.footer-areas a:hover {
  border-bottom-color: hsl(var(--accent-soft));
  transform: none;
}

.footer-credit {
  margin-top: var(--space-4);
  font-size: var(--step--1);
  color: hsl(var(--deep-muted));
}

.footer-credit a {
  color: hsl(var(--deep-foreground));
  font-weight: 500;
  text-decoration: none;
}

.footer-credit a:hover {
  color: hsl(var(--accent-soft));
}

/* ---- Newsletter ---- */
.newsletter-form {
  margin-top: var(--space-6);
}

.newsletter-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.newsletter-form .form-input {
  padding: 0.875rem 1rem;
  border: 1px solid hsl(var(--deep-foreground) / 0.22);
  border-radius: 0;
  background: transparent;
  color: hsl(var(--deep-foreground));
  font-size: var(--step--1);
  transition: border-color var(--dur-fast) ease;
}

.newsletter-form .form-input:focus {
  outline: none;
  border-color: hsl(var(--accent-soft));
}

.newsletter-form .form-input::placeholder {
  color: hsl(var(--deep-muted) / 0.75);
}

.newsletter-form .btn {
  background: hsl(var(--accent-soft));
  border-color: hsl(var(--accent-soft));
  color: hsl(var(--deep)) !important;
}

.newsletter-form .btn:hover {
  background: hsl(var(--deep-foreground));
  border-color: hsl(var(--deep-foreground));
  color: hsl(var(--deep)) !important;
}

.footer-bottom {
  max-width: calc(var(--container) - var(--gutter) * 2);
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid hsl(var(--deep-foreground) / 0.14);
  text-align: center;
  color: hsl(var(--deep-muted));
  font-size: var(--step--1);
}

.footer-divider {
  display: none;
}

.footer-bottom a {
  color: hsl(var(--deep-muted));
  text-decoration: none;
  transition: color var(--dur-fast) ease;
}

.footer-bottom a:hover {
  color: hsl(var(--accent-soft));
}

.team-links {
  margin-top: var(--space-2);
}

.disclaimer,
.credits {
  margin-top: var(--space-2);
  font-size: var(--step--2);
  opacity: 0.75;
}

/* ============================================================
   TOAST
   ============================================================ */

.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: hsl(var(--foreground));
  color: hsl(var(--background));
  border: none;
  border-radius: 0;
  border-left: 2px solid hsl(var(--accent));
  padding: 1.125rem 1.5rem;
  box-shadow: var(--shadow-lift);
  transform: translateY(200%);
  opacity: 0;
  transition: transform var(--dur-base) var(--ease-out),
    opacity var(--dur-base) ease;
  z-index: 1000;
  min-width: 300px;
  max-width: 420px;
  font-size: var(--step--1);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.success {
  border-left-color: hsl(var(--accent));
}

.toast.error {
  border-left-color: hsl(var(--destructive));
}

.toast.warning {
  border-left-color: hsl(var(--accent-soft));
}

.toast.info {
  border-left-color: hsl(var(--accent));
}

.toast::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-right: 0.75rem;
}

.toast.success::before {
  content: "✓";
  color: hsl(var(--accent-soft));
  font-weight: 500;
}

.toast.error::before {
  content: "✕";
  color: hsl(var(--destructive));
  font-weight: 500;
}

.toast.warning::before {
  content: "!";
  color: hsl(var(--accent-soft));
  font-weight: 500;
}

.toast.info::before {
  content: "i";
  color: hsl(var(--accent-soft));
  font-style: italic;
}

/* ============================================================
   FLOATING ACTIONS / MOBILE ACTION BAR
   ============================================================ */

.floating-actions {
  position: fixed;
  right: var(--space-6);
  bottom: var(--space-6);
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.float-btn {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  box-shadow: var(--shadow-lift);
  transition: transform var(--dur-base) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out);
}

.float-btn:hover {
  transform: translateY(-3px);
}

.float-btn svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.75;
}

.float-whatsapp {
  background: #128c3e;
}

.float-call {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

/* Gentle attention pulse on the WhatsApp button. */
.float-whatsapp::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #128c3e;
  animation: floatPulse 2.6s ease-out infinite;
  z-index: -1;
}

@keyframes floatPulse {
  0% {
    transform: scale(1);
    opacity: 0.45;
  }
  70%,
  100% {
    transform: scale(1.55);
    opacity: 0;
  }
}

.mobile-action-bar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  background: hsl(var(--background) / 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid hsl(var(--border));
  padding: 0.5rem 0.5rem calc(0.5rem + env(safe-area-inset-bottom));
  gap: 0.5rem;
}

.mobile-action {
  flex: 1;
  min-height: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  border-radius: 0;
  font-size: var(--step--2);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: hsl(var(--foreground));
  border: 1px solid hsl(var(--border));
  background: transparent;
  transition: background-color var(--dur-fast) ease;
}

.mobile-action svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.5;
}

.mobile-action-wa {
  background: #128c3e;
  border-color: #128c3e;
  color: #fff;
}

.mobile-action-primary {
  background: hsl(var(--primary));
  border-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

.mobile-action:active {
  filter: brightness(0.92);
}

/* ============================================================
   ACCESSIBILITY
   ============================================================ */

[id] {
  scroll-margin-top: 7rem;
}

:focus-visible {
  outline: 2px solid hsl(var(--accent));
  outline-offset: 3px;
  border-radius: 0;
}

:focus:not(:focus-visible) {
  outline: none;
}

.skip-link {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -120%);
  z-index: 100;
  padding: 0.875rem 1.75rem;
  background: hsl(var(--foreground));
  color: hsl(var(--background));
  font-size: var(--step--2);
  font-weight: 500;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  text-decoration: none;
  transition: transform var(--dur-base) var(--ease-out);
}

.skip-link:focus {
  transform: translate(-50%, 0);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   SCROLL REVEALS
   ------------------------------------------------------------
   The hidden state only applies once JS is running (html.js-motion),
   so the page stays fully visible without JS and for crawlers.
   ============================================================ */

.js-motion [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  transition: opacity var(--dur-slow) var(--ease-out),
    transform var(--dur-slow) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

.js-motion [data-reveal].is-revealed {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  will-change: auto;
}

.js-motion [data-reveal="left"] {
  transform: translate3d(-32px, 0, 0);
}

.js-motion [data-reveal="right"] {
  transform: translate3d(32px, 0, 0);
}

.js-motion [data-reveal="scale"] {
  transform: scale(0.97);
}

.js-motion [data-reveal="scale"].is-revealed {
  transform: scale(1);
}

/* Once the services sections stack, a horizontal slide both reads wrong
   and pushes content past the viewport edge. Reveal them vertically. */
@media (max-width: 1024px) {
  .js-motion .service-section [data-reveal="left"],
  .js-motion .service-section [data-reveal="right"] {
    transform: translate3d(0, 28px, 0);
  }

  .js-motion .service-section [data-reveal].is-revealed {
    transform: translate3d(0, 0, 0);
  }
}

/* ---- Word-by-word heading reveal ----
   motion.js wraps each word in .word > .word-inner; the outer span
   clips while the inner one rises. Applied to section headings only —
   never to the LCP element, which keeps its CSS entrance. */
.split-line .word {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  /* room for descenders so the clip never shaves a 'g' or 'y' */
  padding-bottom: 0.14em;
  margin-bottom: -0.14em;
}

.split-line .word-inner {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 760ms var(--ease-out);
  transition-delay: calc(var(--word-index, 0) * 42ms);
}

.split-line.is-revealed .word-inner,
.is-revealed .split-line .word-inner {
  transform: translateY(0);
}

/* The words carry the vertical motion, so the block they sit in only
   fades — otherwise the heading moves twice. */
.js-motion .section-header[data-reveal] {
  transform: none;
}

/* ---- Brass rule that draws itself in ----
   Scoped to eyebrows inside a reveal container: a standalone eyebrow
   (the hero) has nothing to trigger it, so it must stay drawn. */
.js-motion [data-reveal] .eyebrow::before {
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 620ms var(--ease-out) 120ms;
}

.js-motion [data-reveal].is-revealed .eyebrow::before {
  transform: scaleX(1);
}

/* ---- Parallax ----
   motion.js writes --parallax (px) from a rAF scroll loop. The scale
   compensates so the translate never exposes an edge.

   will-change is applied only while the element is actually on screen
   (motion.js toggles .is-moving). Holding it permanently keeps a
   compositor layer alive per element, which costs memory on phones for
   no benefit when they are scrolled away. */
.js-motion [data-parallax].is-moving {
  will-change: transform;
}

.js-motion [data-parallax] img,
.js-motion img[data-parallax] {
  transform: translate3d(0, var(--parallax, 0px), 0) scale(1.12);
  transition: none;
}

/* ---- Image mask: the photo wipes out from behind a panel ----
   Done with a sliding overlay rather than clip-path on the element
   itself. IntersectionObserver measures the *clipped* box, so a
   clip-path here would report zero intersection and the element could
   never qualify to reveal — it would stay hidden forever. */
.js-motion [data-reveal="mask"] {
  opacity: 1;
  transform: none;
  position: relative;
}

.js-motion [data-reveal="mask"]::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: hsl(var(--background));
  transform: translateY(0);
  transition: transform 900ms var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
  pointer-events: none;
}

.js-motion [data-reveal="mask"].is-revealed::before {
  transform: translateY(-100.5%);
}

/* ============================================================
   PAGE TRANSITION CURTAIN
   ------------------------------------------------------------
   An ink panel wipes up over the outgoing page before navigation,
   so moving between pages reads as one continuous surface rather
   than a white flash. Only on outgoing clicks — the incoming page
   paints immediately, so first paint is never delayed.
   ============================================================ */

.page-curtain {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: hsl(var(--deep));
  transform: translateY(100%);
  pointer-events: none;
}

/* Promoted only for the duration of the wipe. */
.page-curtain.is-leaving {
  will-change: transform;
}

.page-curtain.is-leaving {
  animation: curtainUp 420ms var(--ease-in-out) both;
}

@keyframes curtainUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

/* The incoming page is deliberately *not* animated — a fade there
   would delay first paint on every navigation. */

/* ============================================================
   MICRO-INTERACTIONS
   ============================================================ */

.project-card,
.blog-card,
.service-index-card,
.service-overview-card,
.contact-quick-card,
.value-card,
.gallery-card,
.testimonial-card {
  transition: transform var(--dur-base) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out),
    border-color var(--dur-base) ease, background-color var(--dur-base) ease;
}

.project-image,
.gallery-card img,
.blog-card-image img,
.about-image img,
.story-image img {
  transition: transform 900ms var(--ease-out);
}

/* Parallaxed images own their transform — excluded so the hover zoom
   cannot fight the scroll loop. */
.project-card:hover .project-image:not([data-parallax]),
.about-image:hover img:not([data-parallax]),
.story-image:hover img:not([data-parallax]) {
  transform: scale(1.04);
}

.project-card,
.about-image,
.story-image,
.blog-card-image {
  overflow: hidden;
}

.social-links a,
.float-btn,
.mobile-action {
  transition: transform var(--dur-fast) var(--ease-out),
    background-color var(--dur-fast) ease, border-color var(--dur-fast) ease,
    color var(--dur-fast) ease, box-shadow var(--dur-fast) var(--ease-out);
}

.social-links a:active,
.float-btn:active,
.mobile-action:active {
  transform: scale(0.95);
}

.home-stat h3,
.story-stat h3 {
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   RESPONSIVE — DESKTOP
   ============================================================ */

@media (min-width: 1025px) {
  .nav-container {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 2rem;
  }

  .logo {
    grid-column: 1;
  }

  .nav-links {
    grid-column: 2 / 4;
    justify-content: flex-end;
    margin-left: auto;
  }

  .menu-toggle {
    display: none;
  }

  .user-welcome {
    display: none !important;
  }

  .top-header.is-scrolled .nav-container {
    padding-block: 0.75rem;
  }

  .top-header.is-scrolled .logo img {
    height: 44px;
  }
}

@media (min-width: 1025px) and (max-width: 1240px) {
  .nav-links {
    gap: 1.5rem;
  }

  .nav-call span {
    display: none;
  }

  .nav-cta {
    gap: 0.75rem;
  }
}

/* ============================================================
   RESPONSIVE — MOBILE NAVIGATION
   ------------------------------------------------------------
   Full-screen editorial overlay rather than a narrow drawer:
   oversized serif links separated by hairlines, staggered in.
   ============================================================ */

@media (max-width: 1024px) {
  .menu-toggle {
    display: block;
  }

  /* Keep the brand above the open overlay so the page never looks
     like it navigated away. */
  .logo {
    position: relative;
    z-index: 61;
  }

  .nav-links {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100dvh;
    background: hsl(var(--background));
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    /* bottom pad clears the sticky action bar + the safe area */
    padding: 7rem var(--gutter) calc(7rem + env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-1.5rem);
    transition: opacity var(--dur-base) var(--ease-out),
      transform var(--dur-base) var(--ease-out),
      visibility 0s linear var(--dur-base);
    z-index: 55;
  }

  .nav-links.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition-delay: 0s;
  }

  /* Opaque strip behind the header row so menu items cannot scroll up
     under the logo. It hangs off .nav-container rather than .nav-links
     because .nav-links carries a transform — which would make a fixed
     child scroll along with the panel instead of staying put. */
  body.nav-open .nav-container::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 6rem;
    background: hsl(var(--background));
    /* inside .top-header's stacking context: over the panel (55),
       under the logo and close button (61) */
    z-index: 56;
    pointer-events: none;
  }

  .nav-links > li {
    width: 100%;
    border-bottom: 1px solid hsl(var(--border));
    opacity: 0;
    transform: translateY(12px);
  }

  .nav-links.active > li {
    animation: navItemIn 420ms var(--ease-out) forwards;
  }

  .nav-links.active > li:nth-child(1) {
    animation-delay: 60ms;
  }
  .nav-links.active > li:nth-child(2) {
    animation-delay: 100ms;
  }
  .nav-links.active > li:nth-child(3) {
    animation-delay: 140ms;
  }
  .nav-links.active > li:nth-child(4) {
    animation-delay: 180ms;
  }
  .nav-links.active > li:nth-child(5) {
    animation-delay: 220ms;
  }
  .nav-links.active > li:nth-child(6) {
    animation-delay: 260ms;
  }
  .nav-links.active > li:nth-child(7) {
    animation-delay: 300ms;
  }
  .nav-links.active > li:nth-child(8) {
    animation-delay: 340ms;
  }
  .nav-links.active > li:nth-child(9) {
    animation-delay: 380ms;
  }

  @keyframes navItemIn {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* Menu links take the display face at scale — the panel becomes a
     page of its own rather than a dropdown. */
  .nav-links > li > a {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 60px;
    padding-block: 0.75rem;
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 6vw, 2rem);
    font-weight: 300;
    letter-spacing: var(--tracking-tight);
    text-transform: none;
    color: hsl(var(--foreground));
  }

  .nav-links > li > a::after {
    display: none;
  }

  .nav-links > li > a[aria-current="page"] {
    color: hsl(var(--accent));
  }

  .nav-links > li:has(.theme-toggle),
  .nav-links > li.nav-cta {
    border-bottom: none;
  }

  .theme-toggle {
    width: 100%;
    justify-content: flex-start;
    padding: 1.25rem 0;
    height: auto;
    border: none;
  }

  .theme-text {
    display: inline-block;
    margin-left: 2rem;
  }

  .theme-icon {
    position: absolute;
    left: 0;
  }

  .nav-cta {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    margin-top: 1.5rem;
  }

  .nav-call,
  .nav-quote-btn {
    justify-content: center;
    min-height: 50px;
  }

  .nav-call {
    border: 1px solid hsl(var(--border));
    font-size: var(--step-0);
  }

  .user-welcome {
    display: flex;
    order: -1;
  }

  .user-section .user-name {
    display: none;
  }

  .auth-section,
  .user-section {
    flex-direction: column;
    width: 100%;
    order: 999;
  }

  .auth-btn,
  .user-section button {
    width: 100%;
    justify-content: center;
  }

  /* Lock the page behind the overlay. */
  body.nav-open {
    overflow: hidden;
  }
}

@media (max-width: 1024px) and (min-width: 769px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .mobile-action-bar {
    display: flex;
  }

  .floating-actions {
    display: none;
  }

  footer {
    padding-bottom: 6rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .toast {
    bottom: 5.5rem;
    right: 1rem;
    left: 1rem;
    min-width: 0;
    max-width: none;
  }

  .btn {
    min-height: 48px;
  }

  h1,
  h2,
  h3 {
    overflow-wrap: break-word;
  }

  /* Real touch height on dense link lists. */
  .footer-section ul li a,
  .footer-section p a,
  .footer-areas a,
  .footer-credit a,
  .footer-bottom a {
    display: inline-block;
    padding-block: 0.625rem;
    min-height: 44px;
    line-height: 1.5;
  }

  .footer-section ul li {
    margin-bottom: 0.25rem;
  }

  .social-links a {
    width: 44px;
    height: 44px;
  }

  .filter-tab {
    min-height: 44px;
  }

  /* Inline "read more" style links need a real touch target too. */
  .blog-card-link,
  .contact-directions,
  .btn-ghost {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .js-motion [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
  }

  .float-whatsapp::after {
    display: none;
  }

  .nav-links > li {
    opacity: 1;
    transform: none;
  }

  /* Motion layer off: show every word, hold every image still. */
  .split-line .word-inner {
    transform: none !important;
  }

  .js-motion [data-reveal] .eyebrow::before {
    transform: scaleX(1) !important;
  }

  .js-motion [data-parallax] img,
  .js-motion img[data-parallax] {
    transform: none !important;
  }

  .page-curtain {
    display: none;
  }

  .btn-primary::before,
  .btn-outline::before {
    transition: none !important;
  }
}
