/* =========================================================
   MAISON — Tiny Homes v2
   Gold Coast / Hockney Riviera palette
   Fraunces + Bodoni Moda + Inter
   No gradients. Flat colors. Hairline detail.
   ========================================================= */

:root {
  /* palette */
  --white:    #fbfaf6;
  --paper:    #f6f1e7;
  --blush:    #f4cfd0;
  --pink:     #e89aa1;
  --sand:     #e9d9bb;
  --cognac:   #9c6a3f;
  --cognac-d: #7a5230;
  --olive:    #7a8a5e;   /* touch of dusty sage, used ONLY in warm sections */
  --olive-d:  #5e6c45;
  --cobalt:   #1d3a6b;
  --cobalt-d: #142a52;
  --ink:      #0e1d3a;
  --muted:    #7a8398;
  --line:     rgba(14, 29, 58, 0.12);
  --line-soft: rgba(14, 29, 58, 0.06);

  /* type */
  --display:  'Bodoni Moda', 'Didot', Georgia, serif;
  --serif:    'Fraunces', Georgia, serif;
  --body:     'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --script:   'Caveat', cursive;
  --quirky:   'Gloock', serif;

  /* sizing */
  --max-w: 1240px;
  --gutter: clamp(20px, 4vw, 56px);
  --pill: 100px;

  /* motion */
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { overscroll-behavior-y: none; }
body {
  font-family: var(--body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* paper grain overlay — subtle, on top of everything below modals */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* container */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
  z-index: 2;
}

/* =========================================================
   PLACEHOLDERS
   ========================================================= */
.placeholder {
  background: repeating-linear-gradient(
    45deg,
    rgba(14, 29, 58, 0.04),
    rgba(14, 29, 58, 0.04) 8px,
    rgba(14, 29, 58, 0.07) 8px,
    rgba(14, 29, 58, 0.07) 16px
  );
  border: 1.5px dashed rgba(14, 29, 58, 0.28);
  color: rgba(14, 29, 58, 0.55);
  font-family: 'Courier New', monospace;
  font-size: 11px;
  line-height: 1.5;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  letter-spacing: 0.02em;
}
.placeholder-logo { width: 60px; height: 60px; border-radius: 50%; font-size: 9px; }
.placeholder-hero { aspect-ratio: 4/3; }
.placeholder-icon { aspect-ratio: 1; width: 60px; font-size: 9px; }
.placeholder-plan { aspect-ratio: 4/3; }
.placeholder-ba { aspect-ratio: 16/9; min-height: 320px; }

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 24px 0;
  background: rgba(251, 250, 246, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
  transition: background 0.4s var(--ease), backdrop-filter 0.4s var(--ease), padding 0.3s var(--ease);
}
body.is-home .site-header:not(.scrolled) {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: none;
  padding: 32px 0;
}
.site-header.scrolled {
  /* No overrides needed if default is already scrolled state */
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand-name {
  display: flex;
  align-items: center;
  line-height: 1;
}
.brand-name img {
  height: 55px;
  width: auto;
  display: block;
  transform: translateY(-14px) scale(2);
  transform-origin: left top;
}
.brand-mark {
  display: none;
}
.brand-sub {
  display: none;
}
body.is-home .site-header:not(.scrolled) .brand-name img,
body.is-home .site-header:not(.scrolled) .brand-logo img {
  filter: brightness(0) invert(1);
}
.brand-logo {
  display: block;
  width: 50px; height: 50px;
  transform: translateY(-76px) scale(4);
  transform-origin: right top;
}
.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* =========================================================
   TYPOGRAPHY HELPERS
   ========================================================= */
.eyebrow {
  display: inline-block;
  font-family: var(--body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--cognac);
  margin-bottom: 18px;
}
.eyebrow-light { color: var(--blush); }

.display-h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-bottom: 18px;
}
.display-h2 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  color: var(--cognac);
}
.display-h2.light { color: var(--white); }
.display-h2.light em { color: var(--pink); }

.lead {
  font-family: var(--body);
  font-weight: 300;
  font-size: clamp(15px, 1.5vw, 17px);
  color: var(--ink);
  opacity: 0.78;
  max-width: 620px;
  margin-bottom: 40px;
  line-height: 1.7;
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--body);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 16px 32px;
  border-radius: var(--pill);
  transition: all 0.35s var(--ease);
  cursor: pointer;
  white-space: nowrap;
  position: relative;
}
.btn-primary {
  background: var(--cobalt);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--cobalt-d);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(29, 58, 107, 0.25);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid rgba(14, 29, 58, 0.4);
}
.btn-ghost:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white);
}

