:root {
  --bg: #120f14;
  --bg-soft: #1b151d;
  --panel: rgba(255, 248, 239, 0.08);
  --panel-strong: rgba(255, 248, 239, 0.12);
  --line: rgba(255, 235, 214, 0.14);
  --text: #f8eee1;
  --text-soft: rgba(248, 238, 225, 0.76);
  --accent: #f2b57f;
  --accent-strong: #f8d3a4;
  --rose: #b96d79;
  --gold: #f5dbaf;
  --leaf: #7da566;
  --petal: #fff8ef;
  --heart: #ef7b9d;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --content-width: min(1120px, calc(100vw - 40px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  font-family: "Manrope", sans-serif;
  background:
    radial-gradient(circle at top, rgba(185, 109, 121, 0.24), transparent 28%),
    radial-gradient(circle at 85% 15%, rgba(242, 181, 127, 0.14), transparent 20%),
    linear-gradient(180deg, #19141a 0%, #100c11 48%, #0d0a0e 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(245, 219, 175, 0.08), transparent 22%),
    radial-gradient(circle at 80% 30%, rgba(185, 109, 121, 0.08), transparent 18%),
    radial-gradient(circle at 50% 80%, rgba(242, 181, 127, 0.08), transparent 28%);
  pointer-events: none;
  z-index: -3;
}

.gate-page {
  display: grid;
  place-items: center;
  padding: 24px;
}

.gate-wrap {
  width: min(100%, 760px);
}

.gate-card {
  position: relative;
  padding: clamp(28px, 6vw, 54px);
  border: 1px solid var(--line);
  border-radius: 36px;
  background:
    linear-gradient(180deg, rgba(255, 248, 239, 0.08), rgba(255, 248, 239, 0.03)),
    radial-gradient(circle at 85% 20%, rgba(185, 109, 121, 0.14), transparent 24%);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.gate-card__eyebrow {
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.76rem;
  color: var(--gold);
}

.gate-card__title {
  margin-top: 18px;
  font-size: clamp(2.7rem, 7vw, 4.8rem);
  letter-spacing: -0.04em;
}

.gate-card__text {
  max-width: 34ch;
  margin: 20px 0 0;
  color: var(--text-soft);
  line-height: 1.8;
}

.gate-form {
  display: grid;
  gap: 14px;
  max-width: 360px;
  margin-top: 28px;
}

.gate-form__label {
  color: rgba(248, 238, 225, 0.92);
  font-weight: 700;
}

.gate-form__input {
  min-height: 54px;
  padding: 0 16px;
  border: 1px solid rgba(255, 248, 239, 0.16);
  border-radius: 18px;
  background: rgba(255, 248, 239, 0.04);
  color: var(--text);
  font: inherit;
}

.gate-form__input::-webkit-calendar-picker-indicator {
  filter: invert(1) brightness(1.2);
}

.gate-form__error {
  margin: 0;
  color: #ffb4c5;
  line-height: 1.6;
}

.gate-form__button {
  width: fit-content;
}

.ambient-canvas,
.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.ambient-canvas {
  z-index: -2;
  opacity: 0.7;
}

.noise {
  z-index: -1;
  opacity: 0.08;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.4) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.4) 1px, transparent 1px);
  background-size: 4px 4px;
  mix-blend-mode: soft-light;
}

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

.hero,
.section,
.footer {
  width: var(--content-width);
  margin: 0 auto;
}

.hero {
  position: relative;
  padding: 28px 0 72px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0 32px;
}

.brand,
.ghost-link,
.section-heading__tag,
.eyebrow {
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.76rem;
}

.brand,
.ghost-link {
  color: rgba(248, 238, 225, 0.72);
}

.ghost-link {
  border-bottom: 1px solid rgba(248, 238, 225, 0.24);
  padding-bottom: 3px;
  transition: color 180ms ease, border-color 180ms ease;
}

.ghost-link:hover {
  color: var(--text);
  border-color: rgba(248, 238, 225, 0.5);
}

