:root {
  --color-primary: #4a2618;
  --color-secondary: #f4ebdd;
  --color-accent: #a85d3a;
  --color-text: #3a241b;
  --color-white: #ffffff;

  --font-primary: "Cormorant Garamond", serif;
  --font-secondary: "Montserrat", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

.lovestory-section {
  position: relative;
  width: 100%;
  overflow: hidden;
  background-image: url("../assets/images/Background 3.png");
  color: var(--color-text);
  background-position: top center;
  background-size: 100% auto;
  background-repeat: repeat-y;
}

.lovestory-divider-top {
  width: 100%;
  height: 6vw;
  max-height: 75px;
}

.lovestory-divider-top img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Container ---------- */

.lovestory-container {
  width: min(90%, 1000px);
  margin: 0 auto;
  padding: 110px 20px;
}

/* ---------- Header ---------- */

.lovestory-header {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}

.lovestory-eyebrow {
  margin: 0 auto;
  font-family: var(--font-secondary);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.lovestory-title {
  margin: 0;
  font-family: var(--font-primary);
  font-size: 80px;
  font-weight: 600;
  line-height: 1.1;
  color: var(--color-primary);
}

.lovestory-intro {
  max-width: 430px;
  margin: 24px auto 0;
  font-family: var(--font-secondary);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.9;
  color: #80695b;
}

/* ---------- Timeline ---------- */

.lovestory-timeline {
  position: relative;
  max-width: 900px;
  margin: 75px auto 0;
}

/* Garis tengah */

/* ========================================
   GARIS TENGAH — DIVIDER 4
======================================== */

.lovestory-timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 14px;
  transform: translateX(-50%);
  background-image: url("../assets/images/Divider 4.png");
  background-repeat: repeat-y;
  background-position: center top;
  background-size: 100% auto;
  pointer-events: none;
  z-index: 1;
}

/* ---------- Timeline Item ---------- */

.lovestory-item {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 70px 1fr;
  align-items: center;
  min-height: 230px;
}

/* ---------- Marker ---------- */

.lovestory-marker {
  grid-column: 2;
  grid-row: 1;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin: 0 auto;
  border: 1px solid rgba(168, 93, 58, 0.5);
  border-radius: 50%;
  background-color: var(--color-secondary);
  color: var(--color-accent);
}

.lovestory-marker span {
  font-family: var(--font-secondary);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
}

/* ---------- Content ---------- */

.lovestory-content {
  grid-row: 1;
  max-width: 280px;
}

.lovestory-item:nth-child(odd) .lovestory-content {
  grid-column: 1;
  justify-self: end;
  padding-right: 25px;
  text-align: right;
}

.lovestory-item:nth-child(even) .lovestory-content {
  grid-column: 3;
  justify-self: start;
  padding-left: 25px;
  text-align: left;
}

/* ---------- Photo ---------- */

.lovestory-photo {
  grid-row: 1;
  width: 180px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid rgba(168, 93, 58, 0.3);
  background-color: #e8ded0;
}

.lovestory-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Foto kanan untuk item ganjil */

.lovestory-item:nth-child(odd) .lovestory-photo {
  grid-column: 3;
  justify-self: start;
  margin-left: 25px;
}

/* Foto kiri untuk item genap */

.lovestory-item:nth-child(even) .lovestory-photo {
  grid-column: 1;
  justify-self: end;
  margin-right: 25px;
}

/* ---------- Date ---------- */

.lovestory-date {
  margin: 0 0 8px;
  font-family: var(--font-secondary);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--color-accent);
}

/* ---------- Subtitle ---------- */

.lovestory-subtitle {
  margin: 0;
  font-family: var(--font-primary);
  font-size: 34px;
  font-weight: 600;
  line-height: 1.1;
  color: var(--color-primary);
}

/* ---------- Description ---------- */

.lovestory-description {
  margin: 14px 0 0;
  font-family: var(--font-secondary);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.7;
  color: #80695b;
}

/* ---------- Closing ---------- */

.lovestory-closing {
  margin: 35px auto 0;
  text-align: center;
}

.lovestory-closing img {
  display: block;
  width: 72px;
  height: auto;
  margin: 0 auto 14px;
  object-fit: contain;
}

.lovestory-closing p {
  margin: 0;
  font-family: var(--font-primary);
  font-size: 32px;
  font-style: italic;
  font-weight: 700;
  color: #80695b;
}

/* Desktop */

@media (min-width: 1200px) {
  .lovestory-container {
    padding: 130px 24px;
  }
}

/* Laptop */

@media (min-width: 1025px) {
  .lovestory-container {
    padding: 120px 24px;
  }
}

/* Laptop kecil */

@media (max-width: 1199px) {
  .lovestory-container {
    width: min(92%, 950px);
  }

  .lovestory-photo {
    width: 170px;
  }
}

/* Tablet */

@media (max-width: 1024px) {
  .lovestory-timeline {
    max-width: 850px;
  }

  .lovestory-photo {
    width: 155px;
  }
}