/* =========================================================
   SECTION 1 — HERO (collage bg, centered TINYHOMES, ~70vh)
/* =========================================================
   HERO SLIDER
   ========================================================= */
.hero-slider {
  position: relative;
  width: 100%;
  height: 75vh;
  min-height: 520px;
  overflow: hidden;
  background: var(--ink);
}

/* --- Slide track & individual slides --- */
.slider-track {
  position: absolute;
  inset: 0;
  z-index: 1;
}

@keyframes wipe-in {
  0%   { clip-path: polygon(0 0, 0 0, 0 100%, 0 100%); }
  100% { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
}

.slider-slide {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  will-change: clip-path, opacity;
}
.slider-slide.prev {
  z-index: 2;
  opacity: 1;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}
.slider-slide.active {
  z-index: 3;
  opacity: 1;
  /* Left to right wipe transition */
  animation: wipe-in 1.4s cubic-bezier(0.77, 0, 0.175, 1) forwards;
}

.slider-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Floorplan images should not be cropped/zoomed */
.slider-slide.is-floorplan {
  background: white;
}
.slider-slide.is-floorplan img {
  object-fit: contain;
  padding: 40px;
}


@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* --- Navbar color crossfade for slider --- */
body.is-home .site-header:not(.scrolled) .nav-link,
body.is-home .site-header:not(.scrolled) .nav-toggle span {
  transition: color 0.8s ease, background 0.8s ease;
}
body.is-home .site-header.nav-dark:not(.scrolled) .nav-link {
  color: var(--ink);
}
body.is-home .site-header.nav-dark:not(.scrolled) .nav-toggle span {
  background: var(--ink);
}
body.is-home .site-header.nav-mixed:not(.scrolled) .nav-link {
  color: var(--ink);
}
body.is-home .site-header.nav-mixed:not(.scrolled) .nav-toggle span {
  background: var(--ink);
}
body.is-home .site-header.nav-dark:not(.scrolled) .brand-name img {
  filter: none;
}
body.is-home .site-header.nav-dark:not(.scrolled) .brand-logo img {
  filter: none;
}
body.is-home .site-header.nav-dark:not(.scrolled) .scroll-cue-hero {
  color: var(--ink);
}
body.is-home .site-header.nav-dark:not(.scrolled) .slider-model {
  color: var(--ink);
  text-shadow: 0 2px 16px rgba(255,255,255,0.3);
}

/* =========================================================
   SECTIONS — generic spacing
   ========================================================= */
.section {
  padding: clamp(80px, 12vw, 160px) 0;
  position: relative;
}

/* =========================================================
   SECTION 2 — WHO ARE WE  (Paint Reveal — X-RAY approach)
   Layers (bottom to top):
     1. .finished-state  — the navy "after" state, always present
     2. .cover-sheet     — opaque beige sheet that hides it; the
                           paint mask cuts holes in this sheet,
                           revealing what's underneath
     3. .who-headline    — headline floats above everything,
                           always visible
   ========================================================= */
.section-who {
  padding: 0;
  position: relative;
  height: 180vh;
}
.section-who .sticky-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

/* BOTTOM LAYER — the finished state */
.finished-state {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--cobalt);
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.finished-state .container-inner {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: clamp(100px, 11vw, 140px) var(--gutter) clamp(40px, 6vw, 80px);
}
.finished-state .display-h2 {
  margin-bottom: 28px !important;
}
.finished-state .eyebrow {
  margin-bottom: 12px;
}
.finished-state .bullet-grid {
  gap: 18px;
  margin-top: 28px;
}
.finished-state .bullet-card {
  padding: 28px 28px 26px;
}
.finished-state .bullet-card h3 {
  font-size: clamp(20px, 2vw, 24px);
  margin-bottom: 8px;
}
.finished-state .bullet-card p {
  font-size: 14px;
  line-height: 1.55;
}

/* COVER LAYER — inline SVG sitting over the finished state.
   Contains a beige rect that gets erased internally by an SVG mask
   whose stroke elements draw in as scroll progresses. */
.cover-sheet {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* HEADLINE — TWO COPIES exist at the same position:
   1. Bottom layer (.finished-state .display-h2) — AFTER colors (white/pink)
   2. Inside cover SVG foreignObject (.who-headline-fo) — BEFORE colors,
      masked by the same paint mask so it gets erased exactly like the
      beige rect. Half navy, half white during transition. */
.who-headline-fo {
  width: 100%;
  height: 100%;
  pointer-events: none;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.who-headline-fo .container-inner {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: clamp(100px, 11vw, 140px) var(--gutter) clamp(40px, 6vw, 80px);
}
.who-headline-fo .eyebrow {
  display: inline-block;
  font-family: var(--body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--cognac);
  margin-bottom: 12px;
}
.who-headline-fo .display-h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 28px;
}
.who-headline-fo .display-h2 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  color: var(--cognac);
}

/* Section 2 cover headline — white text on cobalt cover */
.who-headline-fo-light .eyebrow { color: var(--blush); }
.who-headline-fo-light .display-h2 { color: var(--white); }
.who-headline-fo-light .display-h2 em { color: var(--pink); font-style: italic; }

/* bottom-layer headline (inside .finished-state) — AFTER colors */
.finished-state .eyebrow { color: var(--blush); }
.finished-state .display-h2 { color: var(--white); margin-bottom: 32px; }
.finished-state .display-h2 em { color: var(--pink); }

/* bullets on the finished state — fully visible, no clip-path */
.bullet-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 0;
}
.bullet-card {
  background: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 38px 32px 32px;
  position: relative;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
  cursor: default;
}
.bullet-card[data-jiggle]:hover {
  transform: translate(-3px, -5px) rotate(-0.6deg);
  border-color: var(--cognac);
  box-shadow: 8px 8px 0 var(--blush);
}
.bullet-num {
  position: absolute;
  top: 22px;
  right: 28px;
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: 22px;
  color: var(--cognac);
  opacity: 0.7;
}
.bullet-card h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.bullet-card p {
  font-family: var(--body);
  font-weight: 300;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--ink);
  opacity: 0.78;
}

