/* =========================================================
   RESET & BASE
   ========================================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: #000000;
  color: #ffffff;
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

::selection {
  background: #ffffff;
  color: #000000;
}

/* Focus visibility for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 1px solid #ffffff;
  outline-offset: 4px;
}

/* =========================================================
   PASSWORD SCREEN
   ========================================================= */
.password-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background-color: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  transition: opacity 0.9s ease, visibility 0.9s ease;
}

.password-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.password-content {
  text-align: center;
  max-width: 420px;
  width: 100%;
}

.password-number {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: clamp(4rem, 16vw, 8rem);
  line-height: 1;
  margin-bottom: 16px;
}

.password-subtitle {
  font-size: clamp(0.7rem, 2vw, 0.85rem);
  letter-spacing: 0.2em;
  color: #a3a3a3;
  margin-bottom: 48px;
}

.password-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.password-input {
  width: 100%;
  max-width: 280px;
  background: transparent;
  border: none;
  border-bottom: 1px solid #3d3d3d;
  color: #ffffff;
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  padding: 12px 8px;
  transition: border-color 0.3s ease;
}

.password-input::placeholder {
  color: #6b6b6b;
  letter-spacing: 0.2em;
}

.password-input:focus {
  border-color: #ffffff;
}

.password-button {
  background: transparent;
  border: 1px solid #ffffff;
  color: #ffffff;
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  padding: 12px 36px;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
}

.password-button:hover,
.password-button:focus-visible {
  background: #ffffff;
  color: #000000;
}

.password-error {
  margin-top: 24px;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: #d4d4d4;
}

.password-content.shake {
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}

/* =========================================================
   PROGRESS BAR
   ========================================================= */
.progress-bar {
  position: fixed;
  top: 12vh;
  right: 24px;
  width: 1px;
  height: 76vh;
  background: rgba(255, 255, 255, 0.12);
  z-index: 500;
}

.progress-fill {
  width: 100%;
  height: 0%;
  background: #ffffff;
  transition: height 0.1s linear;
}

/* =========================================================
   MAIN NAVIGATION
   ========================================================= */
.main-nav {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 600;
  text-align: right;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease;
}

.main-nav.is-visible {
  opacity: 1;
  visibility: visible;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  padding: 8px 16px;
  cursor: pointer;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 28px;
}

.nav-link {
  color: #d4d4d4;
  text-decoration: none;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: #ffffff;
}

/* =========================================================
   MAIN CONTENT / SECTIONS
   ========================================================= */
.main-content[hidden] {
  display: none;
}

.section {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px 20px;
  position: relative;
}

.section-inner {
  max-width: 980px;
  width: 100%;
}

.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  color: #8a8a8a;
  margin-bottom: 28px;
}

.section-title {
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  line-height: 1.25;
  font-weight: 400;
  letter-spacing: 0.01em;
  margin-bottom: 24px;
}

.section-subtitle {
  font-size: clamp(0.85rem, 2vw, 1rem);
  color: #a3a3a3;
  letter-spacing: 0.08em;
  line-height: 1.8;
}

/* Fade-in-on-scroll (JS toggles .is-visible via IntersectionObserver) */
.fade-in {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 1s ease, transform 1s ease;
}

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

/* ---- Section 01: Intro ---- */
#section-intro {
  min-height: 62vh;
  padding-bottom: 30px;
}

#section-intro .section-inner {
  max-width: 1100px;
}

#section-intro .intro-title {
  font-family: 'Playfair Display', serif;
  font-weight: 400;
  font-size: clamp(1.75rem, 3vw, 3.15rem) !important;
  line-height: 1.18;
  letter-spacing: -0.015em;
  max-width: 1000px;
  margin: 0 auto 56px;
}

.intro-line {
  display: block;
  opacity: 0;
  transform: translateY(22px);
  filter: blur(5px);
}

.fade-in.is-visible .intro-line--one {
  animation: intro-line-reveal 1.15s cubic-bezier(0.22, 1, 0.36, 1) 0.15s forwards;
}

.fade-in.is-visible .intro-line--two {
  animation: intro-line-reveal 1.15s cubic-bezier(0.22, 1, 0.36, 1) 0.65s forwards;
}

@keyframes intro-line-reveal {
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.scroll-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #8a8a8a;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
}

.scroll-arrow {
  font-size: 1.1rem;
  animation: scroll-bounce 2.2s ease-in-out infinite;
}

@keyframes scroll-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* ---- Section 02: For Urtė (story + photo) ---- */
.section-urte {
  min-height: 62vh;
  padding-top: 30px;
}

.story-layout {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: minmax(280px, 430px) minmax(300px, 520px);
  align-items: center;
  justify-content: center;
  gap: clamp(52px, 8vw, 110px);
  text-align: left;
}

