/* ============================================================
   pobla — landing V2 · ORIGAMI
   Same warm mediterranean palette, but everything is folded
   paper: faceted shapes, hard offset shadows, creased corners.
   Sections UNFOLD as you scroll (--p is fed by app.js per
   [data-fold] block; each piece folds in its own --fs..--fs+--fd
   slice of that progress).
   ============================================================ */

:root {
  --cream: #FBF4E6;
  --cream-2: #F5E9D2;
  --paper: #FFFDF6;
  --ink: #33291E;
  --ink-soft: #6F6049;
  --terra: #C8542C;
  --terra-deep: #A03E1E;
  --olive: #6F7F44;
  --olive-soft: #9FB573;
  --sun: #F2B441;
  --line: rgba(58, 46, 32, .14);

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Instrument Sans", system-ui, sans-serif;
  --font-hand: "Caveat", cursive;

  --ease-out: cubic-bezier(.2, .7, .25, 1);
  --ease-spring: cubic-bezier(.2, .9, .3, 1.25);
  --ease-fold: cubic-bezier(.3, 1.4, .4, 1);

  /* hard paper shadows */
  --shadow-paper: 6px 7px 0 rgba(58, 46, 32, .1);
  --shadow-paper-lg: 9px 11px 0 rgba(58, 46, 32, .12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  overflow-x: clip;
}

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* paper grain */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2000;
  pointer-events: none;
  opacity: .055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: var(--terra); color: var(--cream); }

.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
img, svg { display: block; }
a { color: inherit; text-decoration: none; }

/* ============================================================
   FOLD ENGINE
   [data-fold] gets --p (0→1) from app.js as it crosses the
   viewport. Each .fo / .fold-card / .fold-note computes its own
   local progress --fp from its slice [--fs, --fs + --fd].
   Without JS (html.no-js) everything is shown unfolded.
   ============================================================ */
[data-fold] { --p: 0; }
.no-js [data-fold] { --p: 1; }

/* sin JavaScript: el copy con .reveal y el micro-contenido gateado por .in
   también deben quedar visibles (espejo del bloque reduced-motion) */
.no-js .reveal { opacity: 1; transform: none; }
.no-js .cal-chip,
.no-js .poll-pct,
.no-js .wa-bubble,
.no-js .wa-reply,
.no-js .pin,
.no-js .nw { opacity: 1; transform: none; }
.no-js .poll-bar i { width: var(--w); }
.no-js .cal-grid .cal-day { transform: none; }
.no-js .steps-line i { transform: scaleX(1); }
.no-js .step-dot { background: var(--c); border-color: var(--c); color: #FBF4E6; }
.no-js .wa-typing { display: none; }

.fo, .fold-card, .fold-note {
  --fp: clamp(0, calc((var(--p, 0) - var(--fs, 0)) / var(--fd, .4)), 1);
}

/* SVG pieces unfold from flat-on-the-ground */
.fo {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  transform: perspective(900px) rotateX(calc((1 - var(--fp)) * -88deg));
  opacity: clamp(0, calc(var(--fp) * 2.5), 1);
}

/* HTML cards unfold from a horizontal crease */
.fold-card {
  transform-origin: 50% 100%;
  transform: perspective(1100px) rotateX(calc((1 - var(--fp)) * -72deg)) translateY(calc((1 - var(--fp)) * 22px));
  opacity: clamp(0, calc(var(--fp) * 2.2), 1);
}

/* notes unfold sideways, like opening a folded letter */
.fold-note {
  transform-origin: 0% 50%;
  transform: perspective(1100px) rotateY(calc((1 - var(--fp)) * 55deg)) rotate(calc(var(--note-tilt, 0deg) * var(--fp)));
  opacity: clamp(0, calc(var(--fp) * 2.2), 1);
}

/* ============ buttons: folded paper tabs ============ */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 600 15.5px/1 var(--font-body);
  padding: 16px 28px;
  border-radius: 10px;
  border: 2px solid var(--ink);
  transition: transform .22s var(--ease-out), box-shadow .22s var(--ease-out), background .22s;
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary {
  background: var(--terra);
  color: #FFF6E6;
  box-shadow: 5px 6px 0 rgba(58, 46, 32, .9);
}
.btn-primary:hover {
  transform: translate(-2px, -3px);
  box-shadow: 8px 10px 0 rgba(58, 46, 32, .9);
  background: var(--terra-deep);
}
.btn-ghost {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 5px 6px 0 rgba(58, 46, 32, .18);
}
.btn-ghost:hover { transform: translate(-2px, -3px); box-shadow: 8px 10px 0 rgba(58, 46, 32, .18); }
.btn-ghost .arrow { transition: transform .25s var(--ease-out); }
.btn-ghost:hover .arrow { transform: translateX(4px); }
.btn-sun { background: var(--sun); color: var(--ink); box-shadow: 5px 6px 0 rgba(20, 16, 32, .55); }
.btn-sun:hover { transform: translate(-2px, -3px); box-shadow: 8px 10px 0 rgba(20, 16, 32, .55); }
.btn-night-ghost { background: transparent; border-color: rgba(251, 244, 230, .55); color: var(--cream); box-shadow: 5px 6px 0 rgba(20, 16, 32, .45); }
.btn-night-ghost:hover { background: rgba(251, 244, 230, .12); border-color: var(--cream); transform: translate(-2px, -3px); box-shadow: 8px 10px 0 rgba(20, 16, 32, .45); }
.btn-sm { padding: 10px 18px; font-size: 14px; box-shadow: 4px 4px 0 rgba(58, 46, 32, .85); }
.btn:active { transform: translate(2px, 3px) !important; box-shadow: 1px 1px 0 rgba(58, 46, 32, .6) !important; }

/* ============ nav ============ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background .35s, box-shadow .35s;
}
.nav.scrolled {
  background: rgba(251, 244, 230, .88);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 0 var(--line);
}
.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px clamp(20px, 5vw, 48px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font: 600 1.5rem/1 var(--font-display);
  font-variation-settings: "SOFT" 70, "WONK" 1;
  letter-spacing: -.01em;
}
.logo i { font-style: normal; color: var(--terra); }
.logo-mark { width: 30px; height: 30px; transition: transform .4s var(--ease-spring); }
.logo:hover .logo-mark { transform: rotate(-8deg) scale(1.08); }
.nav-links { display: flex; gap: clamp(16px, 3vw, 32px); font-size: 15px; font-weight: 500; }
.nav-links a:hover {
  color: var(--terra);
  text-decoration: underline 2px var(--terra);
  text-underline-offset: 7px;
}

/* ============ scroll crane companion ============ */
.scroll-crane {
  position: fixed;
  right: clamp(10px, 3vw, 42px);
  top: 18vh;
  width: 58px;
  z-index: 50;
  pointer-events: none;
  opacity: 0;
  transition: opacity .5s;
  filter: drop-shadow(3px 4px 0 rgba(58, 46, 32, .15));
}
.scroll-crane.flying { opacity: 1; }
.scroll-crane svg { width: 100%; animation: craneBob 3.2s ease-in-out infinite; }
@keyframes craneBob {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-9px) rotate(3deg); }
}
.crane-wing {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: wingFlap 1.6s ease-in-out infinite;
}
@keyframes wingFlap {
  0%, 100% { transform: rotateX(0deg) scaleY(1); }
  50% { transform: scaleY(.45) skewX(8deg); }
}

