@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700;800&family=Lora:wght@400;500;600;700&family=Spectral:wght@200;300;400;500&display=swap');

:root {
  --bg: #f7f3ed;
  --bg-warm: #f0debb;
  --panel: #ffffff;
  --panel-2: #f2ece2;
  --text: #3a2e26;
  --text-soft: #6b5d52;
  --muted: #9a8d80;
  --maroon: #7a2e2e;
  --maroon-soft: #a04848;
  --brown: #8b6f47;
  --border: #ddd0c2;
  --border-soft: #e8dfd2;
  --max: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: linear-gradient(160deg, #f9f5ee 0%, #f7f3ed 35%, #f1ebde 70%, #efe8dc 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: 'Lora', Georgia, 'Times New Roman', serif;
  line-height: 1.72;
}

a { color: inherit; text-decoration: none; }

.bg {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 720px 480px at 78% 0%, rgba(122,46,46,.06), transparent 60%),
              radial-gradient(ellipse 600px 400px at 5% 75%, rgba(139,111,71,.08), transparent 60%),
              radial-gradient(ellipse 500px 350px at 50% 100%, rgba(122,46,46,.03), transparent 55%);
}

/* ───── nav ───── */
.nav {
  height: 80px;
  border-bottom: 1px solid var(--border-soft);
  background: linear-gradient(to right, var(--bg-warm), #f7f3ed);
  position: sticky; top: 0; z-index: 10;
  box-shadow: 0 1px 8px rgba(0,0,0,.03);
}
.nav-inner {
  max-width: var(--max); height: 100%; margin: auto;
  padding: 0 32px 0 0; display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 22px; font-weight: 500; color: var(--text);
  letter-spacing: -0.01em;
}
.brand-logo-img { height: 50px; width: auto; display: block; }
.brand-sub { font-family: 'Space Grotesk', Helvetica, sans-serif; font-size: 10px; font-weight: 500; letter-spacing: 3px; color: var(--text-soft); text-transform: uppercase; padding-left: 0; margin-left: 0; }
.brand .word span { color: var(--maroon); }
.brand .word { font-size: 22px; }
.nav-links { display: flex; align-items: center; gap: 28px; font-size: 15px; color: var(--text-soft); }
.nav-links a:hover { color: var(--maroon); }
.nav-links .nav-book {
  color: #fff; background: var(--maroon);
  padding: 10px 18px; border-radius: 4px; font-weight: 600; font-size: 14px;
}
.nav-links .nav-book:hover { background: var(--maroon-soft); color: #fff; }

/* ───── shell ───── */
.shell { max-width: var(--max); margin: auto; padding: 0 32px; }

/* ───── scatter hero ───── */
.hero-scatter {
  position: relative;
  min-height: calc(100vh - 80px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 0 48px;
  overflow: hidden;
}
.scatter-cloud {
  position: relative;
  width: 100%;
  height: 70vh;
  min-height: 480px;
}
.tile {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  padding: 0;
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  box-shadow: 0 4px 16px rgba(0,0,0,.06), 0 2px 6px rgba(0,0,0,.03),
              inset 0 2.5px 7.5px rgba(0,0,0,.1),
              inset 0 -2.5px 7.5px rgba(255,255,255,.625);
  transition: transform .8s cubic-bezier(.16,1,.3,1), box-shadow .8s cubic-bezier(.16,1,.3,1);
  cursor: default;
}
.tile::after {
  content: attr(data-name);
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Lora', serif;
  font-size: 11px;
  color: var(--text-soft);
  background: var(--panel);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border-soft);
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.tile:hover::after {
  opacity: 1;
  transition: opacity .15s ease;
}
@keyframes tileShake {
  0%, 100% { transform: rotate(0deg); }
  15% { transform: rotate(-4.5deg); }
  35% { transform: rotate(3.75deg); }
  55% { transform: rotate(-2.25deg); }
  75% { transform: rotate(1.5deg); }
}
.tile-shake .tile-icon {
  animation: tileShake .9s ease-in-out;
}
.tile:hover {
  transform: translateY(-8px) scale(1.12) rotate(0deg) !important;
  box-shadow: 0 12px 36px rgba(122,46,46,.15), 0 6px 14px rgba(0,0,0,.07),
              inset 0 3.75px 10px rgba(0,0,0,.125),
              inset 0 -3.75px 10px rgba(255,255,255,.75);
  z-index: 5;
  transition: transform .35s ease-out, box-shadow .35s ease-out;
}
.tile-icon { font-size: 38px; line-height: 1; }
.tile-icon svg { width: 54px; height: 54px; }
.tile-label { display: none; }
.tile-label {
  font-family: 'Lora', serif;
  font-size: 11px;
  color: var(--text-soft);
  text-align: center;
  line-height: 1.3;
  word-break: break-word;
}
.hero-statement {
  position: relative;
  width: 100%;
  height: 100%;
}
.hero-line {
  font-family: 'Spectral', Georgia, serif;
  font-size: clamp(38px, 5.2vw, 62px);
  font-weight: 200;
  line-height: 1.3;
  color: var(--text);
  letter-spacing: -0.06em;
  margin: 0;
  max-width: 420px;
  position: absolute;
  text-align: right;
  opacity: 0;
}
.hero-line.line1 {
  top: 18vh; right: 20px;
  animation: fadeLoop1 20s ease-in-out infinite;
}
.hero-line.line2 {
  top: 42vh; right: 40px;
  animation: fadeLoop2 20s ease-in-out infinite;
}
.hero-line.line3 {
  top: 28vh; right: 0px;
  animation: fadeLoop3 20s ease-in-out infinite;
}
.hero-line.line4 {
  top: 50vh; right: 60px;
  animation: fadeLoop4 20s ease-in-out infinite;
}

@keyframes fadeLoop1 {
  0%, 5% { opacity: 0; transform: translateY(15px); }
  10%, 20% { opacity: 1; transform: translateY(0); }
  25%, 100% { opacity: 0; transform: translateY(-15px); }
}
@keyframes fadeLoop2 {
  0%, 25% { opacity: 0; transform: translateY(15px); }
  30%, 45% { opacity: 1; transform: translateY(0); }
  50%, 100% { opacity: 0; transform: translateY(-15px); }
}
@keyframes fadeLoop3 {
  0%, 50% { opacity: 0; transform: translateY(15px); }
  55%, 70% { opacity: 1; transform: translateY(0); }
  75%, 100% { opacity: 0; transform: translateY(-15px); }
}
@keyframes fadeLoop4 {
  0%, 75% { opacity: 0; transform: translateY(15px); }
  80%, 90% { opacity: 1; transform: translateY(0); }
  95%, 100% { opacity: 0; transform: translateY(-15px); }
}
.hero-accent {
  font-family: 'Spectral', Georgia, serif;
  color: #b8aca0;
  font-style: italic;
  font-weight: 200;
  font-size: 0.82em;
}
.scroll-cue {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Playfair Display', serif;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--muted);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: .4; }
  50% { opacity: .8; }
}
.eyebrow {
  color: var(--maroon);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600; font-size: 11px;
  display: flex; gap: 8px; align-items: center;
}
.eyebrow::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--maroon);
}
h1, h2, h3 {
  font-family: 'Playfair Display', Georgia, serif;
  letter-spacing: -0.015em; line-height: 1.28; margin: 0;
}
h1 { font-size: clamp(40px, 5.8vw, 60px); margin: 18px 0 22px; font-weight: 500; }
h2 { font-size: clamp(30px, 4.4vw, 46px); font-weight: 500; }
h3 { font-size: 21px; font-weight: 500; letter-spacing: -0.01em; }
.accent { color: var(--maroon); font-style: italic; }

.hero p {
  color: var(--text-soft);
  font-size: 17px; max-width: 580px; margin: 0 0 29px;
  line-height: 1.72;
}
.ctas { display: flex; flex-wrap: wrap; gap: 14px; }
.btn {
  display: inline-flex; justify-content: center; align-items: center; gap: 9px;
  border-radius: 4px; font-weight: 600; font-size: 15px;
  padding: 13px 22px; border: 1px solid var(--border);
  transition: all .2s ease;
  font-family: 'Lora', serif;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  color: #fff; background: var(--maroon); border-color: var(--maroon);
  box-shadow: 0 2px 8px rgba(122,46,46,.18), 0 1px 3px rgba(0,0,0,.06);
}
.btn-primary:hover { background: var(--maroon-soft); border-color: var(--maroon-soft); box-shadow: 0 4px 14px rgba(122,46,46,.25); }
.btn-secondary {
  background: var(--panel); color: var(--text);
  border-color: var(--border);
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.btn-secondary:hover { border-color: var(--brown); box-shadow: 0 2px 10px rgba(0,0,0,.08); }

.small-note { margin-top: 18px; color: var(--muted); font-size: 13px; }

/* ───── hero card ───── */
.hero-card {
  padding: 34px; min-height: 340px;
  border: 1px solid var(--border-soft);
  background: var(--panel);
  border-radius: 8px;
  position: relative; overflow: hidden;
  box-shadow: 0 4px 24px rgba(122,46,46,.06), 0 2px 8px rgba(0,0,0,.04);
}
.hero-card:after {
  content: ''; position: absolute; width: 240px; height: 240px;
  border-radius: 50%; border: 1px solid rgba(122,46,46,.08);
  right: -100px; bottom: -100px;
}
.card-kicker {
  color: var(--maroon); font-size: 11px;
  letter-spacing: 0.15em; font-family: 'Playfair Display', serif;
  font-weight: 600;
}
.first-win { margin-top: 30px; position: relative; z-index: 1; }
.first-win div {
  border-left: 2px solid var(--border);
  padding: 0 0 22px 18px;
  color: var(--text-soft); font-size: 15px;
}
.first-win strong {
  display: block; color: var(--text);
  font-family: 'Playfair Display', serif;
  font-size: 13px; font-weight: 600;
  margin-bottom: 4px; letter-spacing: 0.02em;
}
.first-win div:last-child { padding-bottom: 0; }

/* ───── sections ───── */
/* The first post-hero message is intentionally driven sideways by vertical scroll. */
.horizontal-scroll-stage {
  height: 190vh;
  margin-top: calc(-50vh + 40px);
  position: relative;
  overflow: clip;
  /* Visual-only transition; allow the overlapped hero tiles to keep receiving hover events. */
  pointer-events: none;
}
.horizontal-scroll-sticky {
  position: sticky;
  top: calc(16.5vh + 67px);
  height: calc(67vh - 54px);
  overflow: hidden;
  /* This stage overlaps the hero early; it must not block tile hover hit-testing. */
  pointer-events: none;
}
.horizontal-panel {
  width: 100vw;
  min-height: calc(67vh - 54px);
  margin: 0;
  display: flex;
  align-items: center;
  background: linear-gradient(115deg, #f8f2e8 0%, var(--bg) 72%);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  will-change: transform;
}
.horizontal-panel .section-intro { width: 100%; margin: 0; }
.post-horizontal-section {
  position: relative;
  z-index: 2;
  margin-top: -32vh;
  background: var(--bg);
}
.section { padding: 88px 0; border-top: 1px solid var(--border-soft); }
.section-intro {
  display: grid;
  grid-template-columns: minmax(0,1.45fr) minmax(300px,.55fr);
  align-items: end; gap: 28px; margin-bottom: 38px;
}
.section-intro > div { min-width: 0; }
.section-intro p { color: var(--text-soft); max-width: 480px; margin: 0; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid.four { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--panel);
  border: 1px solid var(--border-soft);
  padding: 28px; border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,.03);
  transition: box-shadow .2s ease;
}
.card:hover { box-shadow: 0 6px 20px rgba(122,46,46,.08); }
.card .number {
  color: var(--maroon); font: 600 11px 'Playfair Display', serif;
  letter-spacing: 0.1em; margin-bottom: 16px;
}
.card p { color: var(--text-soft); font-size: 15px; margin: 10px 0 0; }
.card a {
  color: var(--maroon); font-size: 14px; font-weight: 600;
  display: inline-block; margin-top: 16px;
}
.card a:hover { color: var(--maroon-soft); }

.route {
  display: grid; grid-template-columns: 230px 1fr auto;
  align-items: center; gap: 28px;
  border-top: 1px solid var(--border-soft); padding: 22px 0;
}
.route:first-child { border-top: 0; }
.route-title { font: 600 15px 'Playfair Display', serif; color: var(--text); }
.route p { margin: 0; color: var(--text-soft); font-size: 15px; }

.band {
  margin: 0; padding: 64px 0; text-align: center;
  background: var(--bg-warm);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}
.band p { max-width: 600px; margin: 15px auto 25px; color: var(--text-soft); }

/* ───── footer ───── */
.footer {
  border-top: 1px solid var(--border-soft);
  padding: 32px 0; color: var(--muted); font-size: 13px;
}
.footer-inner {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}
.footer a { color: var(--text-soft); margin-left: 18px; }
.footer a:hover { color: var(--maroon); }

/* ───── product hero ───── */
.product-hero { padding: 82px 0 60px; max-width: 760px; }
.product-hero p { color: var(--text-soft); max-width: 600px; font-size: 17px; margin: 20px 0 28px; }
.usecase {
  border-left: 3px solid var(--maroon);
  background: var(--panel-2);
  padding: 20px 22px; color: var(--text-soft);
  margin: 30px 0 0; border-radius: 0 6px 6px 0;
  box-shadow: 0 2px 12px rgba(0,0,0,.03);
}
.usecase strong { display: block; color: var(--text); margin-bottom: 6px; }

/* ───── responsive ───── */
@media (max-width: 780px) {
  body { overflow-x: hidden; }
  .nav-inner, .shell { padding-left: 20px; padding-right: 20px; min-width: 0; }
  .nav-links { min-width: 0; gap: 0; }
  .nav-links a:not(.nav-book) { display: none; }
  .nav-links .nav-book { font-size: 13px; padding: 10px 14px; white-space: nowrap; }
  .brand { font-size: 18px; min-width: 0; }
  .hero-scatter { grid-template-columns: 1fr; grid-template-rows: 40vh 50vh; padding: 0 20px; min-height: 90vh; }
  .scatter-cloud { height: 40vh; min-height: 240px; }
  .tile { width: 56px; height: 56px; border-radius: 14px; }
  .tile-icon { font-size: 28px; }
  .tile-icon svg { width: 42px; height: 42px; }
  .tile-label { font-size: 9px; }
  .hero-statement { width: 100%; height: 50vh; position: relative; }
  .hero-line { font-size: clamp(22px, 7vw, 34px); max-width: 100%; text-align: center; }
  .hero-line.line1 { top: 5%; right: 0; left: 0; }
  .hero-line.line2 { top: 30%; right: 0; left: 0; }
  .hero-line.line3 { top: 15%; right: 0; left: 0; }
  .hero-line.line4 { top: 40%; right: 0; left: 0; }
  .scroll-cue { display: none; }
  h1 { font-size: clamp(22px, 7vw, 34px); overflow-wrap: anywhere; }
  .grid, .grid.four { grid-template-columns: 1fr; }
  .horizontal-scroll-stage { height: auto; margin-top: 0; overflow: visible; }
  .horizontal-scroll-sticky { position: static; height: auto; overflow: visible; }
  .horizontal-panel { min-height: auto; width: auto; transform: none !important; }
  .post-horizontal-section { margin-top: 0; }
  .section { padding: 60px 0; }
  .section-intro { display: block; }
  .section-intro p { margin-top: 15px; }
  .route { grid-template-columns: 1fr; gap: 9px; }
  .route .btn { justify-self: start; }
  .footer-inner { display: block; }
  .footer a { margin: 12px 18px 0 0; display: inline-block; }
}