/* Before After Digital: base styles. Static-first and reduced-motion-safe.
   Everything here renders a complete, readable page with no JS and no motion.
   All motion lives in motion.css (inside prefers-reduced-motion: no-preference)
   or is applied by JS only after the reduced-motion gate passes. */

:root {
  --ink: #16211b;
  --muted: #51605a;
  --line: #e2e8e4;
  --paper: #fbfaf7;
  --paper-2: #f2f0e9;
  --accent: #1f6f54;
  --accent-2: #3a9d78;
  --night: #0e1512;
  --night-2: #14211b;
  --cream: #f4efe4;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --maxw: 1180px;
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --radius: 14px;
  --head-h: 68px; /* header height; every pin/anchor offset accounts for this so nothing clips under the bar */

  /* Grain garnish: one tiled fractal-noise tile, reused on every flat ground so
     no large flat untextured colour field ships (art-direction spec 1). */
  --grain: 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.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Grain overlay: add data-grain="dark" | "light" to any flat ground. No wrapper
   div needed; a non-interactive ::after tile sits above the ground, below content. */
[data-grain] { position: relative; }
[data-grain] > * { position: relative; z-index: 1; }
[data-grain]::after {
  content: "";
  position: absolute; inset: 0;
  background-image: var(--grain);
  background-size: 160px 160px;
  pointer-events: none;
  z-index: 0;
}
[data-grain="dark"]::after { opacity: 0.18; mix-blend-mode: overlay; }
[data-grain="light"]::after { opacity: 0.6; mix-blend-mode: multiply; }

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.15rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

a { color: inherit; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.01em;
  margin: 0;
}

p { margin: 0; }

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

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

/* ---------- utilities ---------- */

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 200;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 1rem;
  border-radius: 8px;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 1rem; }

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

.eyebrow {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
}

