@font-face {
  font-family: "Inter";
  src: url("assets/fonts/inter-400-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("assets/fonts/inter-600-latin.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Playfair Display";
  src: url("assets/fonts/playfair-display-700-latin.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --black: #030303;
  --charcoal: #0b0b0c;
  --white: #f2eee8;
  --muted: #98928a;
  --gold: #c99b54;
  --gold-light: #ebc989;
  --gold-dark: #785728;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Inter", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--black);
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% 42%, rgba(126, 92, 43, 0.08), transparent 31%),
    radial-gradient(circle at 50% 50%, #101011 0%, #070708 46%, #020202 100%);
  color: var(--white);
  font-family: var(--sans);
}

body.modal-open {
  overflow: hidden;
}

body::before {
  position: fixed;
  z-index: 4;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.42'/%3E%3C/svg%3E");
  content: "";
  opacity: 0.025;
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
}

.sequence-field {
  position: fixed;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  filter: drop-shadow(0 0 6px rgba(213, 167, 91, 0.16));
  animation: field-in 2.4s 0.8s ease forwards;
  pointer-events: none;
}

.ambient {
  position: fixed;
  z-index: 1;
  width: 42vw;
  height: 42vw;
  border: 1px solid rgba(213, 167, 91, 0.13);
  border-radius: 50%;
  box-shadow: 0 0 55px rgba(213, 167, 91, 0.025);
  opacity: 0.78;
  pointer-events: none;
}

.ambient::before,
.ambient::after {
  position: absolute;
  border: 1px solid rgba(213, 167, 91, 0.1);
  border-radius: inherit;
  content: "";
}

.ambient::before {
  inset: 9%;
}

.ambient::after {
  inset: 23%;
}

.ambient--left {
  top: -20vw;
  left: -22vw;
}

.ambient--right {
  right: -25vw;
  bottom: -24vw;
}

.home {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: clamp(36px, 7vh, 72px) 24px;
}

.home__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(100%, 900px);
  text-align: center;
}

.brand-mark {
  position: relative;
  width: clamp(180px, 24vh, 250px);
  margin: 0 0 clamp(26px, 4.5vh, 48px);
  opacity: 0;
  filter: drop-shadow(0 20px 35px rgba(0, 0, 0, 0.65));
  animation: mark-in 1.4s 0.1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.brand-mark::after {
  position: absolute;
  z-index: -1;
  inset: 20%;
  border-radius: 50%;
  background: rgba(205, 153, 74, 0.18);
  content: "";
  filter: blur(35px);
}

.brand-mark__image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 50%;
  mix-blend-mode: screen;
}

.brand-mark__orbit {
  position: absolute;
  z-index: 2;
  inset: -10px;
  border: 1px solid rgba(236, 196, 128, 0.16);
  border-color: rgba(236, 196, 128, 0.24) transparent rgba(236, 196, 128, 0.07);
  border-radius: 50%;
  animation: orbit 14s linear infinite;
}

.brand-mark__orbit::before {
  position: absolute;
  top: 12%;
  right: 9%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold-light);
  box-shadow: 0 0 14px 3px rgba(235, 201, 137, 0.55);
  content: "";
}

.home__copy {
  display: flex;
  flex-direction: column;
  align-items: center;
}

