/* ============================================================
   İhsan & Bengisu — Wedding Invitation Website
   Colors can be changed from the :root variables below.
   ============================================================ */

:root {
  --bg: #F8F4EC;
  --cream: #EFE7D8;
  --gold: #B99A62;
  --gold-soft: rgba(185, 154, 98, 0.28);
  --gold-line: rgba(185, 154, 98, 0.45);
  --text: #29251F;
  --text-soft: rgba(41, 37, 31, 0.68);
  --beige: #D8CCB8;
  --white: #FFFFFF;
  --blush: #E8D5D0;
  --shadow: 0 18px 50px rgba(41, 37, 31, 0.08);
  --radius: 18px;
  --font-script: "Great Vibes", "Allura", cursive;
  --font-serif: "Cormorant Garamond", "Playfair Display", Georgia, serif;
  --font-display: "Playfair Display", "Cormorant Garamond", Georgia, serif;
  --font-sans: "Montserrat", "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html,
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body {
  font-family: var(--font-serif);
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse at 50% -10%, rgba(185, 154, 98, 0.12), transparent 52%),
    radial-gradient(ellipse at 100% 30%, rgba(232, 213, 208, 0.35), transparent 42%),
    radial-gradient(ellipse at 0% 70%, rgba(216, 204, 184, 0.28), transparent 40%);
  line-height: 1.6;
  font-size: 16px;
  min-height: 100%;
  -webkit-tap-highlight-color: rgba(185, 154, 98, 0.18);
}

/* Subtle paper grain — does not block clicks */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.18;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

