:root {
  --bg: #14130f;
  --panel: rgba(28, 26, 22, 0.82);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #ece8df;
  --text-dim: #9c968a;
  --text-faint: #6b6559;
  --accent: #e8a838;
  --accent-ink: #1a1305;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--text);
  font-family: "Manrope", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }

/* ---------- Header ---------- */
.ld-header {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 40px;
  background: rgba(12, 11, 9, 0.7); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.ld-brand { display: flex; align-items: center; gap: 10px; }
.ld-mark {
  width: 14px; height: 14px; border-radius: 3px; background: var(--accent);
  box-shadow: 0 0 14px rgba(232,168,56,0.6);
}
.ld-brand-text { font-family: "Fraunces", serif; font-weight: 600; font-size: 19px; }
.ld-dim { color: var(--text-faint); font-weight: 400; }
.ld-nav { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.ld-nav a { color: var(--text-dim); padding: 8px 12px; border-radius: 9px; transition: all 0.18s; }
.ld-nav a:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.ld-cta {
  background: var(--accent) !important; color: var(--accent-ink) !important;
  font-weight: 600; display: inline-flex; align-items: center; gap: 7px;
}
.ld-cta:hover { filter: brightness(1.08); }

/* ---------- Hero ---------- */
.ld-hero {
  position: relative; min-height: 620px; overflow: hidden;
  display: flex; align-items: center;
}
.ld-hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(900px 420px at 74% 6%, rgba(232,168,56,0.11), transparent 60%),
    radial-gradient(400px 300px at 58% 80%, rgba(30,80,60,0.07), transparent 70%);
}
.ld-hero-content {
  position: relative; z-index: 3; max-width: 560px; padding: 0 40px;
}
.ld-eyebrow {
  font-family: "Space Mono", monospace; font-size: 12px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 16px;
}
.ld-title {
  font-family: "Fraunces", serif; font-weight: 600; font-size: 46px;
  line-height: 1.04; letter-spacing: -0.01em;
}
.ld-lead { color: var(--text-dim); font-size: 16px; line-height: 1.6; margin-top: 18px; max-width: 440px; }
.ld-actions { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.ld-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 600; padding: 13px 24px; border-radius: 12px;
  border: 1px solid var(--line-strong); background: rgba(255,255,255,0.04);
  transition: all 0.18s;
}
.ld-btn:hover { background: rgba(255,255,255,0.08); }
.ld-btn-accent { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.ld-btn-accent:hover { filter: brightness(1.08); }

/* ---------- Isometric construction scene ---------- */
.ld-scene-wrap {
  position: absolute; right: 0; top: 0; bottom: 0; width: 62%;
  z-index: 1; display: flex; align-items: center; justify-content: center;
  pointer-events: none;
  perspective: 1100px;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 28%);
  mask-image: linear-gradient(to right, transparent, #000 28%);
}
.ld-scene {
  position: relative; width: 580px; height: 480px;
  transform-style: preserve-3d;
  transform: rotateX(58deg) rotateZ(-42deg);
  animation: ld-drift 32s ease-in-out infinite alternate;
}
@keyframes ld-drift {
  0%   { transform: rotateX(57deg) rotateZ(-43deg) translateZ(0); }
  45%  { transform: rotateX(62deg) rotateZ(-37deg) translateZ(7px); }
  100% { transform: rotateX(53deg) rotateZ(-33deg) translateZ(14px); }
}

/* Ground plane — dual grid: coarse parcel lines + fine texture */
.ld-ground {
  position: absolute; left: 50%; top: 50%;
  width: 540px; height: 540px; transform: translate(-50%, -50%);
  background:
    repeating-linear-gradient(0deg,  rgba(255,255,255,0.07) 0 1px, transparent 1px 52px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.07) 0 1px, transparent 1px 52px),
    repeating-linear-gradient(0deg,  rgba(255,255,255,0.025) 0 1px, transparent 1px 13px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.025) 0 1px, transparent 1px 13px),
    rgba(20, 18, 13, 0.68);
  border: 1px solid var(--line);
}

/* Buildings — each floor is a preserve-3d slab that extrudes upward via scaleZ */
.ld-bldg { position: absolute; transform-style: preserve-3d; }
.ld-floor {
  position: absolute; transform-style: preserve-3d;
  transform-origin: 50% 50% 0;
  opacity: 0;
  transition:
    transform 0.44s cubic-bezier(0.34, 1.45, 0.64, 1),
    opacity 0.17s ease;
  will-change: transform, opacity;
}
.ld-floor.ld-down {
  transition: transform 0.27s cubic-bezier(0.55, 0, 0.8, 0.4), opacity 0.20s ease;
}
.ld-face {
  position: absolute; left: 0; top: 0;
  border: 1px solid rgba(0,0,0,0.22);
  backface-visibility: hidden;
}

