/* Açorespoly — one-page site
   Structure/type/spacing from DESIGN.md ("poster on fog"),
   colours + assets from the Figma mood (cream #F9F9DF + ink, card-group colours). */

:root {
  /* Figma palette */
  --cream: #f9f9df;
  --cream-deep: #efefcc;
  --ink: #000000;
  --ink-soft: #1c1c16;
  --ink-muted: #5c5c4f;
  --ink-faint: #8c8c7a;
  --hairline: #d9d9bd;
  --paper: #fffff4;

  /* Card-group colours (property cards) */
  --g-darkgreen: #1f4a2f;
  --g-green: #4f7b2e;
  --g-emerald: #3aae68;
  --g-lime: #98c12a;
  --g-navy: #1e3565;
  --g-purple: #7e4a9d;
  --g-indigo: #5b56a8;
  --g-sky: #6a9bd5;

  /* Figma: Gill Sans (text) + Bodoni 72 (headlines, prices). Both ship with macOS/iOS;
     other systems fall back to the closest free web fonts (Cabin, Bodoni Moda). */
  --font-sans: "Gill Sans", "Gill Sans MT", "Cabin", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Bodoni 72", "Bodoni Moda", "Bodoni MT", Didot, serif;
  --font-serif: "Bodoni 72", "Bodoni Moda", "Bodoni MT", Didot, serif;
  --font-ui: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-script: "Instrument Serif", "Times New Roman", serif;

  --text-tag: 12px;
  --text-caption: 14px;
  --text-body: 18px;
  --text-subheading: 24px;
  --text-heading-sm: 32px;
  --text-heading-lg: clamp(44px, 7vw, 64px);
  --text-display: clamp(64px, 12vw, 140px);

  --radius-card: 12px;
  --radius-image: 32px;
  --radius-panel: 24px;
  --radius-pill: 9999px;

  --shadow-card: rgba(28, 28, 10, 0.12) 0 9px 25px 0;
  --shadow-image: rgba(28, 28, 10, 0.14) 0 6px 16px 0, rgba(28, 28, 10, 0.08) 0 1px 5px 0;
  --shadow-btn: rgba(28, 28, 10, 0.12) 0 1px 4px 0;

  --max: 1200px;
  --gutter: clamp(16px, 4vw, 48px);
  --section: clamp(72px, 10vw, 128px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink-soft);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { display: block; max-width: 100%; }
a { color: inherit; }

.wrap { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Type ---------- */
.eyebrow {
  font-size: var(--text-tag);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 16px;
}
h2 {
  font-family: var(--font-display);
  font-size: var(--text-heading-lg);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 24px;
  text-wrap: balance;
}
h3 {
  font-size: var(--text-subheading);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 12px;
}
.lede { font-size: 20px; line-height: 1.45; letter-spacing: -0.01em; color: var(--ink-muted); max-width: 560px; margin: 0; }
p { margin: 0 0 12px; }

/* ---------- Buttons ---------- */
.btn {
  border: 0; cursor: pointer;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 26px;
  border-radius: var(--radius-pill);
  background: var(--ink); color: var(--cream);
  font: 600 16px/1 var(--font-sans);
  text-decoration: none;
  box-shadow: var(--shadow-btn);
  transition: transform .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 18px; height: 18px; transition: transform .2s ease; }
.btn:hover svg { transform: translateX(3px); }
.btn--ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); box-shadow: none; }

/* Price */
.buy { display: flex; align-items: center; flex-wrap: wrap; gap: 20px 24px; }
.price { display: flex; align-items: center; gap: 12px; margin: 0; }
.price b { font-family: var(--font-serif); font-weight: 400; font-size: 48px; line-height: 1; color: var(--ink); }
.price span { font-size: var(--text-caption); line-height: 1.35; color: var(--ink-muted); }
.price--center { justify-content: center; margin-bottom: 28px; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  z-index: 50;
  display: flex; align-items: center; gap: 28px;
  padding: 10px 10px 10px 24px;
  background: rgba(249, 249, 223, 0.88);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-image);
  width: max-content; max-width: calc(100% - 32px);
  opacity: 0; visibility: hidden;
  transform: translate(-50%, -24px);
  transition: opacity .35s ease, transform .35s ease, visibility 0s linear .35s;
}
.nav.is-visible {
  opacity: 1; visibility: visible; transform: translate(-50%, 0);
  transition: opacity .35s ease, transform .35s ease;
}
.nav__logo { width: 120px; color: var(--ink); display: block; }
.nav__links { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; }
.nav__links a { font-size: 15px; font-weight: 600; text-decoration: none; color: var(--ink-soft); }
.nav__links a:hover { color: var(--g-purple); }
.nav .btn { padding: 10px 18px; font-size: 14px; }
@media (max-width: 820px) { .nav__links { display: none; } .nav { gap: 16px; } }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 96px 0;
}
.corner {
  position: absolute; width: clamp(140px, 20vw, 280px);
  mix-blend-mode: multiply; pointer-events: none; opacity: .9;
}
.corner--tl { top: 24px; left: 24px; }
.corner--tr { top: 24px; right: 24px; transform: scaleX(-1); }
.corner--bl { bottom: 24px; left: 24px; transform: scaleY(-1); }
.corner--br { bottom: 24px; right: 24px; transform: scale(-1, -1); }

