/* ============================================================
   Base
   ============================================================ */

:root {
  --ink: #f5f1ee;
  --muted: rgba(245, 241, 238, .72);
  --bg: #2a2522;
  color-scheme: dark;
}

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

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

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

@keyframes rise {
  from { opacity: 0; translate: 0 14px; }
  to   { opacity: 1; translate: none; }
}

/* ============================================================
   Profile
   ============================================================ */

.profile {
  position: fixed;
  inset: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  isolation: isolate;
}

.profile__photo {
  position: absolute;
  inset: -3%;
  background: url("assets/img/photo.webp") 50% 0% / auto 140% no-repeat, var(--bg);
  filter: blur(1.5px) brightness(.82) saturate(.95);
  transform-origin: 50% 30%;
  animation: photo-in 1.4s ease both, kenburns 30s 1.4s ease-in-out infinite alternate;
}
@keyframes photo-in { from { scale: 1.08; } to { scale: 1; } }

/* wide screens (desktop): fill the whole width instead of leaving dark sides */
@media (min-aspect-ratio: 3/4) {
  .profile__photo { background-size: cover; background-position: 50% 4%; }
}

/* safety net: if the browser never runs the entrance animations, show everything anyway */
.settled .profile__avatar,
.settled .profile__name,
.settled .profile__btn { animation: none; }
@keyframes kenburns {
  from { transform: scale(1.02) translate3d(0, 0, 0); }
  to   { transform: scale(1.14) translate3d(-1.5%, 1%, 0); }
}

.profile__shade {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 90% 60% at 50% 50%, rgba(0, 0, 0, .05), rgba(0, 0, 0, .35));
}

.profile__content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
}

.profile__avatar {
  --size: clamp(124px, 36vw, 230px);
  width: var(--size);
  height: var(--size);
  flex: none;
  overflow: hidden;
  border-radius: 50%;
  border: clamp(4px, 1.2vw, 6px) solid #fff;
  background: #fff;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .35);
  animation: pop .8s .3s cubic-bezier(.3, 1.4, .5, 1) both;
}
.profile__avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 0%;
  transform: scale(1.3);
  transform-origin: 50% 12%;
}
@keyframes pop { from { opacity: 0; scale: .6; } to { opacity: 1; scale: 1; } }

.profile__name {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: clamp(14px, 3vw, 22px) 0 clamp(18px, 4vw, 30px);
  font-family: "Plus Jakarta Sans", "Inter", sans-serif;
  font-weight: 700;
  font-size: clamp(30px, 8.5vw, 42px);
  letter-spacing: -.01em;
  color: #fff;
  text-shadow: 0 2px 16px rgba(0, 0, 0, .35);
  animation: rise .7s .7s ease both;
}
.profile__check { width: .72em; height: .72em; flex: none; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .3)); }

.profile__btn {
  position: relative;
  width: min(78vw, 300px);
  padding: 19px 24px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(190, 140, 115, .55), rgba(140, 100, 82, .5));
  -webkit-backdrop-filter: blur(16px) saturate(130%);
  backdrop-filter: blur(16px) saturate(130%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 10px 30px rgba(0, 0, 0, .25);
  font-family: "Plus Jakarta Sans", "Inter", sans-serif;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: .01em;
  color: #fff;
  animation: rise .7s .95s ease both;
  transition: transform .2s, background .3s;
}
/* glossy rim: bright on the top-right, fading around */
.profile__btn::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 2px;
  border-radius: inherit;
  background: conic-gradient(from 20deg, rgba(255, 255, 255, .95), rgba(255, 255, 255, .25) 25%, rgba(255, 255, 255, .45) 50%, rgba(255, 255, 255, .2) 75%, rgba(255, 255, 255, .95));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}
.profile__btn:hover { background: linear-gradient(180deg, rgba(200, 150, 125, .65), rgba(150, 108, 88, .6)); }
.profile__btn:active { transform: scale(.97); }

/* ============================================================
   18+ gate — opens right where the button is
   ============================================================ */

.gate { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-start; justify-content: center; }
.gate[hidden] { display: none; }

.gate__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 5, 7, .55);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  opacity: 0;
  transition: opacity .35s ease;
}

.gate__card {
  position: relative;
  width: min(100% - 32px, 440px);
  margin-top: var(--card-top, 30vh);
  padding: 30px 24px 18px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, .22);
  background: linear-gradient(180deg, rgba(40, 34, 38, .82), rgba(18, 15, 17, .9));
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 20px 60px rgba(0, 0, 0, .5);
  text-align: center;
  opacity: 0;
  transform: scale(.85);
  transition: transform .45s cubic-bezier(.2, .9, .25, 1), opacity .25s ease;
}
.gate.is-open .gate__backdrop { opacity: 1; }
.gate.is-open .gate__card { opacity: 1; transform: none; }

.gate__badge {
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .5);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .04em;
}
.gate__title {
  margin: 14px 0 8px;
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-weight: 400;
  font-size: 34px;
}
.gate__text { margin: 0 auto 22px; max-width: 340px; font-size: 14px; line-height: 1.55; color: var(--muted); }

.gate__yes, .gate__no { display: block; width: 100%; border-radius: 999px; transition: transform .15s, background .2s; }
.gate__yes { padding: 16px; border: 0; background: #f5f1ee; color: #121012; font-weight: 600; font-size: 15px; letter-spacing: .06em; }
.gate__no { margin-top: 6px; padding: 14px; border: 0; background: transparent; color: var(--muted); font-size: 14px; }
.gate__yes:active, .gate__no:active { transform: scale(.98); }
.gate__no:hover { color: var(--ink); }

/* ============================================================
   Accessibility
   ============================================================ */

:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

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