@media (max-width: 992px) {
  .lovestory-timeline {
    margin-top: 65px;
  }

  .lovestory-photo {
    width: 145px;
  }
}

/* Tablet portrait */

@media (max-width: 768px) {
  .lovestory-container {
    padding: 90px 18px;
  }

  .lovestory-timeline {
    margin-top: 55px;
  }

  .lovestory-item {
    grid-template-columns: 1fr 55px 1fr;
    min-height: 210px;
  }

  .lovestory-marker {
    width: 42px;
    height: 42px;
  }

  .lovestory-content {
    max-width: 210px;
  }

  .lovestory-photo {
    width: 125px;
  }

  .lovestory-item:nth-child(odd) .lovestory-content {
    padding-right: 18px;
  }

  .lovestory-item:nth-child(even) .lovestory-content {
    padding-left: 18px;
  }

  .lovestory-item:nth-child(odd) .lovestory-photo {
    margin-left: 18px;
  }

  .lovestory-item:nth-child(even) .lovestory-photo {
    margin-right: 18px;
  }

  .lovestory-subtitle {
    font-size: 25px;
  }

  .lovestory-description {
    font-size: 10px;
  }
}

/* HP */

@media (max-width: 480px) {
  .lovestory-container {
    width: 94%;
    padding: 75px 14px;
  }

  .lovestory-eyebrow {
    font-size: 12px !important;
  }

  .lovestory-title {
    font-size: 40px;
  }

  .lovestory-intro {
    font-size: 11px;
  }

  .lovestory-timeline {
    margin-top: 45px;
  }

  .lovestory-item {
    grid-template-columns: 1fr 42px 1fr;
    min-height: 185px;
  }

  .lovestory-marker {
    width: 36px;
    height: 36px;
  }

  .lovestory-marker span {
    font-size: 9px;
  }

  .lovestory-date {
    font-size: 12px !important;
  }

  .lovestory-subtitle {
    font-size: 24px !important;
  }

  .lovestory-content {
    max-width: 135px;
  }

  .lovestory-photo {
    width: 95px;
  }

  .lovestory-item:nth-child(odd) .lovestory-content {
    padding-right: 12px;
  }

  .lovestory-item:nth-child(even) .lovestory-content {
    padding-left: 12px;
  }

  .lovestory-item:nth-child(odd) .lovestory-photo {
    margin-left: 12px;
  }

  .lovestory-item:nth-child(even) .lovestory-photo {
    margin-right: 12px;
  }

  .lovestory-subtitle {
    font-size: 22px;
  }

  .lovestory-description {
    margin-top: 10px;
    font-size: 9px;
    line-height: 1.7;
  }

  .lovestory-date {
    font-size: 9px;
  }

  .lovestory-closing {
    margin-top: 25px;
  }

  .lovestory-closing img {
    width: 44px;
    margin-bottom: 10px;
  }

  .lovestory-closing p {
    font-size: 20px;
  }
}

/* HP kecil */

@media (max-width: 420px) {
  .lovestory-container {
    padding: 65px 12px;
  }

  .lovestory-item {
    grid-template-columns: 1fr 38px 1fr;
    min-height: 175px;
  }

  .lovestory-content {
    max-width: 120px;
  }

  .lovestory-photo {
    width: 85px;
  }

  .lovestory-subtitle {
    font-size: 20px;
  }

  .lovestory-description {
    font-size: 8.5px;
  }
}

@media (max-width: 360px) {
  .lovestory-container {
    padding: 55px 10px;
  }

  .lovestory-item {
    grid-template-columns: 1fr 34px 1fr;
    min-height: 165px;
  }

  .lovestory-marker {
    width: 32px;
    height: 32px;
  }

  .lovestory-content {
    max-width: 110px;
  }

  .lovestory-photo {
    width: 75px;
  }

  .lovestory-subtitle {
    font-size: 18px;
  }

  .lovestory-description {
    font-size: 8px;
  }

  .lovestory-closing p {
    font-size: 18px;
  }
}

/* =========================================================
   SCROLL REVEAL - LOVE STORY
   ========================================================= */

.lovestory-divider-top,
.lovestory-header,
.lovestory-item,
.lovestory-closing {
  opacity: 0;
  translate: 0 45px;
  transition:
    opacity 0.8s ease,
    translate 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.lovestory-divider-top.is-visible,
.lovestory-header.is-visible,
.lovestory-item.is-visible,
.lovestory-closing.is-visible {
  opacity: 1;
  translate: 0 0;
}

/* Urutan muncul */
.lovestory-header.is-visible {
  transition-delay: 0.15s;
}

.lovestory-item:nth-child(1).is-visible {
  transition-delay: 0.1s;
}

.lovestory-item:nth-child(2).is-visible {
  transition-delay: 0.25s;
}

.lovestory-item:nth-child(3).is-visible {
  transition-delay: 0.4s;
}

.lovestory-item:nth-child(4).is-visible {
  transition-delay: 0.55s;
}

.lovestory-closing.is-visible {
  transition-delay: 0.2s;
}