main {
  position: relative;
  z-index: 1;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button,
input,
a {
  font: inherit;
  touch-action: manipulation;
}

a {
  color: inherit;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 100;
  background: var(--text);
  color: var(--bg);
  padding: 0.5rem 0.9rem;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

/* ------------------------------------------------------------
   Music button
   ------------------------------------------------------------ */
.music-btn {
  position: fixed;
  top: calc(1rem + env(safe-area-inset-top));
  right: calc(1rem + env(safe-area-inset-right));
  z-index: 40;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: rgba(248, 244, 236, 0.88);
  color: var(--gold);
  cursor: pointer;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.4s ease, background 0.4s ease, color 0.4s ease;
}

.music-btn__icon {
  font-size: 1.05rem;
  line-height: 1;
}

.music-btn.is-playing {
  background: var(--gold);
  color: var(--white);
}

.music-btn:hover,
.music-btn:focus-visible {
  transform: scale(1.06);
  outline: none;
}

.music-btn.is-unavailable {
  opacity: 0.45;
}

/* ------------------------------------------------------------
   Shared section language
   ------------------------------------------------------------ */
.section {
  position: relative;
  padding: 6.5rem 1.5rem;
}

.section__inner {
  width: min(920px, 100%);
  margin: 0 auto;
  text-align: center;
}

.eyebrow {
  margin: 0 0 0.55rem;
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gold);
}

.section-title {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  letter-spacing: 0.04em;
}

.divider {
  width: min(220px, 70%);
  margin: 1.15rem auto 1.8rem;
}

/* Reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 1.1s ease, transform 1.1s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ------------------------------------------------------------
   Floral corners
   ------------------------------------------------------------ */
.floral {
  position: absolute;
  width: min(34vw, 280px);
  pointer-events: none;
  user-select: none;
  z-index: 2;
}

.floral--tl {
  top: -2%;
  left: -2%;
  transform: rotate(-2deg);
}

.floral--tr {
  top: -2%;
  right: -2%;
  transform: scaleX(-1) rotate(-2deg);
}

.floral--bl {
  bottom: -2%;
  left: -2%;
  transform: scaleY(-1) rotate(-2deg);
}

.floral--br {
  bottom: -2%;
  right: -2%;
  transform: scale(-1) rotate(-2deg);
}

.floral--mini {
  width: min(28vw, 170px);
  opacity: 0.85;
}

.float-a {
  animation: floatLeaf 8s ease-in-out infinite;
}

.float-b {
  animation: floatLeaf 10s ease-in-out infinite reverse;
}

@keyframes floatLeaf {
  0%, 100% { margin-top: 0; }
  50% { margin-top: -8px; }
}

/* ------------------------------------------------------------
   1. Hero — open landing, not a card
   ------------------------------------------------------------ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: calc(2.2rem + env(safe-area-inset-top)) 1.4rem calc(4.8rem + env(safe-area-inset-bottom));
}

@supports (min-height: 100svh) {
  .hero {
    min-height: 100svh;
  }
}

.hero__atmosphere {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.5), transparent 52%),
    linear-gradient(180deg, rgba(239, 231, 216, 0.2), transparent 40%);
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 3;
  width: min(720px, 100%);
  text-align: center;
}

.hero-mark {
  margin: 0 0 1.4rem;
  font-family: var(--font-serif);
  font-size: 0.95rem;
  letter-spacing: 0.42em;
  color: var(--gold);
}

.couple-names {
  margin: 0;
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(3.6rem, 11vw, 6.2rem);
  line-height: 1.05;
  color: var(--text);
}

.couple-names__line,
.couple-names__amp {
  display: block;
}

.couple-names__amp {
  font-size: 0.55em;
  color: var(--gold);
  margin: 0.05em 0;
}

.hero-date {
  margin: 1.15rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2.6vw, 1.35rem);
  letter-spacing: 0.34em;
  color: var(--gold);
}

.hero-quote {
  margin: 1.5rem 0 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.05rem, 2.4vw, 1.28rem);
  line-height: 1.75;
  color: var(--text-soft);
}

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: calc(1.1rem + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  z-index: 4;
}

.scroll-hint__line {
  width: 1px;
  height: 28px;
  background: var(--gold);
  animation: scrollPulse 2.2s ease-in-out infinite;
  transform-origin: top;
}

@keyframes scrollPulse {
  0%, 100% { transform: scaleY(0.45); opacity: 0.3; }
  50% { transform: scaleY(1); opacity: 1; }
}

.fade-in {
  opacity: 0;
  animation: fadeUp 1.25s ease forwards;
}

.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.65s; }
.delay-4 { animation-delay: 0.95s; }
.delay-5 { animation-delay: 1.2s; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

/* ------------------------------------------------------------
   2. Story
   ------------------------------------------------------------ */
.story {
  background:
    linear-gradient(180deg, transparent, rgba(239, 231, 216, 0.45) 20%, rgba(239, 231, 216, 0.45) 80%, transparent);
}

.story__ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  margin: 0 auto 1.4rem;
}

.story__ornament img[src*="floral-heart"] {
  width: 36px;
}

.story__sprig {
  width: 22px;
  transform: rotate(-28deg);
  opacity: 0.8;
}

.story__sprig--flip {
  transform: scaleX(-1) rotate(-28deg);
}

.story__text {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.15rem, 2.6vw, 1.45rem);
  line-height: 1.9;
  color: var(--text-soft);
}

.story__text p {
  margin: 0 0 1.15rem;
}

/* ------------------------------------------------------------
   3. Countdown
   ------------------------------------------------------------ */
.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  width: min(640px, 100%);
  margin: 0 auto;
}

.count-box {
  border: 1px solid var(--gold-line);
  background: rgba(255, 255, 255, 0.48);
  border-radius: 16px;
  padding: 1.15rem 0.4rem 0.95rem;
  box-shadow: 0 8px 24px rgba(41, 37, 31, 0.04);
}

.count-box__num {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 5vw, 2.5rem);
  line-height: 1;
  color: var(--text);
}

.count-box__label {
  display: block;
  margin-top: 0.55rem;
  font-family: var(--font-sans);
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}

.countdown-done {
  margin: 1.4rem 0 0;
  font-family: var(--font-script);
  font-size: clamp(2rem, 5vw, 2.8rem);
  color: var(--text);
}

