/* ================= FAUSTINO'S — brand system ================= */
:root {
  --cream:      #F4EFE4;
  --cream-soft: #FAF6EC;
  --terracotta: #C65A3A;
  --ochre:      #E0A33A;
  --azulejo:    #5C7FA1;
  --espresso:   #3A271E;
  --faja:       #B92E2E;
  --night:      #221E36;

  --font-display: "Marcellus", "Times New Roman", serif;
  --font-body:    "Karla", -apple-system, "Helvetica Neue", sans-serif;
  --font-accent:  "Cormorant Garamond", Georgia, serif;

  --ease-out: cubic-bezier(.22, 1, .36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { overscroll-behavior-y: none; }

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

::selection { background: var(--ochre); color: var(--espresso); }

/* ================= canvas + grain ================= */
#scene {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  display: block;
  z-index: 0;
}
.grain {
  position: fixed; inset: -50%;
  z-index: 3; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: .05;
  animation: grain 1.2s steps(4) infinite;
}
@keyframes grain {
  0% { transform: translate(0,0); } 25% { transform: translate(-2%,3%); }
  50% { transform: translate(3%,-2%); } 75% { transform: translate(-3%,-3%); }
  100% { transform: translate(2%,2%); }
}

/* ================= loader ================= */
.loader {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-content: center; gap: 18px; justify-items: center;
  background: var(--cream);
  transition: opacity .7s var(--ease-out), visibility .7s;
}
.loader.is-done { opacity: 0; visibility: hidden; }
.loader__sun { color: var(--terracotta); animation: spin 9s linear infinite; }
.loader__word {
  font-family: var(--font-display);
  letter-spacing: .32em; text-indent: .32em; font-size: 15px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.spin-slow { animation: spin 26s linear infinite; }

/* ================= type ================= */
.eyebrow {
  font-size: 11px; font-weight: 700;
  letter-spacing: .28em; text-transform: uppercase;
  color: var(--terracotta);
}
.eyebrow--light { color: var(--ochre); }

h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.04; }
h2 { font-size: clamp(34px, 4.2vw, 54px); margin: 14px 0 18px; }
h2 em, .hero__title em {
  font-family: var(--font-accent); font-style: italic; font-weight: 400;
  color: var(--terracotta);
}
.card p { font-size: 16px; line-height: 1.65; margin-bottom: 14px; max-width: 46ch; }
.fine { font-size: 12.5px; opacity: .72; }
.fine--light { color: var(--cream); opacity: .65; margin-top: 14px; }
.fine--light a { color: var(--ochre); }

/* ================= buttons ================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 700; font-size: 13.5px;
  letter-spacing: .14em; text-transform: uppercase; text-decoration: none;
  padding: 15px 28px; border-radius: 999px; border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .35s var(--ease-out), box-shadow .35s, background .3s, color .3s;
}
.btn--primary {
  background: var(--terracotta); color: var(--cream-soft);
  box-shadow: 0 10px 26px -10px rgba(198, 90, 58, .55);
}
.btn--primary:hover { transform: translateY(-2px); background: #b34e30; }
.btn--ghost { background: transparent; color: var(--espresso); border-color: rgba(58, 39, 30, .35); }
.btn--ghost:hover { border-color: var(--espresso); transform: translateY(-2px); }
.btn--big { width: 100%; padding: 18px; }

/* ================= nav ================= */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(20px, 4vw, 48px);
  transition: color .5s;
  color: var(--espresso);
}
.nav::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to bottom, rgba(244, 239, 228, .9), rgba(244, 239, 228, 0));
  opacity: 1; transition: opacity .5s;
}
.nav.nav--night { color: var(--cream); }
.nav.nav--night::before { opacity: 0; }
.nav__brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-size: 17px; letter-spacing: .22em;
  color: inherit; text-decoration: none;
}
.nav__brand svg { color: var(--terracotta); }
.nav--night .nav__brand svg { color: var(--ochre); }
.nav__links { display: flex; gap: 30px; }
.nav__links a {
  color: inherit; text-decoration: none; font-size: 12.5px; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase; opacity: .8;
  transition: opacity .25s;
}
.nav__links a:hover { opacity: 1; }
.nav__cta { padding: 12px 22px; font-size: 12px; }
@media (max-width: 760px) { .nav__links { display: none; } }

