@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("assets/fonts/barlow-condensed.woff2") format("woff2");
}

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

:root {
  --bg: #1a0a0a;
  --gold: #ffc43a;
  --accent: #ffbb21;
  --accent-light: #ffd34c;
  --text: #fff8f1;
  --muted: #ddc6be;
  --border: rgba(207, 154, 123, .22);
  --font-body: "Inter", Arial, sans-serif;
  --font-display: "Barlow Condensed", Impact, sans-serif;
}

*, ::before, ::after {
  box-sizing: border-box;
}

html, body {
  margin: 0px;
  min-height: 100%;
}

body {
  min-width: min(320px, 100%);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

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

.bridge-page {
  position: relative;
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;
  padding: 34px 22px 24px;
  background: radial-gradient(at 16% 20%, rgba(169, 30, 39, 0.17), transparent 46%), radial-gradient(at 83% 80%, rgba(255, 178, 57, 0.09), transparent 46%), linear-gradient(145deg, #1e0606 0%, #1a0a0a 100%);
}

.page-link {
  position: absolute;
  inset: 0;
}

/* Keep the visible CTA focusable and pass other clicks to the link underneath. */
.age-card, .page-footer {
  pointer-events: none;
}

.ambient, .background-grid {
  position: absolute;
  pointer-events: none;
}

.ambient {
  width: 620px;
  height: 620px;
  border-radius: 50%;
  filter: blur(20px);
}

.ambient-top {
  top: -390px;
  right: -240px;
  background: radial-gradient(circle, rgba(181, 43, 49, 0.25), transparent 67%);
}

.ambient-bottom {
  bottom: -430px;
  left: -250px;
  background: radial-gradient(circle, rgba(121, 25, 27, 0.3), transparent 68%);
}

.background-grid {
  inset: 0px;
  opacity: 0.35;
  background-image: linear-gradient(rgba(207, 128, 91, 0.055) 1px, transparent 1px), linear-gradient(90deg, rgba(207, 128, 91, 0.055) 1px, transparent 1px);
  background-size: 52px 52px;
  -webkit-mask-image: radial-gradient(black 12%, transparent 73%);
  mask-image: radial-gradient(black 12%, transparent 73%);
}

.age-card {
  position: relative;
  z-index: 1;
  width: min(100%, 820px);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 23px;
  background: linear-gradient(130deg, rgba(117, 28, 33, 0.37), transparent 38%), linear-gradient(110deg, #3d0808 0%, #2b0c0c 53%, #1a0a0a 100%);
  box-shadow: rgba(0, 0, 0, 0.58) 0px 32px 90px, rgba(255, 255, 255, 0.024) 0px 0px 0px 1px inset;
  animation: 650ms cubic-bezier(0.2, 0.9, 0.2, 1) 0s 1 normal both running card-entrance;
}

.age-card::before {
  content: "";
  position: absolute;
  top: 0px;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 210, 98, 0.65), transparent);
  pointer-events: none;
}

.card-light {
  position: absolute;
  top: -150px;
  right: -120px;
  width: 490px;
  height: 490px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(197, 54, 50, 0.19), transparent 63%);
  pointer-events: none;
}

.card-header {
  position: relative;
  z-index: 3;
  display: flex;
  min-height: 105px;
  align-items: center;
  padding: 22px 38px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
}

.brand-logo {
  display: block;
  width: 190px;
  max-width: 60%;
  max-height: 66px;
  object-fit: contain;
  object-position: left center;
}

.card-body {
  position: relative;
  display: grid;
  grid-template-columns: 1.22fr 0.78fr;
  align-items: center;
  min-height: 380px;
}

.card-copy {
  position: relative;
  z-index: 3;
  padding: 35px 0px 42px 44px;
}

.age-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  color: #ead2c0;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.115em;
}

.age-medallion {
  display: inline-grid;
  width: 47px;
  height: 47px;
  place-items: center;
  border: 2px solid var(--gold);
  border-radius: 50%;
  color: var(--gold);
  background: rgba(255, 196, 58, 0.067);
  box-shadow: rgba(255, 196, 58, 0.035) 0px 0px 0px 7px;
  font-family: var(--font-display);
  font-size: 1.38rem;
  font-weight: 900;
  letter-spacing: 0px;
}

h1 {
  max-width: 410px;
  margin: 0px 0px 16px;
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 5vw, 4.05rem);
  font-weight: 900;
  line-height: 0.96;
  letter-spacing: -0.015em;
}

h1 span {
  color: var(--accent-light);
}

