/* ==========================================================================
   OFFICIAL CALIFORNIA DETAILING — single-page site
   Dark, cinematic, editorial. White = the OCD accent.
   ========================================================================== */

/* ---------- TOKENS ------------------------------------------------------- */
:root {
  --bg:           #0a0a0a;
  --bg-2:         #111111;
  --bg-3:         #161616;
  --bg-card:      #131313;
  --line:         rgba(255, 255, 255, 0.10);
  --line-strong:  rgba(255, 255, 255, 0.22);
  --text:         #ffffff;
  --text-mute:    #9a9a9a;
  --text-soft:    #c7c7c7;
  --accent:       #ffffff;
  --accent-glow:  rgba(255, 255, 255, 0.55);

  --font-display: 'Anton', 'Bebas Neue', 'Arial Narrow', sans-serif;
  --font-display-2: 'Bebas Neue', 'Anton', 'Arial Narrow', sans-serif;
  --font-body:    'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --ease:         cubic-bezier(0.65, 0, 0.35, 1);
  --ease-out:     cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-in:      cubic-bezier(0.7, 0, 0.84, 0);

  --maxw:         1440px;
  --gutter:       clamp(20px, 4vw, 64px);
  --section-pad:  clamp(96px, 12vh, 180px);

  --nav-h:        82px;
}

/* ---------- RESET -------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
}
body {
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  min-height: 100vh;
}
img, svg, video { display: block; max-width: 100%; }
img { color: transparent; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; padding: 0; margin: 0; }
input, textarea, select { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--bg); }

/* ---------- LAYOUT HELPERS ---------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
}

section {
  position: relative;
  padding: var(--section-pad) 0;
  overflow: hidden;
}

/* ---------- GRAIN OVERLAY ------------------------------------------------ */
.grain {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.08;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ---------- CURSOR (desktop) -------------------------------------------- */
.cursor {
  position: fixed; top: 0; left: 0;
  pointer-events: none;
  z-index: 10000;
  mix-blend-mode: difference;
  transform: translate3d(-100px, -100px, 0);
}
.cursor-dot {
  position: absolute; top: 0; left: 0;
  width: 6px; height: 6px;
  background: #fff; border-radius: 50%;
  transform: translate(-50%, -50%);
}
.cursor-ring {
  position: absolute; top: 0; left: 0;
  width: 38px; height: 38px;
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.3s var(--ease), height 0.3s var(--ease), background 0.3s, border-color 0.3s;
}
.cursor.is-hover .cursor-ring { width: 56px; height: 56px; background: rgba(255,255,255,0.1); }
.cursor.is-down  .cursor-ring { width: 28px; height: 28px; }
@media (hover: none), (pointer: coarse) {
  .cursor { display: none; }
}
@media (hover: hover) and (pointer: fine) {
  html, body, * { cursor: none !important; }
  a, button, input, textarea, [role="slider"] { cursor: none !important; }
}

/* ---------- LOADER ------------------------------------------------------- */
.loader {
  position: fixed; inset: 0; z-index: 11000;
  background: var(--bg);
  display: grid; place-items: center;
  transition: opacity 0.6s var(--ease), visibility 0.6s;
}
.loader.is-hidden { opacity: 0; visibility: hidden; }
.loader-inner { text-align: center; }
.loader-mark {
  font-family: var(--font-display);
  font-size: clamp(56px, 10vw, 120px);
  letter-spacing: 0.04em;
  line-height: 1;
  color: var(--accent);
}
.loader-bar {
  width: 240px; height: 1px;
  background: var(--line);
  margin: 24px auto 14px;
  position: relative; overflow: hidden;
}
.loader-bar span {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 0%; background: var(--accent);
  animation: loaderBar 1.4s var(--ease) forwards;
}
@keyframes loaderBar { to { width: 100%; } }
.loader-tag {
  font-size: 10px; letter-spacing: 0.38em; text-transform: uppercase;
  color: var(--text-mute);
}

/* ---------- NAVIGATION --------------------------------------------------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--gutter);
  transition: background 0.35s var(--ease), border-color 0.35s, padding 0.35s, height 0.35s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(10, 10, 10, 0.72);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom-color: var(--line);
  height: 66px;
}

.nav-logo {
  display: flex; align-items: baseline; gap: 12px;
  letter-spacing: 0.02em;
}
.nav-logo-mark {
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1;
  letter-spacing: 0.06em;
}
.nav-logo-sub {
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--text-mute);
}

.nav-links {
  display: flex; gap: clamp(18px, 2.4vw, 42px);
}
.nav-link {
  position: relative;
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--text-soft);
  padding: 8px 0;
  transition: color 0.25s;
}
.nav-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.4s var(--ease);
}
.nav-link:hover { color: var(--text); }
.nav-link.is-active { color: var(--text); }
.nav-link.is-active::after,
.nav-link:hover::after { transform: scaleX(1); }

.nav-cta {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 11px 18px;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  border: 1px solid var(--line-strong);
  background: rgba(255,255,255,0.04);
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.nav-cta:hover {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}
.nav-cta-arrow {
  display: inline-block; transition: transform 0.4s var(--ease);
}
.nav-cta:hover .nav-cta-arrow { transform: translateX(3px); }

.nav-burger {
  display: none;
  width: 38px; height: 38px;
  position: relative;
}
.nav-burger span {
  position: absolute; left: 8px; right: 8px;
  height: 1.5px; background: #fff;
  transition: transform 0.35s var(--ease), top 0.35s var(--ease), opacity 0.2s;
}
.nav-burger span:nth-child(1) { top: 13px; }
.nav-burger span:nth-child(2) { top: 19px; }
.nav-burger span:nth-child(3) { top: 25px; }
.nav-burger.is-open span:nth-child(1) { top: 19px; transform: rotate(45deg); }
.nav-burger.is-open span:nth-child(2) { opacity: 0; }
.nav-burger.is-open span:nth-child(3) { top: 19px; transform: rotate(-45deg); }

/* ---------- MOBILE MENU -------------------------------------------------- */
.mobile-menu {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(10,10,10,0.98);
  backdrop-filter: blur(20px);
  padding: calc(var(--nav-h) + 32px) var(--gutter) var(--gutter);
  opacity: 0; visibility: hidden;
  transition: opacity 0.4s var(--ease), visibility 0.4s;
  display: flex; flex-direction: column; justify-content: space-between;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; }
.mobile-menu-nav { display: flex; flex-direction: column; gap: 8px; }
.mobile-link {
  display: flex; align-items: baseline; gap: 18px;
  font-family: var(--font-display);
  font-size: clamp(40px, 9vw, 64px);
  line-height: 1.05;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  transition: padding-left 0.3s var(--ease), color 0.3s;
}
.mobile-link:hover { padding-left: 8px; color: var(--accent); }
.mobile-link-num {
  font-family: var(--font-mono);
  font-size: 11px; color: var(--text-mute);
  letter-spacing: 0.2em;
}
.mobile-menu-footer {
  display: flex; gap: 24px;
  padding-top: 24px;
  font-size: 12px; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--text-mute);
}
.mobile-menu-footer a { color: var(--text); border-bottom: 1px solid var(--line); padding-bottom: 4px; }

