:root {
  --warm-beige-gray: #D8D1CB;
  --light-stone: #E9E4E0;
  --soft-ivory: #F7F4F1;
  --pure-white: #FFFFFF;
  --signature-red: #A32024;
  --deep-black: #111111;
  --charcoal: #2B2B2B;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--soft-ivory);
  color: var(--deep-black);
  font-family: 'Montserrat', sans-serif;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg {
  display: block;
}

.gateway-page {
  position: relative;
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--soft-ivory);
  padding: 0 1.5rem;
  color: var(--deep-black);
}

.ambient-layer {
  pointer-events: none;
  position: absolute;
  inset: 0;
}

.ambient {
  position: absolute;
  border-radius: 9999px;
  filter: blur(64px);
}

.ambient-one {
  left: 50%;
  top: 50%;
  height: 34rem;
  width: 34rem;
  background: rgba(163, 32, 36, 0.06);
  animation: ambientFloatOne 10s ease-in-out infinite;
}

.ambient-two {
  left: 18%;
  top: 22%;
  height: 10rem;
  width: 10rem;
  background: var(--light-stone);
  animation: ambientFloatTwo 11s ease-in-out infinite;
}

.ambient-three {
  right: 20%;
  bottom: 18%;
  height: 11rem;
  width: 11rem;
  background: rgba(216, 209, 203, 0.7);
  animation: ambientFloatThree 12s ease-in-out infinite;
}

.gateway-section {
  position: relative;
  width: 100%;
  max-width: 48rem;
}

.gateway-card {
  position: relative;
  overflow: hidden;
  border-radius: 40px;
  border: 1px solid var(--warm-beige-gray);
  background: rgba(247, 244, 241, 0.92);
  padding: 4rem 2rem;
  text-align: center;
  box-shadow: 0 22px 60px rgba(17, 17, 17, 0.06);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.35), rgba(247, 244, 241, 0.2), rgba(163, 32, 36, 0.03));
}

.logo-block {
  position: relative;
  z-index: 1;
  width: fit-content;
  margin: 0 auto 2.5rem;
  opacity: 0;
}

.logo-glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle, rgba(163, 32, 36, 0.12), rgba(163, 32, 36, 0.03) 44%, rgba(163, 32, 36, 0) 72%);
  filter: blur(40px);
}

.logo-img {
  height: 2.5rem;
  width: auto;
  user-select: none;
  animation: logoIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both,
    logoFloat 6s ease-in-out 1.1s infinite;
}

.welcome-block {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  opacity: 0;
}

.welcome-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(163, 32, 36, 0.16) 0%, rgba(163, 32, 36, 0.05) 38%, rgba(163, 32, 36, 0) 72%);
  filter: blur(40px);
  animation: softBreath 4.5s ease-in-out 1s infinite;
}

.welcome-wrap {
  position: relative;
  width: min(540px, 88vw);
  margin: 0 auto;
}

.welcome-svg {
  position: relative;
  width: 100%;
  height: auto;
  overflow: visible;
}

.welcome-stroke,
.welcome-fill {
  font-family: 'Homemade Apple', cursive;
  font-size: 86px;
  letter-spacing: 0;
  text-anchor: middle;
  dominant-baseline: middle;
}

.welcome-stroke {
  fill: none;
  stroke: url(#welcomeInk);
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  filter: drop-shadow(0 8px 18px rgba(163, 32, 36, 0.06));
  animation: drawStroke 1.8s cubic-bezier(0.65, 0, 0.35, 1) 0.2s forwards;
}

.welcome-fill {
  fill: url(#welcomeInk);
  fill-opacity: 0;
  filter: drop-shadow(0 10px 24px rgba(163, 32, 36, 0.06));
  transform-origin: center;
  animation: fillIn 1.9s ease 0.2s forwards, welcomeFloat 6s ease-in-out 2.1s infinite;
}

.gateway-heading {
  position: relative;
  z-index: 1;
  margin: 0.5rem 0 0;
  color: var(--charcoal);
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.2;
  opacity: 0;
}

.gateway-copy {
  position: relative;
  z-index: 1;
  max-width: 36rem;
  margin: 1.5rem auto 0;
  color: var(--charcoal);
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.75;
  opacity: 0;
}

.cta-wrap {
  position: relative;
  z-index: 1;
  margin-top: 2.5rem;
  opacity: 0;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: var(--deep-black);
  padding: 0.75rem 1.5rem;
  color: var(--pure-white);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}

.cta-button:hover,
.cta-button:focus-visible {
  transform: translateY(-1px);
  background: var(--charcoal);
  box-shadow: 0 14px 28px rgba(17, 17, 17, 0.12);
  outline: none;
}

.cta-arrow {
  margin-right: 0.5rem;
  transition: transform 0.25s ease;
}

.cta-button:hover .cta-arrow,
.cta-button:focus-visible .cta-arrow {
  transform: translateX(3px);
}

.reveal-logo {
  animation: fadeUp 0.7s ease 0.05s forwards;
}

.reveal-welcome {
  animation: fadeUp 0.9s ease 0.14s forwards;
}

.reveal-heading {
  animation: fadeUp 0.8s ease 1.3s forwards;
}

.reveal-copy {
  animation: fadeUp 0.8s ease 1.45s forwards;
}

.reveal-cta {
  animation: fadeUp 0.8s ease 1.6s forwards;
}

@keyframes fadeUp {
  0% {
    opacity: 0;
    transform: translateY(14px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drawStroke {
  from {
    stroke-dashoffset: 1;
  }
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes fillIn {
  0%,
  78% {
    fill-opacity: 0;
  }
  100% {
    fill-opacity: 1;
  }
}

@keyframes welcomeFloat {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-2px);
  }
}

@keyframes softBreath {
  0%,
  100% {
    opacity: 0.2;
    transform: scale(0.98);
  }
  50% {
    opacity: 0.42;
    transform: scale(1.03);
  }
}

@keyframes logoIn {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
    filter: blur(4px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes logoFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

@keyframes ambientFloatOne {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    transform: translate(-50%, calc(-50% - 10px)) scale(1.03);
  }
}

@keyframes ambientFloatTwo {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes ambientFloatThree {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(6px);
  }
}

@media (min-width: 768px) {
  .gateway-card {
    padding: 5rem 3.5rem;
  }

  .logo-img {
    height: 3rem;
  }

  .gateway-heading {
    font-size: 1.875rem;
  }

  .gateway-copy {
    font-size: 1rem;
  }
}

@media (max-width: 640px) {
  .gateway-page {
    padding: 0 1rem;
  }

  .gateway-card {
    border-radius: 32px;
    padding: 3.25rem 1.35rem;
  }

  .welcome-wrap {
    width: min(100%, 420px);
  }

  .welcome-stroke,
  .welcome-fill {
    font-size: 64px;
  }
}

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