/* Pitter's Pool Caribbean
   Design system: design-system/pitters-pool-caribbean/MASTER.md + pages/site.md
   Style: Minimalism & Swiss, photography-led. One typeface (Manrope). 4/8 spacing. */

/* ---------- tokens ---------- */
:root {
  /* colour: raw */
  --navy-950: #061528;
  --navy-900: #0B2540;
  --navy-800: #12365A;
  --teal-300: #7FD1C7;
  --teal-700: #0E6B66;
  --paper: #FAF8F4;
  --stone: #F0ECE4;
  --white: #FFFFFF;
  --slate-600: #4B5A6B;
  --slate-400: #7B8794;
  --sand-300: #DDD6C9;
  --green-500: #25D366;
  --green-600: #1DBF59;
  --red-700: #B42318;

  /* colour: semantic */
  --bg: var(--paper);
  --surface: var(--white);
  --text: var(--navy-900);
  --text-muted: var(--slate-600);
  --border: var(--sand-300);
  --control-border: var(--slate-400);
  --accent: var(--teal-700);
  --cta: var(--green-500);
  --cta-hover: var(--green-600);
  --on-cta: var(--navy-950);
  --danger: var(--red-700);
  --dark: var(--navy-900);
  --on-dark: var(--white);
  --on-dark-muted: #C3CEDB;
  --on-dark-accent: var(--teal-300);
  --border-dark: rgba(255, 255, 255, .18);

  /* type */
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --fs-sm: .875rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: 1.25rem;
  --fs-h3: 1.5rem;
  --fs-h2: clamp(2rem, 1.3rem + 2.6vw, 3.25rem);
  --fs-h1: clamp(2.25rem, 1.2rem + 4.2vw, 4.25rem);

  /* space: 4/8 scale */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px;
  --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 128px;
  --gutter: 24px;
  --sec: clamp(64px, 9vw, 128px);
  --wrap: 1248px;
  --nav-h: 64px;
  --bar-h: 0px;

  /* shape and depth */
  --r: 4px;
  --shadow-sm: 0 1px 2px rgba(6, 21, 40, .08);
  --shadow-md: 0 6px 16px -4px rgba(6, 21, 40, .14);
  --shadow-lg: 0 24px 48px -16px rgba(6, 21, 40, .28);

  /* motion */
  --ease-out: cubic-bezier(.25, .46, .45, .94);
  --ease-in: cubic-bezier(.55, .09, .68, .53);
  --t-fast: 150ms;
  --t: 200ms;
  --t-reveal: 350ms;
  --t-slow: 600ms;

  /* layers */
  --z-nav: 40; --z-bar: 30;
}
@media (min-width: 768px) { :root { --gutter: 40px; --nav-h: 72px; } }
@media (min-width: 1440px) { :root { --gutter: 48px; } }
@media (max-width: 1023.98px) { :root { --bar-h: 76px; } }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 var(--fs-base)/1.6 var(--font); font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; touch-action: manipulation; }
a, button, select, input { -webkit-tap-highlight-color: transparent; }
h1, h2, h3 { font-weight: 700; line-height: 1.1; text-wrap: balance; color: inherit; }
h1 { font-size: var(--fs-h1); letter-spacing: -.025em; }
h2 { font-size: var(--fs-h2); letter-spacing: -.02em; }
h3 { font-size: var(--fs-h3); line-height: 1.2; }
p { text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--navy-900); outline-offset: 2px; box-shadow: 0 0 0 2px var(--white); border-radius: var(--r); }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: var(--s-4); top: -100px; z-index: 100; background: var(--surface); color: var(--text); padding: var(--s-3) var(--s-4); border-radius: var(--r); font-weight: 600; }
.skip:focus { top: var(--s-4); }
.ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.ico-sm { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- buttons and links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 var(--s-5); border: 1px solid transparent; border-radius: var(--r);
  font-weight: 600; font-size: var(--fs-base); line-height: 1.2; text-align: center; cursor: pointer;
  transition: background-color var(--t) var(--ease-out), color var(--t) var(--ease-out), border-color var(--t) var(--ease-out), transform var(--t-fast) var(--ease-out);
}
.btn:active { transform: scale(.98); }
.btn-lg { min-height: 56px; padding: 0 28px; font-size: 1.0625rem; }
.btn-sm { min-height: 44px; padding: 0 var(--s-4); font-size: .9375rem; white-space: nowrap; }
.btn-primary { background: var(--cta); color: var(--on-cta); }
.btn-primary:hover { background: var(--cta-hover); }
.btn-line { border-color: var(--navy-900); color: var(--navy-900); }
.btn-line:hover { background: var(--navy-900); color: var(--white); }
.btn-ghost { border-color: rgba(255, 255, 255, .5); color: var(--white); }
.btn-ghost:hover { background: var(--white); color: var(--navy-900); border-color: var(--white); }

