
:root {
  --sky: #8bd7f3;
  --sky-light: #e0f5fc;
  --blue: #287ca8;
  --blue-dark: #1d2946;
  --blue-soft: #b9e5f7;
  --navy: #202943;
  --green: #72b28b;
  --green-dark: #3d805d;
  --pink: #f5b8d0;
  --pink-dark: #d982a9;
  --cream: #fffdf5;
  --white: #ffffff;
  --text: #29475d;
  --shadow: 0 12px 30px rgba(28, 65, 91, 0.18);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 20px;
}

body {
  font-family: "Nunito", sans-serif;
  color: var(--text);
  background: var(--sky-light);
  overflow-x: hidden;
}

body,
button,
input {
  font-family: "Nunito", sans-serif;
}

button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}

button,
input {
  font-size: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

::selection {
  background: var(--pink);
  color: var(--blue-dark);
}

/* BACKGROUND LANGIT DAN PADANG RUMPUT */

.gate,
.section {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
}

.gate::before,
.section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(
      ellipse at 15% 12%,
      rgba(255, 255, 255, 0.8),
      transparent 23%
    ),
    radial-gradient(
      ellipse at 82% 20%,
      rgba(255, 255, 255, 0.65),
      transparent 20%
    ),
    linear-gradient(
      180deg,
      #78c9ed 0%,
      #bce9f6 48%,
      #d9f1ed 66%,
      #86c795 67%,
      #6eb383 100%
    );
}

.gate::after,
.section::after {
  content: "";
  position: absolute;
  left: -5%;
  right: -5%;
  bottom: -2px;
  height: 34%;
  z-index: -1;
  background:
    radial-gradient(
      ellipse at 20% 8%,
      #a6d69d 0 2px,
      transparent 3px
    ),
    radial-gradient(
      ellipse at 65% 20%,
      #f5df79 0 2px,
      transparent 3px
    ),
    radial-gradient(
      ellipse at 80% 45%,
      #dff0b4 0 2px,
      transparent 3px
    ),
    linear-gradient(
      180deg,
      #8bca92 0%,
      #6fb384 42%,
      #5ca576 100%
    );
  border-radius: 50% 50% 0 0 / 10% 10% 0 0;
  pointer-events: none;
}

/* BACKGROUND TIAP SECTION */

.memories::before {
  background:
    radial-gradient(
      ellipse at 15% 15%,
      rgba(255, 255, 255, 0.65),
      transparent 24%
    ),
    linear-gradient(
      180deg,
      #8bcce8 0%,
      #d3edf5 58%,
      #b9dcb7 72%,
      #83bd8c 100%
    );
}

.letter-section::before {
  background:
    radial-gradient(
      ellipse at 80% 12%,
      rgba(255, 255, 255, 0.8),
      transparent 22%
    ),
    linear-gradient(
      180deg,
      #a6dcf2 0%,
      #e0f4fa 56%,
      #dcebd5 72%,
      #9bcba0 100%
    );
}

/* OPENING DAN JENDELA KODE RAHASIA */

.gate {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

.gate-window {
  width: min(100%, 460px);
  position: relative;
  z-index: 2;
  transform: translateY(-2%);
}

.gate-content {
  padding: clamp(24px, 5vw, 42px);
  text-align: center;
}

.eyebrow {
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.8;
}

.gate-content h1 {
  margin: 10px 0;
  color: var(--blue);
  font-family: "Fredoka", sans-serif;
  font-size: clamp(2.8rem, 8vw, 4.3rem);
  line-height: 1.05;
  text-shadow: 2px 3px 0 var(--white);
}

.gate-content > p:not(.eyebrow):not(.tiny-note) {
  margin: 12px 0 26px;
  line-height: 1.8;
}

#codeForm {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  text-align: left;
}

#codeForm label {
  font-size: 0.85rem;
  font-weight: 800;
}

#accessCode {
  width: 100%;
  padding: 13px 16px;
  border: 2px solid #a4d9ef;
  border-radius: 12px;
  background: #f8fdff;
  color: var(--navy);
  outline: none;
  text-align: center;
  letter-spacing: 0.3em;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#accessCode:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(82, 177, 220, 0.18);
}

.message {
  min-height: 18px;
  color: #bd426e;
  font-size: 0.8rem;
  text-align: center;
}

.tiny-note {
  margin-top: 22px;
  color: #71869b;
  font-size: 0.75rem;
}

/* JENDELA DESKTOP RETRO */

.window {
  overflow: hidden;
  border: 3px solid var(--white);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.window-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  padding: 8px 12px;
  background: linear-gradient(
    180deg,
    #d9f3ff 0%,
    #94d8f4 100%
  );
  border-bottom: 2px solid #6fb9df;
  color: #245f84;
  font-family: "Fredoka", sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
}