/* ---------- FIXED SIDE UI ------------------------------------------------ */
.side-scroll {
  position: fixed;
  left: 22px; top: 50%; transform: translateY(-50%);
  z-index: 50;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  writing-mode: vertical-rl;
  font-size: 10px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.side-scroll .side-line {
  display: block; width: 1px; height: 70px;
  background: linear-gradient(to bottom, transparent, var(--text-mute), transparent);
}
.side-scroll .side-label { transform: rotate(180deg); }

.side-section {
  position: fixed;
  right: 28px; top: 50%; transform: translateY(-50%);
  z-index: 50;
}
.side-section-list {
  display: flex; flex-direction: column; gap: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-mute);
  position: relative;
}
.side-section-list::before {
  content: ""; position: absolute;
  top: 4px; bottom: 4px; right: 6px;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--line) 20%, var(--line) 80%, transparent);
}
.side-section-list li {
  position: relative;
  padding-right: 22px;
  display: flex; align-items: center; justify-content: flex-end;
  gap: 10px;
  transition: color 0.3s;
}
.side-section-list li em {
  font-style: normal;
  opacity: 0.5;
  transition: opacity 0.3s, transform 0.3s var(--ease);
}
.side-section-list li .dot {
  position: absolute; right: 2px;
  width: 9px; height: 9px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  border-radius: 50%;
  transition: background 0.3s, border-color 0.3s, transform 0.3s;
}
.side-section-list li.active { color: var(--text); }
.side-section-list li.active em { opacity: 1; transform: translateX(-2px); }
.side-section-list li.active .dot {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(255,255,255,0.08);
}

.side-social {
  position: fixed;
  right: 22px; bottom: 28px;
  z-index: 50;
  display: flex; flex-direction: column; gap: 14px;
  align-items: center;
}
.side-social a {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  color: var(--text-mute);
  border: 1px solid transparent;
  transition: color 0.3s, transform 0.3s var(--ease), border-color 0.3s;
}
.side-social a:hover { color: var(--text); transform: translateY(-2px); border-color: var(--line); }