.hero__content {
  position: relative;
  z-index: 2;
  padding: 42px clamp(24px, 4vw, 48px);
  border: 1px solid var(--line);
  border-radius: clamp(28px, 5vw, 44px);
  background: linear-gradient(180deg, rgba(255, 248, 239, 0.08), rgba(255, 248, 239, 0.03));
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero__content::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(245, 219, 175, 0.06), transparent 45%),
    radial-gradient(circle at 80% 15%, rgba(185, 109, 121, 0.16), transparent 24%);
  pointer-events: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--gold);
}

.eyebrow::before {
  content: "";
  width: 36px;
  height: 1px;
  background: rgba(245, 219, 175, 0.56);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  line-height: 0.95;
}

h1 {
  max-width: 10ch;
  margin-top: 22px;
  font-size: clamp(3.9rem, 10vw, 7.2rem);
  letter-spacing: -0.04em;
}

h1 span {
  display: block;
  color: var(--accent-strong);
}

.hero__lead {
  max-width: 680px;
  margin: 28px 0 0;
  font-size: clamp(1.05rem, 2.4vw, 1.32rem);
  line-height: 1.8;
  color: var(--text-soft);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button--primary {
  background: linear-gradient(135deg, var(--accent) 0%, #d38a77 100%);
  color: #1c1115;
  box-shadow: 0 12px 30px rgba(210, 137, 117, 0.28);
}

.button--secondary {
  background: rgba(255, 248, 239, 0.02);
  border-color: rgba(255, 248, 239, 0.16);
  color: var(--text);
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 42px;
}

.hero__garden {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  pointer-events: none;
}

.hero__garden-image {
  display: block;
  width: clamp(146px, 19vw, 248px);
  height: auto;
  filter:
    drop-shadow(0 18px 30px rgba(0, 0, 0, 0.2))
    drop-shadow(0 0 22px rgba(255, 236, 184, 0.18));
  opacity: 0.98;
  transform-origin: center;
  animation: heartbeat 1.7s ease-in-out infinite;
}

.stat-card,
.glass-card,
.promise-card,
.closing__box,
.letter {
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.stat-card {
  display: grid;
  gap: 10px;
  padding: 24px;
  border-radius: var(--radius-lg);
  transition: transform 220ms ease, border-color 220ms ease;
}

.stat-card__number {
  font-family: "Cormorant Garamond", serif;
  font-size: 3.2rem;
  line-height: 0.9;
  color: var(--accent-strong);
}

.stat-card__label {
  color: var(--text-soft);
  line-height: 1.6;
}

.hero__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(20px);
  opacity: 0.7;
  z-index: 1;
}

.hero__orb--one {
  width: 220px;
  height: 220px;
  right: 4%;
  top: 140px;
  background: radial-gradient(circle, rgba(245, 219, 175, 0.22), transparent 70%);
  animation: drift 8s ease-in-out infinite alternate;
}

.hero__orb--two {
  width: 300px;
  height: 300px;
  left: -60px;
  bottom: 40px;
  background: radial-gradient(circle, rgba(185, 109, 121, 0.18), transparent 70%);
  animation: drift 10s ease-in-out infinite alternate-reverse;
}

.section {
  padding: 42px 0;
}

.section-heading {
  display: grid;
  gap: 18px;
  margin-bottom: 28px;
}

.section-heading__tag {
  color: var(--gold);
}

h2 {
  max-width: 16ch;
  font-size: clamp(2.8rem, 6vw, 4.7rem);
  letter-spacing: -0.04em;
}

.section--split {
  display: grid;
  gap: 30px;
}

.regret-grid,
.promise-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.glass-card,
.promise-card {
  position: relative;
  padding: 28px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease;
}

.stat-card:hover,
.glass-card:hover,
.promise-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 219, 175, 0.22);
}

.glass-card::before,
.promise-card::before,
.closing__box::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), transparent 45%),
    radial-gradient(circle at top right, rgba(245, 219, 175, 0.12), transparent 25%);
  pointer-events: none;
}

