/* =========================================================
   Ömer & Kevser — Düğün Davetiyesi
   Palet: krem zemin, altın vurgu, koyu yeşil detay
   ========================================================= */

:root {
  --cream: #f7f2ea;
  --cream-deep: #efe6d9;
  --ivory: #fffdf9;
  --ink: #3c3830;
  --ink-soft: #6d675c;
  --gold: #b9975b;
  --gold-soft: #d8c39a;
  --green: #40513b;
  --blush: #e7d3cb;

  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --script: "Great Vibes", "Segoe Script", cursive;
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;

  --maxw: 1100px;
  --radius: 4px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;

  /* çok hafif kağıt dokusu */
  background-image:
    radial-gradient(circle at 15% 20%, rgba(216, 195, 154, 0.18), transparent 45%),
    radial-gradient(circle at 85% 75%, rgba(231, 211, 203, 0.22), transparent 45%);
  background-attachment: fixed;
}

img,
svg {
  max-width: 100%;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 400;
  line-height: 1.2;
}

p {
  margin: 0 0 0.8em;
}

a {
  color: var(--green);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 99;
  background: var(--ivory);
  padding: 0.6rem 1rem;
  font-family: var(--sans);
  font-size: 0.85rem;
}

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

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 1.25rem 6rem;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(255, 253, 249, 0.85), rgba(247, 242, 234, 0.4) 60%, var(--cream)),
    radial-gradient(ellipse at 50% 0%, rgba(185, 151, 91, 0.16), transparent 60%);
}

.hero__frame {
  position: relative;
  width: 100%;
  max-width: 680px;
  padding: clamp(2.5rem, 6vw, 4rem) clamp(1rem, 5vw, 3rem);
}

.hero__frame::before,
.hero__frame::after {
  content: "";
  position: absolute;
  width: 72px;
  height: 72px;
  border: 1px solid var(--gold-soft);
  pointer-events: none;
}

.hero__frame::before {
  top: 0;
  left: 0;
  border-right: 0;
  border-bottom: 0;
}

.hero__frame::after {
  bottom: 0;
  right: 0;
  border-left: 0;
  border-top: 0;
}

.hero__eyebrow {
  margin: 0 0 1.6rem;
  font-family: var(--sans);
  font-size: clamp(0.62rem, 1.6vw, 0.75rem);
  font-weight: 400;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--ink-soft);
  /* dar ekranlarda satır kayabilsin, harf aralığı taşırmasın */
  max-width: 100%;
  text-wrap: balance;
}

.hero__names {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--script);
  color: var(--ink);
}

.hero__name {
  font-size: clamp(4.6rem, 17vw, 7rem);
  line-height: 1.05;
  padding: 0 0.08em;
}

/* "&" iki ismin arasında, çakışmadan duracak kadar nefes payı alır */
.hero__amp {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.4rem, 4.5vw, 2.1rem);
  color: var(--gold);
  line-height: 1;
  margin: 0.35em 0 0.3em;
}

.hero__date {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.5rem;
  margin: 0.4rem 0 0.2rem;
  font-family: var(--sans);
  font-weight: 300;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: clamp(0.95rem, 3vw, 1.25rem);
  color: var(--ink);
}

.hero__day,
.hero__year {
  font-size: 1em;
}

.hero__month {
  font-family: var(--serif);
  font-style: italic;
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 1.15em;
  color: var(--gold);
}

.hero__time {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(0.68rem, 2vw, 0.8rem);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* aşağı ok — ekranın en altında olduğu için reveal yerine kendi fade'i var */
.hero__scroll {
  position: absolute;
  bottom: 2.2rem;
  left: 50%;
  translate: -50% 0;
  width: 26px;
  height: 42px;
  border: 1px solid var(--gold-soft);
  border-radius: 14px;
  display: grid;
  place-items: start center;
  padding-top: 7px;
  opacity: 0;
  animation: fadeIn 1s var(--ease) 1.1s forwards;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

.hero__scroll span {
  width: 4px;
  height: 8px;
  border-radius: 2px;
  background: var(--gold);
  animation: scrollDot 1.8s var(--ease) infinite;
}

@keyframes scrollDot {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(14px); opacity: 0.25; }
}

/* =========================================================
   AYIRICI
   ========================================================= */
.divider {
  margin: 1.5rem auto 2rem;
  width: min(320px, 70vw);
  color: var(--gold);
}

.divider--sm {
  width: min(220px, 55vw);
  margin: 1rem auto 2rem;
}

.divider svg {
  display: block;
  width: 100%;
  height: auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
  stroke-linecap: round;
}

/* =========================================================
   BÖLÜM TEMELİ
   ========================================================= */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(5rem, 12vw, 7rem) 1.25rem;
  text-align: center;
}