/* ---------- SECTION HEADER ---------------------------------------------- */
.section-head { margin-bottom: clamp(48px, 7vw, 96px); position: relative; }
.section-head--center { text-align: center; }
.section-head--center .section-eyebrow { justify-content: center; }

.section-eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 18px;
}
.section-eyebrow .section-num { color: var(--accent); }

.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(64px, 11vw, 180px);
  line-height: 0.9;
  letter-spacing: 0.005em;
  margin: 0 0 18px;
  text-transform: uppercase;
}
.section-sub {
  font-size: clamp(15px, 1.1vw, 17px);
  line-height: 1.7;
  color: var(--text-mute);
  max-width: 56ch;
  margin: 0;
}

/* Floating section tag (bottom-left of each section, like reference) */
.section-tag {
  position: absolute;
  left: var(--gutter); bottom: 28px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--text-mute);
  display: flex; align-items: center; gap: 14px;
  pointer-events: none;
}
.section-tag::before {
  content: ""; display: inline-block;
  width: 28px; height: 1px;
  background: var(--text-mute);
}

/* ---------- BUTTONS ----------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 16px 24px;
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--bg);
  transition: background 0.4s var(--ease), color 0.4s var(--ease),
              transform 0.3s var(--ease), box-shadow 0.4s var(--ease),
              border-color 0.4s;
  position: relative; overflow: hidden;
  white-space: nowrap;
}
.btn:hover {
  background: transparent;
  color: var(--text);
  transform: scale(1.02);
  box-shadow: 0 18px 48px -22px var(--accent-glow);
}
.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}
.btn--ghost:hover {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}
.btn--outline {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
  padding: 14px 22px;
}
.btn--outline:hover {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}
.btn--text {
  background: transparent;
  border: 0;
  padding: 14px 0;
  color: var(--text-mute);
}
.btn--text span {
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 4px;
  transition: color 0.3s, border-color 0.3s;
}
.btn--text:hover { color: var(--text); transform: none; box-shadow: none; }
.btn--text:hover span { border-bottom-color: var(--accent); color: var(--text); }
.btn--lg { padding: 22px 30px; font-size: 12px; }

/* ---------- DOTTED LEADER (specs) --------------------------------------- */
.dotted {
  flex: 1;
  height: 1px;
  margin: 0 18px;
  position: relative; top: -4px;
  display: block;
  background-image: radial-gradient(circle, rgba(255,255,255,0.45) 1px, transparent 1.4px);
  background-size: 6px 1px;
  background-repeat: repeat-x;
  background-position: 0 50%;
}

/* =========================================================================
   SECTION 01 — HERO
   ========================================================================= */
.hero {
  position: relative;
  min-height: 100vh;
  padding: var(--nav-h) 0 0;
  display: flex; align-items: center;
}
.hero-media {
  position: absolute; inset: 0;
  z-index: 0;
}
.hero-img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  will-change: transform;
  transform: scale(1.08);
  transition: none;
}
.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(10,10,10,0.55) 0%, rgba(10,10,10,0.35) 35%, rgba(10,10,10,0.92) 100%),
    linear-gradient(90deg, rgba(10,10,10,0.65) 0%, transparent 60%);
}
.hero-vignette {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 60%, transparent 35%, rgba(0,0,0,0.85) 100%);
  mix-blend-mode: multiply;
}

.hero-content {
  position: relative; z-index: 2;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 32px;
  opacity: 0;
  animation: fadeUp 1s 0.4s var(--ease) forwards;
}
.hero-eyebrow .line {
  width: 48px; height: 1px; background: var(--accent);
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(60px, 13vw, 220px);
  line-height: 0.84;
  letter-spacing: -0.01em;
  margin: 0;
  text-transform: uppercase;
}
.hero-line { display: block; overflow: hidden; padding-bottom: 0.04em; }
.hero-word {
  display: inline-block;
  position: relative;
  transform: translateY(110%);
  animation: wordRise 1.05s var(--ease) forwards;
  will-change: transform;
}
.hero-word:nth-child(1) { animation-delay: 0.55s; }
.hero-word:nth-child(2) { animation-delay: 0.7s; }
.hero-line:nth-child(2) .hero-word { animation-delay: 0.9s; }