/* ================= journey rail ================= */
.rail {
  position: fixed; right: clamp(14px, 2.6vw, 34px); top: 50%; z-index: 40;
  transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 22px;
  transition: color .5s; color: var(--espresso);
}
.rail--night { color: var(--cream); }
.rail__line {
  position: absolute; top: 8px; bottom: 8px; width: 1.5px;
  background: currentColor; opacity: .18;
}
.rail__fill {
  position: absolute; top: 0; left: 0; width: 100%; height: 0%;
  background: var(--terracotta);
}
.rail__dot {
  position: relative; z-index: 1;
  background: none; border: none; cursor: pointer; color: inherit;
  display: flex; align-items: center; padding: 4px;
}
.rail__dot i {
  display: block; width: 9px; height: 9px; border-radius: 2px;
  transform: rotate(45deg);
  background: var(--cream); border: 1.5px solid currentColor; opacity: .55;
  transition: all .3s var(--ease-out);
}
.rail__dot.is-active i {
  background: var(--terracotta); border-color: var(--terracotta);
  opacity: 1; transform: rotate(45deg) scale(1.35);
}
.rail__dot span {
  position: absolute; right: 24px; top: 50%; transform: translateY(-50%) translateX(6px);
  font-size: 10.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  white-space: nowrap; opacity: 0; pointer-events: none;
  transition: all .3s var(--ease-out);
}
.rail__dot:hover span, .rail__dot.is-active span { opacity: .85; transform: translateY(-50%) translateX(0); }
@media (max-width: 760px) { .rail { display: none; } }

/* ================= journey + panels ================= */
.journey { position: relative; height: 780vh; z-index: 2; }

.panel {
  position: fixed; inset: 0; z-index: 2;
  display: flex; align-items: center;
  padding: 0 clamp(20px, 6vw, 90px);
  opacity: 0; visibility: hidden; pointer-events: none;
}
.panel.is-on { visibility: visible; }
.panel.is-on .card, .panel.is-on .hero__inner { pointer-events: auto; }
.panel--left  { justify-content: flex-start; }
.panel--right { justify-content: flex-end; }

/* hero */
.panel--hero {
  justify-content: center; text-align: center;
  align-items: flex-start; padding-top: clamp(90px, 14vh, 170px);
}
.hero__inner { display: grid; justify-items: center; }
.hero__sun { color: var(--terracotta); margin-bottom: 22px; }
.hero__title {
  font-size: clamp(52px, 9.5vw, 128px);
  letter-spacing: .14em; text-indent: .14em;
  color: var(--espresso);
}
.hero__sub {
  font-family: var(--font-accent); font-style: italic;
  font-size: clamp(19px, 2.2vw, 26px); line-height: 1.45;
  margin: 18px 0 34px; color: rgba(58, 39, 30, .85);
}
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.hero__hint {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
  opacity: .6;
}
.hero__mouse {
  width: 20px; height: 32px; border: 1.5px solid var(--espresso); border-radius: 12px;
  position: relative;
}
.hero__mouse::after {
  content: ""; position: absolute; left: 50%; top: 6px; margin-left: -1.5px;
  width: 3px; height: 6px; border-radius: 3px; background: var(--terracotta);
  animation: wheel 1.8s ease-in-out infinite;
}
@keyframes wheel { 0%,100% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(10px); opacity: 0; } }