.hero__grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 425px); gap: clamp(32px, 6.67vw, 96px); justify-content: space-between; width: 100%;
  align-items: center;
}
.hero__masthead {
  position: absolute; top: 48px; left: 50%; transform: translateX(-50%);
  width: clamp(240px, 24.7vw, 356px); z-index: 1;
}
.hero__title {
  font-family: var(--font-display); font-weight: 700;
  font-size: 44px; line-height: 1.04; letter-spacing: -0.02em;
  color: var(--ink); margin: 0; max-width: 560px; text-wrap: balance;
}
.hero__sub { color: var(--ink-muted); font-size: 20px; line-height: 1.45; letter-spacing: -0.01em; margin: 24px 0 24px; max-width: 560px; }
.hero__photo {
  border-radius: 32px; overflow: hidden; box-shadow: var(--shadow-image);
  aspect-ratio: 425 / 604; max-height: 78vh; justify-self: start; width: 100%; max-width: 425px;
}
.hero__photo img, .hero__photo video { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 860px) {
  .hero { min-height: auto; padding-top: 110px; }
  .hero__grid { grid-template-columns: 1fr; }
  .hero__photo { max-width: 380px; justify-self: center; }
  .hero .corner { width: 84px; top: 84px; opacity: .55; }
  .hero .corner--bl, .hero .corner--br { top: auto; }
}

/* ---------- Islands strip ---------- */
.islands {
  border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink);
  overflow: hidden; white-space: nowrap; padding: 14px 0;
  font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: -0.01em; color: var(--ink);
}
.islands__track { display: inline-flex; gap: 40px; animation: marquee 40s linear infinite; }
.islands__track span::after { content: "✺"; margin-left: 40px; font-weight: 400; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .islands__track { animation: none; } }

/* ---------- Sections ---------- */
section { scroll-margin-top: 90px; }
.section { padding: var(--section) 0; }
.section-head { max-width: 720px; margin-bottom: 48px; }

/* About / intro — 2 col */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6.67vw, 96px); align-items: center; }
.split--rev > :first-child { order: 2; }
.split__img { border-radius: var(--radius-image); overflow: hidden; box-shadow: var(--shadow-image); }
.split__img img { width: 100%; height: 100%; object-fit: cover; }
.stats { display: flex; flex-wrap: wrap; gap: 32px; margin-top: 32px; }
.stat b { display: block; font-family: var(--font-serif); font-weight: 400; font-size: 64px; line-height: 0.9; color: var(--ink); }
.stat span { font-size: var(--text-caption); color: var(--ink-muted); }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split--rev > :first-child { order: 0; }
}

/* Property cards — a fanned hand of seven highlights */
#cartas { overflow-x: clip; }
.section-head--center { text-align: center; }
.section-head--center .cards-hint { max-width: 520px; margin: 0 auto; }
.hand {
  display: flex; justify-content: center;
  padding: 0 var(--gutter) 24px;
}
.section-head--below { margin: 120px auto 0; }
.flip {
  all: unset; display: block; cursor: pointer; position: relative;
  perspective: 1200px;
  flex: 0 0 auto;
  width: clamp(90px, 15vw, 210px);
  aspect-ratio: 918 / 1327;
  margin-left: calc(clamp(90px, 15vw, 210px) * -0.22);
  --r: calc((var(--i) - 3) * 5deg);
  --y: calc((var(--i) - 3) * (var(--i) - 3) * 7px);
  transform: translateY(var(--y)) rotate(var(--r));
  transform-origin: 50% 110%;
}
.flip:first-child { margin-left: 0; }
.hand__more { text-align: center; font-size: var(--text-caption); color: var(--ink-muted); margin: 20px 0 0; padding: 0 var(--gutter); }
@media (max-width: 760px) {
  /* phones: text first, then a smaller fan of the same seven cards, then the button */
  #cartas { display: flex; flex-direction: column; padding: 52px 0; }
  #cartas .hand { order: 1; margin-top: 0; }
  #cartas .section-head--below { order: 2; margin: 0 auto; }
  #cartas .lugares-cta { order: 3; margin-top: 24px; }
  .hand { position: relative; display: block; height: 318px; padding: 0; margin: 4px 0 0; }
  .flip {
    --cw: 100px; --step: 53px;
    position: absolute; width: var(--cw); margin: 0; bottom: 118px;
    left: calc(50% - var(--cw) / 2 + (var(--m) - 2) * var(--step));
    --r: calc((var(--m) - 2) * 4deg);
    /* a little mountain: the middle card is highest and on top, each card further out sits
       ~46px lower and further back, so every card's name strip peeks out below its neighbour */
    --y: calc(var(--d) * 46px);
    transform-origin: 50% 120%;
    z-index: calc(10 - var(--d)); transition: z-index 0s linear .7s;
  }
  /* tapped card: lifts out of the hand, straightens, grows and flips to the rents */
  #cartas .flip.is-flipped { z-index: 20; transition-delay: 0s; }
  .flip--wide-only { display: none; }
  #cartas .flip.is-flipped .flip__inner { transform: rotate(calc(var(--r) * -1)) translate(calc((2 - var(--m)) * var(--step)), -56px) scale(1.45) rotateY(180deg); }
}
.flip:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: var(--radius-card); }
.flip__inner {
  position: relative; display: block; width: 100%; height: 100%;
  transition: transform .7s cubic-bezier(.2,.7,.2,1); transform-style: preserve-3d;
}
.flip.is-flipped .flip__inner { transform: rotateY(180deg); }
/* Hover: the button (hit area) never moves — only its inner card lifts and flips,
   so the pointer can't slip off mid-animation */