.hero-word--accent {
  position: relative;
}
.hero-word--accent::after {
  content: ""; position: absolute;
  left: 0; right: 8%; bottom: 0.12em;
  height: 0.08em;
  background: var(--accent);
  transform-origin: left;
  transform: scaleX(0);
  animation: lineWipe 1.2s 1.6s var(--ease) forwards;
}
@keyframes wordRise { to { transform: translateY(0); } }
@keyframes lineWipe { to { transform: scaleX(1); } }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-sub {
  max-width: 46ch;
  margin: 32px 0 40px;
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.65;
  color: var(--text-soft);
  opacity: 0;
  animation: fadeUp 1s 1.5s var(--ease) forwards;
}

.hero-actions {
  display: flex; gap: 14px; flex-wrap: wrap;
  margin-bottom: 80px;
  opacity: 0;
  animation: fadeUp 1s 1.7s var(--ease) forwards;
}

.hero-meta {
  display: flex; flex-wrap: wrap; gap: clamp(28px, 5vw, 80px);
  border-top: 1px solid var(--line);
  padding-top: 30px;
  margin-top: 12px;
  opacity: 0;
  animation: fadeUp 1s 1.9s var(--ease) forwards;
}
.meta-num {
  font-family: var(--font-display);
  font-size: clamp(36px, 4.4vw, 64px);
  line-height: 1;
  letter-spacing: 0.01em;
  color: var(--accent);
  margin-bottom: 6px;
}
.meta-label {
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-mute);
  line-height: 1.5;
}

.hero-scroll {
  position: absolute; bottom: 36px; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  font-size: 10px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--text-mute);
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  text-align: center;
}
.hero-scroll-line {
  width: 1px; height: 56px;
  background: var(--line-strong);
  position: relative; overflow: hidden;
}
.hero-scroll-line span {
  position: absolute; top: -100%; left: 0; width: 100%; height: 100%;
  background: var(--accent);
  animation: scrollDot 1.8s infinite var(--ease);
}
@keyframes scrollDot {
  0%   { top: -100%; }
  60%  { top: 100%; }
  100% { top: 100%; }
}

/* =========================================================================
   SECTION 02 — GALLERY (hexagon/diamond editorial composition)
   ========================================================================= */
.gallery { background: var(--bg); }

.gallery .section-head {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "eyebrow pager"
    "title   pager"
    "sub     pager";
  column-gap: 32px;
  align-items: end;
}
.gallery .section-head > .section-eyebrow { grid-area: eyebrow; }
.gallery .section-head > .section-title   { grid-area: title; }
.gallery .section-head > .section-sub     { grid-area: sub; }
.gallery-pager {
  grid-area: pager;
  align-self: end;
  display: flex; align-items: center; gap: 22px;
  padding-bottom: 8px;
}
.gallery-count {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--text-mute);
}
.gallery-count em { color: var(--accent); font-style: normal; }
.gallery-arrows { display: flex; gap: 10px; }
.arrow {
  width: 44px; height: 44px;
  border: 1px solid var(--line-strong);
  display: grid; place-items: center;
  color: var(--text);
  transition: background 0.3s, color 0.3s, border-color 0.3s, transform 0.3s var(--ease);
}
.arrow:hover { background: var(--accent); color: var(--bg); border-color: var(--accent); transform: scale(1.05); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 110px;
  gap: 22px;
  margin-top: 24px;
}
.tile {
  position: relative;
  margin: 0;
  overflow: hidden;
}
/* Editorial mosaic — explicit placement keeps the composition intentional */
.tile:nth-child(1) { grid-column: 1 / span 7; grid-row: 1 / span 4; } /* large */
.tile:nth-child(2) { grid-column: 8 / span 5; grid-row: 1 / span 2; }
.tile:nth-child(3) { grid-column: 8 / span 5; grid-row: 3 / span 2; }
.tile:nth-child(4) { grid-column: 1 / span 4; grid-row: 5 / span 3; } /* tall */
.tile:nth-child(5) { grid-column: 5 / span 4; grid-row: 5 / span 3; }
.tile:nth-child(6) { grid-column: 9 / span 4; grid-row: 5 / span 3; }

.tile-mask {
  position: absolute; inset: 0;
  /* parallelogram clip — matches reference */
  clip-path: polygon(6% 0, 100% 0, 94% 100%, 0 100%);
  background: var(--bg-2);
  overflow: hidden;
  transition: clip-path 0.6s var(--ease);
}
.tile:nth-child(3n) .tile-mask { clip-path: polygon(0 0, 94% 0, 100% 100%, 6% 100%); }
.tile:nth-child(4n) .tile-mask { clip-path: polygon(0 6%, 100% 0, 100% 94%, 0 100%); }

