/* Pátzcuaro — coming soon. Palette from the town itself:
   white-washed walls, rojo óxido bands, adobe cream, lake dusk. */
:root {
  --ink: #fbf6ee;
  --cream: #f3ead9;
  --oxide: #9b2d20;
  --oxide-hi: #c2412f;
  --night: #0e0c0b;
  --gutter: clamp(16px, 4vw, 56px);
  --serif: "Calistoga", ui-serif, Georgia, serif;
  --sans: "Poppins", -apple-system, BlinkMacSystemFont, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--night);
  color: var(--ink);
  font: 400 16px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- page shell ---------- */
.page { position: relative; min-height: 100svh; }
#slider { position: absolute; inset: 0; height: 100svh; }

.overlay {
  position: relative;
  z-index: 5;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: var(--gutter);
  padding-bottom: 0;
  pointer-events: none; /* let swipes reach the slider */
}
.overlay a, .overlay button, .overlay input { pointer-events: auto; }

.top-shade {
  position: absolute; inset: 0 0 auto 0; height: 80%;
  background:
    linear-gradient(to right, rgba(10,8,7,.55), rgba(10,8,7,.2) 50%, rgba(10,8,7,0) 70%),
    linear-gradient(to bottom, rgba(10,8,7,.72), rgba(10,8,7,.25) 55%, rgba(10,8,7,0));
  z-index: 3; pointer-events: none;
}

/* ---------- header ---------- */
.brand { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { display: flex; align-items: baseline; gap: 10px; text-decoration: none; color: inherit; }
.logo-mark {
  width: 34px; height: 34px; flex: none; align-self: center;
  border: 1px solid rgba(251,246,238,.6);
  display: grid; place-items: center;
  font: 400 18px/1 var(--serif);
  background: linear-gradient(to top, var(--oxide) 38%, transparent 38%);
}
.logo-name { font: 400 22px/1 var(--serif); letter-spacing: .02em; }
.badge {
  font: 500 11px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase;
  padding: 8px 12px; border: 1px solid rgba(251,246,238,.45); border-radius: 999px;
  white-space: nowrap;
}

/* ---------- hero copy ---------- */
.hero { margin-top: clamp(40px, 12vh, 120px); max-width: 760px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font: 500 12px/1 var(--sans); letter-spacing: .26em; text-transform: uppercase;
  color: var(--cream);
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--oxide-hi); }
.hero h1 {
  margin: 18px 0 0;
  font: 400 clamp(38px, 8.4vw, 100px)/1 var(--serif);
  letter-spacing: -.01em;
  text-wrap: balance;
}
.hero h1 em { font-style: normal; color: #f0b9a6; }
.lede {
  margin: 20px 0 0; max-width: 46ch; font-weight: 400;
  font-size: clamp(15px, 1.6vw, 18px); color: rgba(251,246,238,.86);
  text-wrap: pretty;
}

/* ---------- countdown ---------- */
.countdown { display: flex; gap: clamp(10px, 2.4vw, 22px); margin-top: 32px; }
.cd-cell {
  min-width: clamp(64px, 16vw, 88px);
  padding: 12px 10px 10px;
  background: rgba(14,12,11,.42);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(251,246,238,.18);
  border-bottom: 3px solid var(--oxide-hi);
  text-align: center;
}
.cd-num { display: block; font: 400 clamp(28px, 6vw, 44px)/1 var(--serif); font-variant-numeric: tabular-nums; }
.cd-lbl { display: block; margin-top: 6px; font: 500 10px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; opacity: .75; }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  font: 500 14px/1 var(--sans); letter-spacing: .04em; text-decoration: none;
  color: var(--ink); background: var(--oxide); border: 1px solid var(--oxide);
  transition: background .2s ease, transform .2s ease;
}
.btn:hover { background: var(--oxide-hi); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.btn--ghost { background: transparent; border-color: rgba(251,246,238,.5); }
.btn--ghost:hover { background: rgba(251,246,238,.12); }

/* ---------- slider (ported from 21st.dev Shutter Blinds) ---------- */
.sb-root { position: relative; width: 100%; overflow: hidden; background: var(--night); color: var(--ink); user-select: none; -webkit-user-select: none; touch-action: pan-y; outline: none; }
.sb-root:focus-visible { box-shadow: inset 0 0 0 2px var(--ink); }
.sb-base { position: absolute; inset: 0; transition: filter .9s ease, transform 1.4s cubic-bezier(.2,.7,.2,1); }
.sb-root[data-moving="1"] .sb-base { filter: brightness(.42); transform: scale(1.04); }
.sb-img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; display: block; pointer-events: none; }
.sb-in { position: absolute; inset: 0; perspective: 1600px; }
.sb-slat { position: absolute; left: 0; right: 0; overflow: hidden; transform-origin: 50% 0; backface-visibility: hidden; animation: sb-open var(--sb-d) cubic-bezier(.2,.75,.2,1) both; }
.sb-in[data-dir="-1"] .sb-slat { transform-origin: 50% 100%; animation-name: sb-open-up; }
.sb-slat-img { position: absolute; left: 0; right: 0; }
.sb-shade { position: absolute; inset: auto 0 0 0; height: 50%; background: linear-gradient(to top, rgba(0,0,0,.7), rgba(0,0,0,0)); pointer-events: none; z-index: 2; }