/* =========================================================
   SECTION 3 — WHO WE ARE NOT  (Paint Reveal #2 — X-RAY)
   Bottom: pink finished state with cobalt-text cards.
   Cover: cobalt SVG with masked beige strokes erasing through to pink.
   Continuity: cover matches the painted end of section 2 (cobalt).
   ========================================================= */
.section-who-not {
  padding: 0;
  position: relative;
  height: 180vh;
}
.section-who-not .sticky-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

.section-who.latched-collapsed .sticky-stage,
.section-who-not.latched-collapsed .sticky-stage {
  position: relative;
}

/* BOTTOM LAYER — pink finished state */
.finished-state-pink {
  background: var(--pink);
}
.finished-state-pink .eyebrow { color: var(--cobalt-d); }
.finished-state-pink .display-h2 {
  color: var(--cobalt);
  margin-bottom: 32px;
}
.finished-state-pink .display-h2 em {
  color: var(--ink);
  font-style: italic;
}

/* pink-section cards: cobalt cards with pink number accent */
.bullet-card-not {
  background: var(--cobalt) !important;
  border-color: rgba(14, 29, 58, 0.4) !important;
}
.bullet-card-not h3 { color: var(--white); }
.bullet-card-not p { color: var(--blush); opacity: 0.85; }
.bullet-card-not .bullet-num { color: var(--pink); }
.bullet-card-not[data-jiggle]:hover {
  transform: translate(-3px, -5px) rotate(0.6deg);
  border-color: var(--ink) !important;
  box-shadow: 8px 8px 0 var(--cobalt-d);
}

/* =========================================================
   SECTION 4 — WHAT MAKES US DIFFERENT (scribble setpiece)
   Layout: "What [we provide.]" with marker label above the
   crossed-out portion only. Final read:
     "What [scribbled: we provide.] [label: makes us different.]"
   ========================================================= */