.tile img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.06);
  transition: transform 0.9s var(--ease), filter 0.5s;
  filter: saturate(0.85) contrast(1.05) brightness(0.92);
}
.tile::after {
  content: ""; position: absolute; inset: 0;
  clip-path: inherit;
  border: 1px solid transparent;
  pointer-events: none;
  background:
    linear-gradient(180deg, transparent 55%, rgba(10,10,10,0.85) 100%);
  transition: background 0.4s;
}
.tile-mask::before {
  content: ""; position: absolute; inset: 0;
  border: 1px solid var(--line);
  pointer-events: none;
  transition: border-color 0.4s, box-shadow 0.4s;
}
.tile:hover .tile-mask { transform: translateY(-2px); }
.tile:hover img { transform: scale(1.12); filter: saturate(1) contrast(1.08) brightness(1); }
.tile:hover .tile-mask::before {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.05);
}
.tile.is-spot .tile-mask::before {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.08), 0 18px 60px -20px rgba(255,255,255,0.25);
}
.tile.is-spot figcaption { opacity: 1; transform: translateY(0); }

.tile figcaption {
  position: absolute; left: 22px; bottom: 18px;
  z-index: 2;
  display: flex; flex-direction: column; gap: 4px;
  transform: translateY(8px);
  opacity: 0;
  transition: transform 0.5s var(--ease), opacity 0.4s;
  pointer-events: none;
}
.tile figcaption span {
  font-size: 10px; letter-spacing: 0.32em; text-transform: uppercase; color: var(--text-mute);
}
.tile figcaption em {
  font-style: normal;
  font-family: var(--font-display);
  font-size: 22px; letter-spacing: 0.02em;
  color: var(--text);
}
.tile:hover figcaption { opacity: 1; transform: translateY(0); }

/* =========================================================================
   SECTION 03 — SERVICES (tabbed, parallelogram-masked visual)
   ========================================================================= */
.services { background: var(--bg-2); }

.services-tabs {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 60px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}
.tab {
  position: relative;
  padding: 14px 26px;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-mute);
  transition: color 0.3s;
}
.tab-inner {
  position: relative;
  display: inline-block;
}
.tab::before {
  content: ""; position: absolute;
  inset: 0;
  clip-path: polygon(10% 0, 100% 0, 90% 100%, 0 100%);
  background: transparent;
  border: 1px solid transparent;
  transition: background 0.4s, border-color 0.4s;
}
.tab.is-active { color: var(--text); }
.tab.is-active::before {
  background: rgba(255,255,255,0.04);
  border-color: var(--line-strong);
}
.tab.is-active::after {
  content: ""; position: absolute;
  left: 18%; right: 18%; bottom: -19px;
  height: 1px; background: var(--accent);
}

.services-stage { position: relative; }
.service {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: center;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  position: relative;
}
.service.is-active {
  opacity: 1; transform: translateY(0);
}
.service[hidden] { display: none; }

.service-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 22px;
  display: inline-block;
}
.service-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(40px, 5.4vw, 86px);
  line-height: 0.95;
  margin: 0 0 22px;
  text-transform: uppercase;
}
.service-desc {
  font-size: 16px; line-height: 1.75;
  color: var(--text-soft);
  margin: 0 0 32px;
  max-width: 58ch;
}

.spec-list {
  display: flex; flex-direction: column; gap: 14px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
  margin-bottom: 36px;
}
.spec-list li {
  display: flex; align-items: center;
  font-size: 13px;
  color: var(--text-soft);
}
.spec-list li span {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-mute);
  min-width: 140px;
}
.spec-list li em {
  font-style: normal;
  letter-spacing: 0.06em;
  color: var(--text);
}

.service-visual {
  position: relative;
  aspect-ratio: 4/5;
  width: 100%;
}
.service-mask {
  position: absolute; inset: 0;
  clip-path: polygon(14% 0, 100% 0, 86% 100%, 0 100%);
  overflow: hidden;
  background: var(--bg-3);
  z-index: 2;
}
.service-mask img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: contrast(1.05);
  transform: scale(1.04);
  transition: transform 1s var(--ease);
}
.service.is-active .service-mask img { transform: scale(1); }
.service-bg-accent {
  position: absolute;
  right: -8%; top: 8%;
  width: 70%; height: 84%;
  background: var(--accent);
  clip-path: polygon(20% 0, 100% 0, 80% 100%, 0 100%);
  z-index: 1;
  opacity: 0.92;
}
.service-badge {
  position: absolute;
  left: -10px; bottom: 12%;
  z-index: 3;
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.12em;
  line-height: 1;
  background: var(--bg);
  color: var(--text);
  padding: 14px 18px;
  border: 1px solid var(--line-strong);
}

/* =========================================================================
   SECTION 04 — BEFORE / AFTER
   ========================================================================= */
