/* ============================================================
   Hekim & Selbi — toý çakylygy
   Monochrome content (cream/black/grey) + sepia unlock cover
   ============================================================ */

:root {
  --cream: #fbfaf6; /* primary background      */
  --cream-2: #f4efe7; /* alternating section     */
  --paper: #ffffff;
  --ink: #201d19; /* serif headings / dark   */
  --ink-soft: #585048; /* body text               */
  --grey: #8c857a; /* day numbers, weekday, labels */
  --line: #cfc7ba; /* hairlines, rings, borders */
  --cover-bg: #43352a; /* unlock cover backdrop   */

  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans:
    "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;

  --maxw: 800px;
  --pad: 24px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
html.locked,
html.locked body {
  overflow: hidden;
  height: 100%;
}

body {
  font-family: var(--sans);
  font-weight: 300;
  color: var(--ink-soft);
  background: var(--cream);
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-user-select: none;
  user-select: none;
}
img,
svg,
iframe {
  display: block;
  max-width: 100%;
}
img {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
}
a {
  color: inherit;
}
::selection {
  background: rgba(140, 133, 122, 0.25);
}

/* ---------- shared ---------- */
.section {
  padding: clamp(58px, 11vw, 100px) var(--pad);
}
.section:nth-of-type(even) {
  background: var(--cream-2);
}
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  text-align: center;
}
.section__title {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--ink);
  font-size: clamp(1.6rem, 6vw, 2.3rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1.2em;
}
.heart {
  color: var(--grey);
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

/* eyebrow labels */
.cover__kicker,
.cd__label,
.contact__role,
.venue__time,
.footer__date,
.cal__year,
.countbox__label {
  font-size: 0.72rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--grey);
}

/* reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.9s ease,
    transform 0.9s ease;
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* =================================================================
   COVER + SLIDE TO UNLOCK
   ================================================================= */
.cover {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 64px 24px 40px;
  background: var(--cover-bg);
  overflow: hidden;
  transition:
    transform 1s cubic-bezier(0.76, 0, 0.24, 1),
    opacity 1s ease;
}
.cover.is-open {
  transform: translateY(-100%);
  opacity: 0;
}
.cover__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
  filter: grayscale(60%) sepia(22%) contrast(1.02);
}
.cover__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(60%) sepia(22%) contrast(1.02);
}
.cover__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(40, 30, 22, 0.55) 0%,
    rgba(40, 30, 22, 0.34) 40%,
    rgba(40, 30, 22, 0.62) 100%
  );
}
.cover__inner {
  position: relative;
  z-index: 2;
  color: #fff;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.cover__kicker {
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 30px;
}
.cover__names {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.05;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}
.cover__names span {
  font-size: clamp(2.8rem, 14vw, 4.4rem);
}
.cover__amp {
  font-style: italic;
  font-size: clamp(1.4rem, 6vw, 2rem) !important;
  color: rgba(255, 255, 255, 0.8);
  margin: 4px 0;
}
.cover__date {
  position: relative;
  z-index: 2;
  color: #fff;
  margin-top: 18px;
  letter-spacing: 0.22em;
  font-size: 0.82rem;
  text-transform: uppercase;
}

.unlock {
  position: relative;
  z-index: 2;
  width: min(320px, 84%);
  margin-top: 26px;
}
.unlock__track {
  position: relative;
  height: 62px;
  border-radius: 40px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.35);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  overflow: hidden;
  --p: 0;
}
.unlock__hint {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  pointer-events: none;
  opacity: calc(1 - var(--p) * 1.6);
  animation: hintpulse 2s ease-in-out infinite;
}
.unlock__target {
  position: absolute;
  right: 9px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.5);
  pointer-events: none;
}
.unlock__handle {
  position: absolute;
  left: 7px;
  top: 7px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--cover-bg);
  border: none;
  cursor: grab;
  touch-action: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  will-change: transform;
}
.unlock__handle.grabbing {
  cursor: grabbing;
}
@keyframes hintpulse {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 1;
  }
}

/* =================================================================
   HERO — name / photo-row / name
   ================================================================= */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cover-bg);
  padding: 80px 22px;
}
.hero__bg-img,
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero__bg-img {
  filter: grayscale(100%);
}
.hero__video {
  display: none;
  filter: grayscale(35%) sepia(12%);
}
.hero__veil {
  position: absolute;
  inset: 0;
  background: rgba(38, 28, 20, 0.42);
}
.hero__inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(6px, 2vw, 16px);
  width: 100%;
  color: #fff;
  text-align: center;
}
.hero__name {
  width: 100%;
  display: flex;
  justify-content: center;
}
.male {
  margin-right: 100px;
}
.female {
  margin-left: 100px;
}

/* ---- cursive signature: self-drawing SVG (pathLength=1, CSS-only) ---- */
.cover__names .sig,
.hero__name .sig {
  display: block;
  width: auto;
  max-width: 92vw;
}
.cover__names .sig {
  height: clamp(54px, 13vw, 100px);
}
.hero__name .sig {
  height: clamp(62px, 16vw, 132px);
}
/* Filled Great Vibes calligraphy, revealed by a centreline stroke that TRACES
   through the letters (SVG mask + stroke-dashoffset). Fully shown by default. */