@media (hover: hover) and (min-width: 761px) {
  /* stay on top until the flip-back finishes, so the card doesn't snap behind its neighbour mid-animation */
  .flip { z-index: 1; transition: z-index 0s linear .7s; }
  .flip:hover { z-index: 5; transition-delay: 0s; }
  .flip:hover .flip__inner { transform: translateY(-36px) rotate(calc(var(--r) * -1)) scale(1.08) rotateY(180deg); }
}

.flip__face {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: clamp(6px, 0.8vw, 12px);
  box-shadow: var(--shadow-card);
}
.flip__face--back { transform: rotateY(180deg); }
.cards-hint { font-size: 20px; line-height: 1.45; letter-spacing: -0.01em; color: var(--ink-muted); margin: 0; }

/* Banknotes — loosely scattered on the table, every note visible */
.note-table { position: relative; aspect-ratio: 1 / 1.08; }
.note-table img {
  position: absolute; width: 52%;
  aspect-ratio: 509 / 264; object-fit: cover;
  border-radius: 3px;
  box-shadow: var(--shadow-card);
  transform: rotate(var(--r));
  transition: transform .35s ease;
}
.note-table img:nth-child(1) { left: 0;   top: 0;   --r: -6deg; }
.note-table img:nth-child(2) { left: 46%; top: 3%;  --r: 4deg; }
.note-table img:nth-child(3) { left: 3%;  top: 26%; --r: 3deg; }
.note-table img:nth-child(4) { left: 47%; top: 29%; --r: -3deg; }
.note-table img:nth-child(5) { left: 0;   top: 52%; --r: -4deg; }
.note-table img:nth-child(6) { left: 46%; top: 55%; --r: 5deg; }
.note-table img:nth-child(7) { left: 23%; top: 76%; --r: -2deg; }
.note-table img:hover { transform: rotate(var(--r)) translateY(-10px); }
@media (max-width: 860px) { .note-table { margin-top: 8px; } }

/* In the box — visual grid */
.box-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: clamp(180px, 22vw, 280px);
}
.box-tile {
  position: relative; margin: 0; overflow: hidden;
  border-radius: var(--radius-image); box-shadow: var(--shadow-image);
  background: var(--cream);
}
.box-tile--big { grid-column: span 2; grid-row: span 2; }
.box-tile > img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.box-tile:hover > img { transform: scale(1.04); }
.box-tile figcaption {
  position: absolute; left: 12px; bottom: 12px;
  max-width: calc(100% - 24px);
  padding: 8px 16px 8px 14px;
  background: var(--cream); color: var(--ink);
  border-radius: var(--radius-pill);
  font-family: var(--font-ui); font-size: 14px; font-weight: 600; line-height: 1.4;
  pointer-events: none;
}
.box-tile--notes { background: var(--cream); display: grid; place-items: center; }
.box-tile__notes { position: relative; width: 78%; aspect-ratio: 509 / 330; margin-bottom: 40px; }
.box-tile__notes img {
  position: absolute; width: 82%; aspect-ratio: 509 / 264; border-radius: 3px;
  box-shadow: var(--shadow-card);
}
.box-tile__notes img:nth-child(1) { left: 0; top: 0; transform: rotate(-7deg); }
.box-tile__notes img:nth-child(2) { left: 9%; top: 12%; transform: rotate(2deg); }
.box-tile__notes img:nth-child(3) { left: 18%; top: 24%; transform: rotate(-2deg); }
@media (max-width: 860px) {
  .box-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 200px; }
  .box-tile--big { grid-column: span 2; grid-row: span 2; }
  .box-tile--notes { grid-column: span 2; }   /* last tile goes full width: no orphan cell */
}
@media (max-width: 520px) {
  .box-grid { grid-auto-rows: 170px; gap: 10px; }
  .box-tile figcaption { left: 8px; bottom: 8px; padding: 6px 12px; font-size: 12px; }
}

/* Gallery */
.gallery {
  display: grid; gap: 16px;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: clamp(120px, 14vw, 180px);
}
.gallery figure { margin: 0; border-radius: var(--radius-image); overflow: hidden; box-shadow: var(--shadow-image); background: var(--cream-deep); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.gallery figure:hover img { transform: scale(1.04); }
.g-a { grid-column: span 7; grid-row: span 3; }
.g-b { grid-column: span 5; grid-row: span 3; }
.g-c { grid-column: span 3; grid-row: span 2; }
.g-f { grid-column: span 5; grid-row: span 3; }
.g-g { grid-column: span 7; grid-row: span 3; }
@media (max-width: 760px) {
  .gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 160px; }
  .gallery figure { grid-column: span 1; grid-row: span 2; }
  .gallery .g-a, .gallery .g-g { grid-column: span 2; }
}