.section-different {
  background: var(--white);
  padding: clamp(120px, 16vw, 200px) 0;
}
.strike-heading {
  margin-bottom: 100px;
  position: relative;
}

.strike-heading .display-h2 {
  font-weight: 500;
  font-size: clamp(48px, 7vw, 92px);
  line-height: 1;
  color: var(--ink);
  display: flex;
  align-items: flex-end;
  gap: 0.3em;
  flex-wrap: wrap;
}

/* the "What" portion — stays clean */
.title-kept {
  color: var(--ink);
}

/* the correction container — holds the label above + the strike below */
.title-correct {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
}

/* MARKER LABEL — handwritten Caveat, sits above the scribbled portion */
.marker-label {
  font-family: 'Caveat', cursive;
  font-weight: 600;
  font-size: 1.3em;          /* relative to the h2 size — almost 2x previous */
  line-height: 0.95;
  color: var(--cobalt);
  letter-spacing: -0.01em;
  white-space: nowrap;
  display: inline-block;
  margin: 0 0 12px 12px;
  transform: rotate(-2deg);
  transform-origin: left center;
  /* hidden until JS writes it in */
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1.4s steps(28, end);
}
.marker-label.written {
  clip-path: inset(0 0 0 0);
}

/* the title-strike portion: holds the text being crossed out + scribble overlay */
.title-strike {
  position: relative;
  display: inline-block;
}
.scribble-target {
  display: inline-block;
  position: relative;
  color: var(--ink);
  /* DO NOT fade — text stays full opacity behind the scribble */
}

/* SCRIBBLE SVG — generous overshoot, overflow visible */
.scribble-svg {
  position: absolute;
  inset: -20px -30px -20px -30px;
  width: calc(100% + 60px);
  height: calc(100% + 40px);
  pointer-events: none;
  z-index: 2;
  overflow: visible;
}

.signature-line { display: none; }
.value-row {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.value-col {
  padding: 0;
  cursor: default;
  transition: transform 0.4s var(--ease);
}
.value-col[data-jiggle]:hover {
  transform: translateY(-6px);
}
.value-icon {
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
}
.value-col h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 0;
  letter-spacing: -0.01em;
  display: inline-block;
}
.value-col p {
  font-family: var(--body);
  font-weight: 300;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--ink);
  opacity: 0.78;
  margin-top: 18px;
}

/* NAILED TITLE — horizontal side-profile nail (shaft = underline,
   thin rectangular head on the right). Nail starts off-screen
   right, slams in fast, recoils with a hard shake. */
.nailed-title {
  position: relative;
  display: inline-block;
  padding-bottom: 18px;
  margin-bottom: 6px;
}
.nail-h {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  width: 100%;
  height: 14px;
  display: block;
  /* start off to the right */
  transform: translateX(110%);
  filter: drop-shadow(0 1px 1px rgba(14, 29, 58, 0.18));
}
/* SLAM IN: fast linear travel, no ease — feels like one hammer strike */
.nailed-title.nailed .nail-h {
  animation: nail-slam 0.18s linear forwards, nail-recoil 0.45s 0.18s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}
@keyframes nail-slam {
  0%   { transform: translateX(110%); }
  100% { transform: translateX(0); }
}
@keyframes nail-recoil {
  0%   { transform: translateX(0) translateY(0); }
  15%  { transform: translateX(-3px) translateY(1.5px); }
  30%  { transform: translateX(1.5px) translateY(-1px); }
  45%  { transform: translateX(-1px) translateY(0.8px); }
  60%  { transform: translateX(0.5px) translateY(-0.4px); }
  100% { transform: translateX(0) translateY(0); }
}

/* =========================================================
   SET PIECE #4 — SPINNING RAZOR SAW
   One-shot animation: panel covers the next section, blade
   cuts top + right edges, panel falls backward with
   perspective, screen shake on impact, panel gone.
   ========================================================= */
.saw-stage {
  position: relative;
  width: 100%;
  height: 0;             /* doesn't take scroll space until armed */
  pointer-events: none;
  z-index: 50;
}
.saw-stage.armed {
  /* when the next section enters view, we arm the stage by
     making it position:fixed full viewport for the duration */
  position: fixed;
  inset: 0;
  height: 100vh;
  z-index: 80;
}
.saw-stage.spent {
  display: none;          /* once animation finishes, take it out completely */
}