.glass-card h3,
.promise-card h3,
.timeline__item h3 {
  font-size: clamp(1.7rem, 3vw, 2.25rem);
  line-height: 1;
  margin-bottom: 18px;
}

.glass-card p,
.timeline__item p,
.promise-card p,
.letter p,
.footer p,
.closing__line {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.9;
  color: var(--text-soft);
}

.section--timeline {
  display: grid;
  gap: 14px;
}

.timeline {
  display: grid;
  gap: 18px;
}

.timeline__item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 18px;
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 248, 239, 0.08);
  background: linear-gradient(180deg, rgba(255, 248, 239, 0.04), rgba(255, 248, 239, 0.02));
}

.timeline__marker {
  position: relative;
  display: block;
  width: 16px;
  height: 16px;
  margin-top: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--rose));
  box-shadow: 0 0 24px rgba(242, 181, 127, 0.45);
}

.timeline__marker::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 1px;
  height: calc(100% + 44px);
  background: linear-gradient(180deg, rgba(242, 181, 127, 0.5), transparent);
  transform: translateX(-50%);
}

.timeline__item:last-child .timeline__marker::after {
  display: none;
}

.section--letter {
  padding-top: 56px;
}

.letter-shell {
  position: relative;
}

.letter {
  position: relative;
  padding: clamp(28px, 6vw, 56px);
  border-radius: 36px;
  background:
    linear-gradient(180deg, rgba(255, 248, 239, 0.08), rgba(255, 248, 239, 0.04)),
    linear-gradient(180deg, rgba(245, 219, 175, 0.06), transparent);
}

.letter::after {
  content: "";
  position: absolute;
  top: 24px;
  bottom: 24px;
  left: 24px;
  width: 1px;
  background: linear-gradient(180deg, rgba(245, 219, 175, 0.6), transparent 90%);
}

.letter p + p {
  margin-top: 18px;
}

.letter__signature {
  margin-top: 32px;
  color: var(--text);
}

.letter__signature span {
  display: block;
  margin-top: 12px;
  font-family: "Cormorant Garamond", serif;
  font-size: 2.3rem;
  color: var(--accent-strong);
}

.promise-card {
  padding-top: 34px;
}

.promise-card span {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--gold);
  font-size: 0.95rem;
  letter-spacing: 0.18em;
}

.confession {
  padding-top: 10px;
}

.confession-card {
  position: relative;
  padding: clamp(28px, 5vw, 44px);
  border: 1px solid rgba(255, 248, 239, 0.1);
  border-radius: 34px;
  background:
    linear-gradient(180deg, rgba(255, 248, 239, 0.06), rgba(255, 248, 239, 0.03)),
    radial-gradient(circle at 85% 20%, rgba(185, 109, 121, 0.1), transparent 22%);
  box-shadow: var(--shadow);
}

.confession-card h2 {
  margin-top: 18px;
  margin-bottom: 18px;
  max-width: 12ch;
  font-size: clamp(2.4rem, 5vw, 4rem);
}

.confession-card p {
  margin: 0;
  max-width: 780px;
  font-size: 1.04rem;
  line-height: 1.95;
  color: var(--text-soft);
}

.closing {
  padding-top: 68px;
  padding-bottom: 88px;
}

.closing__box {
  position: relative;
  padding: clamp(82px, 8vw, 122px) clamp(28px, 5vw, 54px) clamp(28px, 5vw, 54px);
  border-radius: 38px;
  text-align: center;
  overflow: hidden;
}

.heart-beat {
  position: absolute;
  top: 28px;
  left: 50%;
  width: 110px;
  height: 96px;
  transform: translateX(-50%);
  display: grid;
  place-items: center;
}

.heart-beat__ring {
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  border: 1px solid rgba(239, 123, 157, 0.34);
  animation: pulseRing 2.8s ease-out infinite;
}

.heart-beat__ring--delayed {
  animation-delay: 1.4s;
}