/* azulejo tile row, used as border band everywhere */
:root {
  --tile-band: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='192' height='48'%3E%3Crect width='192' height='48' fill='%23F4EFE4'/%3E%3Cg%3E%3Cpath d='M24 6 L29 19 L42 24 L29 29 L24 42 L19 29 L6 24 L19 19 Z' fill='%23C65A3A'/%3E%3Ccircle cx='24' cy='24' r='3' fill='%23F4EFE4'/%3E%3Ccircle cx='7' cy='7' r='2.5' fill='%23C65A3A' opacity='.55'/%3E%3Ccircle cx='41' cy='7' r='2.5' fill='%23C65A3A' opacity='.55'/%3E%3Ccircle cx='7' cy='41' r='2.5' fill='%23C65A3A' opacity='.55'/%3E%3Ccircle cx='41' cy='41' r='2.5' fill='%23C65A3A' opacity='.55'/%3E%3C/g%3E%3Cg transform='translate(48)'%3E%3Cpath d='M24 6 L29 19 L42 24 L29 29 L24 42 L19 29 L6 24 L19 19 Z' fill='%23E0A33A'/%3E%3Ccircle cx='24' cy='24' r='3' fill='%23F4EFE4'/%3E%3Ccircle cx='7' cy='7' r='2.5' fill='%23E0A33A' opacity='.55'/%3E%3Ccircle cx='41' cy='7' r='2.5' fill='%23E0A33A' opacity='.55'/%3E%3Ccircle cx='7' cy='41' r='2.5' fill='%23E0A33A' opacity='.55'/%3E%3Ccircle cx='41' cy='41' r='2.5' fill='%23E0A33A' opacity='.55'/%3E%3C/g%3E%3Cg transform='translate(96)'%3E%3Cpath d='M24 6 L29 19 L42 24 L29 29 L24 42 L19 29 L6 24 L19 19 Z' fill='%235C7FA1'/%3E%3Ccircle cx='24' cy='24' r='3' fill='%23F4EFE4'/%3E%3Ccircle cx='7' cy='7' r='2.5' fill='%235C7FA1' opacity='.55'/%3E%3Ccircle cx='41' cy='7' r='2.5' fill='%235C7FA1' opacity='.55'/%3E%3Ccircle cx='7' cy='41' r='2.5' fill='%235C7FA1' opacity='.55'/%3E%3Ccircle cx='41' cy='41' r='2.5' fill='%235C7FA1' opacity='.55'/%3E%3C/g%3E%3Cg transform='translate(144)'%3E%3Cpath d='M24 6 L29 19 L42 24 L29 29 L24 42 L19 29 L6 24 L19 19 Z' fill='%23B92E2E'/%3E%3Ccircle cx='24' cy='24' r='3' fill='%23F4EFE4'/%3E%3Ccircle cx='7' cy='7' r='2.5' fill='%23B92E2E' opacity='.55'/%3E%3Ccircle cx='41' cy='7' r='2.5' fill='%23B92E2E' opacity='.55'/%3E%3Ccircle cx='7' cy='41' r='2.5' fill='%23B92E2E' opacity='.55'/%3E%3Ccircle cx='41' cy='41' r='2.5' fill='%23B92E2E' opacity='.55'/%3E%3C/g%3E%3C/svg%3E");
}
.tile-band {
  height: 18px;
  background-image: var(--tile-band);
  background-size: auto 100%;
  background-repeat: repeat-x;
}

/* floating captions (the tunnel beat) */
.panel--caption { justify-content: center; }
.caption {
  font-family: var(--font-accent); font-style: italic;
  font-size: clamp(24px, 3.4vw, 40px);
  color: #F2D9B0;
  text-shadow: 0 2px 30px rgba(0, 0, 0, .55);
  text-align: center;
}
.caption--light { color: var(--cream); }

/* cards → postcards from the road */
.card {
  position: relative;
  width: min(560px, 100%);
  background: #FBF7EC;
  border: 1px solid rgba(58, 39, 30, .12);
  border-radius: 10px;
  padding: 46px 46px 34px;
  box-shadow:
    0 2px 0 rgba(58, 39, 30, .05),
    0 34px 70px -28px rgba(58, 39, 30, .5);
  overflow: hidden;
}
.card--wide { width: min(680px, 100%); }
.card__tiles {
  position: absolute; top: 0; left: 0; right: 0; height: 16px;
  background-image: var(--tile-band);
  background-size: auto 100%;
  background-repeat: repeat-x;
}
.panel--left .card { transform: rotate(-1.1deg); }
.panel--right .card { transform: rotate(1.1deg); }