.sb-text { position: absolute; z-index: 6; left: var(--gutter); right: calc(var(--gutter) + 160px); bottom: 64px; pointer-events: none; }
.sb-line { display: block; overflow: hidden; padding-bottom: .08em; }
.sb-line > span { display: block; animation: sb-rise .9s cubic-bezier(.2,.8,.2,1) both; }
.sb-title { font: 400 clamp(22px, 3.2vw, 38px)/1.05 var(--serif); letter-spacing: -.01em; }
.sb-cap { margin-top: 6px; font: 400 13px/1.4 var(--sans); opacity: .8; max-width: 48ch; }
.sb-cap > span { animation-delay: .08s; }

.sb-nav { position: absolute; z-index: 6; right: var(--gutter); bottom: 60px; display: flex; align-items: center; gap: 12px; }
.sb-count { font: 500 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .14em; }
.sb-btn { appearance: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(251,246,238,.45); background: rgba(14,12,11,.25); color: inherit; display: grid; place-items: center; cursor: pointer; transition: background .2s ease, color .2s ease; }
.sb-btn:hover { background: var(--ink); color: var(--night); }
.sb-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.sb-dots { position: absolute; z-index: 6; left: var(--gutter); bottom: 34px; display: flex; gap: 6px; }
.sb-dot { appearance: none; width: 22px; height: 22px; padding: 0; border: 0; background: none; cursor: pointer; position: relative; }
.sb-dot::after { content: ""; position: absolute; left: 3px; right: 3px; top: 50%; height: 2px; background: rgba(251,246,238,.35); transition: background .3s; }
.sb-dot[aria-current="true"]::after { background: var(--oxide-hi); }
.sb-dot:focus-visible { outline: 2px solid var(--ink); }

.sb-track { position: absolute; z-index: 6; left: var(--gutter); right: var(--gutter); bottom: 20px; height: 1px; background: rgba(251,246,238,.22); }
.sb-fill { height: 100%; background: var(--ink); transform-origin: left; transform: scaleX(0); }
.sb-fill[data-run="1"] { animation: sb-fill var(--sb-auto) linear forwards; }
.sb-root[data-paused="1"] .sb-fill { animation-play-state: paused; }
.sb-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@keyframes sb-open    { from { transform: rotateX(-88deg); filter: brightness(.35); } to { transform: none; filter: none; } }
@keyframes sb-open-up { from { transform: rotateX(88deg);  filter: brightness(.35); } to { transform: none; filter: none; } }
@keyframes sb-rise    { from { transform: translateY(105%); } to { transform: none; } }
@keyframes sb-fill    { to { transform: scaleX(1); } }
@keyframes sb-fade    { from { opacity: 0; } to { opacity: 1; } }

/* ---------- footer ---------- */
.foot {
  position: relative; z-index: 5;
  padding: 18px var(--gutter) 24px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  font-size: 12px; color: rgba(251,246,238,.6);
  background: var(--night);
}
.foot a { color: inherit; }

/* ---------- mobile ---------- */
@media (max-width: 640px) {
  .badge { display: none; }
  .hero { margin-top: 32px; }
  .countdown { margin-top: 24px; }
  .cd-cell { flex: 1; min-width: 0; }
  .cta-row .btn { flex: 1; justify-content: center; }
  .sb-text { right: var(--gutter); bottom: 96px; }
  .sb-nav { bottom: 34px; gap: 8px; }
  .sb-count { display: none; }
  .sb-dots { bottom: 44px; }
  .top-shade { height: 100%; background: linear-gradient(to bottom, rgba(10,8,7,.75), rgba(10,8,7,.35) 60%, rgba(10,8,7,.1)); }
}
@media (max-height: 700px) and (max-width: 640px) {
  .lede { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .sb-slat, .sb-in[data-dir="-1"] .sb-slat { animation-name: sb-fade; animation-delay: 0s !important; }
  .sb-line > span { animation: none; }
  .sb-base { transition: none; }
}