.sig__fill {
  fill: currentColor;
}
@media (prefers-reduced-motion: no-preference) {
  .sig__trace {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: sigDraw 3s ease forwards;
  }
}
@keyframes sigDraw {
  to {
    stroke-dashoffset: 0;
  }
}

/* ---- whole-page fade-in on open ---- */
@keyframes pageFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
body {
  animation: pageFade 1.1s ease both;
}

/* =================================================================
   INVITE
   ================================================================= */
.invite__greeting {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--ink);
  font-size: clamp(1.5rem, 5.6vw, 2.15rem);
  letter-spacing: 0.04em;
  margin-bottom: 0.7em;
  overflow-wrap: anywhere;
}
.invite__text {
  font-size: 1.03rem;
  color: var(--ink-soft);
  margin: 0 auto 1.1em;
  max-width: 30em;
}
.invite__cta {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--ink);
}

/* =================================================================
   GALLERY SLIDER
   ================================================================= */
.gallery .container {
  max-width: 640px;
}
/* full-bleed, edge-to-edge, infinite transform-based track with peeking neighbours */
.slider {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
}
.slider__track {
  display: flex;
  gap: 12px;
  will-change: transform;
}
.slider__track.is-animating {
  transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}
.slide {
  flex: 0 0 50%;
}
@media (min-width: 680px) {
  .slide {
    flex: 0 0 34%;
  }
}
@media (min-width: 1080px) {
  .slide {
    flex: 0 0 25%;
  }
}
.slide img {
  width: 100%;
  height: clamp(320px, 56vh, 520px);
  object-fit: cover;
  filter: grayscale(100%);
  display: block;
  border-radius: 4px;
}
.slider__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(32, 24, 18, 0.32);
  color: #fff;
  cursor: pointer;
  z-index: 2;
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  transition: background 0.2s ease;
}
.slider__nav:hover {
  background: rgba(32, 24, 18, 0.6);
}
.slider__nav:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.slider__nav--prev {
  left: 12px;
}
.slider__nav--next {
  right: 12px;
}
.slider__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}
.slider__dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--line);
  cursor: pointer;
  transition:
    background 0.25s ease,
    transform 0.25s ease;
}
.slider__dots button.is-active {
  background: var(--ink);
  transform: scale(1.3);
}

/* =================================================================
   CALENDAR
   ================================================================= */
.cal__month {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--ink);
  font-size: clamp(2rem, 8vw, 3rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.cal__year {
  margin-top: 4px;
  margin-bottom: 1.5em;
}
.cal {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px 2px;
  max-width: 360px;
  margin: 0 auto;
}
.cal__dow {
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--grey);
  padding-bottom: 8px;
  font-weight: 500;
}
.cal__cell {
  position: relative;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  font-size: clamp(0.82rem, 3.6vw, 0.95rem);
  color: var(--grey);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}
.cal__cell--blank {
  color: transparent;
}
.cal__cell--day {
  color: var(--ink);
  font-weight: 500;
  cursor: pointer;
}
.cal__cell--day:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
  border-radius: 4px;
}
.cal__heart {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 165%;
  height: 165%;
  color: var(--grey);
  pointer-events: none;
}

/* date section layout: stacked (mobile) → side-by-side (desktop) */
.datecard__row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(34px, 8vw, 50px);
}
.cal-block {
  width: 100%;
  max-width: 360px;
}
@media (min-width: 820px) {
  .datecard__row {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 64px;
  }
  .cal-block {
    width: 100%;
  }
}

/* COUNTDOWN box */
.countbox {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: clamp(24px, 6vw, 34px) clamp(12px, 3.5vw, 20px);
}
.countbox__heart {
  color: var(--grey);
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}
.countbox__label {
  margin-bottom: 22px;
}
.countdown__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(6px, 2.5vw, 12px);
}
.cd {
  position: relative;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
}
.cd__ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.cd__ring-track,
.cd__ring-prog {
  fill: none;
  stroke-width: 3;
}
.cd__ring-track {
  stroke: var(--line);
}
.cd__ring-prog {
  stroke: var(--ink);
  stroke-linecap: round;
  stroke-dasharray: 226.19;
  stroke-dashoffset: 226.19;
  transition: stroke-dashoffset 0.85s linear;
}
.cd__num {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--ink);
  line-height: 1;
  font-size: clamp(1.2rem, 6vw, 1.7rem);
  font-variant-numeric: tabular-nums;
}
.cd__label {
  font-size: 0.56rem;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: var(--grey);
}
.countdown__done {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--ink);
  margin-top: 8px;
}