/* ============ shared section bits ============ */
.section {
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(80px, 11vw, 130px) clamp(20px, 5vw, 48px);
}
.section-head { text-align: center; max-width: 720px; margin: 0 auto clamp(40px, 6vw, 64px); }
.section-head.left { text-align: left; margin: 0 0 36px; }
.kicker {
  font: 700 12.5px/1 var(--font-body);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--terra);
  margin-bottom: 18px;
}
.kicker::before { content: "▲ "; font-size: 9px; vertical-align: 2px; }
.kicker::after { content: " ▲"; font-size: 9px; vertical-align: 2px; }
.night-copy .kicker-night { color: var(--sun); margin-bottom: 12px; }
.section-head h2 {
  font: 540 clamp(2.1rem, 4.6vw, 3.4rem)/1.08 var(--font-display);
  font-variation-settings: "SOFT" 60, "WONK" 1;
  letter-spacing: -.015em;
}
.section-head h2 em { font-style: italic; color: var(--terra); }
.section-sub {
  margin-top: 18px;
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink-soft);
}

/* scroll reveals (for copy; illustrations use the fold engine) */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
  transition-delay: var(--d, 0s);
}
.reveal.in { opacity: 1; transform: none; }
/* fold-cards drive their own transform/opacity — restate them here so the
   higher-specificity .reveal rules can't fight the fold engine */
.reveal.fold-card, .reveal.fold-card.in {
  transition: none;
  opacity: clamp(0, calc(var(--fp) * 2.2), 1);
  transform: perspective(1100px) rotateX(calc((1 - var(--fp)) * -72deg)) translateY(calc((1 - var(--fp)) * 22px));
}

.reveal-load {
  /* .001 en vez de 0: Chrome no cuenta opacity:0 como pintado y retrasaría el LCP */
  opacity: .001;
  animation: riseIn .8s var(--ease-out) forwards;
  animation-delay: var(--d, 0s);
}
@keyframes riseIn {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}