.description {
  max-width: 375px;
  margin: 0px 0px 28px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

.description strong {
  color: var(--text);
}

.confirm-button {
  --cta-cycle: 3.6s;
  position: relative;
  display: flex;
  width: min(100%, 370px);
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 12px 11px 22px;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(160deg, #ffe77a, #ffcf42 52%, var(--accent));
  color: #2b1205;
  font-size: 0.83rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-align: center;
  box-shadow: 0 12px 28px rgba(239, 170, 30, 0.18);
  pointer-events: auto;
  animation: button-pulse var(--cta-cycle) ease-out infinite;
  transition: transform 0.18s, filter 0.18s;
}

.confirm-button::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 34%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 240, 0.7), transparent);
  transform: translateX(-150%) skewX(-18deg);
  pointer-events: none;
  animation: button-sheen var(--cta-cycle) ease-in-out infinite;
}

.confirm-button > span {
  position: relative;
}

@media (hover: hover) {
  .confirm-button:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
  }
}

.confirm-button:active {
  transform: scale(0.985);
}

.confirm-button:focus-visible {
  outline: white solid 3px;
  outline-offset: 5px;
}

.button-arrow {
  display: grid;
  width: 35px;
  height: 35px;
  flex: 0 0 35px;
  overflow: hidden;
  border-radius: 8px;
  background: #501b11;
  color: #ffe889;
}

.arrow-glyph {
  position: relative;
  animation: arrow-slide var(--cta-cycle) cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.arrow-glyph::before, .arrow-glyph::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 19px;
  height: 14px;
  transform: translate(-50%, -50%);
  background: currentColor;
  clip-path: polygon(0 39%, 65% 39%, 43% 13%, 54% 0, 100% 50%, 54% 100%, 43% 87%, 65% 61%, 0 61%);
}

/* The second arrow enters as the first leaves the tile. */
.arrow-glyph::before {
  left: -50%;
}

.destination-note {
  margin: 12px 0px 0px;
  color: #c0a89c;
  font-size: 0.67rem;
  line-height: 1.6;
}

.destination-note strong {
  color: #ebd7c9;
  font-weight: 600;
}

.mascot-area {
  position: relative;
  align-self: stretch;
  min-width: 0px;
  min-height: 380px;
  isolation: isolate;
}

.mascot-glow {
  position: absolute;
  z-index: -2;
  top: 15%;
  right: -7%;
  width: 310px;
  height: 310px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(229, 154, 56, 0.22), rgba(194, 38, 34, 0.12) 45%, transparent 70%);
  filter: blur(7px);
}

.mascot-ring {
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 50%;
  width: 315px;
  height: 315px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.mascot-ring-one {
  border: 1px solid rgba(239, 174, 85, 0.18);
}

.mascot-ring-two {
  width: 245px;
  height: 245px;
  border: 1px solid rgba(215, 137, 89, 0.19);
}

.mascot {
  aspect-ratio: 1125 / 1398;
  object-fit: cover;
  object-position: center top;
  padding-top: 4px;
  position: absolute;
  z-index: 1;
  right: -24px;
  bottom: -90px;
  width: 350px;
  max-width: none;
  filter: drop-shadow(rgba(0, 0, 0, 0.3) -18px 18px 22px);
  pointer-events: none;
}

.floating-asset {
  position: absolute;
  z-index: 3;
  width: 83px;
  height: 83px;
  opacity: 0.96;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(rgba(0, 0, 0, 0.35) 0px 10px 18px);
}

.floating-asset svg {
  display: block;
  width: 100%;
  height: 100%;
}

.floating-animalitos {
  top: 35px;
  left: 4px;
  animation: 6s ease-in-out 0s infinite normal none running float-left;
}

.floating-loteria {
  right: 15px;
  bottom: 30px;
  animation: 7s ease-in-out 0s infinite normal none running float-right;
}

.card-footer {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 17px 38px 19px;
  border-top: 1px solid rgba(255, 255, 255, 0.086);
  background: rgba(26, 9, 9, 0.43);
}

.responsibility-icon {
  display: grid;
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  place-items: center;
  border: 1px solid rgba(255, 196, 58, 0.6);
  border-radius: 50%;
  color: var(--gold);
  font-size: 0.63rem;
  font-weight: 800;
}

.card-footer p {
  margin: 0px;
  color: #c8b0a5;
  font-size: 0.68rem;
  line-height: 1.6;
}

.page-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 20px;
  color: #b59b90;
  font-size: 0.68rem;
}

.footer-separator {
  color: var(--gold);
}