/* stamp + postmark */
.postcard__stamp {
  position: absolute; top: 30px; right: 26px;
  width: 58px; height: 70px;
  display: grid; place-content: center; justify-items: center; gap: 4px;
  background: var(--cream);
  border: 2px dotted rgba(58, 39, 30, .4);
  border-radius: 3px;
  color: var(--terracotta);
  transform: rotate(3deg);
}
.postcard__stamp span {
  font-size: 8px; font-weight: 700; letter-spacing: .18em;
  color: var(--espresso); opacity: .7;
}
.postcard__postmark {
  position: absolute; top: 44px; right: 62px;
  width: 84px; height: 84px; border-radius: 50%;
  border: 2px solid rgba(58, 39, 30, .22);
  display: grid; place-content: center;
  transform: rotate(-14deg);
  pointer-events: none;
}
.postcard__postmark span {
  font-size: 8px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
  color: rgba(58, 39, 30, .45); text-align: center; line-height: 1.8; max-width: 60px;
}
.postcard__postmark::before, .postcard__postmark::after {
  content: ""; position: absolute; left: -28px; right: -20px; height: 2px;
  background: rgba(58, 39, 30, .18); border-radius: 2px;
}
.postcard__postmark::before { top: 32px; }
.postcard__postmark::after { top: 46px; }

/* postcard footer: signature + link to the full page */
.postcard__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  margin-top: 20px; padding-top: 16px;
  border-top: 1.5px dashed rgba(58, 39, 30, .22);
}
.postcard__sign {
  font-family: var(--font-accent); font-style: italic;
  font-size: 19px; color: var(--terracotta);
}
.btn--small { padding: 11px 20px; font-size: 11px; }

.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.chips li {
  font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  padding: 8px 14px; border-radius: 999px;
  border: 1px solid rgba(58, 39, 30, .25);
}

/* menu */
.menu { list-style: none; margin: 8px 0 20px; }
.menu li {
  display: flex; align-items: baseline; gap: 10px;
  padding: 8px 0; font-size: 16.5px;
}
.menu li > span:first-child { font-family: var(--font-display); letter-spacing: .04em; }
.menu li i { flex: 1; border-bottom: 1.5px dotted rgba(58, 39, 30, .3); }
.menu__note { font-family: var(--font-accent); font-style: italic; font-size: 15px; opacity: .75; }
.prices {
  display: flex; flex-wrap: wrap; gap: 8px 18px;
  padding: 14px 18px; border-radius: 12px;
  background: rgba(224, 163, 58, .16);
  font-size: 13px; letter-spacing: .06em; text-transform: uppercase; font-weight: 700;
  margin-bottom: 14px;
}
.prices b { color: var(--terracotta); }

/* events */
.events { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 26px; margin: 4px 0 16px; }
.event { padding: 12px 0; border-bottom: 1px solid rgba(58, 39, 30, .14); }
.event h3 { font-size: 19px; margin-bottom: 5px; }
.event p { font-size: 13.5px; line-height: 1.5; margin: 0; opacity: .85; }
@media (max-width: 560px) { .events { grid-template-columns: 1fr; } }

/* ================= booking ================= */
.book {
  position: relative; z-index: 2;
  padding: 16vh clamp(20px, 6vw, 90px) 14vh;
  color: var(--cream);
}
.book::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to bottom,
    rgba(26, 22, 44, 0) 0%,
    rgba(26, 22, 44, .55) 18%,
    rgba(26, 22, 44, .72) 60%,
    rgba(26, 22, 44, .85) 100%);
  pointer-events: none;
}
.book__grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(30px, 5vw, 80px);
  max-width: 1200px; margin: 0 auto; align-items: start;
}
@media (max-width: 900px) { .book__grid { grid-template-columns: 1fr; } }
.book__head h2 { color: var(--cream); }
.book__head h2 em { color: var(--ochre); }
.book__lede { line-height: 1.7; opacity: .85; max-width: 44ch; margin-bottom: 30px; }
.book__head > svg { margin-bottom: 16px; }

.book__faqs details {
  border-bottom: 1px solid rgba(244, 239, 228, .18);
  padding: 4px 0;
}
.book__faqs summary {
  cursor: pointer; list-style: none; position: relative;
  font-family: var(--font-display); font-size: 17px; letter-spacing: .03em;
  padding: 12px 30px 12px 0;
}
.book__faqs summary::-webkit-details-marker { display: none; }
.book__faqs summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  color: var(--ochre); font-size: 20px; transition: transform .3s;
}
.book__faqs details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.book__faqs details p { font-size: 14px; line-height: 1.65; opacity: .8; padding: 0 0 14px; }