/* THE PANEL — the surface being cut */
.saw-panel {
  position: absolute;
  inset: 0;
  perspective: 1400px;
  perspective-origin: 50% 100%;
}
.saw-panel-face {
  position: absolute;
  inset: 0;
  background: var(--pink);
  transform-origin: 50% 100%;
  transform: rotateX(0deg);
  transition: none;
  box-shadow: inset 0 0 0 1px rgba(14, 29, 58, 0.08);
}
.saw-stage.cutting .saw-panel-face {
  /* during cut, panel just sits still */
}
.saw-stage.falling .saw-panel-face {
  transform: rotateX(-92deg) translateY(20px);
  transition: transform 0.95s cubic-bezier(0.5, 0.0, 0.2, 1);
}

/* the panel rocks/shakes on landing */
.saw-stage.thudding .saw-panel-face {
  animation: panel-thud 0.6s ease-out forwards;
}
@keyframes panel-thud {
  0%   { transform: rotateX(-92deg) translateY(20px); }
  30%  { transform: rotateX(-89deg) translateY(20px); }
  60%  { transform: rotateX(-91deg) translateY(20px); }
  100% { transform: rotateX(-90deg) translateY(20px); opacity: 0; }
}

/* KERF LINE — the cut mark left behind the blade */
.saw-kerf {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}
#sawKerfPath {
  stroke-dasharray: 5000;
  stroke-dashoffset: 5000;
}
.saw-stage.cutting #sawKerfPath {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1.6s linear;
}

/* THE BLADE — spinning disc */
.saw-blade {
  position: absolute;
  top: 80px;             /* matches kerf path start Y */
  left: -120px;          /* starts off-screen left */
  width: 110px;
  height: 110px;
  z-index: 3;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 6px 14px rgba(0,0,0,0.45));
}
.saw-blade svg {
  width: 100%;
  height: 100%;
  animation: blade-spin 0.08s linear infinite;
}
@keyframes blade-spin {
  to { transform: rotate(360deg); }
}

/* blade travel: two phases — across top, then down right side */
.saw-stage.cutting .saw-blade {
  animation: blade-travel 1.6s linear forwards;
}
@keyframes blade-travel {
  0%   { top: 80px;  left: -120px; }
  10%  { top: 80px;  left: 0; }                 /* enter from left */
  50%  { top: 80px;  left: calc(100% - 80px); } /* cross to top-right corner */
  55%  { top: 80px;  left: calc(100% - 80px); } /* pause to pivot */
  95%  { top: calc(100% - 60px); left: calc(100% - 80px); } /* down the right edge */
  100% { top: 100%;  left: calc(100% - 80px); } /* exit bottom-right */
}

/* SPARKS — orange/yellow flecks trailing the blade */
.saw-sparks {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}
.spark {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #ffb245;
  border-radius: 50%;
  box-shadow: 0 0 8px 1px rgba(255, 178, 69, 0.8), 0 0 14px 2px rgba(255, 100, 50, 0.45);
  pointer-events: none;
  animation: spark-life 0.7s ease-out forwards;
}
@keyframes spark-life {
  0%   { opacity: 1; transform: translate(0,0) scale(1); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0.3); }
}

/* SCREEN SHAKE on thud */
body.shaking {
  animation: screen-shake 0.45s cubic-bezier(.36,.07,.19,.97) both;
}
@keyframes screen-shake {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-4px, 3px); }
  20% { transform: translate(5px, -2px); }
  30% { transform: translate(-3px, 4px); }
  40% { transform: translate(4px, -3px); }
  50% { transform: translate(-2px, 2px); }
  60% { transform: translate(3px, -1px); }
  70% { transform: translate(-2px, 2px); }
  80% { transform: translate(2px, -1px); }
  90% { transform: translate(-1px, 1px); }
}

   ========================================================= */
/* =========================================================
   SECTION 5 — FLOOR PLANS
   ========================================================= */
.section-plans {
  background: var(--paper);
}
.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 60px;
}
.plan-card {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 18px 18px 28px;
  cursor: pointer;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}