.story-photo-frame {
  width: 100%;
  aspect-ratio: 3 / 4;
  background-color: #0d0d0d;
  border: 1px solid #242424;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.story-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.story-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.6rem, 5vw, 4.9rem);
  font-weight: 500;
  line-height: 1.02;
  margin-bottom: 28px;
}

.story-accent {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.05rem, 2vw, 1.45rem);
  letter-spacing: 0.32em;
  color: #ffffff;
  margin-bottom: 20px;
}

.story-text {
  color: #b3b3b3;
  font-size: clamp(0.98rem, 1.55vw, 1.12rem);
  line-height: 1.9;
  letter-spacing: 0.01em;
  margin-bottom: 24px;
  max-width: 34ch;
}

.story-text--final {
  color: #ffffff;
  margin-bottom: 0;
}

/* Generic placeholders used in later sections */
.photo-placeholder {
  background-color: #0d0d0d;
  border: 1px solid #2b2b2b;
  width: 260px;
  aspect-ratio: 3 / 4;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
}

.photo-placeholder span {
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  color: #6b6b6b;
}

.photo-placeholder--wide {
  width: 100%;
  max-width: 500px;
  aspect-ratio: 16 / 10;
  margin: 40px auto;
}

/* ---- Section 03: The Book ---- */
.book-cover-visual {
  width: min(360px, 100%);
  margin: 48px auto 36px;
}

.book-cover-image {
  width: 100%;
  display: block;
  border-radius: 2px;
  box-shadow: 0 28px 54px rgba(0, 0, 0, 0.42);
}

.btn-outline {
  background: transparent;
  border: 1px solid #ffffff;
  color: #ffffff;
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  padding: 14px 40px;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
}

.btn-outline:hover,
.btn-outline:focus-visible {
  background: #ffffff;
  color: #000000;
}

/* ---- Section 04: One of a Kind ---- */
.onekind-title {
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 1.3;
  font-weight: 400;
  margin-bottom: 24px;
}

.name-highlight {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 1.1em;
}

/* ---- Final message ---- */
.section-final {
  overflow: hidden;
}

.stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
}

.final-credit {
  margin-top: 40px;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: #8a8a8a;
  line-height: 1.8;
}

.final-year {
  margin-top: 56px;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: #6b6b6b;
}

/* =========================================================
   MODAL (THE BOOK)
   ========================================================= */
.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
}

.modal-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 480px;
  padding: 40px;
  border: 1px solid #2b2b2b;
  background: #000000;
}

.modal-title {
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.modal-subtitle {
  font-size: 0.85rem;
  color: #a3a3a3;
  letter-spacing: 0.05em;
}

.modal-close {
  position: absolute;
  top: -36px;
  right: 0;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 8px;
}

/* =========================================================
   RESPONSIVE — TABLET & MOBILE
   ========================================================= */
@media (max-width: 768px) {
  .section {
    padding: 80px 20px;
  }

  #section-intro {
    padding-bottom: 20px;
  }

  .section-urte {
    padding-top: 20px;
  }

  .progress-bar {
    display: none;
  }

  .story-layout {
    grid-template-columns: 1fr;
    gap: 42px;
    width: min(560px, 100%);
    text-align: center;
  }

  .story-photo-frame {
    width: min(380px, 100%);
    margin: 0 auto;
  }

  .story-copy {
    text-align: center;
  }

  .nav-toggle {
    display: inline-block;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    align-items: flex-end;
    gap: 16px;
    background: #000000;
    border: 1px solid #2b2b2b;
    padding: 20px;
    margin-top: 12px;
  }

  .nav-links.is-open {
    display: flex;
  }
}

@media (max-width: 480px) {
  #section-intro .intro-title {
    font-size: clamp(1.55rem, 7vw, 2.15rem) !important;
    line-height: 1.25;
  }

  .story-photo-frame {
    width: 100%;
    max-width: 300px;
  }

  .story-text br {
    display: none;
  }

  .photo-placeholder {
    width: 100%;
    max-width: 280px;
  }
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .intro-line {
    opacity: 1;
    transform: none;
    filter: none;
    animation: none !important;
  }

  .scroll-arrow {
    animation: none;
  }

  .password-content.shake {
    animation: none;
  }

  .wish-light {
    animation: none;
    opacity: 0;
  }

  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}


/* Digital book link */
a.btn-outline {
  display: inline-block;
  text-decoration: none;
}


/* Page refinements — July update */
.section-intro .section-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.story-copy {
  text-align: left;
}

.btn-outline {
  display: inline-block;
  text-decoration: none;
}