.tlink { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 44px; font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; text-decoration-color: currentColor; }
.tlink .ico { transition: transform var(--t) var(--ease-out); }
.tlink:hover { text-decoration-thickness: 2px; }
.tlink:hover .ico { transform: translateX(4px); }

/* ---------- nav ---------- */
.nav { position: fixed; inset: 0 0 auto; z-index: var(--z-nav); height: var(--nav-h); color: var(--text); background: rgba(250, 248, 244, .78); -webkit-backdrop-filter: blur(20px) saturate(150%); backdrop-filter: blur(20px) saturate(150%); border-bottom: 1px solid rgba(11, 37, 64, .1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6); transition: background-color var(--t) var(--ease-out), border-color var(--t) var(--ease-out), color var(--t) var(--ease-out), box-shadow var(--t) var(--ease-out); }
.home .nav:not(.solid) { background: rgba(8, 20, 44, .18); border-color: rgba(255, 255, 255, .12); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08); color: var(--white); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .nav { background: var(--paper); } .home .nav:not(.solid) { background: rgba(8, 20, 44, .7); } }
.nav-in { height: 100%; display: flex; align-items: center; gap: var(--s-4); }
@media (min-width: 1200px) { .nav-in { gap: var(--s-6); } }
.logo { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; font-size: 1.0625rem; letter-spacing: 0; white-space: nowrap; }
.logo .mark { height: 40px; width: auto; flex: none; }
.logo .mark-d, .home .nav:not(.solid) .mark-l, .menu .mark-l { display: none; }
.home .nav:not(.solid) .mark-d, .menu .mark-d { display: block; }
.logo-full img { width: 190px; height: auto; }
.logo-t span { font-weight: 400; }
.links { display: none; align-items: center; gap: var(--s-2); margin-left: auto; }
.link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 var(--s-3); border-radius: var(--r); font-weight: 500; font-size: .9375rem; white-space: nowrap; cursor: pointer; position: relative; }
.link::after { content: ""; position: absolute; left: var(--s-3); right: var(--s-3); bottom: 8px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform var(--t) var(--ease-out); }
.link:hover::after, .link.on::after, .dd.open .link::after { transform: scaleX(1); }
.link .ico-sm { transition: transform var(--t) var(--ease-out); }
.dd.open .link .ico-sm { transform: rotate(180deg); }
.nav-act { display: flex; align-items: center; gap: var(--s-4); margin-left: auto; }
.tel { display: none; align-items: center; gap: var(--s-2); min-height: 44px; font-weight: 600; font-size: .9375rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tel:hover { text-decoration: underline; text-underline-offset: 6px; }
.nav-cta { display: none; border-color: currentColor; }
.nav-cta:hover { background: var(--navy-900); border-color: var(--navy-900); color: var(--white); }
.home .nav:not(.solid) .nav-cta:hover { background: var(--white); border-color: var(--white); color: var(--navy-900); }
.cta-away .nav-cta, .cta-away .nav-cta:hover { background: var(--cta); border-color: var(--cta); color: var(--on-cta); }
.cta-away .nav-cta:hover { background: var(--cta-hover); border-color: var(--cta-hover); }
.burger { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-right: -10px; border-radius: var(--r); transition: background-color var(--t) var(--ease-out); }
.burger .ico { width: 28px; height: 28px; stroke-width: 1.75; }
.burger span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.burger:active { background: rgba(127, 127, 127, .18); }

.dd { position: relative; }
.dd-panel { position: absolute; top: 100%; left: 0; min-width: 300px; padding: var(--s-2); background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity var(--t-fast) var(--ease-in), transform var(--t-fast) var(--ease-in), visibility 0s linear var(--t-fast); }
.dd.open .dd-panel { opacity: 1; visibility: visible; transform: none; transition: opacity var(--t) var(--ease-out), transform var(--t) var(--ease-out), visibility 0s; }
.dd-panel a { display: flex; align-items: center; min-height: 48px; padding: 0 var(--s-4); border-radius: 2px; font-weight: 500; transition: background-color var(--t-fast) var(--ease-out); }
.dd-panel a:hover { background: var(--stone); }
.dd-panel a[aria-current] { color: var(--accent); }

@media (min-width: 1024px) {
  .nav-in { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
  .nav-in > .logo { justify-self: start; }
  .links { display: flex; margin: 0; justify-self: center; }
  .nav-act { margin-left: 0; justify-self: end; }
  .tel, .nav-cta { display: inline-flex; }
  .burger { display: none; }
}
/* narrow desktops: the phone number would crowd the centred links, so only the quote button stays */
@media (min-width: 1024px) and (max-width: 1239.98px) { .tel { display: none; } }

/* ---------- mobile menu (native dialog: focus trap, Esc, inert page) ---------- */
.menu { position: fixed; inset: 0; width: 100%; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: var(--navy-900); color: var(--white); overflow: hidden; }
.menu[open] { display: flex; flex-direction: column; }
.menu:focus, .menu:focus-visible { outline: none; box-shadow: none; }
.menu::backdrop { background: var(--navy-900); }
.menu :focus-visible { outline-color: var(--white); box-shadow: none; }
.motion .menu[open] { animation: menu-in 250ms var(--ease-out); }
@keyframes menu-in { from { opacity: 0; transform: translateY(-8px); } }
.menu-top { display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); padding-inline: var(--gutter); flex: none; }
.menu-nav { flex: 1; overflow-y: auto; padding: var(--s-6) var(--gutter) var(--s-5); }
.menu-k { font-size: var(--fs-h3); font-weight: 700; letter-spacing: -.01em; line-height: 1.2; margin-bottom: var(--s-2); }
.menu-nav a { display: flex; align-items: center; min-height: 44px; font-size: var(--fs-md); font-weight: 500; color: rgba(255, 255, 255, .78); }
.menu-nav a[aria-current], .menu-nav a:active { color: var(--white); }
.menu-main { margin-top: var(--s-5); padding-top: var(--s-4); border-top: 1px solid var(--border-dark); }
.menu-main a { font-size: var(--fs-h3); font-weight: 700; letter-spacing: -.01em; min-height: 56px; color: var(--white); }
.menu-foot { flex: none; display: grid; grid-template-columns: 1.5fr 1fr; gap: var(--s-2); padding: var(--s-4) var(--gutter) calc(var(--s-4) + env(safe-area-inset-bottom)); border-top: 1px solid var(--border-dark); }

/* ---------- hero (home) ---------- */
.hero { position: relative; min-height: max(var(--vh, 100svh), 600px); background: #0A1630; color: var(--white); overflow: hidden; isolation: isolate; }
.hero-media img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; }
.hero-video { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 100% 100%; opacity: 0; pointer-events: none; }
.hero-video.on { opacity: 1; }
@media (min-aspect-ratio: 5/4) { .hero-media img, .hero-video { filter: saturate(1.35) brightness(1.2); } }
/* text sits in the middle of the picture, so the picture is darkened evenly, a little more behind the text */
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse 62% 46% at 50% 52%, rgba(6, 14, 32, .5) 0%, rgba(6, 14, 32, 0) 100%), rgba(6, 14, 32, .14); }
.hero-in { min-height: max(var(--vh, 100svh), 600px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding-top: var(--nav-h); padding-bottom: var(--s-6); }
.hero h1 { font-size: clamp(2.25rem, 10.4vw, 4rem); line-height: 1.05; max-width: 11em; text-shadow: 0 2px 28px rgba(6, 14, 32, .6); }
.hero-cta { margin-top: var(--s-5); width: 100%; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--s-2) var(--s-5); }
.hero-cta .btn { width: 100%; max-width: 420px; }
@media (min-width: 600px) { .hero-cta .btn { width: auto; } }
@media (min-aspect-ratio: 5/4) {
  .hero-media img { object-position: 100% 100%; }
  .hero h1 { font-size: clamp(2.25rem, min(4.6vw, 8vh), 4.75rem); max-width: min(14.5em, 84vw); }
  .hero-cta { margin-top: clamp(24px, 4.4vh, 40px); }
}
.hero .tlink { display: none; }
@media (min-height: 700px), (min-aspect-ratio: 5/4) { .hero .tlink { display: inline-flex; } }
.motion .hero-in > * { animation: rise 500ms var(--ease-out) both; }
.motion .hero-in > :nth-child(1) { animation-delay: 150ms; }
.motion .hero-in > :nth-child(2) { animation-delay: 230ms; }
@keyframes settle { from { transform: scale(1.05); } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

/* ---------- proof ---------- */
.proof { border-bottom: 1px solid var(--border); }
.proof-in { display: grid; padding-block: var(--s-3); }
.proof-in > div { padding-block: var(--s-4); border-top: 1px solid var(--border); }
.proof-in > div:first-child { border-top: 0; }
.proof dt { font-size: clamp(1.25rem, 1rem + .9vw, 1.625rem); font-weight: 700; line-height: 1.2; letter-spacing: -.015em; }
.proof dd { margin-top: 2px; font-size: .9375rem; line-height: 1.4; color: var(--text-muted); }
@media (min-width: 768px) {
  .proof-in { grid-template-columns: repeat(3, 1fr); padding-block: var(--s-6); }
  .proof-in > div { padding: var(--s-1) var(--s-6); border-top: 0; border-left: 1px solid var(--border); }
  .proof-in > div:first-child { padding-left: 0; border-left: 0; }
}

/* ---------- build story ---------- */
.build { color: var(--on-dark); background: linear-gradient(rgba(6, 21, 40, .8), rgba(6, 21, 40, .86)), var(--navy-950) url(/img/water.webp) center / cover; }
.build :focus-visible { outline-color: var(--white); box-shadow: none; }
.build-pin { padding-block: var(--sec); }
.build-head p { margin-top: var(--s-3); color: var(--on-dark-muted); font-size: var(--fs-md); }
.stages { margin-top: var(--s-7); display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-6) var(--s-4); }
.stage:last-child { grid-column: 1 / -1; }
.stage figure { overflow: hidden; border-radius: var(--r); background: var(--navy-800); aspect-ratio: 4 / 3; }
.stage img { width: 100%; height: 100%; object-fit: cover; }
.stage-t { margin-top: var(--s-3); }
.stage-n { display: block; font-size: var(--fs-h3); font-weight: 600; line-height: 1; color: var(--on-dark-accent); font-variant-numeric: tabular-nums; }
.stage h3 { margin-top: var(--s-2); font-size: var(--fs-lg); }
.stage p { margin-top: var(--s-1); color: var(--on-dark-muted); font-size: .9375rem; line-height: 1.45; }
.build-prog { display: none; }
@media (min-width: 1024px) {
  .stages { grid-template-columns: repeat(5, 1fr); gap: var(--s-5); }
  .stage:last-child { grid-column: auto; }
}