/* How to play */
.rules { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.rule {
  background: var(--paper);
  border-radius: var(--radius-card);
  padding: 32px;
  box-shadow: var(--shadow-card);
}
.rule--wide { grid-column: 1 / -1; }
.rule__num {
  display: inline-grid; place-items: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--ink); color: var(--cream);
  font-size: 13px; font-weight: 700; flex: 0 0 auto;
}
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.steps li { display: flex; gap: 14px; align-items: flex-start; color: var(--ink-soft); font-size: 17px; }
.steps li > div { padding-top: 2px; }
.bullets { margin: 8px 0 0; padding-left: 18px; color: var(--ink-muted); font-size: 16px; }
.bullets li { margin: 4px 0; display: list-item; }
.notes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.note { font-size: 13px; font-weight: 600; background: var(--cream); border: 1px solid var(--hairline); border-radius: var(--radius-pill); padding: 6px 12px; color: var(--ink-soft); }
.rule p { color: var(--ink-muted); font-size: 16px; }
.rule strong { color: var(--ink); }
.rule--jail { border-top: 6px solid var(--g-navy); }
.rule--bankrupt { border-top: 6px solid var(--g-purple); }
.rule--win { border-top: 6px solid var(--g-lime); }
.rule--build { border-top: 6px solid var(--g-emerald); }
@media (max-width: 860px) { .rules { grid-template-columns: 1fr; } .rule { padding: 24px; } }

/* Author note */
.letter {
  font-family: var(--font-sans);
  font-size: 20px;
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.letter p { margin: 0 0 20px; }
.letter .sign { font-family: var(--font-script); font-style: italic; font-size: 27px; line-height: 1.4; letter-spacing: 0; }

/* Video slot (fill in manually) */
.video-slot video { width: 100%; border-radius: var(--radius-image); box-shadow: var(--shadow-image); display: block; }

/* Closing CTA */
.closing { position: relative; text-align: center; padding: var(--section) 0; }
.closing .corner { width: clamp(100px, 20vw, 290px); }
.closing__logo { width: min(640px, 90%); margin: 0 auto 24px; color: var(--ink); }
.closing p { color: var(--ink-muted); margin: 0 auto 32px; max-width: 480px; }

/* Photo lightbox */
img.is-zoomable { cursor: zoom-in; }
img.is-zoomable:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.lightbox {
  width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: rgb(14, 14, 8); color: var(--cream);
}
.lightbox::backdrop { background: transparent; }
.lightbox[open] { display: grid; animation: lb-in .25s ease; }
@keyframes lb-in { from { opacity: 0; } }
.lightbox__figure {
  margin: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 64px clamp(16px, 8vw, 96px) 24px; gap: 16px; min-height: 0;
}
.lightbox { overflow: hidden; }
.lightbox__img {
  max-width: 100%; max-height: calc(100dvh - 150px);
  object-fit: contain; border-radius: 8px;
  cursor: zoom-in; touch-action: none;
  transition: transform .25s ease;
  position: relative; z-index: 1;
}
.lightbox.is-zoomed .lightbox__img { cursor: zoom-out; transition: transform .25s ease, transform-origin .08s linear; }
.lightbox.is-zoomed .lightbox__caption { opacity: 0; }
.lightbox__btn { z-index: 2; }
.lightbox__hint { margin-left: auto; white-space: nowrap; opacity: .6; }
@media (hover: none) { .lightbox__hint::before { content: "Toca duas vezes para ampliar"; } .lightbox__hint { font-size: 0; } .lightbox__hint::before { font-size: var(--text-caption); } }
.lightbox__caption { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline; max-width: 720px; font-size: var(--text-caption); color: rgba(249, 249, 223, 0.75); }
.lightbox__count { font-weight: 600; color: var(--cream); white-space: nowrap; }
.lightbox__btn {
  position: fixed; width: 48px; height: 48px; display: grid; place-items: center;
  border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(20, 20, 12, 0.7); color: var(--cream);
  box-shadow: 0 0 0 1px rgba(249, 249, 223, 0.18);
  transition: background .2s ease;
}
.lightbox__btn:hover { background: rgba(50, 50, 36, 0.85); }
.lightbox__btn svg { width: 24px; height: 24px; }
.lightbox__close { top: 16px; right: 16px; }
.lightbox__prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 16px; top: 50%; transform: translateY(-50%); }
@media (max-width: 600px) {
  .lightbox__prev, .lightbox__next { top: auto; bottom: 16px; transform: none; }
  .lightbox__figure { padding-bottom: 80px; }
}