.section__title {
  font-family: var(--script);
  font-size: clamp(2.9rem, 9vw, 4rem);
  color: var(--ink);
  margin-bottom: 0.2rem;
}

.section__sub {
  font-family: var(--sans);
  font-size: clamp(0.68rem, 2vw, 0.78rem);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 2.5rem;
}

/* =========================================================
   GERİ SAYIM
   ========================================================= */
.countdown-section {
  position: relative;
}

.countdown {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(0.35rem, 2vw, 1.25rem);
  margin: 0 auto 2rem;
  flex-wrap: nowrap;
}

.cd__unit {
  flex: 0 1 clamp(72px, 20vw, 130px);
  background: var(--ivory);
  border: 1px solid var(--gold-soft);
  border-radius: var(--radius);
  padding: clamp(0.9rem, 2.5vw, 1.5rem) clamp(0.35rem, 1.5vw, 0.75rem);
  box-shadow: 0 12px 30px -22px rgba(60, 56, 48, 0.5);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.cd__value {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 9vw, 3.4rem);
  line-height: 1;
  font-weight: 400;
  color: var(--green);
  font-variant-numeric: tabular-nums;
  transition: transform 0.35s var(--ease);
}

.cd__value.tick {
  animation: tick 0.45s var(--ease);
}

@keyframes tick {
  0% { transform: translateY(-6px); opacity: 0.35; }
  100% { transform: translateY(0); opacity: 1; }
}

.cd__label {
  font-family: var(--sans);
  font-size: clamp(0.54rem, 1.7vw, 0.7rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.cd__sep {
  align-self: center;
  font-family: var(--serif);
  font-size: clamp(1.1rem, 3vw, 1.8rem);
  color: var(--gold-soft);
  padding-top: 0.4rem;
}

.countdown__sentence {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.05rem, 3.2vw, 1.5rem);
  color: var(--ink);
  max-width: 34ch;
  margin: 0 auto;
}

.countdown__sentence strong {
  font-style: normal;
  font-weight: 500;
  color: var(--gold);
}

/* =========================================================
   ÇİFT
   ========================================================= */
.couple {
  background: linear-gradient(180deg, transparent, rgba(255, 253, 249, 0.6), transparent);
}

.couple__grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(1rem, 4vw, 2.5rem);
  margin-bottom: 3rem;
}

.card {
  background: var(--ivory);
  border: 1px solid var(--cream-deep);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2.5rem) clamp(1rem, 3vw, 2rem);
  position: relative;
}

.card__initial {
  display: block;
  font-family: var(--script);
  font-size: clamp(3.2rem, 11vw, 4rem);
  line-height: 1;
  color: var(--gold-soft);
  margin-bottom: 0.2rem;
}

.card__name {
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(0.8rem, 2.4vw, 0.95rem);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}

.card__text {
  font-size: clamp(0.95rem, 2.6vw, 1.05rem);
  color: var(--ink-soft);
  margin: 0;
}

.couple__heart {
  width: clamp(26px, 6vw, 40px);
  color: var(--blush);
}

.couple__heart svg {
  fill: currentColor;
  stroke: var(--gold-soft);
  stroke-width: 1;
  animation: beat 2.4s var(--ease) infinite;
}

@keyframes beat {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.12); }
  30% { transform: scale(1); }
}

.quote {
  margin: 0 auto;
  max-width: 56ch;
  padding: 0 1rem;
}

.quote p {
  font-size: clamp(1.05rem, 3vw, 1.3rem);
  font-style: italic;
  color: var(--ink);
}

.quote cite {
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
}

/* =========================================================
   DETAYLAR
   ========================================================= */
.details__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: clamp(1rem, 3vw, 2rem);
}

.detail {
  background: var(--ivory);
  border: 1px solid var(--cream-deep);
  border-radius: var(--radius);
  padding: clamp(1.75rem, 4vw, 2.5rem) 1.25rem;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.detail:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -28px rgba(60, 56, 48, 0.55);
}