/* ---------- Telemetry node ---------- */
.ld-node {
  position: absolute; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px 2px rgba(232,168,56,0.7);
  opacity: 0;
  transition: opacity 0.32s ease, background 0.25s ease, box-shadow 0.25s ease;
}
/* Topped-out — gold pulse */
.ld-node.on {
  opacity: 1;
  animation: ld-pulse 2.2s ease-in-out infinite;
}
@keyframes ld-pulse {
  0%, 100% { box-shadow: 0 0 12px 2px rgba(232,168,56,0.7); }
  50%       { box-shadow: 0 0 22px 7px rgba(232,168,56,0.28); }
}
/* Blocked — red pulse (chantier arrêté) */
.ld-node.blocked {
  opacity: 1;
  background: #E24B4A;
  box-shadow: 0 0 12px 2px rgba(226,75,74,0.8);
  animation: ld-blocked-pulse 0.9s ease-in-out infinite;
}
@keyframes ld-blocked-pulse {
  0%, 100% { box-shadow: 0 0 12px 2px rgba(226,75,74,0.80); }
  50%       { box-shadow: 0 0 20px 8px rgba(226,75,74,0.28); }
}

/* ---------- Construction crane ---------- */
.ld-crane {
  position: absolute;
  transform-style: preserve-3d;
}

/* Jib wrapper sits at the top of the mast and spins around the Z axis */
.ld-crane-jib-wrap {
  position: absolute;
  left: 50%; top: 50%;
  width: 0; height: 0;
  transform-style: preserve-3d;
  animation: crane-spin 20s linear infinite;
}
@keyframes crane-spin {
  from { transform: translateZ(var(--jh, 80px)) rotateZ(0deg); }
  to   { transform: translateZ(var(--jh, 80px)) rotateZ(360deg); }
}

/* Main jib arm extending to the right */
.ld-crane-jib {
  position: absolute;
  width: 64px;
  height: 4px;
  top: -2px;
  left: 0;
  background: linear-gradient(90deg, #b0802a 0%, #b0802a 58%, rgba(176,128,42,0.28) 100%);
  border-radius: 0 2px 2px 0;
}
/* Counter-jib arm extending to the left */
.ld-crane-jib::before {
  content: "";
  position: absolute;
  width: 22px;
  height: 3px;
  top: 0;
  right: 100%;
  background: #b0802a;
  border-radius: 2px 0 0 2px;
}

/* ---------- Sections ---------- */
.ld-section {
  max-width: 1080px; margin: 0 auto; padding: 70px 40px;
}
.ld-section-label {
  font-family: "Space Mono", monospace; font-size: 11px; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--text-faint); margin-bottom: 12px;
}
.ld-h2 { font-family: "Fraunces", serif; font-weight: 600; font-size: 30px; margin-bottom: 20px; }
.ld-prose { max-width: 720px; }
.ld-prose p { color: var(--text-dim); font-size: 15.5px; line-height: 1.8; margin-bottom: 14px; }
.ld-prose em { color: var(--text-faint); font-style: italic; }

.ld-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 34px;
}
.ld-stat {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 20px;
}
.ld-stat-num { font-family: "Space Mono", monospace; font-size: 30px; font-weight: 700; color: var(--accent); }
.ld-stat-lbl { color: var(--text-dim); font-size: 13px; margin-top: 5px; }

.ld-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.ld-feature {
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 26px 24px;
  transition: transform 0.25s, border-color 0.25s;
}
.ld-feature:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.ld-feature i { font-size: 26px; color: var(--accent); }
.ld-feature h3 { font-family: "Fraunces", serif; font-weight: 600; font-size: 18px; margin: 14px 0 8px; }
.ld-feature p { color: var(--text-dim); font-size: 14px; line-height: 1.6; }

/* ---------- Footer ---------- */
.ld-footer {
  border-top: 1px solid var(--line); margin-top: 40px;
  padding: 30px 40px; display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 14px;
}
.ld-footer-note { color: var(--text-faint); font-size: 13px; }

/* Entrance */
@media (prefers-reduced-motion: no-preference) {
  @keyframes ld-fade-up { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
  .ld-hero-content > * { animation: ld-fade-up 0.7s cubic-bezier(0.22,1,0.36,1) both; }
  .ld-hero-content > *:nth-child(1) { animation-delay: 0.05s; }
  .ld-hero-content > *:nth-child(2) { animation-delay: 0.12s; }
  .ld-hero-content > *:nth-child(3) { animation-delay: 0.19s; }
  .ld-hero-content > *:nth-child(4) { animation-delay: 0.26s; }
}
@media (prefers-reduced-motion: reduce) {
  .ld-scene { animation: none; }
}

@media (max-width: 900px) {
  .ld-scene-wrap { width: 50%; opacity: 0.55; }
  .ld-title { font-size: 36px; }
  .ld-stats { grid-template-columns: repeat(2, 1fr); }
  .ld-features { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .ld-scene-wrap { display: none; }
  .ld-header { padding: 14px 20px; }
  .ld-nav a:not(.ld-cta) { display: none; }
  .ld-hero-content { padding: 40px 20px; }
  .ld-section { padding: 50px 20px; }
}