.heart-beat__image {
  position: relative;
  z-index: 1;
  display: block;
  width: min(88px, 100%);
  height: auto;
  filter:
    drop-shadow(0 10px 18px rgba(0, 0, 0, 0.22))
    drop-shadow(0 0 18px rgba(255, 236, 184, 0.2));
  animation: heartbeat 1.7s ease-in-out infinite;
}

.closing__line {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2rem, 5vw, 4.6rem);
  line-height: 1.04;
  color: var(--text);
}

.closing__line + .closing__line {
  margin-top: 16px;
}

.closing__line--soft {
  color: rgba(248, 238, 225, 0.84);
}

.closing__line--accent span {
  color: var(--accent-strong);
}

.final-memory {
  padding-top: 0;
  padding-bottom: 40px;
}

.final-memory__frame {
  position: relative;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid rgba(255, 248, 239, 0.1);
  border-radius: 40px;
  background:
    linear-gradient(180deg, rgba(255, 248, 239, 0.04), rgba(255, 248, 239, 0.02)),
    radial-gradient(circle at top, rgba(245, 219, 175, 0.08), transparent 38%);
  box-shadow: var(--shadow);
}

.final-memory__header {
  display: grid;
  gap: 14px;
  max-width: 760px;
  margin-bottom: 22px;
}

.final-memory__note {
  margin: 0;
  font-size: 1rem;
  line-height: 1.9;
  color: var(--text-soft);
}

.final-memory__card {
  margin: 0;
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid rgba(216, 170, 131, 0.22);
  background: rgba(255, 248, 239, 0.03);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
}

.final-memory__image {
  display: block;
  width: 100%;
  height: auto;
}

.footer {
  padding: 0 0 42px;
}

.footer p {
  text-align: center;
  color: rgba(248, 238, 225, 0.58);
}

.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 700ms ease,
    transform 700ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(0, -14px, 0) scale(1.08);
  }
}

@keyframes heartbeat {
  0%,
  100% {
    transform: scale(1);
  }
  14% {
    transform: scale(1.12);
  }
  28% {
    transform: scale(0.98);
  }
  42% {
    transform: scale(1.15);
  }
  70% {
    transform: scale(1);
  }
}

@keyframes pulseRing {
  0% {
    opacity: 0;
    transform: scale(0.72);
  }
  20% {
    opacity: 0.46;
  }
  100% {
    opacity: 0;
    transform: scale(1.34);
  }
}

@media (max-width: 980px) {
  .hero__stats,
  .regret-grid,
  .promise-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    max-width: 11ch;
  }

  h2 {
    max-width: 14ch;
  }

  .hero__garden {
    position: static;
    margin-top: 28px;
  }
}

@media (max-width: 640px) {
  :root {
    --content-width: min(100vw - 24px, 1120px);
  }

  .hero {
    padding-top: 18px;
    padding-bottom: 56px;
  }

  .gate-page {
    padding: 14px;
  }

  .gate-card {
    border-radius: 26px;
  }

  .topbar {
    padding-bottom: 22px;
  }

  .hero__content {
    padding: 22px 18px 24px;
  }

  .hero__garden {
    margin-top: 22px;
  }

  .hero__garden-image {
    width: min(200px, 56vw);
  }

  .hero__lead,
  .glass-card p,
  .timeline__item p,
  .promise-card p,
  .letter p,
  .confession-card p,
  .final-memory__note,
  .footer p {
    font-size: 0.98rem;
  }

  .timeline__item {
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 14px;
    padding: 18px;
  }

  .letter {
    border-radius: 28px;
  }

  .letter::after {
    left: 16px;
    top: 18px;
    bottom: 18px;
  }

  .final-memory {
    padding-bottom: 24px;
  }

  .final-memory__frame {
    padding: 14px;
    border-radius: 28px;
  }

  .final-memory__header {
    gap: 10px;
    margin-bottom: 14px;
  }

  .final-memory__card {
    border-radius: 22px;
  }

  .confession-card {
    padding: 22px 18px;
    border-radius: 26px;
  }

  .closing__box {
    padding-top: 92px;
  }

  .heart-beat {
    top: 20px;
    width: 92px;
    height: 82px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