/* ============ hero ============ */
.hero {
  position: relative;
  padding-top: clamp(120px, 16vh, 170px);
  text-align: center;
  background:
    radial-gradient(110% 60% at 50% 100%, #E3ECDC 0%, rgba(227, 236, 220, 0) 62%),
    linear-gradient(180deg, var(--cream) 0%, #F6EEDC 100%);
}
.hero-copy { position: relative; z-index: 2; padding: 0 20px; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 10px;
  padding: 9px 18px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 4px 4px 0 rgba(58, 46, 32, .14);
}
.badge-crane { width: 26px; height: 20px; }
.hero-title {
  font-family: var(--font-display);
  font-weight: 560;
  font-variation-settings: "SOFT" 70, "WONK" 1;
  font-size: clamp(2.6rem, 6.4vw, 4.9rem);
  line-height: 1.05;
  letter-spacing: -.02em;
  max-width: 21ch;
  margin: 28px auto 24px;
}
.hero-title .line { display: block; }
.hero-title .w {
  display: inline-block;
  opacity: .001;
  transform: perspective(700px) rotateX(-80deg);
  transform-origin: 50% 100%;
  animation: wordUnfold .85s var(--ease-fold) forwards;
  animation-delay: var(--d);
}
@keyframes wordUnfold {
  60% { opacity: 1; }
  to { opacity: 1; transform: none; }
}
.hero-title em {
  font-style: italic;
  color: var(--terra);
  position: relative;
  white-space: nowrap;
}
.zigzag {
  position: absolute;
  left: -2%;
  bottom: -.24em;
  width: 104%;
  height: .22em;
  overflow: visible;
}
.zigzag path {
  fill: none;
  stroke: var(--sun);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 300;
  stroke-dashoffset: 300;
  animation: drawLine 1s ease-out 1.15s forwards;
}
@keyframes drawLine { to { stroke-dashoffset: 0; } }

.hero-sub {
  font-size: 17.5px;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 58ch;
  margin: 0 auto;
}
.hero-ctas {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 34px;
}
.hero-note { margin-top: 18px; font-size: 13px; color: var(--ink-soft); }

/* ============ the origami village (on-load fold sequence) ============ */
.hero-art { margin-top: clamp(10px, 4vh, 40px); }
.village {
  width: 100%;
  height: clamp(280px, 36vw, 520px);
}

/* each building: base lifts from the ground, then the roof folds down, then trims pop */
.ori .fo-base {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  transform: perspective(900px) rotateX(-88deg);
  opacity: 0;
  animation: unfoldUp .8s var(--ease-fold) both;
  animation-delay: calc(var(--d) + .45s);
}
.ori .fo-roof {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  transform: perspective(900px) rotateX(86deg);
  opacity: 0;
  animation: foldDown .55s var(--ease-fold) both;
  animation-delay: calc(var(--d) + 1.05s);
}
.ori .fo-roof.r2 { animation-delay: calc(var(--d) + 1.25s); }
.ori .fo-base.b2 { animation-delay: calc(var(--d) + .65s); }
.ori .fo-extra {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  opacity: 0;
  animation: popUnfold .5s var(--ease-spring) both;
  animation-delay: calc(var(--d) + 1.45s);
}
@keyframes unfoldUp {
  0% { transform: perspective(900px) rotateX(-88deg); opacity: 0; }
  35% { opacity: 1; }
  100% { transform: none; opacity: 1; }
}
@keyframes foldDown {
  0% { transform: perspective(900px) rotateX(86deg); opacity: 0; }
  40% { opacity: 1; }
  100% { transform: none; opacity: 1; }
}
@keyframes popUnfold {
  0% { transform: scale(.4); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.sun-g {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: sunUnfold 1.4s var(--ease-fold) .25s both;
}
@keyframes sunUnfold {
  from { opacity: 0; transform: translateY(70px) rotate(-120deg) scale(.3); }
  to { opacity: 1; transform: none; }
}
.sun-spin {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: spin 90s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.cloud { animation: drift 16s ease-in-out infinite alternate; }
.cloud.c2 { animation-duration: 21s; animation-delay: -6s; }
.cloud.c3 { animation-duration: 18s; animation-delay: -12s; }
@keyframes drift {
  from { transform: translateX(-26px); }
  to { transform: translateX(26px); }
}

.flock { animation: flyAcross 38s linear infinite; }
@keyframes flyAcross {
  from { transform: translateX(-140px); }
  to { transform: translateX(1580px); }
}

.puff {
  fill: #EFE7D6;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: puffUp 4.8s ease-out infinite;
  animation-delay: calc(var(--pd, 0s) + 2s);
}
.puff.p2 { --pd: 1.6s; }
.puff.p3 { --pd: 3.2s; }
@keyframes puffUp {
  0% { transform: translate(0, 0) scale(.5) rotate(0deg); opacity: 0; }
  12% { opacity: .65; }
  100% { transform: translate(-16px, -54px) scale(1.6) rotate(90deg); opacity: 0; }
}

.flag {
  transform-box: fill-box;
  transform-origin: 0% 50%;
  animation: flagWave 2.8s ease-in-out infinite;
}
@keyframes flagWave {
  0%, 100% { transform: skewY(0deg) scaleX(1); }
  50% { transform: skewY(-6deg) scaleX(.92); }
}

.clock-hand {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: spin 50s linear infinite;
}

.bell {
  transform-box: fill-box;
  transform-origin: 50% 0%;
  animation: bellSwing 3.4s ease-in-out infinite;
}
@keyframes bellSwing {
  0%, 100% { transform: rotate(6deg); }
  50% { transform: rotate(-6deg); }
}

.cloth {
  transform-box: fill-box;
  transform-origin: 50% 0%;
  animation: sway 2.6s ease-in-out infinite alternate;
}
.cloth.cl2 { animation-duration: 3.1s; animation-delay: -.8s; }
.cloth.cl3 { animation-duration: 2.2s; animation-delay: -1.4s; }
@keyframes sway {
  from { transform: rotate(-7deg); }
  to { transform: rotate(7deg); }
}

.drop {
  fill: #9DC0CE;
  transform-box: fill-box;
  animation: dropJump 1.7s ease-in-out infinite;
}
.drop.d2 { animation-delay: .35s; }
.drop.d3 { animation-delay: .7s; }
@keyframes dropJump {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: .4; }
  50% { transform: translateY(-13px) rotate(45deg); opacity: 1; }
}

/* ============ marquee ============ */
.marquee {
  background: var(--ink);
  color: var(--cream);
  overflow: hidden;
  padding: 17px 0;
  transform: rotate(-1.1deg) scale(1.02);
  margin: -14px 0 10px;
  box-shadow: 0 8px 0 rgba(58, 46, 32, .14);
  position: relative;
  z-index: 3;
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 32s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-group {
  display: flex;
  align-items: center;
  gap: clamp(26px, 3vw, 44px);
  padding-right: clamp(26px, 3vw, 44px);
}
.marquee-group span {
  font: italic 500 clamp(1.05rem, 1.6vw, 1.35rem)/1 var(--font-display);
  font-variation-settings: "SOFT" 80;
  white-space: nowrap;
}
.mq-crane { width: 26px; height: 20px; flex-shrink: 0; --c-body: var(--sun); --c-body2: #DA9C2B; --c-wing: #F6CD78; --c-tail: var(--sun); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ============ actors ============ */
.actors {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  perspective: 1400px;
}
.actor-card {
  position: relative;
  border: 2px solid var(--ink);
  border-radius: 14px;
  padding: 30px 26px;
  box-shadow: var(--shadow-paper);
  transition: box-shadow .3s var(--ease-out);
}
/* folded corner */
.actor-card::after {
  content: "";
  position: absolute;
  top: -2px; right: -2px;
  width: 26px; height: 26px;
  background: var(--cream);
  border-left: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  border-bottom-left-radius: 12px;
  clip-path: polygon(0 0, 100% 100%, 0 100%);
  transform: rotate(180deg);
}
.actor-card:hover { box-shadow: var(--shadow-paper-lg); }
.tint-terra { background: #FAE9DC; }
.tint-sun { background: #FAF0D4; }
.tint-olive { background: #EDF0DB; }
.tint-cream { background: #FFF8E7; }
.actor-icon {
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 12px;
  transform: rotate(-3deg);
  box-shadow: 3px 4px 0 rgba(58, 46, 32, .15);
  margin-bottom: 20px;
}
.actor-icon svg { width: 40px; height: 40px; }
.actor-card:hover .actor-icon { animation: wiggle .6s var(--ease-out); }
@keyframes wiggle {
  0%, 100% { transform: rotate(-3deg); }
  30% { transform: rotate(-10deg) scale(1.06); }
  65% { transform: rotate(3deg); }
}
.actor-card h3 {
  font: 560 1.35rem/1.2 var(--font-display);
  font-variation-settings: "SOFT" 60;
  margin-bottom: 10px;
}
.actor-card p { font-size: 14.5px; line-height: 1.6; color: var(--ink-soft); }

/* ============ illustrated strips ============ */
.strip { margin-top: clamp(48px, 7vw, 84px); }
.strip svg { width: 100%; height: auto; display: block; }

.strip-grove { margin-bottom: -20px; }
.strip-grove .fo { --fd: .3; }

/* river + paper boat */
.strip-river { position: relative; padding: 10px 0 0; }
.river-svg { height: 150px; }
.river-path {
  fill: none;
  stroke: #A9C7D8;
  stroke-width: 12;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: calc(1 - var(--p, 0));
  opacity: .9;
}
.river-path-2 { stroke: #BCD4DE; stroke-width: 8; stroke-dashoffset: calc(1.06 - var(--p, 0)); opacity: .6; }
.boat {
  position: absolute;
  top: 0; left: 0;
  width: 58px;
  /* positioned along the river polyline by app.js (transform), scaled to the strip */
  will-change: transform;
  filter: drop-shadow(3px 4px 0 rgba(58, 46, 32, .12));
}
.boat svg { width: 100%; animation: boatRock 2.6s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes boatRock {
  0%, 100% { transform: rotate(-3deg) translateY(0); }
  50% { transform: rotate(3deg) translateY(-3px); }
}
.no-js .boat { display: none; }

/* ============ feed section ============ */
.section-feed {
  max-width: none;
  background: linear-gradient(180deg, var(--cream) 0%, var(--cream-2) 18%, var(--cream-2) 82%, var(--cream) 100%);
}
.feed-grid {
  max-width: 1140px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(320px, 420px) 1fr;
  gap: clamp(40px, 7vw, 96px);
  align-items: center;
}

.phone-wrap { position: relative; justify-self: center; perspective: 1400px; }
.phone {
  width: min(350px, 86vw);
  height: 620px;
  border: 3px solid var(--ink);
  border-radius: 26px;
  background: #FDF7EA;
  box-shadow: 12px 14px 0 rgba(58, 46, 32, .16);
  position: relative;
  overflow: hidden;
}
.phone.fold-card { transform-origin: 50% 85%; }
.phone-notch {
  position: absolute;
  top: 10px; left: 50%;
  transform: translateX(-50%);
  width: 110px; height: 22px;
  background: var(--ink);
  clip-path: polygon(8% 0, 92% 0, 100% 100%, 0 100%);
  border-radius: 0 0 10px 10px;
  z-index: 5;
}
.phone-screen { height: 100%; display: flex; flex-direction: column; }
.phone-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 46px 18px 12px;
  border-bottom: 2px solid var(--line);
  background: #FDF7EA;
}
.phone-logo { width: 24px; height: 24px; }
.phone-town { font: 600 1.15rem/1 var(--font-display); font-variation-settings: "SOFT" 70; }
.phone-bell { width: 21px; height: 21px; margin-left: auto; color: var(--ink-soft); }

.feed {
  flex: 1;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  overflow: hidden;
}
.feed-card {
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 10px;
  padding: 13px 14px;
  display: flex;
  gap: 11px;
  box-shadow: 3px 3px 0 rgba(58, 46, 32, .08);
  flex-shrink: 0;
}
.feed-card--enter { animation: cardUnfold .6s var(--ease-fold); transform-origin: 50% 0%; }
@keyframes cardUnfold {
  from { opacity: 0; transform: perspective(700px) rotateX(-65deg); }
  to { opacity: 1; transform: none; }
}
.feed-avatar {
  width: 38px; height: 38px;
  border-radius: 8px;
  transform: rotate(-3deg);
  border: 1.5px solid var(--ink);
  display: grid;
  place-items: center;
  font-size: 17px;
  flex-shrink: 0;
  background: var(--cream-2);
}
.tone-terra .feed-avatar { background: #F6DCCB; }
.tone-sun .feed-avatar { background: #F8E9C2; }
.tone-olive .feed-avatar { background: #E6ECD0; }
.tone-sky .feed-avatar { background: #DCE8EE; }
.feed-body { min-width: 0; }
.feed-body header { display: flex; align-items: center; gap: 7px; margin-bottom: 3px; }
.feed-body strong { font-size: 13.5px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-badge {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  background: var(--terra);
  color: #FFF6E6;
  padding: 3px 7px;
  border-radius: 5px;
  flex-shrink: 0;
}
.feed-body .feed-time { font-size: 11px; color: var(--ink-soft); margin-left: auto; flex-shrink: 0; }
.feed-body p { font-size: 13px; line-height: 1.45; color: #4A3E2E; }

.phone-sticker {
  position: absolute;
  top: -16px; right: -26px;
  font: 600 1.3rem/1 var(--font-hand);
  background: var(--sun);
  color: var(--ink);
  padding: 10px 16px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  transform: rotate(7deg);
  box-shadow: 4px 5px 0 rgba(58, 46, 32, .25);
  z-index: 6;
}

.feature-list { list-style: none; display: flex; flex-direction: column; gap: 22px; }
.feature-list li { display: flex; gap: 16px; align-items: flex-start; }
.feature-list .check {
  width: 28px; height: 28px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: var(--olive);
  color: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 8px;
  transform: rotate(-3deg);
  font-size: 14px;
  font-weight: 700;
  margin-top: 1px;
  box-shadow: 2px 3px 0 rgba(58, 46, 32, .2);
}
.feature-list div { font-size: 15.5px; line-height: 1.6; color: var(--ink-soft); }
.feature-list strong { color: var(--ink); }

/* ============ bento ============ */
.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(215px, auto);
  gap: 22px;
  perspective: 1400px;
}
.bento-card {
  position: relative;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 14px;
  padding: 26px;
  box-shadow: var(--shadow-paper);
  transition: box-shadow .3s var(--ease-out);
  display: flex;
  flex-direction: column;
}
.bento-card::after {
  content: "";
  position: absolute;
  bottom: -2px; right: -2px;
  width: 22px; height: 22px;
  background: var(--cream);
  border-left: 2px solid var(--ink);
  border-top: 2px solid var(--ink);
  border-top-left-radius: 10px;
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
}
.bento-card:hover { box-shadow: var(--shadow-paper-lg); }
.bento-card h3 {
  font: 560 1.3rem/1.2 var(--font-display);
  font-variation-settings: "SOFT" 60;
  margin-bottom: 7px;
}
.bento-card > p { font-size: 14px; color: var(--ink-soft); }
.b-note { font-style: italic; }
.b-foot { font-size: 12.5px !important; margin-top: auto; padding-top: 14px; }

.b-map { grid-area: 1 / 1 / 3 / 3; }
.b-agenda { grid-area: 1 / 3 / 2 / 4; }
.b-incident { grid-area: 2 / 3 / 3 / 4; }
.b-poll { grid-area: 3 / 1 / 4 / 2; }
.b-wa { grid-area: 3 / 2 / 4 / 4; }

/* map */
.mapbox {
  position: relative;
  flex: 1;
  min-height: 280px;
  margin-top: 16px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid var(--ink);
}
.mapbox svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.pin {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  opacity: 0;
}
.bento-card.in .pin { animation: pinDrop .7s var(--ease-spring) forwards; }
.bento-card.in .pin-2 { animation-delay: .25s; }
.bento-card.in .pin-3 { animation-delay: .5s; }
@keyframes pinDrop {
  from { opacity: 0; transform: translateY(-36px) rotate(-25deg) scale(.6); }
  to { opacity: 1; transform: none; }
}
.pin-pulse {
  fill: none;
  stroke-width: 3;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: 50% 50%;
}
.pin-1 .pin-pulse { stroke: var(--terra); }
.pin-2 .pin-pulse { stroke: var(--olive); }
.pin-3 .pin-pulse { stroke: var(--sun); }
.bento-card.in .pin-pulse { animation: pulse 2.6s ease-out .8s infinite; }
@keyframes pulse {
  0% { transform: scale(.4) rotate(45deg); opacity: .8; }
  70%, 100% { transform: scale(2.1) rotate(45deg); opacity: 0; }
}
.map-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 7px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 3px 3px 0 rgba(58, 46, 32, .15);
  white-space: nowrap;
}
.chip-1 { left: 56%; top: 44%; }
.chip-2 { left: 6%; top: 12%; }
.chip-3 { left: 10%; bottom: 14%; }
.dot { width: 9px; height: 9px; transform: rotate(45deg); }
.dot-terra { background: var(--terra); }
.dot-olive { background: var(--olive); }
.dot-sun { background: var(--sun); }

/* agenda */
.cal { margin-top: 14px; }
.cal-head {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2em;
  color: var(--terra);
  margin-bottom: 12px;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 9px 6px;
  align-items: center;
  justify-items: center;
}
.cal-grid > span { width: 8px; height: 8px; transform: rotate(45deg); background: rgba(58, 46, 32, .13); }
.cal-grid .cal-day {
  width: 27px; height: 27px;
  background: var(--terra);
  color: var(--cream);
  border: 1.5px solid var(--ink);
  display: grid;
  place-items: center;
  font-size: 12.5px;
  font-weight: 700;
  transform: scale(0) rotate(45deg);
}
.cal-grid .cal-day { border-radius: 6px; }
.bento-card.in .cal-day { animation: dayPop .55s var(--ease-spring) .35s forwards; }
@keyframes dayPop { to { transform: scale(1) rotate(0deg); } }
.cal-dot-sun { background: var(--sun) !important; }
.cal-dot-olive { background: var(--olive-soft) !important; }
.cal-chip {
  margin-top: 16px;
  background: var(--cream-2);
  border: 1.5px solid var(--line);
  border-radius: 8px;
  padding: 10px 13px;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .6s var(--ease-out) .6s, transform .6s var(--ease-out) .6s;
}
.bento-card.in .cal-chip { opacity: 1; transform: none; }

/* incidents */
.steps {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin: 22px 2px 6px;
}
.steps-line {
  position: absolute;
  top: 9px; left: 10%; right: 10%;
  height: 3px;
  background: rgba(58, 46, 32, .12);
  overflow: hidden;
}
.steps-line i {
  display: block;
  height: 100%;
  background: var(--olive);
  transform: scaleX(0);
  transform-origin: left;
}
.bento-card.in .steps-line i { animation: lineFill 1.7s var(--ease-out) .5s forwards; }
@keyframes lineFill { to { transform: scaleX(1); } }
.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-soft);
  width: 33%;
  position: relative;
  z-index: 1;
}
.step-dot {
  width: 20px; height: 20px;
  transform: rotate(45deg);
  border-radius: 5px;
  background: #EDE3CE;
  border: 2.5px solid rgba(58, 46, 32, .25);
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
  color: transparent;
}
.step-dot { font-size: 0; }
.step.s3 .step-dot { font-size: 10px; }
.step.s3 .step-dot { transform: rotate(45deg); }
.step.s1 { --c: var(--terra); }
.step.s2 { --c: var(--sun); }
.step.s3 { --c: var(--olive); }
.bento-card.in .s1 .step-dot { animation: dotOn .45s var(--ease-spring) .5s forwards; }
.bento-card.in .s2 .step-dot { animation: dotOn .45s var(--ease-spring) 1.3s forwards; }
.bento-card.in .s3 .step-dot { animation: dotOn .45s var(--ease-spring) 2.1s forwards; }
@keyframes dotOn {
  55% { transform: rotate(45deg) scale(1.35); }
  100% { background: var(--c); border-color: var(--c); color: #FBF4E6; transform: rotate(0deg) scale(1); }
}

/* polls */
.poll { margin-top: 16px; display: flex; flex-direction: column; gap: 14px; }
.poll-row {
  display: grid;
  grid-template-columns: 1fr 40px;
  gap: 5px 10px;
  align-items: center;
}
.poll-label { grid-column: 1 / -1; font-size: 13.5px; font-weight: 600; }
.poll-bar {
  height: 15px;
  background: var(--cream-2);
  border: 1.5px solid var(--line);
  border-radius: 5px;
  overflow: hidden;
}
.poll-bar i {
  display: block;
  height: 100%;
  width: 0;
  background: repeating-linear-gradient(-45deg, var(--terra) 0 8px, #B84A24 8px 16px);
  transition: width 1.2s cubic-bezier(.22, 1, .36, 1) .4s;
}
.poll-bar i.alt { background: repeating-linear-gradient(-45deg, #8C9A55 0 8px, #7C8A47 8px 16px); transition-delay: .55s; }
.bento-card.in .poll-bar i { width: var(--w); }
.poll-pct { font-size: 13px; font-weight: 700; opacity: 0; transition: opacity .5s 1.2s; }
.bento-card.in .poll-pct { opacity: 1; }

/* whatsapp */
.wa { margin-top: 14px; display: flex; flex-direction: column; gap: 11px; }
.wa-bubble {
  max-width: 78%;
  padding: 11px 15px;
  border: 1.5px solid var(--ink);
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.45;
  box-shadow: 3px 3px 0 rgba(58, 46, 32, .08);
}
.wa-user {
  align-self: flex-end;
  background: #E2EACB;
  border-bottom-right-radius: 2px;
  opacity: 0;
  transform: perspective(600px) rotateX(-50deg);
  transform-origin: 50% 100%;
  transition: opacity .5s var(--ease-fold) .25s, transform .5s var(--ease-fold) .25s;
}
.wa-bot {
  align-self: flex-start;
  background: var(--paper);
  border-bottom-left-radius: 2px;
  display: grid;
  opacity: 0;
  transform: perspective(600px) rotateX(-50deg);
  transform-origin: 50% 100%;
  transition: opacity .5s var(--ease-fold) .8s, transform .5s var(--ease-fold) .8s;
}
.bento-card.in .wa-bubble { opacity: 1; transform: none; }
.wa-typing, .wa-reply { grid-area: 1 / 1; }
.wa-typing {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 20px;
}
.wa-typing i {
  width: 7px; height: 7px;
  transform: rotate(45deg);
  background: rgba(58, 46, 32, .4);
  animation: typingDot 1s ease-in-out infinite;
}
.wa-typing i:nth-child(2) { animation-delay: .15s; }
.wa-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typingDot {
  0%, 100% { transform: rotate(45deg) translateY(0); }
  40% { transform: rotate(45deg) translateY(-5px); }
}
.wa-reply { opacity: 0; }
.bento-card.in .wa-typing { animation: vanish .25s ease-out 2.2s forwards; }
.bento-card.in .wa-reply { animation: fadeIn .45s ease-out 2.35s forwards; }
@keyframes vanish { to { opacity: 0; visibility: hidden; } }
@keyframes fadeIn { to { opacity: 1; } }

/* ============ notes ============ */
.notes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(22px, 3.5vw, 40px);
  align-items: start;
  perspective: 1400px;
}
.note {
  position: relative;
  background: #FFFBED;
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  padding: 38px 28px 24px;
  box-shadow: var(--shadow-paper);
}
.note:nth-child(1) { --note-tilt: -2.2deg; }
.note:nth-child(2) { --note-tilt: 1.6deg; }
.note:nth-child(3) { --note-tilt: -1.2deg; }
/* folded corner on each note */
.note::after {
  content: "";
  position: absolute;
  bottom: -1.5px; right: -1.5px;
  width: 30px; height: 30px;
  background: var(--cream);
  border-left: 1.5px solid var(--ink);
  border-top: 1.5px solid var(--ink);
  border-top-left-radius: 8px;
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
}
/* center crease, like a letter that was folded in three */
.note::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 50%;
  border-bottom: 1px dashed rgba(58, 46, 32, .12);
  pointer-events: none;
}
.tape {
  position: absolute;
  top: -13px; left: 50%;
  width: 95px; height: 27px;
  transform: translateX(-50%) rotate(-3deg);
  background: rgba(242, 180, 65, .6);
  border-left: 2px dashed rgba(255, 251, 237, .8);
  border-right: 2px dashed rgba(255, 251, 237, .8);
}
.note blockquote {
  font: 500 1.55rem/1.25 var(--font-hand);
  color: var(--ink);
}
.note figcaption { margin-top: 14px; font-size: 13px; font-weight: 600; color: var(--ink-soft); }

/* ============ night CTA ============ */
.section-cta { padding-top: 30px; }
.night {
  position: relative;
  border-radius: 18px;
  border: 2px solid var(--ink);
  overflow: hidden;
  background: linear-gradient(180deg, #282243 0%, #3D2E50 36%, #6E4250 66%, #A04A33 100%);
  padding: clamp(70px, 9vw, 110px) 24px clamp(170px, 22vw, 240px);
  text-align: center;
  color: var(--cream);
  box-shadow: 10px 12px 0 rgba(40, 34, 67, .35);
}
.night-sky { position: absolute; inset: 0; pointer-events: none; }
.star {
  position: absolute;
  width: 6px; height: 6px;
  background: #FBF4E6;
  clip-path: polygon(50% 0, 64% 36%, 100% 50%, 64% 64%, 50% 100%, 36% 64%, 0 50%, 36% 36%);
  animation: twinkle 3.2s ease-in-out infinite alternate;
}
.st1 { left: 8%; top: 18%; } .st2 { left: 16%; top: 38%; animation-delay: -.7s; }
.st3 { left: 27%; top: 12%; animation-delay: -1.4s; width: 5px; height: 5px; }
.st4 { left: 41%; top: 30%; animation-delay: -2.1s; width: 5px; height: 5px; }
.st5 { left: 58%; top: 14%; animation-delay: -.4s; }
.st6 { left: 70%; top: 34%; animation-delay: -1.8s; width: 5px; height: 5px; }
.st7 { left: 81%; top: 20%; animation-delay: -1.1s; }
.st8 { left: 90%; top: 42%; animation-delay: -2.6s; width: 5px; height: 5px; }
.st9 { left: 48%; top: 46%; animation-delay: -3s; width: 5px; height: 5px; }
@keyframes twinkle {
  from { opacity: .25; transform: scale(.8) rotate(0deg); }
  to { opacity: 1; transform: scale(1.15) rotate(22deg); }
}
.moon { position: absolute; top: 54px; right: 8%; width: 52px; opacity: .95; }
.shooting-star {
  position: absolute;
  top: 16%; left: 4%;
  width: 100px; height: 2.5px;
  background: linear-gradient(90deg, rgba(251, 244, 230, 0), #FBF4E6);
  transform: rotate(16deg);
  opacity: 0;
  animation: shoot 9s ease-in 3s infinite;
}
@keyframes shoot {
  0% { transform: rotate(16deg) translateX(0); opacity: 0; }
  2% { opacity: 1; }
  9% { transform: rotate(16deg) translateX(56vw); opacity: 0; }
  100% { transform: rotate(16deg) translateX(56vw); opacity: 0; }
}
.night-copy { position: relative; z-index: 2; }
.night-copy h2 {
  font: 540 clamp(2.4rem, 5.4vw, 3.9rem)/1.06 var(--font-display);
  font-variation-settings: "SOFT" 70, "WONK" 1;
  letter-spacing: -.018em;
}
.night-copy p {
  margin: 22px auto 0;
  max-width: 60ch;
  font-size: 16.5px;
  line-height: 1.7;
  color: rgba(251, 244, 230, .85);
}
.night-ctas {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 36px;
}
.night-village {
  position: absolute;
  bottom: -2px; left: 0;
  width: 100%;
  pointer-events: none;
}
.night-village .fo { --fd: .25; }
.nw { opacity: 0; }
.night.in .nw { animation: windowOn .6s ease-out forwards; animation-delay: calc(var(--d) + .9s); }
@keyframes windowOn {
  0% { opacity: 0; }
  60% { opacity: .45; }
  100% { opacity: 1; }
}
.night.in .nw-flicker {
  animation:
    windowOn .6s ease-out forwards,
    flicker 7s linear infinite;
  animation-delay: calc(var(--d) + .9s), calc(var(--d) + 3s);
}
@keyframes flicker {
  0%, 91%, 95%, 100% { opacity: 1; }
  93% { opacity: .25; }
}

/* ============ footer ============ */
.footer { border-top: 2px dashed var(--line); }
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 56px 24px 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.footer-tag {
  font: 600 1.45rem/1.2 var(--font-hand);
  color: var(--ink-soft);
  transform: rotate(-1.2deg);
}
.footer-desc {
  max-width: 640px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 26px; font-size: 14px; font-weight: 500; }
.footer-links a:hover { color: var(--terra); text-decoration: underline 2px var(--terra); text-underline-offset: 6px; }
.footer-copy { font-size: 12.5px; color: var(--ink-soft); }

/* ============ responsive ============ */
@media (max-width: 1020px) {
  .actors { grid-template-columns: repeat(2, 1fr); }
  .feed-grid { grid-template-columns: 1fr; gap: 70px; }
  .phone-wrap { margin-top: 10px; }
  .phone-sticker { right: -8px; }
  .bento { grid-template-columns: 1fr 1fr; grid-auto-rows: auto; }
  .b-map { grid-area: auto / 1 / auto / 3; }
  .b-agenda, .b-incident, .b-poll { grid-area: auto; }
  .b-wa { grid-area: auto / 1 / auto / 3; }
  .notes { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; gap: 34px; }
  .scroll-crane { width: 44px; }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .actors { grid-template-columns: 1fr; }
  .bento { grid-template-columns: 1fr; }
  .b-map, .b-wa { grid-area: auto; }
  .hero-title { max-width: 14ch; }
  .hero-ctas .btn { width: min(320px, 100%); justify-content: center; }
  .phone { height: 560px; }
  .map-chip { font-size: 11px; }
  .chip-1 { left: 38%; }
  .marquee { transform: rotate(-1.6deg) scale(1.06); }
  .scroll-crane { display: none; }
  .boat { width: 44px; }
}

/* ============ reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  html { scroll-behavior: auto; }
  [data-fold] { --p: 1 !important; }
  .reveal, .reveal-load, .hero-title .w, .pin, .wa-bubble, .nw,
  .ori .fo-base, .ori .fo-roof, .ori .fo-extra { opacity: 1 !important; transform: none !important; }
  .zigzag path { stroke-dashoffset: 0; }
  .river-path, .river-path-2 { stroke-dashoffset: 0; }
  .poll-bar i { width: var(--w); }
  .wa-typing { display: none; }
  .wa-reply { opacity: 1; }
  .scroll-crane { display: none; }
}