.plan-card:hover {
  transform: translateY(-8px) rotate(-0.4deg);
  border-color: var(--cognac);
  box-shadow: 6px 14px 30px rgba(14, 29, 58, 0.1);
}
.plan-render {
  margin-bottom: 22px;
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: 4px;
}
.plan-render img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.plan-card h3 {
  font-family: var(--display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(24px, 2.6vw, 30px);
  letter-spacing: -0.005em;
  color: var(--olive-d);
  padding: 0 8px;
}
.plan-spec {
  font-family: var(--body);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cognac);
  margin-top: 8px;
  padding: 0 8px;
}

/* =========================================================
   SECTION 6 — BEFORE/AFTER SLIDER
   ========================================================= */
.section-slider {
  background: var(--blush);
}
.section-slider .lead {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  color: var(--cobalt);
  opacity: 1;
}
.ba-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  margin-top: 40px;
  overflow: hidden;

  cursor: ew-resize;
  user-select: none;
  border: 1px solid var(--line);
  background: var(--white);
}
.ba-layer {
  position: absolute;
  inset: 0;
}
.ba-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: translateY(-3px) scale(1.02);
}
.ba-with {
  clip-path: inset(0 0 0 50%);
}
.ba-layer .placeholder {
  width: 100%;
  height: 100%;
  border: none;
  min-height: unset;
}
.ba-cap {
  position: absolute;
  top: 18px;
  font-family: var(--body);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 7px 14px;
  background: var(--white);
  color: var(--ink);

  z-index: 3;
  transition: opacity 0.25s var(--ease);
}
.ba-cap-after  { left: 18px; background: var(--cobalt); color: var(--white); }
.ba-cap-before { right: 18px; }
.ba-handle {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 2px;
  background: var(--white);
  box-shadow: 0 0 12px rgba(0,0,0,0.3);
  z-index: 4;
}
.ba-handle-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  background: var(--white);
  color: var(--cobalt);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 8px 20px rgba(14, 29, 58, 0.25);
}

/* =========================================================
   SECTION 7 — DEPOSIT (handwritten, dark)
   ========================================================= */
.section-deposit {
  background: var(--ink);
  color: var(--white);
  text-align: center;
  padding: clamp(100px, 14vw, 180px) 0;
}
.handwritten-target {
  margin: 24px auto 30px;
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.handwritten-fallback {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(42px, 7vw, 90px);
  line-height: 1;
  color: var(--white);
  letter-spacing: -0.01em;
}
.deposit-body {
  font-family: var(--body);
  font-weight: 300;
  font-size: clamp(15px, 1.5vw, 18px);
  line-height: 1.75;
  max-width: 620px;
  margin: 0 auto;
  color: rgba(251, 250, 246, 0.78);
}
.deposit-signature {
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  color: var(--blush);
  margin-top: 30px;
}

/* =========================================================
   SECTION 8 — LET'S TALK
   ========================================================= */
.section-talk {
  background: var(--paper);
}
.talk-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.contact-points {
  list-style: none;
  margin-top: 30px;
  border-top: 1px solid var(--line);
}
.contact-points li {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14.5px;
  display: flex;
  gap: 16px;
  align-items: baseline;
}
.contact-points strong {
  font-family: var(--body);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--cognac);
  min-width: 60px;
}
.contact-points a {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--ink);
  transition: color 0.25s var(--ease);
  border-bottom: 1px solid transparent;
}
.contact-points a:hover { color: var(--olive-d); border-bottom-color: var(--olive); }