.ba { background: var(--bg); }
.ba .container { max-width: 1200px; }
.ba-stage { margin-top: 16px; }
.ba-frame {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-2);
  user-select: none;
  touch-action: none;
}
.ba-after, .ba-before { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.ba-before-wrap {
  position: absolute; inset: 0;
  width: 50%;
  overflow: hidden;
  will-change: width;
}
.ba-before {
  width: 200%;
  max-width: none;
}

.ba-handle {
  position: absolute; top: 0; bottom: 0;
  left: 50%;
  width: 2px;
  background: var(--accent);
  transform: translateX(-50%);
  cursor: ew-resize;
  z-index: 5;
}
.ba-handle:focus { outline: none; }
.ba-handle-line {
  display: block; width: 100%; height: 100%;
  box-shadow: 0 0 24px 4px rgba(255,255,255,0.18);
}
.ba-handle-knob {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 56px; height: 56px;
  background: var(--bg);
  border: 1px solid var(--accent);
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--text);
  transition: transform 0.35s var(--ease), background 0.3s, color 0.3s;
}
.ba-handle:hover .ba-handle-knob,
.ba-handle:focus .ba-handle-knob,
.ba-stage.is-dragging .ba-handle-knob {
  transform: translate(-50%, -50%) scale(1.1);
  background: var(--accent);
  color: var(--bg);
}

.ba-tag {
  position: absolute; z-index: 4;
  top: 18px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--text);
  background: rgba(10,10,10,0.65);
  padding: 8px 12px;
  border: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.ba-tag--before { left: 18px; }
.ba-tag--after  { right: 18px; }

.ba-hint {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-top: 22px;
}

/* =========================================================================
   SECTION 05 — CERTIFICATIONS (specs-style)
   ========================================================================= */
.certs { background: var(--bg-2); }
.certs-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: center;
}
.certs-sub { margin-bottom: 36px; max-width: 60ch; }

.cert-table {
  display: flex; flex-direction: column;
  border-top: 1px solid var(--line);
  margin: 8px 0 48px;
}
.cert-table li {
  display: flex; align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.cert-key {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.04em;
  min-width: 240px;
  text-transform: uppercase;
}
.cert-table li em {
  font-style: normal;
  color: var(--text-soft);
  letter-spacing: 0.04em;
  font-size: 14px;
}

.certs-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.stat-num {
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1;
  color: var(--accent);
  margin-bottom: 6px;
}
.stat-label {
  font-size: 10px; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--text-mute);
  max-width: 22ch;
}

.certs-visual {
  position: relative;
  aspect-ratio: 4/5;
  width: 100%;
}
.certs-block {
  position: absolute; inset: 0;
  clip-path: polygon(0 0, 86% 0, 100% 100%, 14% 100%);
  overflow: hidden;
  z-index: 2;
  background: var(--bg-3);
}
.certs-block img { width: 100%; height: 100%; object-fit: cover; filter: contrast(1.1) saturate(0.85); }
.certs-shape {
  position: absolute;
  right: -18%; top: -6%;
  width: 90%; height: 110%;
  background: var(--accent);
  clip-path: polygon(20% 0, 100% 0, 80% 100%, 0 100%);
  z-index: 1;
}
.certs-stamp {
  position: absolute;
  right: -10px; bottom: 8%;
  z-index: 3;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  padding: 16px 20px;
  display: grid;
  text-align: right;
}
.certs-stamp-top, .certs-stamp-bot {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--text-mute);
}
.certs-stamp-main {
  font-family: var(--font-display);
  font-size: 38px;
  letter-spacing: 0.04em;
  line-height: 1.05;
  color: var(--accent);
  margin: 4px 0;
}

/* =========================================================================
   SECTION 06 — ABOUT
   ========================================================================= */
.about { background: var(--bg); }
.about-grid {
  display: grid;
  grid-template-columns: 0.95fr 1fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: center;
}
.about-visual {
  position: relative;
  aspect-ratio: 4/5;
  width: 100%;
}
.about-mask {
  position: absolute; inset: 0;
  clip-path: polygon(0 0, 100% 0, 86% 100%, 14% 100%);
  overflow: hidden;
  z-index: 2;
  background: var(--bg-3);
}
.about-mask img { width: 100%; height: 100%; object-fit: cover; filter: contrast(1.05); }
.about-shape {
  position: absolute;
  left: -10%; top: 6%;
  width: 80%; height: 92%;
  background: var(--accent);
  clip-path: polygon(0 0, 80% 0, 100% 100%, 20% 100%);
  z-index: 1;
  opacity: 0.92;
}
.about-tag {
  position: absolute; left: 12px; bottom: 14px; z-index: 3;
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--text);
  background: rgba(10,10,10,0.72);
  padding: 8px 12px;
  border: 1px solid var(--line);
  backdrop-filter: blur(6px);
}

