:root {
  --ink: #0a0708;
  --ink-soft: #161012;
  --latex: #111111;
  --bone: #f4efe6;
  --mist: #cfc6ba;
  --silver: #b7b0a6;
  --brass: #d9b48a;
  --ember: #c45a38;
  --danger: #e25a4a;
  --display: "Italiana", "Didot", "Bodoni MT", serif;
  --ui: "Syne", "Futura", sans-serif;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--ink);
  color: var(--bone);
}

body {
  font-family: var(--ui);
  overflow: hidden;
}

body.allow-scroll {
  overflow: auto;
}

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

button,
input {
  font: inherit;
}

a {
  color: var(--brass);
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  opacity: 0.18;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

.stage {
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, 460px);
}

.tableau {
  position: relative;
  background: #f7f4ef;
  overflow: hidden;
}

.tableau__photo {
  width: 100%;
  height: 100svh;
  object-fit: cover;
  object-position: 52% 18%;
  filter: contrast(1.08) saturate(0.92);
  animation: rise 1.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.tableau__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 7, 8, 0) 55%, rgba(10, 7, 8, 0.38) 100%),
    linear-gradient(180deg, rgba(247, 244, 239, 0.08) 0%, rgba(10, 7, 8, 0.12) 100%);
  pointer-events: none;
}

.tableau__mark,
.tableau__age {
  position: absolute;
  z-index: 2;
  margin: 0;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 0.68rem;
  color: #1a1a1a;
  mix-blend-mode: multiply;
}

.tableau__mark {
  top: 28px;
  left: 32px;
  animation: fade-up 0.9s 0.25s both;
}

.tableau__age {
  bottom: 28px;
  left: 32px;
  font-weight: 700;
  animation: fade-up 0.9s 0.4s both;
}

.gate {
  position: relative;
  isolation: isolate;
  background: var(--ink);
  overflow: hidden;
  border-left: 1px solid rgba(217, 180, 138, 0.22);
}

.gate__atmosphere {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.gate__atmosphere img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% 40%;
  filter: saturate(1.15) contrast(1.1);
  transform: scale(1.08);
}

.gate__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(10, 7, 8, 0.42) 0%, rgba(10, 7, 8, 0.78) 42%, rgba(10, 7, 8, 0.92) 100%),
    radial-gradient(ellipse at 80% 30%, rgba(196, 90, 56, 0.28), transparent 46%);
}

.gate__inner {
  position: relative;
  z-index: 2;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 42px 28px;
}

.gate__inner--sheet {
  justify-content: flex-start;
}

.brand {
  margin-bottom: 36px;
  animation: fade-up 0.9s 0.2s both;
}

.brand__seal {
  width: 42px;
  height: 42px;
  margin-bottom: 16px;
}

.brand__rule {
  display: block;
  width: 42px;
  height: 1px;
  background: linear-gradient(90deg, var(--ember), var(--brass));
  margin-bottom: 18px;
}

.brand__kicker {
  margin: 0 0 10px;
  font-size: 0.72rem;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--brass);
}

.brand__title {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.8rem, 5.2vw, 4.4rem);
  font-weight: 400;
  line-height: 0.86;
  letter-spacing: 0.04em;
}

.brand__line {
  margin: 16px 0 0;
  max-width: 28ch;
  color: var(--mist);
  font-size: 0.92rem;
  line-height: 1.45;
}

.form {
  display: grid;
  gap: 18px;
  animation: fade-up 0.9s 0.38s both;
}

.field {
  display: grid;
  gap: 8px;
}

.field__label {
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--silver);
}

.field__input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(183, 176, 166, 0.38);
  background: transparent;
  color: var(--bone);
  padding: 10px 0 12px;
  outline: none;
  letter-spacing: 0.02em;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.field__input::placeholder {
  color: rgba(207, 198, 186, 0.38);
}

.field__input:focus {
  border-bottom-color: var(--brass);
}

.field__row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 12px;
}