.section-head {
  max-width: 22ch;
  margin: 0 auto 3rem;
  text-align: center;
}
.section-head h2 {
  font-size: clamp(1.9rem, 1.2rem + 3vw, 3.4rem);
  max-width: 18ch;
  margin-inline: auto;
}
.section-head p {
  margin-top: 1.1rem;
  color: var(--muted);
  max-width: 46ch;
  margin-inline: auto;
}

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.9rem 1.6rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border: 2px solid var(--accent);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease,
              transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.btn:hover { background: #185a44; border-color: #185a44; }
.btn--light { background: #fff; color: var(--ink); border-color: #fff; }
.btn--light:hover { background: var(--cream); border-color: var(--cream); }
.btn--submit { border: none; }

/* ---------- header ---------- */

/* State-adaptive header (art-direction spec 4): transparent over dark/full-bleed
   scenes, a faint paper backing over light content, hides on scroll-down. JS in
   main.js toggles .is-dark / .is-hidden; with no JS it defaults to the backed
   state, which is legible over the page's first paint (the dark hero handles its
   own contrast via the light default ink + shadow below). */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--head-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 var(--gutter);
  background: color-mix(in srgb, var(--paper) 80%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              background-color 0.4s ease, border-color 0.4s ease, color 0.4s ease;
}
/* Over a dark scene: no bar, light ink, a soft shadow keeps it legible. */
.site-header.is-dark {
  /* Faint top-down scrim guarantees the light nav stays legible over any dark
     or mixed-brightness scene (e.g. the lighter right of the tired-site hero). */
  background: linear-gradient(180deg, rgba(8,12,10,0.42), rgba(8,12,10,0));
  backdrop-filter: none;
  border-bottom-color: transparent;
  color: var(--paper);
  text-shadow: 0 1px 12px rgba(0,0,0,0.5);
}
.site-header.is-dark .brand,
.site-header.is-dark .site-nav a { color: var(--paper); }
.site-header.is-dark .brand__mark { background: var(--paper); color: var(--night); }
.site-header.is-dark .site-nav__cta {
  background: rgba(255,255,255,0.16);
  color: var(--paper) !important;
  text-shadow: none;
}
.site-header.is-dark .site-nav__cta:hover { background: var(--accent); }
/* Hidden on scroll-down (never sits over the S2 morph mid-choreography). */
.site-header.is-hidden { transform: translateY(-100%); }
/* Reduced motion: state changes are instant, no sliding or fading chrome. */
@media (prefers-reduced-motion: reduce) {
  .site-header { transition: none; }
  .site-header.is-hidden { transform: none; }
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  color: var(--ink);
  transition: color 0.4s ease;
}
.brand__mark {
  display: grid;
  place-items: center;
  width: 2rem; height: 2rem;
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  transition: background-color 0.4s ease, color 0.4s ease;
}
.site-nav { display: flex; align-items: center; gap: clamp(1rem, 2vw, 2rem); }
.site-nav a { text-decoration: none; color: var(--ink); font-weight: 500; font-size: 0.98rem; transition: color 0.2s ease; }
.site-nav a:hover { color: var(--accent); }
.site-nav__cta {
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper) !important;
  transition: background-color 0.2s ease;
}
.site-nav__cta:hover { background: var(--accent); }
@media (max-width: 640px) {
  .site-nav a:not(.site-nav__cta) { display: none; }
}

/* ---------- S1 hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding: var(--gutter);
  padding-bottom: clamp(3rem, 8vh, 6rem);
  overflow: hidden;
  color: #fff;
}
.hero__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top center;
  filter: saturate(0.9);
}
.hero__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(14,21,18,0.82) 0%, rgba(14,21,18,0.5) 42%, rgba(14,21,18,0.15) 70%),
    linear-gradient(180deg, rgba(14,21,18,0.55) 0%, rgba(14,21,18,0.3) 32%, rgba(14,21,18,0.9) 100%);
}
.hero__content { position: relative; max-width: 40ch; }
.hero__title {
  font-size: clamp(2.3rem, 1.5rem + 3.4vw, 4.2rem);
  font-weight: 500;
  max-width: 18ch;
  margin-top: 0.8rem;
  text-wrap: balance;
}
.hero__sub {
  margin-top: 1.4rem;
  max-width: 42ch;
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.3rem);
  color: rgba(255,255,255,0.9);
}
.hero .eyebrow { color: #cfeadd; }

.scroll-cue {
  position: absolute;
  left: 50%; bottom: 1.6rem;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  color: #fff;
  text-decoration: none;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.scroll-cue__line {
  width: 1px; height: 42px;
  background: rgba(255,255,255,0.6);
}

/* ---------- All-users pause control (WCAG 2.2.2) ----------
   Freezes the continuous ambient motion (scroll cue, S5 WebGL field, cursor)
   for everyone, not only OS-reduced-motion users. Injected by main.js only
   when motion actually runs, so reduced-motion users (no motion) never see it. */
.motion-toggle {
  position: fixed;
  left: 1.2rem; bottom: 1.2rem;
  z-index: 150;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.85rem;
  font: 500 0.78rem/1 var(--font-body);
  letter-spacing: 0.02em;
  color: var(--paper);
  background: rgba(14,21,18,0.72);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 999px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.25s ease;
}
.motion-toggle:hover { background: rgba(14,21,18,0.92); }
.motion-toggle:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.motion-toggle__icon { font-size: 0.7em; line-height: 1; }
@media (max-width: 560px) {
  /* Collapse to an icon; the label stays as the accessible name. */
  .motion-toggle { padding: 0.6rem; }
  .motion-toggle__label {
    position: absolute; width: 1px; height: 1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }
}

/* ---------- S2 morph ---------- */

.morph {
  /* Not flat black: a pool of light behind the transforming screen, so the
     screen reads as the light source (art-direction light logic). */
  background:
    radial-gradient(85% 62% at 50% 40%, rgba(36,81,61,0.55) 0%, rgba(20,33,27,0.35) 38%, rgba(11,16,13,0) 66%),
    var(--night);
  padding: clamp(3rem, 8vh, 7rem) var(--gutter);
}
.morph__sticky {
  max-width: 1280px;
  margin-inline: auto;
  display: grid;
  gap: 1.8rem;
  justify-items: stretch;
}
.morph__stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1920 / 1074;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 40px 80px -30px rgba(0,0,0,0.6);
  background: #0b0f0d;
}
.morph__static, .morph__video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
/* Vignette: darkens the frame edges so the transforming screen is the light source. */
.morph__stage::after {
  content: "";
  position: absolute; inset: 0;
  box-shadow: inset 0 0 100px 24px rgba(0,0,0,0.4);
  pointer-events: none;
}
/* Base + no-JS + reduced motion: show the finished (after) frame, not the video. */
.morph__video { display: none; }
.morph__caption {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 1rem + 2vw, 2.4rem);
  color: var(--cream);
  text-align: left;
  max-width: 20ch;
  text-wrap: balance;
}
.morph__caption span { color: #fff; }

/* ---------- S3 before/after slider ---------- */

.drag { padding: clamp(3.5rem, 9vh, 8rem) var(--gutter); overflow: hidden; }
.drag__grid {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(220px, 0.82fr) 1.4fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: end;
}
.drag__copy { padding-bottom: 0.5rem; }
.drag__copy h2 {
  font-size: clamp(1.9rem, 1.2rem + 3vw, 3.4rem);
  max-width: 14ch;
  margin-top: 0.9rem;
  text-wrap: balance;
}
.drag__lead { margin-top: 1.1rem; color: var(--muted); max-width: 30ch; }
@media (max-width: 780px) {
  .drag__grid { grid-template-columns: 1fr; align-items: start; }
  .drag__copy { padding-bottom: 0; }
}
.ba {
  position: relative;
  /* Bleeds slightly past the right gutter; .drag overflow:hidden crops it. */
  width: calc(100% + var(--gutter));
  max-width: none;
  margin: 0;
  aspect-ratio: 1280 / 716;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(22,33,27,0.4);
  isolation: isolate;
  --pos: 50%;
}
.ba__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba__before {
  position: absolute; inset: 0;
  width: var(--pos);
  overflow: hidden;
}
.ba__before .ba__img { width: max(1000px, 100%); }
.ba__divider {
  position: absolute; top: 0; bottom: 0;
  left: var(--pos);
  width: 2px;
  background: #fff;
  transform: translateX(-1px);
  pointer-events: none;
}
.ba__handle {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 14px rgba(0,0,0,0.3);
}
.ba__handle::before {
  content: "";
  position: absolute; inset: 0;
  margin: auto;
  width: 20px; height: 10px;
  background:
    linear-gradient(90deg, var(--accent) 0 40%, transparent 40% 60%, var(--accent) 60% 100%);
  clip-path: polygon(0 50%, 40% 0, 40% 100%, 60% 0, 60% 100%, 100% 50%);
}
.ba__range {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}
.ba__labels {
  position: absolute; inset: auto 0 1rem 0;
  display: flex;
  justify-content: space-between;
  padding: 0 1.2rem;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
  pointer-events: none;
}

/* ---------- S4 why ---------- */

.why { padding: clamp(3.5rem, 9vh, 8rem) var(--gutter); background: var(--paper-2); }
.why__grid {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.why__lead { position: relative; }
.why__lead::before {
  content: "";
  position: absolute;
  inset: -12% -18% auto -30%;
  height: 70%;
  background: radial-gradient(closest-side, rgba(31,111,84,0.18), transparent 70%);
  filter: blur(24px);
  z-index: 0;
}
.why__lead > * { position: relative; z-index: 1; }
.why__lead h2 {
  font-size: clamp(1.8rem, 1.1rem + 2.8vw, 3rem);
  max-width: 15ch;
  margin-top: 0.9rem;
  text-wrap: balance;
}
.why__list { list-style: none; margin: 0; padding: 0; }
.why__item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(1rem, 2vw, 1.6rem);
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
}
.why__item:last-child { border-bottom: 1px solid var(--line); }
.why__num {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--accent);
  line-height: 1.2;
}
.why__item h3 { font-size: 1.25rem; margin-bottom: 0.4rem; }
.why__item p { color: var(--muted); font-size: 0.98rem; max-width: 48ch; }
/* Lead item is the clear anchor: noticeably larger, no top border. */
.why__item--lead { padding-top: 0.2rem; padding-bottom: 1.9rem; border-top: none; }
.why__item--lead .why__num { font-size: 2.4rem; }
.why__item--lead h3 { font-size: 2rem; }
.why__item--lead p { font-size: 1.12rem; color: var(--ink); max-width: 44ch; }
@media (max-width: 820px) {
  .why__grid { grid-template-columns: 1fr; gap: 2rem; }
  .why__lead::before { inset: -12% -10% auto -10%; }
}