/* auto-playing sequence: only with JS and motion allowed; otherwise the five stages show as a grid */
@media (min-height: 520px) {
  .motion .build-pin { padding-block: var(--s-6); }
  .motion .build-grid { height: clamp(430px, calc(var(--vh, 100svh) - var(--nav-h) - var(--bar-h) - 64px), 600px); display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto auto; gap: var(--s-5); }
  .motion .build-head { grid-row: 1; }
  .motion .build-head h2 { font-size: clamp(1.875rem, 1.2rem + 3vw, 3rem); }
  .motion .build-head p { margin-top: var(--s-3); font-size: var(--fs-base); }
  .motion .stages { margin: 0; pointer-events: none; grid-column: 1; grid-row: 2 / 4; display: grid; grid-template-columns: subgrid; grid-template-rows: subgrid; gap: var(--s-5); }
  .motion .stage, .motion .stage:last-child { grid-area: 1 / 1 / -1 / -1; display: grid; grid-template-columns: subgrid; grid-template-rows: subgrid; pointer-events: none; }
  .motion .stage figure { grid-row: 1; aspect-ratio: auto; min-height: 0; opacity: 0; transition: opacity var(--t-slow) var(--ease-out); }
  .motion .stage img { transform: scale(1.04); transition: transform 900ms var(--ease-out); }
  .motion .stage-t { grid-row: 2; margin: 0; display: grid; grid-template-columns: auto 1fr; column-gap: var(--s-4); align-items: end; opacity: 0; transform: translateY(12px); transition: opacity var(--t) var(--ease-in), transform var(--t) var(--ease-in); }
  .motion .stage-n { grid-row: 1 / 3; font-size: clamp(4rem, 19vw, 5.5rem); line-height: .8; letter-spacing: -.02em; }
  .motion .stage h3 { margin: 0; font-size: var(--fs-h3); align-self: end; }
  .motion .stage p { margin: var(--s-1) 0 0; }
  .motion .stage.on { pointer-events: auto; }
  .motion .build-prog button { cursor: pointer; }
  .motion .stage.on figure { opacity: 1; }
  .motion .stage.on img { transform: none; }
  .motion .stage.on .stage-t { opacity: 1; transform: none; transition: opacity var(--t-reveal) var(--ease-out) 120ms, transform var(--t-reveal) var(--ease-out) 120ms; }
  .motion .build-prog { grid-row: 4; display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--s-2); }
  .build-prog button { position: relative; min-height: 44px; padding-top: var(--s-3); text-align: left; font-size: var(--fs-sm); font-weight: 600; color: var(--on-dark-muted); font-variant-numeric: tabular-nums; transition: color var(--t) var(--ease-out); }
  .build-prog button::before, .build-prog i { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: rgba(255, 255, 255, .22); }
  .build-prog i { background: var(--on-dark-accent); transform: scaleX(0); transform-origin: left; }
  .build-prog .done i { transform: scaleX(1); }
  .build-prog .run i { transform: scaleX(1); transition: transform var(--hold, 1800ms) linear; }
  .build-prog button:hover, .build-prog button[aria-current] { color: var(--white); }
}
/* short phones: drop the sub-line so the photo keeps its height */
@media (max-height: 700px) and (max-width: 1023.98px) { .motion .build-head p { display: none; } }
@media (min-height: 520px) and (min-width: 1024px) {
  .motion .build-pin { padding-block: var(--sec); }
  .motion .build-grid { height: clamp(480px, 68vh, 640px); grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); grid-template-rows: minmax(0, 1fr) auto auto auto minmax(0, 1fr); column-gap: var(--s-8); row-gap: var(--s-7); }
  .motion .build-head { grid-column: 1; grid-row: 2; }
  .motion .build-head h2 { font-size: clamp(2.25rem, 3.6vw, 3.5rem); }
  .motion .build-head p { margin-top: var(--s-5); font-size: var(--fs-md); }
  .motion .stages { grid-column: 1 / -1; grid-row: 1 / -1; column-gap: var(--s-8); row-gap: var(--s-7); }
  .motion .stage figure { grid-column: 2; grid-row: 1 / -1; }
  .motion .stage-t { grid-column: 1; grid-row: 3; display: grid; grid-template-columns: auto 1fr; column-gap: var(--s-5); align-items: center; }
  .motion .stage-n { grid-row: 1 / 3; font-size: clamp(4.5rem, 13vh, 7rem); line-height: .8; letter-spacing: -.03em; margin-left: -.04em; }
  .motion .stage h3 { align-self: end; margin: 0; font-size: clamp(1.5rem, 2.4vw, 2.25rem); }
  .motion .stage p { align-self: start; margin-top: var(--s-3); font-size: var(--fs-base); }
  .motion .build-prog { grid-column: 1; grid-row: 4; }
}