.detail__icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 1rem;
  color: var(--gold);
}

.detail__icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.detail__title {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.5rem;
}

.detail__line {
  font-size: clamp(1.25rem, 4vw, 1.6rem);
  margin: 0 0 0.2rem;
  color: var(--ink);
}

.detail__muted {
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin: 0;
}

.detail__link {
  display: inline-block;
  margin-top: 0.8rem;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--green);
}

/* =========================================================
   PROGRAM (TIMELINE)
   ========================================================= */
.timeline {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 620px;
  text-align: left;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: clamp(58px, 14vw, 84px);
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--gold-soft) 12%, var(--gold-soft) 88%, transparent);
}

.timeline__item {
  display: grid;
  grid-template-columns: clamp(58px, 14vw, 84px) 1fr;
  gap: clamp(1rem, 3vw, 1.75rem);
  padding: 0 0 2rem;
  position: relative;
}

.timeline__item:last-child {
  padding-bottom: 0;
}

.timeline__item::before {
  content: "";
  position: absolute;
  left: clamp(58px, 14vw, 84px);
  top: 10px;
  width: 9px;
  height: 9px;
  translate: -4.5px 0;
  border-radius: 50%;
  background: var(--cream);
  border: 1px solid var(--gold);
}

.timeline__time {
  font-family: var(--sans);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  color: var(--gold);
  padding-top: 0.15rem;
  text-align: right;
  padding-right: 0.9rem;
}

.timeline__body h3 {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 3.4vw, 1.4rem);
  margin-bottom: 0.15rem;
}

.timeline__body p {
  margin: 0;
  font-size: 0.98rem;
  color: var(--ink-soft);
}

/* =========================================================
   RSVP
   ========================================================= */
.rsvp__form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem clamp(1rem, 3vw, 2rem);
  max-width: 680px;
  margin: 0 auto;
  text-align: left;
  background: var(--ivory);
  border: 1px solid var(--cream-deep);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2.5rem);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}

.field--full,
.field--radio,
.rsvp__form .btn,
.rsvp__hint {
  grid-column: 1 / -1;
}

.field label,
.field legend {
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 0;
}

.optional {
  letter-spacing: 0.06em;
  text-transform: none;
  opacity: 0.7;
}

.field input[type="text"],
.field select,
.field textarea {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--ink);
  background: var(--cream);
  border: 1px solid var(--cream-deep);
  border-radius: var(--radius);
  padding: 0.7rem 0.85rem;
  width: 100%;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}

.field input[type="text"]:hover,
.field select:hover,
.field textarea:hover {
  border-color: var(--gold-soft);
}

.field textarea {
  resize: vertical;
}

.field input.invalid {
  border-color: #b5544a;
  background: #fdf4f3;
}

.field--radio {
  border: 0;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* .field label kuralını geçmek için özgüllüğü artırıyoruz */
.field--radio label.radio {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--serif);
  font-size: 1.02rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink);
  cursor: pointer;
}

.radio input {
  accent-color: var(--green);
  width: 1.05rem;
  height: 1.05rem;
}

.btn {
  display: inline-block;
  justify-self: center;
  font-family: var(--sans);
  font-size: 0.74rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ivory);
  background: var(--green);
  border: 1px solid var(--green);
  border-radius: var(--radius);
  padding: 0.95rem 2.2rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease);
}

.btn:hover {
  background: var(--ink);
  border-color: var(--ink);
  transform: translateY(-2px);
}

.btn--ghost {
  color: var(--green);
  background: transparent;
  border-color: var(--gold-soft);
}

.btn--ghost:hover {
  background: var(--green);
  color: var(--ivory);
  border-color: var(--green);
}

.rsvp__hint {
  margin: 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--ink-soft);
  font-style: italic;
}

.rsvp__hint.ok {
  color: var(--green);
  font-style: normal;
}

.rsvp__hint.err {
  color: #b5544a;
  font-style: normal;
}

/* =========================================================
   TAKVİME EKLE
   ========================================================= */
.save-date__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  text-align: center;
  padding: clamp(3rem, 8vw, 5rem) 1.25rem clamp(2.5rem, 6vw, 4rem);
  background: linear-gradient(180deg, transparent, rgba(239, 230, 217, 0.7));
}

