@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600&family=Manrope:wght@400;500;600&family=Marck+Script&display=swap");
:root {
  --ink: #f7efe3;
  --gold: #efb658;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: #030506;
  color: var(--ink);
  font-family: Manrope, sans-serif;
}
.card {
  position: relative;
  width: min(1180px, 100vw);
  height: min(760px, 100vh);
  min-height: 650px;
  overflow: hidden;
  background:
    radial-gradient(circle at 84% 15%, #29333a 0, transparent 25%),
    radial-gradient(circle at 18% 86%, #152632 0, transparent 32%),
    linear-gradient(125deg, #050608, #0c1116 55%, #111820);
  box-shadow: 0 25px 90px #000;
}
.card:after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 18;
  pointer-events: none;
  opacity: 0.32;
  mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='130' height='130'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.7' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.17'/%3E%3C/svg%3E");
}
.intro {
  position: absolute;
  z-index: 7;
  left: 6%;
  top: 8%;
  width: 36%;
}
.eyebrow {
  margin: 0;
  color: #d9e1e6;
  font: 500 clamp(20px, 2.2vw, 33px) / 1.1 "Cormorant Garamond";
  letter-spacing: 0.14em;
}
.intro h1 {
  margin: -3px 0 12px;
  color: var(--gold);
  text-shadow: 0 0 32px #f2b65655;
  font: 400 clamp(70px, 8vw, 116px) / 0.85 "Marck Script";
  transform: rotate(-3deg);
}
.lead {
  font: 500 clamp(21px, 2.2vw, 31px) / 1.25 "Cormorant Garamond";
  margin: 25px 0 32px;
  color: #e8e3db;
}
.controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.control {
  border: 1px solid #80909b77;
  background: #0d141bbf;
  color: #e8edf0;
  padding: 13px 18px;
  min-width: 105px;
  cursor: pointer;
  font: 600 13px Manrope;
  letter-spacing: 0.08em;
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px #0008;
  transition: 0.25s;
  border-radius: 5px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.control::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at 50% 55%, #ffd878 0%, #d88c1f 58%, transparent 100%);
}
.control span {
  display: block;
  font-size: 9px;
  color: #82919b;
  margin-bottom: 2px;
}
.control:hover:not(:disabled) {
  border-color: #ffd083;
  background: #e5a849;
  color: #111820;
  box-shadow: 0 0 28px #efb65855;
  transform: translateY(-2px);
}
.control.active {
  color: #ffe2a8;
  border-color: #b88b4666;
  background: linear-gradient(180deg, #171610e8, #0b0d0ee8);
  animation: button-frame-breathe 3.2s ease-in-out infinite;
}
.control.active::before {
  animation: button-light-breathe 3.2s ease-in-out infinite;
}
.control.active span {
  color: #c49a59;
}
.control:disabled {
  opacity: 0.25;
  cursor: default;
}
.hint {
  font-size: 12px;
  color: #91a0aa;
  margin: 14px 0;
}
.portrait-wrap {
  position: absolute;
  right: 1%;
  top: 2%;
  width: 61%;
  height: 96%;
}
.photo-frame {
  position: absolute;
  z-index: 2;
  right: 4%;
  top: 5%;
  width: 75%;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid #91a1aa66;
  box-shadow: 0 30px 70px #000b;
  transform: rotate(1deg);
  background: #090b0d;
  clip-path: polygon(4% 0, 100% 0, 96% 100%, 0 94%);
}
.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.55) brightness(0.48) contrast(1.15);
  transition:
    filter 1.2s,
    transform 1.6s;
  transform: scale(1.04);
}
.warm-light {
  position: absolute;
  inset: -30%;
  opacity: 0;
  background: radial-gradient(circle at 30% 20%, #fff6cdcc, transparent 43%);
  mix-blend-mode: screen;
  transition: opacity 1.4s;
}
.lamp {
  position: absolute;
  z-index: 9;
  left: -10%;
  right: auto;
  top: -3%;
  width: 340px;
  height: 245px;
  pointer-events: none;
  filter: drop-shadow(0 22px 24px #000);
}
.lamp img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  filter: contrast(1.08) brightness(0.68);
  transition: filter 1.2s;
}
.light-beam {
  position: absolute;
  z-index: 4;
  left: 8%;
  right: auto;
  top: 13%;
  width: 104%;
  height: 84%;
  opacity: 0;
  pointer-events: none;
  transform: none;
  transform-origin: 15% 0;
  clip-path: polygon(9% 0, 18% 0, 100% 100%, 0 100%);
  background: linear-gradient(110deg, #fff8d87a 0%, #fff1c44f 42%, #f8dca21d 78%, transparent 100%);
  filter: blur(3px);
  mix-blend-mode: screen;
  transition: opacity 1.3s;
}
.focus-mark {
  position: absolute;
  left: 36%;
  top: 31%;
  width: 30%;
  height: 30%;
  opacity: 0;
  transition: 0.6s;
}
.focus-mark i {
  position: absolute;
  width: 28px;
  height: 28px;
  border-color: #fff;
  border-style: solid;
}
.focus-mark i:nth-child(1) {
  left: 0;
  top: 0;
  border-width: 2px 0 0 2px;
}
.focus-mark i:nth-child(2) {
  right: 0;
  top: 0;
  border-width: 2px 2px 0 0;
}
.focus-mark i:nth-child(3) {
  left: 0;
  bottom: 0;
  border-width: 0 0 2px 2px;
}
.focus-mark i:nth-child(4) {
  right: 0;
  bottom: 0;
  border-width: 0 2px 2px 0;
}
.dust {
  position: absolute;
  inset: 0;
  opacity: 0;
  background-image: radial-gradient(circle, #fff8cf 0 1px, transparent 2px);
  background-size: 39px 47px;
  transition: 1.4s;
}
.note {
  position: absolute;
  z-index: 8;
  padding: 12px 18px;
  color: #fff7e8;
  text-shadow: 0 2px 12px #000;
  font: 500 19px/1.4 "Cormorant Garamond";
  border-left: 2px solid #f3c46f;
  opacity: 0;
  transform: translate(-15px, 10px);
  transition: 0.8s;
  isolation: isolate;
}
.note::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -26px -48px;
  opacity: 0;
  background: radial-gradient(
    ellipse at 42% 50%,
    #ffe6a34d 0%,
    #e7ae3c20 48%,
    transparent 75%
  );
  filter: blur(12px);
  transform: scale(0.78);
  transition: opacity 1.2s ease, transform 1.5s ease;
}
.note b {
  color: #ffd998;
  font-weight: 600;
}
.note-one {
  left: -1%;
  bottom: 22%;
  width: 61%;
}
.note-two {
  right: 0;
  bottom: 3%;
  width: 61%;
}
.step-1 .light-beam {
  opacity: 1;
}
.step-1 .photo-frame img {
  filter: saturate(0.8) brightness(0.82) contrast(1.05);
}
.step-1 .warm-light,
.step-1 .note-one {
  opacity: 1;
}
.step-1 .note-one::before,
.step-2 .note-two::before {
  opacity: 1;
  transform: scale(1);
}
.step-1 .lamp img {
  filter: contrast(1.08) brightness(1.02)
    drop-shadow(0 0 25px #f7bb56aa);
}
.step-1 .note-one {
  transform: translate(0);
}
.step-2 .photo-frame img {
  filter: saturate(1.02) brightness(0.98) contrast(1.03);
  transform: scale(1);
}
.step-2 .focus-mark,
.step-2 .note-two {
  opacity: 1;
}
.step-2 .focus-mark {
  animation: focus 0.7s ease;
}
.step-2 .note-two {
  transform: translate(0);
}
.step-3 .dust {
  opacity: 0.8;
  animation: drift 5s linear infinite;
}
.final {
  position: absolute;
  z-index: 20;
  inset: 5% 7%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 28px;
  background:
    radial-gradient(circle at 75% 20%, #49392255, transparent 35%), #070b0def;
  border: 1px solid #cda95a77;
  box-shadow: 0 25px 90px #000;
  backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  transform: scale(0.96);
  transition: 0.7s;
}
.step-3 .final {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}
.final p {
  font: 500 clamp(18px, 2vw, 25px) / 1.35 "Cormorant Garamond";
  margin: 7px;
}
.final .script {
  font: 400 clamp(31px, 4vw, 52px) "Marck Script";
  color: var(--gold);
}
.final strong {
  font: 400 clamp(34px, 4vw, 56px) "Marck Script";
  color: var(--gold);
  margin-top: 12px;
}
.close {
  position: absolute;
  right: 18px;
  top: 12px;
  border: 0;
  background: transparent;
  font-size: 35px;
  color: #b9a384;
  cursor: pointer;
}
.again {
  margin-top: 14px;
  border: 0;
  border-bottom: 1px solid #b38c4f;
  background: transparent;
  padding: 7px;
  color: #d6bd95;
  cursor: pointer;
}
@keyframes focus {
  0% {
    transform: scale(1.5);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
@keyframes drift {
  50% {
    transform: translateY(10px);
  }
}
@keyframes button-frame-breathe {
  0%,
  100% {
    color: #d0ad73;
    border-color: #8c713f66;
    box-shadow:
      0 0 5px #efb65818,
      0 0 12px #d9962524 inset;
  }
  50% {
    color: #fff0c8;
    border-color: #ffcf78;
    box-shadow:
      0 0 38px #efb658a6,
      0 0 12px #fff0b6cc inset;
  }
}
@keyframes button-light-breathe {
  0%,
  100% {
    opacity: 0.08;
  }
  50% {
    opacity: 0.92;
  }
}
@media (max-width: 760px) {
  body {
    display: block;
  }
  .card {
    width: 100%;
    height: auto;
    min-height: 100svh;
    overflow: auto;
    padding: 28px 18px 40px;
  }
  .intro,
  .portrait-wrap {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    width: 100%;
  }
  .intro {
    text-align: center;
  }
  .intro h1 {
    font-size: 76px;
  }
  .lead {
    margin: 12px 0 20px;
  }
  .controls {
    justify-content: center;
  }
  .portrait-wrap {
    height: 570px;
    margin-top: 5px;
  }
  .photo-frame {
    width: 88%;
    right: 6%;
    top: 28px;
  }
  .lamp {
    width: 210px;
    height: 155px;
    left: -5%;
    right: auto;
    top: 0;
  }
  .light-beam {
    left: 8%;
    right: auto;
    top: 13%;
    width: 105%;
  }
  .note {
    font-size: 16px;
    background: #05080a99;
    backdrop-filter: blur(4px);
  }
  .note-one {
    left: 0;
    bottom: 17%;
    width: 76%;
  }
  .note-two {
    right: 0;
    bottom: 0;
    width: 76%;
  }
  .final {
    position: fixed;
    inset: 12px;
    padding: 28px 18px;
    overflow: auto;
  }
  .final p {
    font-size: 20px;
  }
  .eyebrow {
    font-size: 24px;
  }
  .control {
    min-width: 92px;
    padding: 11px 12px;
  }
}