/* ---------- sections ---------- */
.sec { padding-block: var(--sec); }
.sec-tint { background: var(--surface); border-block: 1px solid var(--border); }
.sec-stone { background: var(--stone); }
.head { max-width: 44rem; margin-bottom: var(--s-7); }
.head p { margin-top: var(--s-4); font-size: var(--fs-md); color: var(--text-muted); }
.sec-cta { margin-top: var(--s-7); display: flex; }
.sec-cta .btn { width: 100%; }
@media (min-width: 600px) { .sec-cta .btn { width: auto; } }

/* reveal on scroll */
.motion [data-r] { opacity: 0; transform: translateY(12px); transition: opacity var(--t-reveal) var(--ease-out), transform var(--t-reveal) var(--ease-out); transition-delay: calc(var(--i, 0) * 40ms); }
.motion [data-r].in { opacity: 1; transform: none; }

/* ---------- services index ---------- */
.svc { border-top: 1px solid var(--navy-900); }
.svc-row { display: grid; grid-template-columns: 72px minmax(0, 1fr) 20px; grid-template-areas: "img name ico" "img line ico"; column-gap: var(--s-4); align-items: center; padding-block: var(--s-4); border-bottom: 1px solid var(--border); transition: background-color var(--t) var(--ease-out); }
.svc-n { display: none; grid-area: n; font-size: var(--fs-sm); font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; }
.svc-name { grid-area: name; align-self: end; font-size: var(--fs-lg); font-weight: 600; line-height: 1.2; }
.svc-line { grid-area: line; align-self: start; margin-top: 2px; font-size: .9375rem; line-height: 1.4; color: var(--text-muted); }
.svc-img { grid-area: img; aspect-ratio: 1; overflow: hidden; border-radius: var(--r); background: var(--stone); }
.svc-img img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow) var(--ease-out); }
.svc-row .ico { grid-area: ico; transition: transform var(--t) var(--ease-out); }
.svc-row:hover { background: var(--surface); }
.svc-row:hover .svc-img img { transform: scale(1.05); }
.svc-row:hover .ico { transform: translateX(6px); }
.svc-row:hover .svc-name { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.svc-row:active { background: var(--stone); }
@media (min-width: 768px) and (max-width: 1023.98px) {
  .svc-row { grid-template-columns: 128px minmax(0, 1fr) 24px; column-gap: var(--s-5); padding-block: var(--s-5); }
  .svc-name { font-size: var(--fs-h3); }
  .svc-line { font-size: var(--fs-base); }
  .svc-img { aspect-ratio: 4 / 3; }
}
@media (min-width: 1024px) {
  .svc-row { grid-template-columns: 56px minmax(0, 5fr) minmax(0, 5fr) 176px 24px; grid-template-areas: "n name line img ico"; column-gap: var(--s-6); padding: var(--s-5) var(--s-4); }
  .svc-n { display: block; }
  .svc-name { align-self: center; font-size: clamp(1.5rem, 2.6vw, 2.25rem); line-height: 1.1; }
  .svc-line { align-self: center; margin: 0; font-size: var(--fs-md); }
  .svc-img { aspect-ratio: 16 / 10; }
  .svc-row .ico { width: 24px; height: 24px; }
}

/* ---------- gallery ---------- */
.gal { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5) var(--s-3); }
.g { display: flex; flex-direction: column; text-align: left; cursor: zoom-in; }
.g-1 { grid-column: 1 / -1; }
.g-img { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--r); background: var(--stone); }
.g-img img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow) var(--ease-out); }
.g:hover .g-img img { transform: scale(1.03); }
.g-cap { display: block; margin-top: var(--s-2); font-size: var(--fs-sm); line-height: 1.4; color: var(--text-muted); transition: color var(--t) var(--ease-out); }
.g:hover .g-cap { color: var(--text); }
@media (min-width: 768px) {
  .gal { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--s-6) var(--s-5); }
  .g { grid-column: span 4; }
  .g-1 { grid-column: span 8; grid-row: span 2; }
  .g-1 .g-img { aspect-ratio: auto; flex: 1; min-height: 0; }
}