h1 {
  max-width: 880px;
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(1.65rem, 3.25vw, 3.5rem);
  font-weight: 400;
  letter-spacing: 0.17em;
  line-height: 1.25;
  text-transform: uppercase;
  text-wrap: balance;
  opacity: 0;
  animation: copy-in 1.2s 0.78s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

h1 span,
h1 em {
  display: block;
}

h1 em {
  margin-top: 0.08em;
  color: var(--gold-light);
  font-style: normal;
  text-shadow: 0 0 32px rgba(204, 153, 76, 0.16);
}

.home__translation {
  margin: 17px 0 0;
  color: var(--muted);
  font-size: clamp(0.72rem, 1vw, 0.86rem);
  letter-spacing: 0.17em;
  line-height: 1.6;
  text-transform: uppercase;
  opacity: 0;
  animation: copy-in 1s 0.95s ease forwards;
}

.sequence-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 186px;
  margin-top: clamp(29px, 5vh, 48px);
  padding: 15px 24px;
  overflow: hidden;
  border: 1px solid rgba(233, 194, 127, 0.58);
  background: linear-gradient(110deg, #9b7037 0%, #d7ac66 49%, #a77a3c 100%);
  box-shadow: 0 8px 35px rgba(157, 110, 46, 0.12), inset 0 1px rgba(255, 244, 210, 0.35);
  color: #0a0805;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0;
  transition: transform 400ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 400ms ease, filter 400ms ease;
  animation: copy-in 1s 1.08s ease forwards;
}

.sequence-button::before {
  position: absolute;
  top: -100%;
  left: -30%;
  width: 26px;
  height: 300%;
  background: rgba(255, 255, 255, 0.32);
  content: "";
  filter: blur(8px);
  transform: rotate(28deg);
  transition: left 700ms ease;
}

.sequence-button:hover,
.sequence-button:focus-visible {
  filter: brightness(1.1);
  outline: none;
  transform: translateY(-3px);
  box-shadow: 0 14px 46px rgba(206, 157, 82, 0.28), 0 0 0 4px rgba(204, 153, 76, 0.06);
}

.sequence-button:hover::before,
.sequence-button:focus-visible::before {
  left: 115%;
}

.sequence-modal[hidden],
.sequence-form[hidden],
.sequence-form__success[hidden] {
  display: none;
}

.sequence-modal {
  position: fixed;
  z-index: 10;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
}

.sequence-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.76);
  backdrop-filter: blur(14px);
  animation: backdrop-in 500ms ease both;
}

.sequence-modal__panel {
  position: relative;
  width: min(100%, 520px);
  max-height: calc(100svh - 40px);
  padding: clamp(34px, 6vw, 58px);
  overflow-y: auto;
  border: 1px solid rgba(224, 181, 108, 0.3);
  background:
    linear-gradient(145deg, rgba(30, 27, 22, 0.96), rgba(7, 7, 8, 0.98)),
    var(--charcoal);
  box-shadow: 0 35px 100px rgba(0, 0, 0, 0.8), 0 0 50px rgba(190, 139, 65, 0.08);
  text-align: center;
  animation: modal-in 600ms cubic-bezier(0.22, 1, 0.36, 1) both;
  scrollbar-width: thin;
  scrollbar-color: var(--gold-dark) transparent;
}

.sequence-modal__panel::before,
.sequence-modal__panel::after {
  position: absolute;
  width: 44px;
  height: 44px;
  border-color: rgba(233, 197, 134, 0.55);
  content: "";
  pointer-events: none;
}

.sequence-modal__panel::before {
  top: 10px;
  left: 10px;
  border-top: 1px solid;
  border-left: 1px solid;
}

.sequence-modal__panel::after {
  right: 10px;
  bottom: 10px;
  border-right: 1px solid;
  border-bottom: 1px solid;
}

.sequence-modal__close {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(242, 238, 232, 0.55);
  cursor: pointer;
  font: 300 1.5rem/1 var(--sans);
  transition: color 250ms ease, transform 250ms ease;
}

.sequence-modal__close:hover,
.sequence-modal__close:focus-visible {
  color: var(--gold-light);
  outline: none;
  transform: rotate(90deg);
}

.sequence-modal__eyebrow {
  margin: 0 0 18px;
  color: var(--gold);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.sequence-modal h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.9rem, 5vw, 3rem);
  line-height: 1.08;
  text-wrap: balance;
}

.sequence-modal__lead {
  margin: 10px 0 0;
  color: var(--gold-light);
  font-family: var(--serif);
  font-size: clamp(1.1rem, 3vw, 1.35rem);
  font-style: italic;
}

.sequence-modal__divider {
  width: 42px;
  height: 1px;
  margin: 26px auto;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.sequence-modal__spanish,
.sequence-form__intro,
.sequence-form__success p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  line-height: 1.8;
}

.sequence-modal__waiting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 34px;
  color: rgba(242, 238, 232, 0.48);
  font-size: 0.53rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.sequence-modal__progress {
  height: 1px;
  margin-top: 9px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.09);
}