.window-controls {
  flex-shrink: 0;
  color: #386e8c;
  font-family: "Nunito", sans-serif;
  font-size: 1rem;
  letter-spacing: 0.08em;
}

/* TOMBOL */

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 22px;
  border: 2px solid var(--white);
  border-radius: 12px;
  background: var(--blue);
  box-shadow:
    0 4px 0 #185c81,
    0 7px 14px rgba(36, 103, 140, 0.18);
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-align: center;
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
  background: #3896c3;
  box-shadow:
    0 6px 0 #185c81,
    0 10px 18px rgba(36, 103, 140, 0.2);
}

.button:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #185c81;
}

.button:focus-visible,
.music-button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--pink-dark);
  outline-offset: 4px;
}

/* HALAMAN HERO */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 90px 24px 100px;
  text-align: center;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(100%, 760px);
  margin: auto;
}

.hero-title {
  margin: 18px 0;
  color: var(--blue);
  font-family: "Fredoka", sans-serif;
  font-size: clamp(4rem, 12vw, 8rem);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.035em;
  -webkit-text-stroke: 2px var(--white);
  paint-order: stroke fill;
  text-shadow:
    3px 5px 0 var(--white),
    6px 8px 0 rgba(36, 101, 137, 0.12);
}

.hero-description {
  max-width: 390px;
  margin: 24px auto 28px;
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  line-height: 1.9;
}

.hero-note {
  margin-top: 25px;
  color: #386b75;
  font-size: 0.85rem;
  font-weight: 700;
}

.hero .button {
  background: var(--pink-dark);
  box-shadow:
    0 4px 0 #b35d85,
    0 7px 14px rgba(113, 71, 96, 0.16);
}

.hero .button:hover {
  background: #e993b7;
}

.hero .button:active {
  box-shadow: 0 2px 0 #b35d85;
}

/* DEKORASI BINTANG */

.hero-decoration {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.star {
  position: absolute;
  color: var(--white);
  text-shadow: 2px 2px 0 #63bce5;
  user-select: none;
}

.star-one {
  top: 18%;
  left: 13%;
  font-size: clamp(2rem, 5vw, 4rem);
  transform: rotate(-12deg);
}

.star-two {
  top: 26%;
  right: 15%;
  color: #ffe77e;
  font-size: clamp(2rem, 5vw, 3.4rem);
  transform: rotate(10deg);
}

.star-three {
  right: 20%;
  bottom: 24%;
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.scroll-hint {
  position: absolute;
  bottom: 30px;
  left: 50%;
  z-index: 2;
  width: max-content;
  max-width: 90%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-shadow: 1px 2px 3px rgba(33, 75, 61, 0.45);
}

/* JUDUL SECTION */

.section-heading {
  width: min(100%, 700px);
  margin: 0 auto 36px;
  text-align: center;
}

.section-heading h2 {
  margin: 10px 0;
  color: var(--blue-dark);
  font-family: "Fredoka", sans-serif;
  font-size: clamp(2.2rem, 6vw, 4rem);
  line-height: 1.1;
  text-shadow: 2px 3px 0 rgba(255, 255, 255, 0.9);
}

.section-heading > p:last-child {
  max-width: 480px;
  margin: 14px auto 0;
  line-height: 1.8;
}

/* GALERI FOTO */

.memories {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(70px, 10vh, 110px) 24px;
}

.memories .section-heading {
  position: relative;
  z-index: 2;
}

.memory-window {
  position: relative;
  z-index: 2;
  width: min(100%, 850px);
  margin: 0 auto 26px;
}

.collage-frame {
  padding: clamp(8px, 2vw, 18px);
  background: #fff;
}

.memory-collage {
  width: 100%;
  height: auto;
  max-height: 680px;
  object-fit: contain;
  border-radius: 4px;
}

.collage-frame figcaption {
  padding: 15px 8px 5px;
  color: #55748a;
  font-family: "Fredoka", sans-serif;
  font-size: 0.9rem;
  text-align: center;
}

.memory-note {
  position: relative;
  z-index: 2;
  margin: 0 auto 24px;
  color: #356b65;
  font-size: 0.88rem;
  line-height: 1.8;
  text-align: center;
}

.memories > .button {
  position: relative;
  z-index: 2;
}

/* SURAT ANNIVERSARY */

.letter-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(70px, 10vh, 110px) 24px 120px;
}

.letter-section .section-heading {
  position: relative;
  z-index: 2;
}

.letter-window {
  position: relative;
  z-index: 2;
  width: min(100%, 700px);
  background: var(--cream);
}

.letter-window .window-bar {
  background: linear-gradient(
    180deg,
    #fce6f0,
    #f7bfd6
  );
  border-bottom-color: #e5a4c0;
  color: #925675;
}

.letter-content {
  padding: clamp(22px, 5vw, 46px);
  background:
    radial-gradient(
      ellipse at 100% 0%,
      rgba(246, 205, 222, 0.28),
      transparent 40%
    ),
    var(--cream);
}

.envelope {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin: 0 auto 22px;
  border: 2px solid #f4c2d8;
  border-radius: 50%;
  background: #fff0f6;
  font-size: 2.5rem;
}

.letter-greeting {
  margin-bottom: 20px;
  color: #3c6b88;
  font-family: "Fredoka", sans-serif;
  font-size: 1.2rem;
}

.letter-body {
  color: #53616b;
  font-size: 0.96rem;
  line-height: 2;
  overflow-wrap: anywhere;
}

.letter-body p + p {
  margin-top: 18px;
}

.letter-signoff {
  margin-top: 30px;
  color: #53616b;
  line-height: 1.9;
}

.letter-signoff span {
  color: var(--pink-dark);
  font-family: "Fredoka", sans-serif;
  font-size: 1.15rem;
}

.ending-note {
  position: relative;
  z-index: 2;
  margin-top: 28px;
  color: #386d72;
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
}

/* MUSIC PLAYER */

.music-player {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(285px, calc(100vw - 32px));
  padding: 11px 13px;
  border: 2px solid var(--white);
  border-radius: 15px;
  background: rgba(242, 250, 255, 0.96);
  box-shadow: 0 8px 24px rgba(25, 54, 80, 0.2);
  backdrop-filter: blur(10px);
}

.music-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 1.6rem;
}