/* lightbox */
.lb { width: 100%; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: var(--s-8) var(--s-4) var(--s-5); border: 0; background: rgba(6, 21, 40, .96); color: var(--white); }
.lb[open] { display: grid; place-items: center; }
.lb::backdrop { background: rgba(6, 21, 40, .96); }
.lb figure { display: grid; gap: var(--s-3); justify-items: center; max-height: 100%; }
.lb img { max-width: 100%; max-height: calc(100dvh - 160px); width: auto; border-radius: var(--r); }
.lb figcaption { color: var(--on-dark-muted); }
.lb-x { position: absolute; top: var(--s-3); right: var(--s-4); display: inline-flex; align-items: center; gap: var(--s-2); min-height: 44px; padding: 0 var(--s-3); border: 1px solid rgba(255, 255, 255, .5); border-radius: var(--r); font-weight: 600; font-size: .9375rem; transition: background-color var(--t) var(--ease-out), color var(--t) var(--ease-out); }
.lb-x:hover { background: var(--white); color: var(--navy-900); }
.lb :focus-visible { outline-color: var(--white); box-shadow: none; }
.motion .lb[open] { animation: fade 200ms var(--ease-out); }
@keyframes fade { from { opacity: 0; } }

/* ---------- process ---------- */
.steps { display: grid; gap: var(--s-6); }
.steps li { padding-top: var(--s-5); border-top: 1px solid var(--navy-900); }
.steps .n { display: block; font-size: clamp(2.5rem, 2rem + 2vw, 3.5rem); font-weight: 600; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.steps h3 { margin-top: var(--s-5); }
.steps p { margin-top: var(--s-2); color: var(--text-muted); max-width: 30em; }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(3, 1fr); gap: var(--s-7); } }