.talk-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  background: var(--white);
  border: 1px solid var(--line);
  padding: 36px;
  border-radius: 12px;

}
.talk-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.talk-form label.full { grid-column: 1 / -1; }
.talk-form label span {
  font-family: var(--body);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cognac);
}
.talk-form input,
.talk-form textarea {
  font-family: var(--serif);
  font-size: 17px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
  color: var(--ink);
  transition: border-color 0.25s var(--ease);
  resize: vertical;
}
.talk-form input:focus,
.talk-form textarea:focus {
  outline: none;
  border-bottom-color: var(--cobalt);
}
.talk-form button {
  grid-column: 1 / -1;
  justify-self: start;
  margin-top: 8px;
}
.form-feedback {
  grid-column: 1 / -1;
  font-size: 13px;
  min-height: 18px;
}
.form-feedback.success { color: var(--cobalt); }
.form-feedback.error { color: var(--cognac-d); }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  background: var(--ink);
  color: rgba(251, 250, 246, 0.6);
  padding: 30px 0;
  font-size: 12px;
  letter-spacing: 0.08em;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-brand {
  font-family: var(--display);
  font-weight: 500;
  font-size: 18px;
  color: var(--white);
  letter-spacing: -0.005em;
}
.footer-brand span {
  font-family: var(--body);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blush);
  margin-left: 10px;
}
.footer-logo {
  display: block;
  height: 55px;
  width: auto;
  margin-bottom: 40px;
  transform: scale(2);
  transform-origin: left top;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 960px) {
  .slider-info { bottom: 60px; }
  .bullet-grid { grid-template-columns: 1fr; }
  .value-row { grid-template-columns: 1fr; gap: 30px; }
  .plan-grid { grid-template-columns: repeat(2, 1fr); }
  .talk-grid { grid-template-columns: 1fr; gap: 50px; }
  .talk-form { grid-template-columns: 1fr; }
  
  .desktop-only { display: none !important; }
  .nav-toggle { display: flex; }
  .site-nav {
    position: fixed;
    top: -100%;
    left: 0; right: 0;
    background: rgba(251, 250, 246, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 100px 24px 40px;
    gap: 32px;
    border-bottom: 1px solid var(--line);
    transition: top 0.4s var(--ease);
  }
  .site-nav.open { top: 0; }
  .nav-link { font-size: 22px; }
}
@media (max-width: 600px) {
  .plan-grid { grid-template-columns: 1fr; }
  .hero-slider { min-height: 400px; }
  .footer-inner { flex-direction: column; gap: 24px; text-align: center; }
  .footer-right { flex-direction: column; gap: 16px; }
}

/* =========================================================
   ADDITIONAL UI (Nav, Admin, Extras)
   ========================================================= */
.desktop-only { display: block; }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  width: 32px;
  height: 24px;
  z-index: 200;
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--ink);
  transition: all 0.3s var(--ease);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.site-nav {
  display: flex;
  gap: 32px;
  align-items: center;
  z-index: 150;
}
.nav-link {
  font-family: var(--body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  transition: color 0.3s var(--ease);
}
.nav-link:hover { color: var(--cognac); }
body.is-home .site-header:not(.scrolled) .nav-link { color: var(--white); }
body.is-home .site-header:not(.scrolled) .nav-toggle span { background: var(--white); }
body.is-home .site-header:not(.scrolled) .nav-link:hover { color: var(--pink); }

.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  background: var(--cognac);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: all 0.4s var(--ease);
  box-shadow: 0 4px 12px rgba(156, 106, 63, 0.3);
}
.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.back-to-top:hover { background: var(--cognac-d); transform: translateY(-4px); }
.back-to-top svg { width: 24px; height: 24px; }

.hp-field {
  position: absolute;
  opacity: 0;
  top: 0;
  left: 0;
  height: 0;
  width: 0;
  z-index: -1;
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 40px;
}
.footer-socials { display: flex; gap: 16px; }
.placeholder-social, .footer-link {
  font-family: var(--body);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--white);
  opacity: 0.6;
  transition: opacity 0.3s ease;
}
.placeholder-social:hover, .footer-link:hover { opacity: 1; }

.static-page-header {
  height: 120px;
  background: var(--white);
}

/* Admin Panel Revamp (Matrix Theme) */
.admin-panel {
  position: fixed;
  inset: 0;
  background: transparent;
  color: #f0f0f0;
  z-index: 1000;
  padding: 60px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  overflow-y: auto;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}
@media (max-width: 960px) { .admin-panel { padding: 20px; } }
.admin-panel.open { opacity: 1; pointer-events: auto; }