/* Reserve modal */
.modal {
  width: min(520px, calc(100% - 32px));
  border: 0; padding: 0;
  border-radius: var(--radius-panel);
  background: var(--cream); color: var(--ink-soft);
  box-shadow: rgba(28, 28, 10, 0.25) 0 24px 60px 0;
}
.modal::backdrop { background: rgba(20, 20, 10, 0.45); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.modal[open] { animation: modal-in .3s cubic-bezier(.2,.7,.2,1); }
@keyframes modal-in { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.modal__body { padding: clamp(28px, 5vw, 44px); }
.modal h2 { font-size: clamp(36px, 6vw, 48px); margin-bottom: 16px; }
.modal__text { color: var(--ink-muted); font-size: 17px; margin-bottom: 20px; }
.modal .price { margin-bottom: 24px; }
.modal__form { display: flex; gap: 8px; flex-wrap: wrap; align-items: stretch; }
.modal__text { margin-bottom: 0; }
.modal__form { margin-top: 16px; }
.modal__form input {
  flex: 1 1 220px; min-width: 0;
  font: 400 17px/1.5 var(--font-sans); color: var(--ink);
  padding: 15px 20px;
  border: 1.5px solid var(--ink); border-radius: var(--radius-pill);
  background: var(--paper);
}
.modal__form input:focus { outline: 2px solid var(--g-purple); outline-offset: 2px; }
.modal__form .btn { flex: 0 0 auto; }
.modal__error { color: #a3261a; font-size: var(--text-caption); margin: 10px 0 0 20px; }
.modal__close {
  position: absolute; top: 16px; right: 16px;
  width: 40px; height: 40px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer;
}
.modal__close:hover { background: var(--cream-deep); }
.modal__close svg { width: 20px; height: 20px; }

/* Footer */
.footer { border-top: 1.5px solid var(--ink); padding: 32px 0 48px; font-size: var(--text-caption); color: var(--ink-muted); }
.footer--ink { background: var(--ink-soft); color: var(--paper); border-top: 0; }
.footer__row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.footer p { margin: 0 0 4px; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* Dark band (Rifas & Bazar) */
.section--dark { background: var(--g-navy); color: var(--cream); }
.section--dark h2 { color: var(--paper); }
.section--dark .eyebrow { color: var(--paper); }
.section--dark .lede { color: var(--paper); }

/* Rifas & Bazar — draw a card */
.draw__hint { margin-top: 16px; font-weight: 600; color: var(--g-lime); }
.draw {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: clamp(32px, 6vw, 88px);
  max-width: 1000px; margin: 0 auto;
}
.draw__deck { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.draw__card {
  all: unset; cursor: pointer; display: block; position: relative;
  width: 100%; max-width: 440px; aspect-ratio: 698 / 471;
  perspective: 1400px;
}
/* the pile underneath */
.draw__card::before, .draw__card::after {
  content: ""; position: absolute; inset: 0;
  border-radius: 12px; background: #e9e9cc;
  box-shadow: rgba(0, 0, 0, 0.3) 0 6px 18px 0;
}
.draw__card::before { transform: translate(-7px, 11px) rotate(-2deg); }
.draw__card::after { transform: translate(7px, 6px) rotate(1.8deg); }
.draw__inner {
  position: absolute; inset: 0; z-index: 1; display: block;
  transform-style: preserve-3d;
  transition: transform .5s cubic-bezier(.2,.7,.2,1);
}
.draw__card.is-drawn .draw__inner { transform: rotateY(180deg) rotate(-1.5deg); }
.draw__card:hover .draw__inner { translate: 0 -4px; }
.draw__card:focus-visible { outline: 2px solid var(--cream); outline-offset: 8px; border-radius: 12px; }
.draw__face {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  border-radius: 12px;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  box-shadow: rgba(0, 0, 0, 0.35) 0 10px 28px 0;
}
.draw__face--front { transform: rotateY(180deg); }
.draw__name { margin: 16px 0 0; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: 13px; color: rgba(249, 249, 223, 0.7); }
.btn--light { background: var(--cream); color: var(--ink); }
@media (max-width: 760px) { .draw { grid-template-columns: 1fr; } }

.draw--single { grid-template-columns: 1fr; max-width: 520px; }
.section--dark .section-head--center .lede { margin: 0 auto; max-width: 640px; }
.section--dark .section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.draw--single .btn { margin-top: 86px; }
@media (max-width: 760px) { .draw--single .btn { margin-top: 40px; } }

/* Bazar: keep the heading block and deck on the page's centre line at every width */
#bazar .section-head { max-width: 760px; margin-left: auto; margin-right: auto; margin-bottom: 56px; text-align: center; }
#bazar .draw__deck { width: 100%; }

/* Nota da autora — dark band with a portrait video */
.section--ink { background: var(--ink-soft); }
.section--ink .letter { color: var(--paper); }
.section--ink .eyebrow { color: var(--paper); }
.split--nota { grid-template-columns: minmax(0, 417px) minmax(0, 552px); justify-content: start; }
.nota__media { aspect-ratio: 417 / 690; }
.nota__media video { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 860px) {
  .split--nota { grid-template-columns: 1fr; }
  .nota__media { max-width: 417px; }
}

/* Hero content block is inset ~24px from the content edges, as in the Figma */
@media (min-width: 861px) { .hero__grid { padding: 0 calc(var(--gutter) + 23px) 0 calc(var(--gutter) + 24px); } .hero__photo { justify-self: end; } }

/* "Reserva já o teu" inside sections */
.section-cta { margin-top: 34px; display: flex; justify-content: center; }
.section-cta--left { margin-top: 20px; justify-content: flex-start; }
.modal__body[data-step="done"] .btn { margin-top: 24px; }

/* Pre-sale popup: Figma keeps Inter here (Display/H2 small, Text/Body) */
.modal h2 { font-family: var(--font-ui); }
.modal__text, .modal__form input, .modal__error { font-family: var(--font-ui); }

/* ---------- Desktop / mobile copy variants ---------- */
.only-mobile { display: none; }

/* ---------- Mobile header + menu (phones) ---------- */
.mhead, .mmenu { display: none; }
.mhead__logo { width: 200px; display: block; }
.mhead__menu {
  border: 0; background: none; cursor: pointer; padding: 12px; margin: -12px;
  display: flex; flex-direction: column; gap: 2px;
}
.mhead__menu span { display: block; width: 16px; height: 2px; background: var(--ink); transition: transform .4s cubic-bezier(.2,.8,.2,1), opacity .2s ease; transform-origin: center; }
.menu-open .mhead__menu span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.menu-open .mhead__menu span:nth-child(2) { opacity: 0; }
.menu-open .mhead__menu span:nth-child(3) { transform: translateY(-4px) rotate(-45deg); }

@media (max-width: 760px) {
  .only-desktop { display: none; }
  .only-mobile { display: inline; }

  .mhead {
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 60;
    padding: 18px 16px; background: var(--cream);
  }
  .mmenu {
    display: flex; flex-direction: column; gap: 4px;
    position: fixed; top: 62px; left: 0; right: 0; z-index: 59;
    padding: 8px 16px 28px; background: var(--cream);
    border-bottom: 1.5px solid var(--ink);
    box-shadow: 0 24px 40px -24px rgba(28, 28, 10, 0.35);
    clip-path: inset(0 0 100% 0);
    visibility: hidden;
    transition: clip-path .5s cubic-bezier(.2,.8,.2,1), visibility 0s linear .5s;
  }
  .mmenu.is-open { clip-path: inset(0 0 -60px 0); visibility: visible; transition: clip-path .5s cubic-bezier(.2,.8,.2,1); }
  .mmenu[hidden] { display: flex; }
  .mmenu > * { opacity: 0; transform: translateY(-10px); transition: opacity .3s ease, transform .4s cubic-bezier(.2,.8,.2,1); }
  .mmenu.is-open > * { opacity: 1; transform: none; transition-delay: calc(80ms + var(--k, 0) * 55ms); }
  .mmenu a { font-family: var(--font-display); font-weight: 700; font-size: 28px; line-height: 1.3; text-decoration: none; color: var(--ink); padding: 6px 0; }
  .mmenu .btn { margin-top: 16px; justify-content: center; }
  /* dim the page behind the open menu */
  .menu-scrim { position: fixed; inset: 62px 0 0 0; z-index: 58; background: rgba(20, 20, 10, 0.25); opacity: 0; pointer-events: none; transition: opacity .4s ease; }
  .menu-open .menu-scrim { opacity: 1; pointer-events: auto; }
  .nav { display: none; }   /* the floating pill is replaced by the sticky header */

  /* Hero: video first, then the text card */
  .hero { min-height: 0; padding: 0 0 0; display: block; }
  .hero .corner, .hero__masthead { display: none; }
  .hero__grid { display: flex; flex-direction: column; gap: 0; padding: 0 var(--gutter); }
  .hero__photo { order: -1; max-width: none; width: 100%; aspect-ratio: 358 / 363; border-radius: 22px; max-height: none; }
  .hero__text { padding: 20px 0 50px; text-align: center; }
  .hero__title { font-size: 44px; margin: 0 auto; }
  .hero__sub { font-size: 14px; line-height: 1.45; letter-spacing: 0; color: var(--ink-muted); margin: 16px auto 16px; }
  .buy { flex-direction: column; align-items: center; gap: 16px; }
  .buy .price { flex-direction: row; align-items: center; justify-content: center; gap: 8px; }
  .buy .price b { font-family: var(--font-display); font-weight: 700; font-size: 24px; }
  .buy .price > span { font-size: 14px; color: var(--ink); }

  /* Headlines (Mobile/H2) */
  h2 { font-size: 44px; line-height: 1.04; letter-spacing: -0.02em; }
  /* Os lugares line uses Text/Small on mobile */
  .cards-hint { font-size: 14px; letter-spacing: 0; }
  /* Nota da autora: letter first, then the video; smaller signature */
  .split--nota .nota__media { order: 2; }
  .letter .sign { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) { .mmenu, .mmenu > *, .menu-scrim, .mhead__menu span { transition: none !important; } }

/* ---------- Tablet hero (761–1099px): one centred, symmetrical column ---------- */
@media (min-width: 761px) and (max-width: 1099px) {
  .hero { display: block; min-height: 0; padding: 196px 0 104px; }
  .hero__masthead { width: 300px; top: 52px; }
  .hero .corner { width: 132px; opacity: .9; }
  .hero .corner--tl, .hero .corner--tr { top: 24px; }
  .hero .corner--bl, .hero .corner--br { top: auto; bottom: 24px; }
  .hero__grid {
    display: flex; flex-direction: column; align-items: center; gap: 56px;
    padding: 0 var(--gutter); text-align: center;
  }
  .hero__text { display: flex; flex-direction: column; align-items: center; max-width: 620px; }
  .hero__title { font-size: clamp(40px, 5.4vw, 52px); max-width: 620px; }
  .hero__sub { margin: 24px auto; }
  .buy { justify-content: center; }
  .buy .price span { text-align: left; }
  .hero__photo { justify-self: auto; margin: 0; width: 100%; max-width: 560px; aspect-ratio: 4 / 5; max-height: none; }
}

/* Banknotes in the full-width mobile tile */
@media (max-width: 860px) { .box-tile--notes .box-tile__notes { width: 50%; margin-bottom: 36px; } }

/* ---------- Pre-sale popup on phones: docked near the top, compact, above the keyboard ---------- */
@media (max-width: 760px) {
  .modal {
    width: calc(100% - 24px);
    margin: 12px auto auto;
    max-height: calc(var(--vvh, 100dvh) - 24px);
    overflow-y: auto; overscroll-behavior: contain;
    border-radius: 20px;
  }
  .modal__body { padding: 24px 22px 22px; }
  .modal h2 { font-size: 32px; margin-bottom: 12px; }
  .modal__text { font-size: 15px; line-height: 1.45; }
  .modal__form { margin-top: 18px; flex-wrap: nowrap; }
  .modal__form input { flex: 1 1 auto; font-size: 16px; padding: 13px 18px; }   /* 16px keeps iOS from zooming in */
  .modal__form .btn { padding: 13px 20px; }
  .modal__close { top: 12px; right: 12px; }
  .modal__error { margin-left: 18px; }
}

/* ---------- Footer: thank-you note left, details right ---------- */
.footer__row { display: flex; justify-content: space-between; gap: 32px; padding: 0 24px; }
.footer__thanks { max-width: 620px; }
.footer__meta { text-align: right; }

@media (max-width: 760px) {
  /* O jogo + O banco: centred headings and text on phones */
  #na-caixa .section-head, #notas .split > div:first-child { text-align: center; }
  #notas .lede { margin: 0 auto; }
  #notas .section-cta--left { justify-content: center; }
  /* closing price stacked */
  .closing .price--center { flex-direction: column; gap: 8px; }
  .closing .price--center b { font-family: var(--font-display); font-weight: 700; font-size: 44px; }
  .closing .price--center span { color: var(--ink); }
  /* footer centred */
  .footer__row { flex-direction: column; gap: 16px; padding: 0 16px; text-align: center; }
  .footer__meta { text-align: center; }
}

@media (max-width: 760px) { .closing .corner--bl, .closing .corner--br { display: none; } }

/* Short desktop windows: keep the hero photo clear of the masthead logo */
@media (min-width: 1100px) {
  .hero { align-items: safe center; }
  .hero__photo { height: min(604px, max(480px, 78vh)); width: auto; max-height: none; aspect-ratio: 425 / 604; }
}
@media (min-width: 1100px) and (max-height: 860px) {
  /* shorter windows: keep the photo big and give the logo room instead */
  .hero { padding-top: 140px; }
}

/* Pre-sale popup: consent line + spam trap */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.modal__consent { font-family: var(--font-ui); font-size: 12px; line-height: 1.5; color: var(--ink-muted); margin: 14px 0 0; }
.modal__consent a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.modal__form .btn[disabled] { opacity: .6; cursor: progress; }

/* Footer legal links */
.footer__legal { margin-top: 8px !important; }
.footer__legal a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Privacy policy / legal page ---------- */
.legal-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 760px; margin: 0 auto; padding: 32px var(--gutter) 0; }
.legal-head__logo { width: 200px; display: block; }
.legal-head__back { font-size: 15px; font-weight: 600; color: var(--ink); text-decoration: none; }
.legal-head__back:hover { text-decoration: underline; }
.legal { max-width: 760px; margin: 0 auto; padding: 72px var(--gutter) 112px; color: var(--ink-soft); font-size: 18px; line-height: 1.6; }
.legal h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(40px, 6vw, 64px); line-height: 1; letter-spacing: -0.01em; color: var(--ink); margin: 0 0 12px; }
.legal h2 { font-size: clamp(26px, 3vw, 32px); line-height: 1.15; margin: 48px 0 14px; }
.legal p { margin: 0 0 14px; }
.legal ul { margin: 0 0 14px; padding-left: 22px; }
.legal li { margin: 6px 0; }
.legal a { color: var(--ink); text-underline-offset: 2px; }
.legal__updated { color: var(--ink-muted); font-size: 15px; margin-bottom: 36px !important; }
.legal__facts { list-style: none; padding: 20px 24px !important; background: var(--paper); border-radius: var(--radius-card); box-shadow: var(--shadow-card); }
.legal mark.todo { background: var(--voltage, #ffef5a); color: var(--ink); padding: 0 4px; border-radius: 3px; font-weight: 600; }
@media (max-width: 760px) {
  .legal-head { padding-top: 20px; }
  .legal-head__logo { width: 160px; }
  .legal { padding: 48px 16px 80px; font-size: 17px; }
}

/* ---------- Pre-sale popup: "Bazar ticket" (draft C) ---------- */
.modal--ticket { background: var(--paper); width: min(560px, calc(100% - 32px)); }
.ticket {
  position: relative; margin: 16px;
  border: 3px dashed var(--ink); border-radius: 10px;
}
.ticket__corner { position: absolute; width: 78px; opacity: .75; pointer-events: none; mix-blend-mode: multiply; }
.ticket__corner--tl { top: 12px; left: 12px; }
.ticket__corner--tr { top: 12px; right: 12px; transform: scaleX(-1); }
.ticket__corner--bl { bottom: 12px; left: 12px; transform: scaleY(-1); }
.ticket__corner--br { bottom: 12px; right: 12px; transform: scale(-1, -1); }
.modal--ticket .modal__body { position: relative; padding: 32px 40px 30px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.modal--ticket .eyebrow { margin-bottom: 14px; }
.modal--ticket h2 { font-family: var(--font-display); font-weight: 700; font-size: 44px; line-height: 1; letter-spacing: -0.02em; margin: 0 0 14px; }
.modal--ticket .modal__text { font-family: var(--font-sans); font-size: 17px; line-height: 1.45; max-width: 400px; margin: 0; }
.badges { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 18px 0 0; padding: 0; }
.badges li { font-family: var(--font-sans); font-weight: 600; font-size: 13px; line-height: 1; color: var(--ink); background: var(--paper); border: 1px solid var(--hairline); border-radius: var(--radius-pill); padding: 8px 12px; }
.modal--ticket .modal__form { width: 100%; margin-top: 22px; }
.modal--ticket .modal__error { margin: 10px 0 0; }
.modal--ticket .modal__consent { max-width: 420px; margin-top: 14px; }
.modal--ticket .modal__close { top: 8px; right: 8px; z-index: 1; }
.modal--ticket [data-step="done"] .btn { margin-top: 24px; }
@media (max-width: 760px) {
  .modal--ticket { width: calc(100% - 24px); }
  .ticket { margin: 10px; }
  .ticket__corner { width: 52px; top: 8px; }
  .ticket__corner--tl, .ticket__corner--tr { top: 8px; }
  .ticket__corner--tl, .ticket__corner--bl { left: 8px; }
  .ticket__corner--tr, .ticket__corner--br { right: 8px; }
  .ticket__corner--bl, .ticket__corner--br { top: auto; bottom: 8px; }
  .modal--ticket .modal__body { padding: 24px 18px 20px; }
  .modal--ticket h2 { font-size: 32px; }
  .modal--ticket .modal__text { font-size: 15px; }
  .badges { margin-top: 14px; gap: 6px; }
  .badges li { font-size: 12px; padding: 7px 10px; }
  .modal--ticket .modal__form { margin-top: 16px; }
}
.modal--ticket .modal__body[hidden] { display: none; }
.badges li { display: inline-flex; align-items: center; gap: 6px; }
.badges svg { width: 15px; height: 15px; flex: 0 0 auto; }
.inline-icon { display: inline-block; width: 1em; height: 1em; vertical-align: -0.12em; }

/* Popup refinements: pills on one line when they fit, round close "seal", bigger ornaments */
.modal--ticket { width: min(600px, calc(100% - 32px)); overflow: visible; }
.modal--ticket .modal__body { padding-left: 28px; padding-right: 28px; }
.badges { flex-wrap: wrap; }
.badges li { white-space: nowrap; }
.ticket__corner { width: 96px; }
.modal--ticket .modal__close {
  top: -17px; right: -17px; width: 34px; height: 34px;
  background: var(--paper); color: var(--ink);
  border: 1.5px solid var(--ink); border-radius: 50%;
  box-shadow: var(--shadow-btn);
  transition: background .2s ease, color .2s ease;
}
.modal--ticket .modal__close:hover { background: var(--ink); color: var(--paper); }
.modal--ticket .modal__close svg { width: 16px; height: 16px; }
@media (max-width: 760px) {
  .modal--ticket { width: calc(100% - 24px); overflow-y: auto; }
  .ticket { margin: 14px; }
  .ticket__corner { width: 64px; }
  .modal--ticket .modal__body { padding-left: 16px; padding-right: 16px; padding-top: 28px; }
  .modal--ticket .modal__close { top: -13px; right: -13px; width: 28px; height: 28px; }
  .modal--ticket .modal__close svg { width: 14px; height: 14px; }
}

/* Close: a plain light ✕ floating just outside the card, on the dimmed backdrop */
.modal--ticket { margin-top: max(64px, calc(50vh - 260px)); }
.modal--ticket .modal__close {
  position: absolute; top: -48px; right: -4px;
  width: 40px; height: 40px;
  background: none; border: 0; box-shadow: none; border-radius: 50%;
  color: var(--paper); opacity: .9;
  transition: opacity .2s ease, background .2s ease;
}
.modal--ticket .modal__close:hover { opacity: 1; background: rgba(255, 255, 244, 0.12); color: var(--paper); }
.modal--ticket .modal__close svg { width: 22px; height: 22px; }
@media (max-width: 760px) {
  .modal--ticket { margin-top: 56px; max-height: calc(var(--vvh, 100dvh) - 68px); }
  .modal--ticket .modal__close { position: fixed; top: 10px; right: 14px; width: 38px; height: 38px; }
  .modal--ticket .modal__close svg { width: 20px; height: 20px; }
}