/* ---------- about ---------- */
.about { display: grid; gap: var(--s-6); align-items: center; }
.about-img { overflow: hidden; border-radius: var(--r); aspect-ratio: 4 / 3; background: var(--stone); }
.about-img img { width: 100%; height: 100%; object-fit: cover; }
.about-t p { margin-top: var(--s-5); font-size: var(--fs-md); color: var(--text-muted); max-width: 34em; }
.ticks { margin-top: var(--s-5); display: grid; gap: var(--s-3); }
.ticks li, .inc-list li { display: flex; align-items: flex-start; gap: var(--s-3); font-weight: 500; }
.ticks .ico, .inc-list .ico { margin-top: 3px; color: var(--accent); }
.about-t .btn { margin-top: var(--s-6); }
@media (min-width: 1024px) {
  .about { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: var(--s-9); }
  .about-img { aspect-ratio: 1; }
}

/* ---------- contact ---------- */
.contact { padding-block: var(--sec); color: var(--on-dark); background: linear-gradient(rgba(11, 37, 64, .76), rgba(6, 21, 40, .88)), var(--navy-900) url(/img/water.webp) center / cover; }
.contact-in { display: grid; gap: var(--s-7); align-items: start; }
.contact-t :focus-visible { outline-color: var(--white); box-shadow: none; }
.lead { margin-top: var(--s-4); font-size: var(--fs-md); color: var(--on-dark-muted); max-width: 28em; }
.direct { margin-top: var(--s-6); display: grid; gap: var(--s-1); }
.direct a, .direct span { display: inline-flex; align-items: center; gap: var(--s-3); min-height: 44px; font-weight: 500; overflow-wrap: anywhere; }
.direct .ico { color: var(--on-dark-accent); }
.direct a:hover { text-decoration: underline; text-underline-offset: 6px; }
.form { display: grid; gap: var(--s-5); padding: var(--s-5); background: var(--surface); color: var(--text); border-radius: var(--r); box-shadow: var(--shadow-lg); }
.form-note { font-size: var(--fs-sm); color: var(--text-muted); }
.field { display: grid; gap: var(--s-2); }
.field label { font-weight: 600; font-size: .9375rem; }
.field input, .field select { width: 100%; min-height: 52px; padding: 0 var(--s-4); background: var(--surface); border: 1px solid var(--control-border); border-radius: var(--r); font-size: 1rem; transition: border-color var(--t) var(--ease-out), box-shadow var(--t) var(--ease-out); }
.field select { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 44px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230B2540' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 20px; }
.field input:hover, .field select:hover { border-color: var(--navy-900); }
.field input:focus-visible, .field select:focus-visible { outline: 2px solid var(--navy-900); outline-offset: 1px; box-shadow: none; border-color: var(--navy-900); }
.field [aria-invalid="true"] { border-color: var(--danger); box-shadow: inset 0 0 0 1px var(--danger); }
.hint { font-size: var(--fs-sm); color: var(--text-muted); }
.err { font-size: var(--fs-sm); font-weight: 600; color: var(--danger); }
.form .btn { width: 100%; }
.form-status { font-size: var(--fs-sm); color: var(--text-muted); text-align: center; margin-top: calc(-1 * var(--s-2)); }
@media (min-width: 768px) { .form { padding: var(--s-7); } }
@media (min-width: 1024px) { .contact-in { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--s-9); } }