/* Matrix Canvas */
#matrixCanvas {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 999;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding-bottom: 20px;
}
.admin-header h2 { font-family: 'Menlo', 'Monaco', monospace; font-size: 24px; font-weight: 400; letter-spacing: 0.5px; text-transform: lowercase; }
.admin-close { color: #f0f0f0; font-size: 32px; line-height: 1; opacity: 0.5; cursor: pointer; background: transparent; border: none; }
.admin-close:hover { opacity: 1; filter: brightness(1.2); }

.admin-controls {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}
.admin-select {
  background: transparent;
  color: #f0f0f0;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  padding: 4px 0;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  cursor: pointer;
  outline: none;
}
.admin-select:focus { border-bottom-color: #fff; }
.admin-select option { background: #000; color: #f0f0f0; }

.submission-card {
  background: rgba(8,8,8,0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 4px;
  padding: 18px;
  margin-bottom: 12px;
  position: relative;
}
.submission-card.unread::before {
  content: '';
  position: absolute;
  top: 18px; left: 8px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 6px #fff;
}
.sub-meta { font-family: 'Menlo', 'Monaco', monospace; font-size: 11px; color: #6a6a6a; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 8px; }
.sub-name { font-size: 16px; font-weight: 500; margin-bottom: 4px; color: #f0f0f0; }
.sub-contact { font-size: 13px; color: #9a9a9a; margin-bottom: 12px; display: flex; gap: 12px; }
.sub-msg { font-size: 14px; line-height: 1.6; margin-bottom: 16px; padding-left: 12px; border-left: 1px solid rgba(255,255,255,0.08); color: #9a9a9a; }
.sub-actions { display: flex; gap: 16px; align-items: center; }

.sub-status {
  padding: 4px 10px;
  font-family: 'Menlo', 'Monaco', monospace;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: lowercase;
  border: 1px solid rgba(255,255,255,0.12);
  background: transparent;
  color: #9a9a9a;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}
.sub-status:focus { border-color: #fff; color: #fff; }
.sub-status[data-val="new"] { border-color: #fff; color: #fff; box-shadow: inset 0 0 4px rgba(255,255,255,0.2); }
.sub-status[data-val="pending"] { color: #f0f0f0; }
.sub-status[data-val="filled"] { color: #6a6a6a; border-color: rgba(255,255,255,0.05); }

.sub-note {
  flex: 1;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  color: #f0f0f0;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  padding: 4px 0;
}
.sub-note:focus { outline: none; border-bottom-color: #fff; }

/* Boot Intro Sequence */
#bootOverlay {
  position: fixed; inset: 0;
  background: #000;
  z-index: 9999;
  display: none;
  opacity: 0;
  transition: opacity 0.2s;
}
#term {
  position: absolute; inset: 0;
  padding: 18px 24px;
  font-size: 11px; line-height: 1.42;
  color: #bdbdbd;
  font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
  overflow: hidden;
}
#scroll {
  position: absolute; left: 24px; right: 24px; top: 0;
  will-change: transform;
}
#term .line { white-space: pre; }
#term .w { color: #f0f0f0; }
#term .g { color: #9a9a9a; }
#term .d { color: #6a6a6a; }
#term .dd { color: #4a4a4a; }

#greet {
  position: absolute; inset: 0;
  display: none; align-items: center; justify-content: center;
  flex-direction: column;
  background: #000; z-index: 5;
  font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
  color: #f0f0f0;
}
#greet .row { font-size: 34px; letter-spacing: 1px; min-height: 48px; white-space: pre; }
#greet .name { font-size: 34px; color: #fff; margin-top: 14px; min-height: 48px; white-space: pre; }
.cur {
  display: inline-block;
  width: 0.55em; height: 1em;
  background: #fff;
  margin-left: 2px;
  vertical-align: -0.12em;
  animation: blink 0.6s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ============================================================
   PLAN MODAL
   ============================================================ */
.plan-modal {
  position: fixed;
  inset: 0;
  background: rgba(14,29,58,0.85);
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.plan-modal.open {
  display: flex;
  opacity: 1;
}
.modal-content {
  background: var(--white);
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: 12px;
}
@media (max-width: 768px) {
  .modal-content { grid-template-columns: 1fr; }
}
.modal-close {
  position: absolute;
  top: 16px; right: 24px;
  font-size: 32px;
  background: none; border: none;
  cursor: pointer; color: var(--ink);
  z-index: 10;
}
.modal-image {
  background: var(--paper);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  min-height: 300px;
}
.modal-details { padding: 48px; }

/* ============================================================
   PLAN WIPE ANIMATION
   ============================================================ */
.plan-render img {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  transition: clip-path 1.2s cubic-bezier(0.77, 0, 0.175, 1);
}