.music-info {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.music-title {
  overflow: hidden;
  color: var(--blue-dark);
  font-size: 0.85rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.music-artist {
  color: #70899a;
  font-size: 0.72rem;
}

.music-button {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--pink);
  color: #74415a;
  font-size: 0.9rem;
  transition: transform 0.2s, background 0.2s;
}

.music-button:hover {
  transform: scale(1.08);
  background: #f4a7c7;
}

/* RESPONSIVE TABLET */

@media (max-width: 768px) {
  .hero {
    padding-right: 22px;
    padding-left: 22px;
  }

  .hero-title {
    font-size: clamp(3.8rem, 13vw, 6.5rem);
  }

  .star-one {
    left: 7%;
  }

  .star-two {
    right: 7%;
  }

  .section-heading {
    margin-bottom: 28px;
  }

  .memories,
  .letter-section {
    padding-right: 20px;
    padding-left: 20px;
  }

  .memory-window {
    width: 100%;
  }

  .letter-content {
    padding: 28px;
  }
}

/* RESPONSIVE HP */

@media (max-width: 480px) {
  .gate {
    padding: 20px 16px;
  }

  .gate-content {
    padding: 25px 20px;
  }

  .gate-content h1 {
    font-size: 3.2rem;
  }

  .eyebrow {
    font-size: 0.64rem;
    letter-spacing: 0.08em;
  }

  .hero {
    padding: 75px 18px 95px;
  }

  .hero-title {
    font-size: clamp(3.4rem, 16vw, 5rem);
    -webkit-text-stroke: 1.5px var(--white);
  }

  .hero-description {
    max-width: 300px;
    font-size: 0.92rem;
  }

  .star-one {
    top: 16%;
    left: 6%;
    font-size: 2rem;
  }

  .star-two {
    top: 23%;
    right: 5%;
    font-size: 2rem;
  }

  .star-three {
    right: 10%;
    bottom: 22%;
    font-size: 1.8rem;
  }

  .memories,
  .letter-section {
    padding: 65px 15px 85px;
  }

  .section-heading h2 {
    font-size: clamp(2.1rem, 9vw, 3rem);
  }

  .section-heading > p:last-child {
    font-size: 0.9rem;
  }

  .window {
    border-width: 2px;
    border-radius: 12px;
  }

  .window-bar {
    min-height: 36px;
    padding: 7px 9px;
    font-size: 0.78rem;
  }

  .collage-frame {
    padding: 7px;
  }

  .collage-frame figcaption {
    padding-top: 12px;
    font-size: 0.8rem;
  }

  .letter-content {
    padding: 22px 18px;
  }

  .letter-body {
    font-size: 0.9rem;
    line-height: 1.9;
  }

  .music-player {
    right: 12px;
    bottom: 12px;
    width: min(260px, calc(100vw - 24px));
    padding: 9px 11px;
  }
}

/* AKSESIBILITAS: KURANGI ANIMASI */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