@keyframes card-entrance {
  0% {
    opacity: 0;
    transform: translateY(16px) scale(0.988);
  }
  100% {
    opacity: 1;
    transform: translateY(0px) scale(1);
  }
}

@keyframes button-pulse {
  0%, 12% {
    box-shadow: 0 0 0 0 rgba(255, 188, 44, 0.42), 0 12px 28px rgba(239, 170, 30, 0.18);
  }
  56%, 100% {
    box-shadow: 0 0 0 12px rgba(255, 188, 44, 0), 0 12px 28px rgba(239, 170, 30, 0.18);
  }
}

@keyframes button-sheen {
  0%, 8% {
    transform: translateX(-150%) skewX(-18deg);
  }
  45%, 100% {
    transform: translateX(420%) skewX(-18deg);
  }
}

@keyframes arrow-slide {
  0%, 32% {
    transform: translateX(0);
  }
  49%, 100% {
    transform: translateX(100%);
  }
}

@keyframes float-left {
  0%, 100% {
    transform: translateY(0px) rotate(-12deg);
  }
  50% {
    transform: translateY(-13px) rotate(-5deg);
  }
}

@keyframes float-right {
  0%, 100% {
    transform: translateY(0px) rotate(10deg);
  }
  50% {
    transform: translateY(-18px) rotate(3deg);
  }
}

@media (max-width: 640px) {
  .bridge-page {
    padding: 16px 14px max(18px, env(safe-area-inset-bottom));
  }
  .age-card {
    width: 100%;
    max-width: 450px;
    border-radius: 18px;
  }
  .card-header {
    min-height: 78px;
    padding: 15px 20px;
  }
  .brand-logo {
    width: 153px;
    max-height: 48px;
  }
  .card-body {
    display: flex;
    flex-direction: column;
    min-height: 0px;
  }
  .mascot-area {
    order: -1;
    width: 100%;
    min-height: 165px;
    height: 165px;
    flex: 0 0 165px;
    overflow: hidden;
  }
  .mascot-glow {
    top: -45px;
    right: calc(50% - 135px);
    width: 270px;
    height: 270px;
  }
  .mascot-ring {
    top: 55%;
    width: 240px;
    height: 240px;
  }
  .mascot-ring-two {
    width: 180px;
    height: 180px;
  }
  .mascot {
    width: 213px;
    right: 50%;
    bottom: -96px;
    transform: translateX(50%);
  }
  .floating-asset {
    width: 69px;
    height: 69px;
    opacity: 1;
  }
  .floating-animalitos {
    top: 50px;
    left: 16px;
  }
  .floating-loteria {
    top: 48px;
    right: 16px;
    bottom: auto;
  }
  .card-copy {
    width: 100%;
    padding: 13px 23px 24px;
    text-align: center;
  }
  .age-label {
    justify-content: center;
    margin-bottom: 15px;
    font-size: 0.59rem;
  }
  .age-medallion {
    width: 40px;
    height: 40px;
    font-size: 1.18rem;
  }
  h1 {
    max-width: none;
    margin-bottom: 11px;
    font-size: clamp(2.52rem, 10.5vw, 3.15rem);
  }
  .description {
    margin: 0px auto 19px;
    font-size: 0.81rem;
    line-height: 1.55;
  }
  .confirm-button {
    width: 100%;
    min-height: 55px;
    padding-left: 14px;
    font-size: 0.75rem;
  }
  .button-arrow {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }
  .destination-note {
    margin-top: 10px;
  }
  .card-footer {
    padding: 13px 19px 15px;
  }
  .card-footer p {
    font-size: 0.62rem;
  }
  .page-footer {
    margin-top: 15px;
    font-size: 0.61rem;
  }
}

@media (max-width: 370px) {
  .card-header {
    padding-inline: 15px;
  }
  .brand-logo {
    width: 138px;
  }
  .card-copy {
    padding-inline: 18px;
  }
  h1 {
    font-size: 2.35rem;
  }
  .mascot-area {
    min-height: 145px;
    height: 145px;
    flex-basis: 145px;
  }
  .mascot {
    width: 196px;
    bottom: -88px;
  }
  .floating-asset {
    width: 60px;
    height: 60px;
  }
  .floating-animalitos {
    left: 8px;
    top: 43px;
  }
  .floating-loteria {
    right: 8px;
    top: 43px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .age-card, .confirm-button, .confirm-button::before, .arrow-glyph, .floating-asset {
    animation: none;
  }
  .confirm-button {
    transition: none;
  }
  .confirm-button:hover, .confirm-button:active {
    transform: none;
  }
}