.footer__names {
  font-family: var(--script);
  font-size: clamp(2.2rem, 8vw, 3.4rem);
  margin: 0 0 0.2rem;
}

.footer__note {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.4em;
  color: var(--gold);
  margin: 0 0 1rem;
}

.footer__thanks {
  font-size: 1rem;
  font-style: italic;
  color: var(--ink-soft);
  margin: 0;
}

/* =========================================================
   YAPRAK YAĞMURU
   ========================================================= */
.petals {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.petals span {
  position: absolute;
  top: -8vh;
  width: 10px;
  height: 10px;
  background: var(--blush);
  border-radius: 50% 0 50% 50%;
  opacity: 0;
  animation: fall linear infinite;
}

.petals span:nth-child(odd) {
  background: var(--gold-soft);
}

.petals span:nth-child(1)  { left: 4%;  animation-duration: 16s; animation-delay: 0s;    scale: 0.7; }
.petals span:nth-child(2)  { left: 13%; animation-duration: 21s; animation-delay: 3s;    scale: 1;   }
.petals span:nth-child(3)  { left: 22%; animation-duration: 18s; animation-delay: 7s;    scale: 0.5; }
.petals span:nth-child(4)  { left: 31%; animation-duration: 24s; animation-delay: 1.5s;  scale: 0.85;}
.petals span:nth-child(5)  { left: 40%; animation-duration: 19s; animation-delay: 9s;    scale: 0.6; }
.petals span:nth-child(6)  { left: 49%; animation-duration: 23s; animation-delay: 5s;    scale: 1.1; }
.petals span:nth-child(7)  { left: 58%; animation-duration: 17s; animation-delay: 11s;   scale: 0.55;}
.petals span:nth-child(8)  { left: 67%; animation-duration: 25s; animation-delay: 2s;    scale: 0.9; }
.petals span:nth-child(9)  { left: 76%; animation-duration: 20s; animation-delay: 8s;    scale: 0.65;}
.petals span:nth-child(10) { left: 85%; animation-duration: 22s; animation-delay: 4s;    scale: 1;   }
.petals span:nth-child(11) { left: 92%; animation-duration: 18s; animation-delay: 13s;   scale: 0.5; }
.petals span:nth-child(12) { left: 97%; animation-duration: 26s; animation-delay: 6s;    scale: 0.8; }

@keyframes fall {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg);
    opacity: 0;
  }
  10% { opacity: 0.75; }
  90% { opacity: 0.35; }
  100% {
    transform: translate3d(6vw, 112vh, 0) rotate(540deg);
    opacity: 0;
  }
}

/* =========================================================
   GİRİŞ ANİMASYONU (reveal)
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.9s var(--ease) var(--d, 0ms),
    transform 0.9s var(--ease) var(--d, 0ms);
}

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

/* JS kapalıysa her şey görünür kalsın */
.no-js .reveal {
  opacity: 1;
  transform: none;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 720px) {
  body {
    font-size: 17px;
  }

  .couple__grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  /* Kalp, üst üste dizilen kartlar arasında süslü bir ayırıcıya dönüşür */
  .couple__heart {
    width: auto;
    justify-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
  }

  .couple__heart::before,
  .couple__heart::after {
    content: "";
    flex: 0 1 70px;
    height: 1px;
    background: var(--gold-soft);
  }

  .couple__heart svg {
    width: 30px;
    flex: none;
  }

  .cd__sep {
    display: none;
  }

  .countdown {
    gap: 0.6rem;
  }

  .cd__unit {
    padding: 1.25rem 0.5rem;
  }

  /* Köşe çerçeveleri mobilde de belirgin kalsın */
  .hero__frame::before,
  .hero__frame::after {
    width: 64px;
    height: 64px;
  }

  .hero__eyebrow {
    letter-spacing: 0.2em;
  }

  .card {
    padding: 2rem 1.5rem;
  }
}

@media (max-width: 400px) {
  .countdown {
    flex-wrap: wrap;
  }

  .cd__unit {
    flex: 1 1 calc(50% - 0.5rem);
  }
}

/* =========================================================
   HAREKET AZALTMA & YAZDIRMA
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .petals {
    display: none;
  }
}

@media print {
  .petals,
  .hero__scroll,
  .save-date__actions,
  .rsvp__form {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