/* heart confetti burst (clicking day 23) */
.heart-burst {
  position: fixed;
  z-index: 1500;
  width: 18px;
  height: 16px;
  margin: -8px 0 0 -9px;
  color: #c8617a;
  pointer-events: none;
  will-change: transform, opacity;
  animation: heartFly var(--dur, 1.4s) cubic-bezier(0.18, 0.7, 0.4, 1) forwards;
}
.heart-burst svg {
  width: 100%;
  height: 100%;
}
@keyframes heartFly {
  0% {
    transform: translate(0, 0) scale(0.2) rotate(0deg);
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  100% {
    transform: translate(var(--dx, 0), var(--dy, -120px)) scale(var(--sc, 1))
      rotate(var(--rot, 0deg));
    opacity: 0;
  }
}

/* =================================================================
   VENUE + MAP
   ================================================================= */
/* stacked on mobile (photo first), two columns on desktop (map left, big photo right) */
.venue__row {
  display: flex;
  flex-direction: column;
  gap: clamp(22px, 5vw, 32px);
}
.venue__photo {
  order: -1; /* photo first on mobile */
  margin: 0 auto;
  width: 100%;
  max-width: 480px;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 16px 38px -26px rgba(40, 30, 22, 0.5);
}
.venue__img {
  display: block;
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  filter: grayscale(100%) contrast(1.03);
}
.venue__name {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--ink);
  font-size: clamp(1.3rem, 5vw, 1.75rem);
  margin-bottom: 0.5em;
}
.venue__addr {
  color: var(--ink-soft);
  margin-bottom: 1em;
}
.venue__time {
  margin-bottom: 1.4em;
}
.venue__time strong {
  color: var(--ink);
  font-weight: 500;
  letter-spacing: 0.1em;
}
.map {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--cream-2);
}
.map__frame {
  width: 100%;
  height: 250px;
  border: 0;
}
.venue .btn {
  margin-top: 1.4em;
}
@media (min-width: 940px) {
  .venue {
    overflow: hidden; /* clip the photo where it bleeds off the right of the viewport */
  }
  .venue .container {
    max-width: 1080px;
  }
  /* info + map stay in flow on the left; the photo is absolute, big, bleeding off-screen right */
  .venue__row {
    position: relative;
    display: block;
    min-height: 560px;
    text-align: left;
  }
  .venue__info {
    width: min(420px, 44%);
    display: flex;
    flex-direction: column;
  }
  .venue__photo {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: calc(50% - 50vw - 18px); /* push the right edge ~18px past the viewport */
    width: min(57vw, 840px);
    height: 520px;
    max-width: none;
    margin: 0;
  }
  .venue__img {
    height: 100%;
    aspect-ratio: auto;
  }
  .map {
    max-width: 420px;
    margin: 0 0 18px;
  }
  .venue .btn {
    align-self: flex-start;
    margin-top: 0;
  }
}

/* outline button (reference style) */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  border-radius: 50px;
  transition:
    background 0.3s ease,
    color 0.3s ease,
    transform 0.2s ease;
}
.btn:hover,
.btn:focus-visible {
  background: var(--ink);
  color: #fff;
}
.btn:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}
.btn:active {
  transform: translateY(1px);
}

/* =================================================================
   DECORATIVE PHOTO + quote
   ================================================================= */
.quote {
  position: relative;
  overflow: hidden;
  color: #fff;
}
.quote__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
}
.quote__veil {
  position: absolute;
  inset: 0;
  background: rgba(32, 24, 18, 0.58);
}
.quote .container {
  position: relative;
  z-index: 2;
}
.quote__text {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.5rem, 6vw, 2.3rem);
  color: #fff;
}

/* =================================================================
   CONTACT
   ================================================================= */
.contact__lead {
  color: var(--ink-soft);
  margin-bottom: 1.8em;
  max-width: 28em;
  margin-inline: auto;
}
.contact__card {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 32px 44px;
}
.contact__role {
  margin-bottom: 2px;
}
.contact__name {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--ink);
  font-size: 1.7rem;
  margin-bottom: 16px;
}

/* =================================================================
   FOOTER
   ================================================================= */
.footer {
  text-align: center;
  padding: clamp(52px, 10vw, 78px) var(--pad);
  background: var(--cream);
}
.footer__names {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--ink);
  font-size: clamp(1.8rem, 8vw, 2.6rem);
  margin-bottom: 0.4em;
}
.footer__line {
  color: var(--ink-soft);
  margin-bottom: 1.1em;
  max-width: 26em;
  margin-inline: auto;
}

/* =================================================================
   MUSIC TOGGLE
   ================================================================= */
.music-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 60;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: rgba(251, 250, 246, 0.85);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.music-toggle[hidden] {
  display: none;
}
.music-toggle:hover {
  transform: scale(1.06);
}
.music-toggle:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}
.music-toggle svg {
  width: 21px;
  height: 21px;
}
.music-toggle__on {
  display: none;
}
.music-toggle.is-playing .music-toggle__off {
  display: none;
}
.music-toggle.is-playing .music-toggle__on {
  display: block;
}
.music-toggle.is-playing {
  animation: spin 6s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .unlock__hint,
  .music-toggle.is-playing {
    animation: none;
  }
  .cover {
    transition: opacity 0.4s ease;
  }
}