/* ------------------------------------------------------------
   4. Details
   ------------------------------------------------------------ */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.15rem;
  margin-top: 0.4rem;
}

.detail-card {
  padding: 2rem 1.1rem 1.8rem;
  border: 1px solid var(--gold-soft);
  background: rgba(255, 255, 255, 0.36);
  border-radius: 4px;
  position: relative;
}

.detail-card::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(185, 154, 98, 0.16);
  pointer-events: none;
}

.detail-card__icon {
  width: 42px;
  height: 42px;
  margin: 0 auto 1rem;
  color: var(--gold);
}

.detail-card__label {
  margin: 0 0 0.45rem;
  font-family: var(--font-sans);
  font-size: 0.62rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
}

.detail-card__value {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.28rem;
  line-height: 1.45;
}

.detail-card__soft {
  display: inline-block;
  margin-top: 0.2rem;
  font-size: 0.95rem;
  color: var(--text-soft);
}

/* ------------------------------------------------------------
   5. Location
   ------------------------------------------------------------ */
.location {
  padding-left: 1.15rem;
  padding-right: 1.15rem;
}

.location__panel {
  position: relative;
  width: min(760px, 100%);
  margin: 0 auto;
  text-align: center;
  padding: 5rem 1.4rem 4.4rem;
  background:
    linear-gradient(180deg, #FBF8F1, var(--cream));
  border: 1px solid var(--gold-soft);
  overflow: hidden;
}

.location__venue {
  margin: 0.2rem 0 0.25rem;
  font-family: var(--font-serif);
  font-size: clamp(1.45rem, 3vw, 1.9rem);
}

.location__city {
  margin: 0 0 1.8rem;
  font-family: var(--font-display);
  font-style: italic;
  color: var(--text-soft);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0.85rem 2.1rem;
  border: 1px solid var(--gold);
  background: var(--gold);
  color: var(--white);
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.35s ease, color 0.35s ease, transform 0.35s ease;
}

.btn:hover,
.btn:focus-visible {
  background: transparent;
  color: var(--gold);
  outline: none;
}

/* ------------------------------------------------------------
   6. Gallery + lightbox
   ------------------------------------------------------------ */
.gallery {
  columns: 3;
  column-gap: 1rem;
  text-align: left;
}

.gallery-item {
  display: block;
  width: 100%;
  margin: 0 0 1rem;
  padding: 0;
  border: 0;
  background: none;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  cursor: pointer;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(41, 37, 31, 0.08);
}

.gallery-item img {
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: transform 0.8s ease;
}

.gallery-item:nth-child(3n+1) img { aspect-ratio: 3 / 4; object-fit: cover; }
.gallery-item:nth-child(3n+2) img { aspect-ratio: 1 / 1; object-fit: cover; }
.gallery-item:nth-child(3n) img { aspect-ratio: 4 / 5; object-fit: cover; }

.gallery-item:hover img,
.gallery-item:focus-visible img {
  transform: scale(1.045);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(41, 37, 31, 0.84);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4.5rem 4rem;
}

.lightbox[hidden] {
  display: none;
}

.lightbox__figure {
  margin: 0;
  max-width: min(920px, 100%);
  max-height: 100%;
}

.lightbox__figure img {
  max-height: min(82vh, 820px);
  width: auto;
  max-width: 100%;
  margin: 0 auto;
  border-radius: 6px;
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.lightbox.is-ready .lightbox__figure img {
  opacity: 1;
  transform: none;
}

.lightbox__close,
.lightbox__nav {
  position: absolute;
  border: 0;
  background: transparent;
  color: var(--cream);
  cursor: pointer;
  line-height: 1;
}

.lightbox__close {
  top: calc(0.8rem + env(safe-area-inset-top));
  right: calc(1rem + env(safe-area-inset-right));
  font-size: 2.2rem;
  width: 48px;
  height: 48px;
}

.lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
  width: 52px;
  height: 52px;
}

.lightbox__prev { left: 0.4rem; }
.lightbox__next { right: 0.4rem; }

.lightbox__close:focus-visible,
.lightbox__nav:focus-visible,
.gallery-item:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 3px;
}