.about-copy p {
  font-size: 16px; line-height: 1.8;
  color: var(--text-soft);
  margin: 0 0 16px;
  max-width: 56ch;
}
.about-lede {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.1;
  color: var(--text);
  margin: 18px 0 24px !important;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.about-copy em { color: var(--text); font-style: italic; }
.about-actions {
  display: flex; flex-wrap: wrap; gap: 18px;
  margin-top: 28px;
}

/* =========================================================================
   SECTION 07 — AREAS
   ========================================================================= */
.areas { background: var(--bg-2); }
.areas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin: 0 0 48px;
}
.areas-grid li {
  background: var(--bg);
  padding: 22px 24px;
  font-family: var(--font-display-2);
  font-size: 22px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-soft);
  position: relative;
  transition: background 0.35s, color 0.35s, padding-left 0.4s var(--ease);
}
.areas-grid li::before {
  content: "→";
  position: absolute;
  left: 22px;
  font-size: 12px;
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.3s, transform 0.4s var(--ease);
}
.areas-grid li:hover {
  background: var(--accent);
  color: var(--bg);
  padding-left: 44px;
}
.areas-grid li:hover::before {
  opacity: 1; transform: translateX(0);
}

.areas-map {
  position: relative;
  aspect-ratio: 21/9;
  border: 1px solid var(--line);
  overflow: hidden;
  background: var(--bg);
}
.areas-map iframe {
  width: 100%; height: 100%; border: 0;
  filter: invert(0.92) hue-rotate(180deg) contrast(0.9) saturate(0.4);
}
.areas-map-card {
  position: absolute;
  left: 24px; bottom: 24px;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  padding: 22px 26px;
  display: flex; flex-direction: column; gap: 6px;
  max-width: 320px;
  z-index: 3;
}
.areas-map-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--accent);
}
.areas-map-card strong { font-weight: 500; font-size: 15px; color: var(--text); }
.areas-map-card span { font-size: 13px; color: var(--text-mute); }
.areas-map-card a {
  margin-top: 10px;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 4px;
  align-self: flex-start;
  transition: border-color 0.3s, color 0.3s;
}
.areas-map-card a:hover { border-color: var(--accent); color: var(--accent); }

/* =========================================================================
   SECTION 08 — BOOK
   ========================================================================= */
.book {
  background: var(--bg);
  text-align: center;
  position: relative;
}
.book-bg { position: absolute; inset: 0; z-index: 0; }
.book-bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0.4; filter: contrast(1.1) saturate(0.8); }
.book-overlay {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 0%, rgba(10,10,10,0.85) 70%, rgba(10,10,10,1) 100%);
}
.book-inner { position: relative; z-index: 2; max-width: 1100px; text-align: center; }
.book-inner .section-eyebrow { justify-content: center; }
.book-title { margin-bottom: 36px; padding-bottom: 0.05em; }
.book-title em { font-style: normal; color: var(--accent); }

.book-sub { margin: 0 auto 40px; }
.book-actions {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 16px;
  margin-bottom: 80px;
}

.book-info {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}
.book-info li {
  background: var(--bg);
  padding: 26px 22px;
  display: flex; flex-direction: column; gap: 10px;
  text-align: left;
}
.book-info span {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--text-mute);
}
.book-info a, .book-info em {
  font-style: normal;
  font-size: 14px;
  color: var(--text);
  letter-spacing: 0.02em;
  border-bottom: 1px solid transparent;
  align-self: flex-start;
  transition: border-color 0.3s, color 0.3s;
}
.book-info a:hover { border-color: var(--accent); color: var(--accent); }

/* =========================================================================
   FOOTER
   ========================================================================= */
.footer {
  background: #060606;
  padding: clamp(64px, 8vw, 110px) 0 36px;
  border-top: 1px solid var(--line);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 64px;
}
.footer-mark {
  font-family: var(--font-display);
  font-size: 52px;
  line-height: 1;
  color: var(--accent);
  letter-spacing: 0.04em;
  display: inline-block;
  margin-bottom: 18px;
}
.footer-name {
  font-size: 13px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  margin: 0 0 10px;
}
.footer-tag {
  font-size: 14px;
  color: var(--text-mute);
  max-width: 38ch;
  margin: 0 0 26px;
}
.footer-social { display: flex; flex-wrap: wrap; gap: 10px; }
.footer-social a {
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--text-mute);
  padding: 9px 14px;
  border: 1px solid var(--line);
  transition: border-color 0.3s, color 0.3s, background 0.3s;
}
.footer-social a:hover { border-color: var(--accent); color: var(--bg); background: var(--accent); }