.field__reveal {
  border: 0;
  background: none;
  color: var(--brass);
  cursor: pointer;
  padding: 0 0 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.62rem;
}

.field__error {
  min-height: 1em;
  margin: 0;
  color: var(--danger);
  font-size: 0.75rem;
}

.field.is-invalid .field__input {
  border-bottom-color: var(--danger);
}

.consent {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 12px;
  align-items: start;
  cursor: pointer;
  color: var(--mist);
  font-size: 0.84rem;
  line-height: 1.4;
}

.consent__box {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.consent__mark {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border: 1px solid var(--brass);
  background: transparent;
  position: relative;
}

.consent__box:focus-visible + .consent__mark {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

.consent__box:checked + .consent__mark::after {
  content: "";
  position: absolute;
  inset: 4px;
  background: var(--ember);
}

.submit {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  border: 1px solid rgba(217, 180, 138, 0.55);
  background: linear-gradient(180deg, rgba(196, 90, 56, 0.16), rgba(10, 7, 8, 0.2));
  color: var(--bone);
  padding: 16px 18px;
  cursor: pointer;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  font-size: 0.78rem;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.submit:hover {
  transform: translateY(-1px);
  border-color: var(--brass);
  background: linear-gradient(180deg, rgba(196, 90, 56, 0.32), rgba(10, 7, 8, 0.12));
}

.submit__key {
  width: 28px;
  height: 1px;
  background: var(--brass);
  position: relative;
}

.submit__key::after {
  content: "";
  position: absolute;
  right: 0;
  top: -3px;
  width: 7px;
  height: 7px;
  border-right: 1px solid var(--brass);
  border-top: 1px solid var(--brass);
  transform: rotate(45deg);
}

.form__links {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.4;
}

.form__links a {
  color: var(--brass);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.form__links a:hover {
  border-bottom-color: var(--brass);
}

.form__note {
  margin: 0;
  color: var(--brass);
  font-size: 0.82rem;
}

.legal {
  display: grid;
  gap: 14px;
  color: var(--mist);
  font-size: 0.86rem;
  line-height: 1.55;
  animation: fade-up 0.9s 0.3s both;
}

.legal h2 {
  margin: 8px 0 0;
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--bone);
  letter-spacing: 0.04em;
}

.legal p,
.legal ul {
  margin: 0;
}

.legal ul {
  padding-left: 1.1rem;
}

.legal a {
  text-decoration: none;
  border-bottom: 1px solid rgba(217, 180, 138, 0.45);
}

.back {
  margin: 0 0 18px;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.back a {
  color: var(--brass);
  text-decoration: none;
}

.gate__foot {
  margin-top: auto;
  padding-top: 32px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: rgba(207, 198, 186, 0.48);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

.gate__foot a:hover {
  color: var(--brass);
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
}

.unlock {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 32px;
  background:
    linear-gradient(180deg, rgba(10, 7, 8, 0.72), rgba(10, 7, 8, 0.9)),
    url("../assets/portrait-dark.png") center/cover;
  animation: fade-up 0.6s both;
}

.unlock[hidden] {
  display: none;
}

.unlock__kicker {
  margin: 0;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--brass);
  font-size: 0.72rem;
}

.unlock__title {
  margin: 12px 0 18px;
  font-family: var(--display);
  font-size: clamp(4rem, 10vw, 8rem);
  line-height: 0.85;
}

.unlock__text {
  margin: 0;
  max-width: 36ch;
  color: var(--mist);
}

.unlock__back {
  margin-top: 22px;
}

.unlock__back a {
  color: var(--brass);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.72rem;
  text-decoration: none;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: scale(1.06);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 860px) {
  body {
    overflow: auto;
  }

  .stage {
    grid-template-columns: 1fr;
  }

  .tableau {
    height: 42svh;
  }

  .tableau__photo {
    height: 42svh;
    object-position: 50% 22%;
  }

  .gate__inner {
    min-height: 58svh;
    padding: 32px 22px 20px;
  }

  .brand__title {
    font-size: 3.4rem;
  }
}
