:root {
  --sky: #5fb8f2;
  --sky-deep: #1f5f9e;
  --night: #121a3a;
  --sun: #ffcc33;
  --sun-deep: #e8a900;
  --grass: #4caf50;
  --brick: #e0533d;
  --paper: #fff8e6;
  --ink: #1b1e2b;
  --ink-soft: #4a4f63;
  --white: #ffffff;
  --radius: 18px;
  --display: "Lilita One", "Arial Black", sans-serif;
  --body: "Nunito", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  font-weight: 500;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  overflow-x: clip;
}
img { display: block; max-width: 100%; }
h1, h2 { font-family: var(--display); font-weight: 400; margin: 0; letter-spacing: 0.01em; }
h2 { font-size: clamp(34px, 4.4vw, 54px); line-height: 1.05; }
a { color: inherit; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* Buttons: chunky toy blocks with a solid bottom edge */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px;
  font: 800 15px/1 var(--body);
  text-decoration: none; cursor: pointer;
  border: 3px solid var(--ink); border-radius: 14px;
  background: var(--white); color: var(--ink);
  box-shadow: 0 4px 0 var(--ink);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 5px 0 var(--ink); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn:focus-visible, input:focus-visible { outline: 3px solid var(--sky-deep); outline-offset: 3px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: 0 4px 0 var(--ink); }
.btn-buy { background: var(--sun); }
.btn-buy:hover { background: #ffd95c; }
.btn-ghost { background: var(--white); }
.btn-big { min-height: 54px; padding: 0 26px; font-size: 17px; }
.btn-small { min-height: 34px; padding: 0 12px; font-size: 13px; border-width: 2px; box-shadow: 0 3px 0 var(--ink); }
.waiting { color: var(--ink-soft); cursor: default; box-shadow: none; border-style: dashed; }
.waiting:hover { transform: none; box-shadow: none; }

/* Top bar */
.bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 24px;
  padding: 10px 24px;
  background: var(--white); border-bottom: 3px solid var(--ink);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 400 22px var(--display); }
.brand img { border-radius: 8px; border: 2px solid var(--ink); }
.bar nav { display: flex; gap: 22px; margin-left: auto; }
.bar nav a { text-decoration: none; font-weight: 800; color: var(--ink-soft); }
.bar nav a:hover { color: var(--ink); }

/* Hero */
.hero { position: relative; min-height: calc(100svh - 66px); display: flex; align-items: center; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(18,26,58,.72) 0%, rgba(18,26,58,.45) 38%, rgba(18,26,58,0) 62%);
}
.hero-inner { position: relative; z-index: 2; width: min(640px, 100%); padding: 64px 24px 72px max(24px, calc((100vw - 1160px) / 2 + 24px)); color: var(--white); }
.hero h1 { font-size: clamp(46px, 6.4vw, 92px); line-height: .98; text-shadow: 0 4px 0 rgba(0,0,0,.35); }
.law-type { color: var(--sun); display: block; font-size: .56em; line-height: 1.12; min-height: 3.4em; margin-top: 10px; max-width: 18ch; }
.law-type::after { content: "|"; margin-left: 2px; animation: blink 1s steps(1) infinite; color: var(--white); }
.lede { font-size: 20px; font-weight: 700; max-width: 30ch; margin: 18px 0 26px; text-shadow: 0 2px 0 rgba(0,0,0,.3); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 18px; }
.hero-mayor {
  position: absolute; z-index: 2; right: max(24px, calc((100vw - 1160px) / 2)); bottom: 48px;
  width: clamp(220px, 24vw, 340px); border-radius: var(--radius);
  border: 4px solid var(--ink); box-shadow: 0 8px 0 var(--ink);
  transform: rotate(3deg);
}
.ca {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 12px 10px 14px; max-width: 100%;
  background: var(--white); color: var(--ink);
  border: 3px solid var(--ink); border-radius: 14px; box-shadow: 0 4px 0 var(--ink);
}
.ca-label { font: 400 16px var(--display); color: var(--brick); }
.ca code { font: 700 14px/1.3 ui-monospace, "Cascadia Code", Consolas, monospace; word-break: break-all; flex: 1; min-width: 0; color: var(--ink-soft); letter-spacing: .06em; }
.ca.live code { color: var(--ink); letter-spacing: 0; }

/* Section heads */
.section-head { max-width: 640px; margin-bottom: 32px; }
.section-head p { font-size: 19px; color: var(--ink-soft); margin: 10px 0 0; }