.footer-col h4 {
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 18px;
  font-weight: 500;
}
.footer-col p,
.footer-col a {
  font-size: 14px;
  color: var(--text-mute);
  line-height: 1.85;
}
.footer-col a:hover { color: var(--text); }
.footer-links { display: flex; flex-direction: column; gap: 6px; }

.footer-base {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--text-mute);
}

/* =========================================================================
   SCROLL-REVEAL ANIMATIONS (Intersection Observer baseline)
   ========================================================================= */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  will-change: opacity, transform;
}
.reveal.is-in { opacity: 1; transform: translateY(0); }

.reveal-text {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1.1s var(--ease), transform 1.1s var(--ease);
}
.reveal-text.is-in { opacity: 1; transform: translateY(0); }

/* Stagger children */
.stagger > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.stagger.is-in > * {
  opacity: 1; transform: translateY(0);
}
.stagger.is-in > *:nth-child(1) { transition-delay: 0.05s; }
.stagger.is-in > *:nth-child(2) { transition-delay: 0.12s; }
.stagger.is-in > *:nth-child(3) { transition-delay: 0.19s; }
.stagger.is-in > *:nth-child(4) { transition-delay: 0.26s; }
.stagger.is-in > *:nth-child(5) { transition-delay: 0.33s; }
.stagger.is-in > *:nth-child(6) { transition-delay: 0.40s; }
.stagger.is-in > *:nth-child(7) { transition-delay: 0.47s; }
.stagger.is-in > *:nth-child(8) { transition-delay: 0.54s; }

/* Lazy fade-in for <img> as it loads */
img.lazyfade {
  opacity: 0; transform: scale(1.02);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
img.lazyfade.is-loaded { opacity: 1; transform: scale(1); }

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 1180px) {
  .side-scroll, .side-section { display: none; }
}
@media (max-width: 1024px) {
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-burger { display: block; }

  .certs-grid,
  .about-grid {
    grid-template-columns: 1fr;
  }
  .certs-visual, .about-visual { max-width: 520px; margin: 0 auto; }

  .service { grid-template-columns: 1fr; }
  .service-visual { max-width: 520px; margin: 0 auto; }

  .book-info { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }

  .gallery-grid { grid-auto-rows: 90px; }
}
@media (max-width: 720px) {
  :root { --gutter: 22px; --section-pad: 96px; }
  .side-social { display: none; }

  .hero { min-height: 92vh; padding-top: 110px; }
  .hero-meta { gap: 22px; }
  .meta-num { font-size: 32px; }

  .section-tag { display: none; }

  .gallery .section-head {
    grid-template-columns: 1fr;
    grid-template-areas:
      "eyebrow"
      "title"
      "sub"
      "pager";
  }
  .gallery-pager { padding-bottom: 0; }

  .gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 240px;
  }
  .tile:nth-child(1),
  .tile:nth-child(2),
  .tile:nth-child(3),
  .tile:nth-child(4),
  .tile:nth-child(5),
  .tile:nth-child(6) {
    grid-column: 1 / -1;
    grid-row: auto / span 1;
  }
  .tile:nth-child(1) { grid-row: auto / span 2; }

  .services-tabs { gap: 4px; padding-bottom: 14px; overflow-x: auto; flex-wrap: nowrap; }
  .tab { padding: 12px 18px; font-size: 10px; letter-spacing: 0.24em; white-space: nowrap; }
  .tab.is-active::after { display: none; }

  .ba-handle-knob { width: 44px; height: 44px; }
  .ba-tag { font-size: 9px; padding: 6px 10px; }

  .cert-table li { flex-direction: column; align-items: flex-start; gap: 4px; padding: 16px 0; }
  .cert-table li .dotted { display: none; }
  .cert-key { min-width: 0; font-size: 18px; }

  .certs-stats { grid-template-columns: 1fr 1fr; }

  .areas-grid { grid-template-columns: 1fr 1fr; }
  .areas-grid li { font-size: 16px; padding: 18px 18px; }
  .areas-map-card { left: 14px; bottom: 14px; padding: 16px 18px; max-width: 260px; }

  .book-info { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }

  .hero-title { font-size: clamp(56px, 16vw, 110px); }
  .section-title { font-size: clamp(48px, 14vw, 100px); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .hero-word { transform: none !important; }
}

/* Print */
@media print {
  .nav, .loader, .grain, .cursor, .side-scroll, .side-section, .side-social, .hero-scroll { display: none !important; }
}