.sequence-modal__progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold-light));
  transform-origin: left;
  animation: sequence-progress 10s linear forwards;
}

.sequence-form {
  display: grid;
  gap: 18px;
  text-align: left;
  animation: form-in 700ms ease both;
}

.sequence-form h2,
.sequence-form__intro,
.sequence-form__success {
  text-align: center;
}

.sequence-form__intro {
  margin: -5px 0 8px;
}

.sequence-form__field {
  display: grid;
  gap: 8px;
  color: rgba(242, 238, 232, 0.54);
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.sequence-form__field input {
  width: 100%;
  min-height: 48px;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid rgba(224, 181, 108, 0.28);
  border-radius: 0;
  background: transparent;
  color: var(--white);
  font: 400 1rem/1.2 var(--sans);
  outline: none;
  transition: border-color 250ms ease, box-shadow 250ms ease;
}

.sequence-form__field input:focus {
  border-color: var(--gold-light);
  box-shadow: 0 8px 14px -14px var(--gold-light);
}

.sequence-form__submit {
  min-height: 52px;
  margin-top: 10px;
  border: 1px solid rgba(233, 194, 127, 0.58);
  background: linear-gradient(110deg, #9b7037, #d7ac66 49%, #a77a3c);
  color: #0a0805;
  cursor: pointer;
  font: 600 0.63rem/1 var(--sans);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: filter 250ms ease, transform 250ms ease;
}

.sequence-form__submit:hover,
.sequence-form__submit:focus-visible {
  filter: brightness(1.12);
  outline: none;
  transform: translateY(-2px);
}

.sequence-form__success {
  padding: 34px 0;
  animation: form-in 700ms ease both;
}

.sequence-form__success h2 {
  margin-inline: auto;
}

.sequence-modal.is-complete {
  place-items: center;
}

.sequence-modal.is-complete .sequence-modal__panel {
  max-height: calc(100svh - 40px);
}

@keyframes mark-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes copy-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes orbit {
  to {
    transform: rotate(360deg);
  }
}

@keyframes field-in {
  to {
    opacity: 1;
  }
}

@keyframes backdrop-in {
  from {
    opacity: 0;
  }
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.97);
  }
}

@keyframes form-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

@keyframes sequence-progress {
  to {
    transform: scaleX(0);
  }
}

@media (max-width: 600px) {
  .home {
    padding: max(24px, env(safe-area-inset-top)) 20px max(30px, env(safe-area-inset-bottom));
  }

  .brand-mark {
    width: clamp(136px, 21vh, 172px);
    margin-bottom: clamp(22px, 3.5vh, 34px);
  }

  h1 {
    max-width: 360px;
    font-size: clamp(1.35rem, 6.8vw, 2rem);
    letter-spacing: 0.13em;
    line-height: 1.35;
  }

  .home__translation {
    max-width: 290px;
    letter-spacing: 0.12em;
  }

  .sequence-button {
    min-width: 174px;
    margin-top: 30px;
    min-height: 52px;
  }

  .sequence-modal {
    align-items: center;
    padding: 12px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }

  .sequence-modal__panel {
    width: 100%;
    max-height: calc(100svh - 24px);
    padding: 42px 24px 30px;
  }

  .sequence-modal h2 {
    font-size: clamp(1.8rem, 8.5vw, 2.45rem);
  }

  .sequence-form {
    gap: 14px;
  }

  .sequence-modal.is-complete {
    align-items: center;
  }

  .sequence-modal.is-complete .sequence-modal__panel {
    padding-block: 48px;
  }
}

@media (max-width: 380px), (max-height: 680px) {
  .brand-mark {
    width: 130px;
    margin-bottom: 20px;
  }

  h1 {
    font-size: 1.28rem;
    letter-spacing: 0.11em;
  }

  .home__translation {
    margin-top: 12px;
    font-size: 0.65rem;
  }

  .sequence-button {
    margin-top: 22px;
  }

  .sequence-modal__panel {
    padding-top: 38px;
  }
}

@media (max-height: 720px) and (min-width: 601px) {
  .brand-mark {
    width: 180px;
    margin-bottom: 24px;
  }

  .sequence-button {
    margin-top: 26px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