/* Trailer */
.trailer { padding: 96px 0; background: var(--night); color: var(--white); }
.trailer-inner { display: grid; grid-template-columns: 1fr 360px; gap: 56px; align-items: center; }
.trailer-copy p { font-size: 19px; max-width: 44ch; color: rgba(255,255,255,.86); }
.trailer-copy .fine { font-size: 14px; color: rgba(255,255,255,.6); }
.trailer-copy .btn { margin-top: 10px; }
.phone-frame {
  position: relative; justify-self: center; width: 100%; max-width: 360px;
  padding: 12px; border-radius: 40px; background: #0b0b0e;
  border: 4px solid var(--ink); box-shadow: 0 10px 0 var(--ink), 0 0 0 3px rgba(255,255,255,.12) inset;
}
.phone-frame video { display: block; width: 100%; aspect-ratio: 9 / 16; border-radius: 28px; background: #000; object-fit: cover; }
.phone-frame .sound { position: absolute; left: 50%; bottom: -58px; translate: -50% 0; }
.trailer .phone-frame { margin-bottom: 52px; }

/* Laws */
.laws { padding: 96px 0; background: var(--paper); }
.law-form {
  display: flex; align-items: center; flex-wrap: wrap; gap: 12px;
  padding: 14px; background: var(--white);
  border: 3px solid var(--ink); border-radius: var(--radius); box-shadow: 0 5px 0 var(--ink);
}
.law-form label { font: 400 24px var(--display); padding-left: 6px; }
.law-form input {
  flex: 1 1 260px; min-height: 48px; padding: 0 14px;
  font: 700 18px var(--body); color: var(--ink);
  border: 2px solid var(--ink-soft); border-radius: 12px; background: var(--paper);
}
.board {
  margin-top: 36px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 22px;
  padding: 28px; border-radius: 22px;
  background: #b98a55; border: 4px solid #6e4a26;
  background-image: radial-gradient(rgba(0,0,0,.08) 1px, transparent 1.5px);
  background-size: 9px 9px;
}
.note {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 14px;
  min-height: 150px; padding: 26px 18px 16px;
  background: var(--paper); border-radius: 6px;
  box-shadow: 0 6px 0 rgba(0,0,0,.18);
  transform: rotate(var(--tilt, 0deg));
}
.note::before {
  content: ""; position: absolute; top: 8px; left: 50%; width: 16px; height: 16px; margin-left: -8px;
  border-radius: 50%; background: var(--brick); border: 2px solid var(--ink);
}
.note p { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.35; }
.note p span { font-family: var(--display); color: var(--sky-deep); }
.note a { align-self: flex-start; font-weight: 800; font-size: 14px; color: var(--sky-deep); }
.note.fresh { animation: pinIn .45s cubic-bezier(.2, 1.4, .4, 1); background: #fff2b8; }

/* Story */
.story { position: relative; padding: 120px 0; color: var(--white); overflow: hidden; background: var(--night); }
.story-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.story::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(18,26,58,0) 30%, rgba(18,26,58,.82) 70%); }
.story-inner { position: relative; z-index: 2; display: flex; justify-content: flex-end; }
.story-card { max-width: 470px; }
.story-card p { font-size: 19px; }
.story-card strong { color: var(--sun); }
.story-card .fine { color: rgba(255,255,255,.75); font-style: italic; }

/* Move in */
.move-in { padding: 96px 0; background: #dff1ff; }
.move-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 36px; align-items: center; }
.map { border-radius: 22px; border: 4px solid var(--ink); box-shadow: 0 8px 0 var(--ink); }
.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 18px; }
.steps li {
  counter-increment: s; position: relative; padding: 16px 18px 16px 70px;
  background: var(--white); border: 3px solid var(--ink); border-radius: var(--radius); box-shadow: 0 4px 0 var(--ink);
  font-size: 17px;
}
.steps li::before {
  content: counter(s); position: absolute; left: 14px; top: 50%; translate: 0 -50%;
  width: 40px; height: 40px; display: grid; place-items: center;
  font: 400 22px var(--display); background: var(--sun); border: 3px solid var(--ink); border-radius: 12px;
}
.move-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 32px; }

/* Town hall */
.hall { padding: 96px 0; background: var(--paper); }
.hall-inner { display: grid; grid-template-columns: 380px 1fr; gap: 44px; align-items: center; }
.hall-inner img { border-radius: 22px; border: 4px solid var(--ink); box-shadow: 0 8px 0 var(--ink); }
.hall-inner p { font-size: 19px; color: var(--ink-soft); max-width: 46ch; }
.socials { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }

/* Footer */
.foot { background: var(--ink); color: rgba(255,255,255,.78); padding: 40px 0; font-size: 14px; }
.foot p { max-width: 80ch; margin: 0 0 10px; }
.foot b { color: var(--white); }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 50; translate: -50% 20px;
  padding: 12px 18px; font-weight: 800;
  background: var(--ink); color: var(--white); border-radius: 12px;
  opacity: 0; pointer-events: none; transition: opacity .2s, translate .2s;
}
.toast.show { opacity: 1; translate: -50% 0; }

@keyframes blink { 50% { opacity: 0; } }
@keyframes pinIn { from { transform: translateY(-24px) rotate(-8deg) scale(.9); opacity: 0; } }

@media (max-width: 900px) {
  .bar nav { display: none; }
  .bar .btn-buy { margin-left: auto; }
  .hero { min-height: auto; flex-direction: column; align-items: stretch; }
  .hero::after { background: linear-gradient(180deg, rgba(18,26,58,.78) 0%, rgba(18,26,58,.5) 60%, rgba(18,26,58,.2) 100%); }
  .hero-inner { padding: 48px 16px 24px; }
  .hero-mayor { position: relative; right: auto; bottom: auto; width: 200px; margin: 8px auto 40px; }
  .move-grid, .hall-inner, .trailer-inner { grid-template-columns: 1fr; }
  .trailer { padding: 72px 0; }
  .phone-frame { max-width: 300px; }
  .story::after { background: rgba(18,26,58,.7); }
  .wrap { padding: 0 16px; }
  .laws, .move-in, .hall { padding: 72px 0; }
  .board { padding: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .law-type::after { animation: none; }
  .note.fresh { animation: none; }
  .btn, .toast { transition: none; }
}