/* ------------------------------------------------------------
   7. Family
   ------------------------------------------------------------ */
.family {
  background:
    radial-gradient(ellipse at 50% 50%, rgba(255, 255, 255, 0.55), transparent 60%);
}

.family .section__inner {
  position: relative;
  padding: 1rem 4.5rem;
}

.family__lead {
  margin: 0 0 1.3rem;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--text-soft);
}

.family__name {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 500;
}

.family__amp {
  margin: 0.35rem 0;
  font-family: var(--font-script);
  font-size: 2rem;
  color: var(--gold);
}

.family__sprig {
  position: absolute;
  top: 50%;
  width: 54px;
  opacity: 0.8;
  pointer-events: none;
}

.family__sprig--left {
  left: 0;
  transform: translateY(-50%);
}

.family__sprig--right {
  right: 0;
  transform: translateY(-50%) scaleX(-1);
}

/* ------------------------------------------------------------
   Finale
   ------------------------------------------------------------ */
.finale {
  position: relative;
  min-height: 88vh;
  min-height: 88svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 1.3rem 5rem;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(255, 255, 255, 0.5), transparent 55%),
    linear-gradient(180deg, transparent, rgba(239, 231, 216, 0.55));
}

.couple-names--finale {
  font-size: clamp(3.2rem, 9vw, 5.2rem);
  margin-bottom: 0.55rem;
}

.finale__wish {
  margin: 0.4rem 0 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--text-soft);
}

.gold-heart {
  width: 48px;
  margin: 1.3rem auto 1rem;
  animation: heartGlow 2.8s ease-in-out infinite;
}

@keyframes heartGlow {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(185, 154, 98, 0)); }
  50% { transform: scale(1.08); filter: drop-shadow(0 0 10px rgba(185, 154, 98, 0.35)); }
}

/* ------------------------------------------------------------
   Desktop invitation card names side-by-side
   ------------------------------------------------------------ */
@media (min-width: 720px) {
  .couple-names:not(.couple-names--finale) {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: baseline;
    gap: 0.28em;
    font-size: clamp(3.4rem, 6.4vw, 4.6rem);
  }

  .couple-names:not(.couple-names--finale) .couple-names__line,
  .couple-names:not(.couple-names--finale) .couple-names__amp {
    display: inline;
  }
}

/* ------------------------------------------------------------
   Tablet
   ------------------------------------------------------------ */
@media (max-width: 900px) {
  .detail-grid {
    grid-template-columns: 1fr;
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
  }

  .gallery {
    columns: 2;
  }

  .section {
    padding: 5rem 1.25rem;
  }
}

/* ------------------------------------------------------------
   Mobile
   ------------------------------------------------------------ */
@media (max-width: 640px) {
  .hero {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .floral {
    width: min(46vw, 168px);
  }

  .countdown {
    gap: 0.55rem;
  }

  .count-box {
    padding: 0.9rem 0.15rem 0.75rem;
    border-radius: 12px;
  }

  .gallery {
    columns: 1;
  }

  .family .section__inner {
    padding: 0.4rem 0;
  }

  .family__sprig {
    display: none;
  }

  .lightbox {
    padding: 4.5rem 0.7rem;
  }

  .lightbox__nav {
    font-size: 2.3rem;
    width: 40px;
  }

  .location__panel {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .btn {
    width: 100%;
    max-width: 360px;
  }
}

/* iPhone notch / home indicator */
@supports (padding: max(0px)) {
  .music-btn {
    top: max(1rem, env(safe-area-inset-top));
    right: max(1rem, env(safe-area-inset-right));
  }
}

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

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

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