.book__form {
  position: relative;
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px 14px;
  background: rgba(250, 246, 236, .07);
  border: 1px solid rgba(244, 239, 228, .16);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-radius: 20px; padding: 34px;
}
.field { display: grid; gap: 7px; }
.field--full { grid-column: 1 / -1; }
.field label {
  font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: rgba(244, 239, 228, .8);
}
.field label small { opacity: .55; text-transform: none; letter-spacing: .04em; }
.field input, .field select, .field textarea {
  font-family: var(--font-body); font-size: 15px; color: var(--cream);
  background: rgba(34, 30, 54, .45);
  border: 1px solid rgba(244, 239, 228, .22);
  border-radius: 10px; padding: 13px 14px; outline: none;
  transition: border-color .25s, box-shadow .25s;
  width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--ochre);
  box-shadow: 0 0 0 3px rgba(224, 163, 58, .22);
}
.field select { appearance: none; }
.field select option { color: var(--espresso); background: var(--cream); }
.field.is-invalid input, .field.is-invalid select { border-color: var(--faja); }
.field ::placeholder { color: rgba(244, 239, 228, .35); }
input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(.9); }
.book__form .btn--big { grid-column: 1 / -1; margin-top: 6px; }
.book__form .fine--light { grid-column: 1 / -1; text-align: center; margin-top: 0; }
.form__error { grid-column: 1 / -1; color: #F2A28E; font-size: 13px; font-weight: 700; }
@media (max-width: 560px) { .book__form { grid-template-columns: 1fr; padding: 26px 22px; } }

.form__success[hidden] { display: none; }
.form__success {
  position: absolute; inset: 0; border-radius: 20px;
  background: rgba(34, 30, 54, .92);
  display: grid; place-content: center; justify-items: center; gap: 12px;
  text-align: center; padding: 30px;
}
.form__success h3 { font-size: 34px; color: var(--cream); }
.form__success p { max-width: 34ch; line-height: 1.65; opacity: .85; }

/* ================= footer ================= */
.footer {
  position: relative; z-index: 2;
  background: var(--espresso); color: rgba(244, 239, 228, .82);
  padding: 90px clamp(20px, 6vw, 90px) 34px;
}
.footer__plate {
  position: absolute; top: -46px; left: 50%; transform: translateX(-50%);
  width: 112px; height: 112px; border-radius: 50%;
  background: var(--cream); border: 7px solid var(--terracotta);
  display: grid; place-content: center; text-align: center;
  font-family: var(--font-accent); font-style: italic; font-size: 16px;
  color: var(--terracotta); line-height: 1.2;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .6);
}
.footer__cols {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 34px; max-width: 1100px; margin: 30px auto 60px;
}
@media (max-width: 800px) { .footer__cols { grid-template-columns: 1fr 1fr; } }
.footer__brand { font-family: var(--font-display); font-size: 22px; letter-spacing: .22em; color: var(--cream); margin-bottom: 12px; }
.footer__cols p { font-size: 14px; line-height: 1.7; }
.footer__cols h4 {
  font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--ochre); margin-bottom: 14px;
}
.footer__cols a { display: block; color: inherit; text-decoration: none; font-size: 14px; padding: 4px 0; opacity: .85; }
.footer__cols a:hover { opacity: 1; color: var(--cream); }
.footer__legal { text-align: center; font-size: 12px; opacity: .5; border-top: 1px solid rgba(244, 239, 228, .12); padding-top: 26px; max-width: 1100px; margin: 0 auto; }

/* ================= reduced motion / no webgl ================= */
@media (prefers-reduced-motion: reduce) {
  .spin-slow, .loader__sun, .grain, .hero__mouse::after { animation: none; }
  html { scroll-behavior: auto; }
}
body.no-webgl #scene, body.no-webgl .grain { display: none; }
body.no-webgl .journey { height: auto; }
body.no-webgl .panel {
  position: relative; inset: auto; opacity: 1; visibility: visible;
  pointer-events: auto; min-height: 100vh;
}
body.no-webgl { background: var(--cream); }
body.no-webgl .book { background: var(--night); }