/* ---------- service pages ---------- */
.service main { padding-top: var(--nav-h); }
.shero { padding-block: var(--s-6) var(--s-7); border-bottom: 1px solid var(--border); }
.shero-in { display: grid; gap: var(--s-6); align-items: center; }
.back { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 44px; margin-bottom: var(--s-3); font-weight: 500; font-size: .9375rem; color: var(--text-muted); transition: color var(--t) var(--ease-out); }
.back .ico { transform: rotate(180deg); transition: transform var(--t) var(--ease-out); }
.back:hover { color: var(--text); }
.back:hover .ico { transform: rotate(180deg) translateX(4px); }
.shero h1 { max-width: 11em; }
.shero .hero-sub { color: var(--text-muted); font-size: var(--fs-md); }
.shero-img { overflow: hidden; border-radius: var(--r); aspect-ratio: 4 / 3; background: var(--stone); }
.shero-img img { width: 100%; height: 100%; object-fit: cover; }
.motion .shero-img img { animation: settle 1200ms var(--ease-out) both; }
@media (min-width: 1024px) {
  .shero { padding-block: var(--s-8) var(--s-9); }
  .shero-in { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--s-8); }
  .shero-img { aspect-ratio: 5 / 4; }
}
.inc { display: grid; gap: 0; }
.inc-list { display: grid; align-content: start; border-top: 1px solid var(--navy-900); }
.inc-list li { padding-block: var(--s-4); border-bottom: 1px solid var(--border); font-size: var(--fs-md); }
.inc-list .ico { margin-top: 4px; }
@media (min-width: 1024px) { .inc { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--s-8); } }
.phs { margin-top: var(--s-8); display: grid; gap: var(--s-5); }
.phs figure { display: grid; gap: var(--s-2); align-content: start; }
.phs img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r); background: var(--stone); }
.phs figcaption { font-size: var(--fs-sm); color: var(--text-muted); }
@media (min-width: 768px) {
  .phs-2 { grid-template-columns: repeat(2, 1fr); }
  .phs-3 { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- footer ---------- */
.foot { background: var(--navy-950); color: var(--on-dark-muted); padding-top: var(--s-8); padding-bottom: calc(var(--s-5) + var(--bar-h)); font-size: .9375rem; }
.foot :focus-visible { outline-color: var(--white); box-shadow: none; }
.foot-in { display: grid; gap: var(--s-6); }
.foot .logo { color: var(--white); }
.foot-brand p { margin-top: var(--s-2); }
.foot h2 { font-size: var(--fs-sm); font-weight: 600; letter-spacing: 0; color: var(--white); margin-bottom: var(--s-2); }
.foot nav, .foot-c { display: grid; align-content: start; }
.foot nav a, .foot-c a, .foot-c span { display: inline-flex; align-items: center; min-height: 44px; overflow-wrap: anywhere; transition: color var(--t) var(--ease-out); }
.foot nav a:hover, .foot-c a:hover { color: var(--white); text-decoration: underline; text-underline-offset: 6px; }
.foot-b { margin-top: var(--s-7); font-size: var(--fs-sm); }
.foot-b::before { content: ""; display: block; margin-bottom: var(--s-5); border-top: 1px solid var(--border-dark); }
@media (min-width: 768px) { .foot-in { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .foot-in { grid-template-columns: 1.4fr 1.1fr .8fr 1.3fr; gap: var(--s-7); } }

/* ---------- mobile action bar ---------- */
.bar { position: fixed; inset: auto 0 0; z-index: var(--z-bar); display: grid; grid-template-columns: 2fr 1fr; gap: var(--s-2); padding: var(--s-3) var(--s-4) calc(var(--s-3) + env(safe-area-inset-bottom)); background: var(--paper); border-top: 1px solid var(--border); box-shadow: 0 -8px 24px -12px rgba(6, 21, 40, .25); transform: translateY(105%); visibility: hidden; transition: transform var(--t) var(--ease-in), visibility 0s linear var(--t); }
.cta-away .bar { transform: none; visibility: visible; transition: transform 300ms var(--ease-out), visibility 0s; }
.bar .btn { min-height: 52px; }
@media (min-width: 1024px) { .bar { display: none; } }

/* ---------- reduced motion ---------- */
/* ---------- touch layouts: nothing that repaints while scrolling (in-app browsers stutter on it) ---------- */
@media (max-width: 1023.98px) {
  .nav { background: var(--paper); -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; transition: none; }
  .home .nav:not(.solid) { background: rgba(8, 20, 44, .5); box-shadow: none; }
  .motion [data-r] { opacity: 1; transform: none; transition: none; }
  .motion .stage img { transform: none; transition: none; }
  .bar { box-shadow: none; }
}

/* ---------- phones: shorter page, form first ---------- */
@media (max-width: 767.98px) {
  :root { --sec: 56px; }
  .head { margin-bottom: var(--s-6); }
  .proof-in { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-3); padding-block: var(--s-4); text-align: center; align-items: center; }
  .proof-in > div { padding: 0 var(--s-1); border-top: 0; }
  .proof-in > div + div { border-left: 1px solid var(--border); padding-left: var(--s-3); }
  .proof dt { font-size: .9375rem; line-height: 1.25; letter-spacing: 0; }
  .proof dd { display: none; }
  .gal .g:last-child { display: none; }
  .steps { gap: 0; }
  .steps li { display: grid; grid-template-columns: 3rem minmax(0, 1fr); column-gap: var(--s-4); padding-block: var(--s-4); }
  .steps .n { grid-row: 1 / 3; font-size: 2rem; line-height: 1.15; }
  .steps h3 { margin-top: 0; }
  .steps p { margin-top: var(--s-1); }
  .about { gap: var(--s-5); }
  .about-img { aspect-ratio: 16 / 10; }
  .about-t p { margin-top: var(--s-4); font-size: var(--fs-base); }
  .about-t .btn { margin-top: var(--s-5); width: 100%; }
  .contact-in { gap: var(--s-5); }
  .contact .direct { display: none; }
  .inc-list li { padding-block: var(--s-3); font-size: var(--fs-base); }
  .phs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); margin-top: var(--s-6); }
  .phs-3 figure:first-child, .phs-1 figure { grid-column: 1 / -1; }
  .foot { padding-top: var(--s-7); }
  .foot-in { gap: var(--s-5); }
  .foot nav { display: none; }
  .foot-c h2 { display: none; }
  .foot-c { padding-top: var(--s-4); border-top: 1px solid var(--border-dark); }
  .foot-c a, .foot-c span { color: var(--on-dark); }
  .logo-full img { width: 132px; }
  .foot-b { margin-top: var(--s-5); }
  .foot-b::before { margin-bottom: var(--s-4); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