@media (max-width: 768px) {
  .story-copy {
    text-align: center;
  }

  .story-text {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .story-accent {
    letter-spacing: 0.24em;
  }

  .book-cover-visual {
    width: min(320px, 88vw);
  }
}

@media (max-width: 480px) {
  .story-title {
    margin-bottom: 24px;
  }
}


/* July refinement v2 */
.story-text--single {
  max-width: 36ch;
  margin-bottom: 0;
  color: #bcbcbc;
}

.section-title--book {
  font-size: clamp(1.5rem, 3.6vw, 2.65rem);
  letter-spacing: 0.02em;
  margin-bottom: 30px;
}

.book-cover-visual--large {
  width: min(520px, 92vw);
  margin: 20px auto 34px;
}

.book-cover-image--floating {
  width: 100%;
  filter: drop-shadow(0 24px 36px rgba(0, 0, 0, 0.34));
}

#section-book .section-inner {
  max-width: 860px;
}

@media (max-width: 768px) {
  .story-text--single {
    max-width: 100%;
  }

  .book-cover-visual--large {
    width: min(430px, 92vw);
  }
}


/* =========================================================
   DEDICATIONS — draggable horizontal carousel, no heading
   ========================================================= */
.section-dedications {
  padding: 90px clamp(0px, 4vw, 40px);
}

.dedications-wrap {
  width: 100%;
}

.dedications-track {
  display: flex;
  gap: 14px;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px clamp(20px, 6vw, 12vw) 24px;
  cursor: grab;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}

.dedications-track::-webkit-scrollbar {
  display: none;
  height: 0;
  width: 0;
}

.dedications-track.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}

.dedication-card {
  flex: 0 0 auto;
  width: min(280px, 76vw);
  min-height: 180px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  opacity: 0.4;
  transition: opacity 0.5s ease, border-color 0.5s ease;
  user-select: none;
}

.dedication-card.is-active {
  opacity: 1;
  border-color: rgba(255, 255, 255, 0.3);
}

.dedication-index {
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  color: #666666;
}

.dedication-text {
  font-family: 'Playfair Display', serif;
  font-size: 0.98rem;
  line-height: 1.75;
  color: #eaeaea;
  margin: 16px 0;
  min-height: 3em;
}

.dedication-text span {
  display: inline-block;
  margin-right: 0.28em;
}

.dedication-from {
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  color: #8a8a8a;
}

.dedications-hint {
  text-align: center;
  font-size: 0.68rem;
  color: #5c5c5c;
  letter-spacing: 0.14em;
  margin-top: 4px;
}

@media (max-width: 680px) {
  .section-dedications {
    padding: 70px 0;
  }

  .dedication-card {
    width: 78vw;
    padding: 22px 18px;
  }
}

/* =========================================================
   PHOTO GALLERY + FINAL REFINEMENTS — v3
   ========================================================= */
.section-gallery {
  min-height: 100vh;
  padding: 90px clamp(18px, 4vw, 56px);
}

.gallery-wrap {
  width: 100%;
}

.gallery-track {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px clamp(20px, 8vw, 16vw) 24px;
  cursor: grab;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}

.gallery-track::-webkit-scrollbar {
  display: none;
  height: 0;
  width: 0;
}

.gallery-track.is-dragging {
  cursor: grabbing;
}

.gallery-item {
  flex: 0 0 auto;
  width: 150px;
  height: min(58vh, 480px);
  overflow: hidden;
  background: #090909;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  margin: 0;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.5);
  transition: filter 0.4s ease;
}

.gallery-item.is-active img {
  filter: brightness(1);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 1.1s cubic-bezier(0.22, 1, 0.36, 1), filter 0.6s ease;
}

.gallery-item:hover img {
  transform: scale(1.025);
}

.gallery-item--landscape img {
  object-position: center center;
}


.section-final .section-inner {
  max-width: 900px;
}

.final-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.4rem, 6vw, 5.4rem);
  line-height: 1.03;
  font-weight: 400;
  letter-spacing: -0.025em;
  margin-bottom: 28px;
}

.final-love {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.3rem, 3vw, 2.35rem);
  line-height: 1.2;
  letter-spacing: 0.04em;
  color: #ffffff;
}

.final-credit {
  margin-top: 42px;
  font-family: 'Inter', sans-serif;
  font-size: clamp(0.7rem, 1.2vw, 0.82rem);
  letter-spacing: 0.15em;
  color: #8f8f8f;
  line-height: 1.9;
}

@media (max-width: 980px) {
  .gallery-item {
    width: 130px;
  }
}

@media (max-width: 680px) {
  .section-gallery {
    padding: 70px 0;
  }

  .gallery-item {
    width: 110px;
    height: 46vh;
  }
}