/* ---------- S5 alive (WebGL, static fallback here) ---------- */

.alive {
  position: relative;
  min-height: 90svh;
  display: grid;
  place-items: center;
  padding: clamp(3rem, 10vh, 8rem) var(--gutter);
  color: #fff;
  overflow: hidden;
  /* static fallback: a living gradient with no motion */
  background:
    radial-gradient(120% 90% at 20% 10%, #1c3a2e 0%, rgba(28,58,46,0) 55%),
    radial-gradient(120% 90% at 85% 90%, #24513d 0%, rgba(36,81,61,0) 55%),
    var(--night);
}
.alive__canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
  opacity: 0; /* revealed by JS only when WebGL initialises */
}
.alive__content { position: relative; text-align: center; max-width: min(46ch, 100%); }
/* Signature scene: oversized display near the hero clamp so it commands the field.
   Authored break in the markup ("We make websites" / "feel alive."). No balance:
   it would re-split each segment and reintroduce a one-word orphan. The measure is
   wide enough (and the mobile floor low enough) that each line fits from 320 to 1600. */
.alive__title { font-size: clamp(2.1rem, 1.3rem + 3.6vw, 4.6rem); }
.alive__sub { margin-top: 1.2rem; color: rgba(255,255,255,0.82); max-width: 40ch; margin-inline: auto; }
/* Mobile: cap the field so the statement fills it rather than floating in a tall void. */
@media (max-width: 640px) { .alive { min-height: 68svh; } }

/* ---------- S6 tiers ---------- */

.tiers { padding: clamp(3.5rem, 9vh, 8rem) var(--gutter); }
/* Left-aligned intro (not a centred head over a centred block). */
.tiers__intro { max-width: var(--maxw); margin: 0 auto 2.4rem; }
.tiers__intro h2 {
  font-size: clamp(1.8rem, 1.2rem + 2.4vw, 3rem);
  max-width: 16ch;
  margin-top: 0.9rem;
  text-wrap: balance;
}
/* Two rooms, unequal weight: flagship large + dark + immersive, standard
   smaller + light + framed. Not two identical cards. */
.tier-grid {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: clamp(1.4rem, 3vw, 2.4rem);
  /* Natural heights: the standard room is deliberately smaller than the flagship,
     not stretched to match (which left a dead cream band). */
  align-items: start;
}
.tier {
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.tier__shot { overflow: hidden; position: relative; }
.tier__shot img { width: 100%; height: 100%; object-fit: cover; }
.tier__body { display: flex; flex-direction: column; gap: 1rem; flex: 1; }
.tier__body p { flex: 1; }
.tier__body .btn { align-self: flex-start; margin-top: 0.4rem; }

/* Flagship: the larger, dark, immersive room. Media bleeds tall; warm inner glow. */
.tier--flagship { background: var(--night); color: #fff; }
.tier--flagship .tier__shot { aspect-ratio: 16 / 10; }
.tier--flagship .tier__shot::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(120% 100% at 28% 0%, rgba(58,157,120,0.34), transparent 62%);
  mix-blend-mode: screen;
  pointer-events: none;
}
.tier--flagship .tier__body { padding: clamp(1.8rem, 3vw, 2.6rem); }
.tier--flagship .tier__body h3 { font-size: clamp(1.8rem, 1.2rem + 1.6vw, 2.4rem); }
.tier--flagship .tier__body p { color: rgba(255,255,255,0.82); max-width: 46ch; }

/* Standard: the smaller, lighter, framed room. */
.tier--standard { background: var(--cream); border: 1px solid var(--line); }
.tier--standard .tier__shot { aspect-ratio: 16 / 9; margin: 0.9rem 0.9rem 0; border-radius: 10px; }
.tier--standard .tier__body { padding: 1.6rem 1.8rem 1.8rem; }
.tier--standard .tier__body h3 { font-size: 1.5rem; }
.tier--standard .tier__body p { color: var(--muted); max-width: 42ch; }

@media (max-width: 820px) {
  .tier-grid { grid-template-columns: 1fr; }
}
.tiers__note {
  max-width: 52ch;
  margin: 2.4rem auto 0;
  color: var(--muted);
  font-size: 0.98rem;
}

/* ---------- S7 person ---------- */

.person {
  padding: clamp(3.5rem, 9vh, 7rem) var(--gutter);
  text-align: center;
  /* Visible warm key from the upper-left plus a faint green cast lower-right,
     so the "portrait lighting" intent actually reads. Not a flat cream fill. */
  background:
    radial-gradient(62% 72% at 26% 24%, var(--cream) 0%, rgba(244,239,228,0) 56%),
    radial-gradient(52% 60% at 82% 88%, rgba(31,111,84,0.09) 0%, rgba(31,111,84,0) 60%),
    var(--paper-2);
}
/* Quietest heading on the page: the intimate close before the loud enquiry. */
.person__title { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 2.9rem); max-width: 18ch; margin: 0 auto; text-wrap: balance; }
.person__sub { margin-top: 1.3rem; color: var(--muted); font-size: 1.12rem; max-width: 44ch; margin-inline: auto; }

/* ---------- S8 enquiry ---------- */

/* Split conversion scene: statement left, form in a dark rim-lit panel right.
   A designed scene that contains a form, not a centred form dump. */
.enquire { padding: clamp(3.5rem, 9vh, 8rem) var(--gutter); }
.enquire__grid {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(2rem, 4vw, 4.5rem);
  align-items: center;
}
/* The loudest note on the page: the enquiry is the destination the whole scroll leans toward. */
.enquire__intro h2 {
  font-size: clamp(2.2rem, 1.4rem + 3.4vw, 4rem);
  max-width: 15ch;
  margin-top: 0.9rem;
  text-wrap: balance;
}
.enquire__lead { margin-top: 1.1rem; color: var(--muted); max-width: 40ch; }
.enquire__intro .form-fallback { margin-top: 1.6rem; }
.enquire__panel {
  position: relative;
  background: var(--night-2);
  border-radius: var(--radius);
  padding: clamp(1.6rem, 3vw, 2.4rem);
  box-shadow: 0 34px 70px -34px rgba(0,0,0,0.55);
}
/* Rim light along the top edge. */
.enquire__panel::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(160deg, rgba(58,157,120,0.5), rgba(255,255,255,0.04) 40%, transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
@media (max-width: 860px) {
  .enquire__grid { grid-template-columns: 1fr; gap: 2rem; }
}
.enquiry-form { display: grid; gap: 1.1rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.field { display: grid; gap: 0.4rem; }
.field label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,0.7);
}
.field .opt { font-weight: 400; letter-spacing: 0; text-transform: none; color: rgba(255,255,255,0.5); }
.field input, .field textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(255,255,255,0.26);
  border-radius: 10px;
  background: rgba(255,255,255,0.09);
  color: #fff;
  width: 100%;
}
.field input::placeholder, .field textarea::placeholder { color: rgba(255,255,255,0.4); }
.field input:focus, .field textarea:focus { border-color: var(--accent-2); outline-offset: 1px; }
.field textarea { resize: vertical; min-height: 110px; }
.enquiry-form .btn--submit { justify-self: start; }
.form-status { min-height: 1.2em; font-size: 0.95rem; color: rgba(255,255,255,0.85); }
.form-status.is-ok { color: var(--accent-2); }
.form-status.is-err { color: #f0a2a2; }
.form-fallback { color: var(--muted); font-size: 0.95rem; }
.form-fallback a { color: var(--accent); }

/* ---------- footer ---------- */

.site-footer {
  padding: clamp(2.5rem, 6vh, 4rem) var(--gutter);
  background: var(--night);
  color: rgba(255,255,255,0.82);
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem 2rem;
  justify-content: space-between;
  align-items: center;
}
.site-footer p { font-size: 0.92rem; margin: 0.15rem 0; }
.site-footer__nav { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.site-footer__nav a { color: rgba(255,255,255,0.82); text-decoration: none; font-size: 0.92rem; }
.site-footer__nav a:hover { color: #fff; }

/* ---------- chat widget ---------- */

.chat { position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 150; }
/* The hidden attribute must win over the display rules below (else the widget
   ships open). Attribute-selector specificity beats the plain class rules. */
.chat[hidden], .chat__panel[hidden] { display: none; }
.chat__toggle {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.8rem 1.3rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 26px -10px rgba(0,0,0,0.5);
}
.chat__toggle:hover { background: var(--accent); }
.chat__panel {
  position: absolute;
  right: 0; bottom: calc(100% + 0.7rem);
  width: min(360px, calc(100vw - 2.4rem));
  height: min(520px, 70vh);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 24px 60px -20px rgba(0,0,0,0.4);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.chat__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.1rem;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
}
.chat__close { background: none; border: none; color: var(--paper); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.chat__log {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.chat__msg { max-width: 85%; padding: 0.6rem 0.85rem; border-radius: 12px; font-size: 0.95rem; line-height: 1.45; }
.chat__msg--bot { background: var(--paper-2); align-self: flex-start; border-bottom-left-radius: 4px; }
.chat__msg--user { background: var(--accent); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.chat__msg--note { align-self: center; color: var(--muted); font-size: 0.82rem; background: none; }
.chat__form { display: flex; gap: 0.5rem; padding: 0.7rem; border-top: 1px solid var(--line); }
.chat__form textarea {
  flex: 1;
  resize: none;
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  max-height: 120px;
}
.chat__send {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0 1rem;
  font-weight: 600;
  cursor: pointer;
}
.chat__send:disabled { opacity: 0.5; cursor: default; }

/* custom cursor element: hidden unless motion.css enables it on fine-pointer devices */
.cursor { display: none; }
