/* ==========================================================================
   Esmâ-ü'l-Hüsnâ · Günün Esması
   Tema: Mübarek Üç Aylar Planlayıcısı (1448) — krem kâğıt, gül kurusu,
   adaçayı ve eski altın; Cormorant Garamond + Plus Jakarta Sans
   ========================================================================== */

:root {
  /* kâğıt & mürekkep */
  --cream: #fffdfa;
  --cream-warm: #fdf7f2;
  --paper: #fffefc;
  --ink: #3d2e30;
  --ink-soft: #6d5054;
  --muted: #96878f;
  --line: #ead9d5;
  --line-soft: #f3e7e3;

  /* ay renkleri */
  --rose: #c19a8d;
  --rose-deep: #9a706b;
  --rose-tint: #f9efeb;

  --sage: #83a28e;
  --sage-deep: #64816f;
  --sage-tint: #f2f7ef;

  --gold: #c59a66;
  --gold-deep: #9a734e;
  --gold-tint: #fdf6ec;

  /* aktif ay (data-theme ile değişir) */
  --accent: var(--rose);
  --accent-deep: var(--rose-deep);
  --accent-tint: var(--rose-tint);

  --shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 30px 60px -50px rgba(93, 71, 72, .6);
}

[data-theme="saban"] {
  --accent: var(--sage);
  --accent-deep: var(--sage-deep);
  --accent-tint: var(--sage-tint);
}

[data-theme="ramazan"] {
  --accent: var(--gold);
  --accent-deep: var(--gold-deep);
  --accent-tint: var(--gold-tint);
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 400;
  font-size: 16px;
  color: var(--ink-soft);
  background:
    radial-gradient(90rem 40rem at 50% -14rem, var(--accent-tint), transparent 68%),
    linear-gradient(180deg, var(--cream) 0%, var(--cream-warm) 55%, #fbf3ee 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, p, dl, dd, ol, ul { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- yerleşim ---------- */

.page {
  width: min(100% - 2.25rem, 60rem);
  margin-inline: auto;
  padding-block: clamp(1.6rem, 4vw, 3rem) clamp(2rem, 5vw, 3.5rem);
  display: flex;
  flex-direction: column;
  gap: clamp(1.4rem, 3vw, 2.1rem);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: clamp(1.4rem, 3vw, 2.1rem);
}

/* ---------- üst şerit ---------- */

.masthead {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.masthead__tag {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .66rem;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
}

.masthead__tag::before {
  content: "";
  width: 1.5rem;
  height: 1px;
  background: var(--accent);
  flex: none;
}

.masthead__quote {
  justify-self: center;
  max-width: 28ch;
  font-family: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  font-style: italic;
  font-weight: 300;
  font-size: clamp(.92rem, 1.6vw, 1.06rem);
  line-height: 1.5;
  text-align: center;
  color: var(--ink-soft);
  text-wrap: balance;
}

.masthead__range {
  justify-self: end;
  font-size: .66rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

@media (max-width: 780px) {
  .masthead {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: .85rem;
  }
  .masthead__range { justify-self: center; }
  .masthead__quote { max-width: 34ch; }
}

/* ---------- günün esması ---------- */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(1.9rem, 5vw, 3.4rem) clamp(1.15rem, 4vw, 3rem) clamp(1.5rem, 3.5vw, 2.2rem);
  text-align: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.hero::before {
  content: "";
  position: absolute;
  inset: -50% 8% auto;
  height: 85%;
  background: radial-gradient(55% 100% at 50% 0%, var(--accent-tint), transparent 72%);
  pointer-events: none;
  z-index: -1;
}

.hero__month {
  font-family: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  font-weight: 300;
  font-size: clamp(1.3rem, 3.2vw, 1.7rem);
  letter-spacing: .06em;
  color: var(--accent-deep);
}

.hero__month em {
  font-style: italic;
  font-size: .82em;
  letter-spacing: .02em;
  opacity: .85;
}

.hero__kicker {
  margin-top: 1.15rem;
  font-size: .63rem;
  font-weight: 500;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--muted);
}

.names {
  margin-top: .85rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .2rem;
}

.names__item {
  font-family: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  font-weight: 300;
  font-size: clamp(2.3rem, 8.4vw, 4.5rem);
  line-height: 1.07;
  letter-spacing: .005em;
  color: var(--ink);
  text-wrap: balance;
  animation: rise .7s cubic-bezier(.22, .7, .3, 1) both;
}

.names__item--long { font-size: clamp(1.55rem, 5.2vw, 2.7rem); line-height: 1.22; }
.names__item:nth-child(3) { animation-delay: .07s; }

.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  width: min(13rem, 62%);
  margin: 1.15rem auto 0;
}

.ornament::before,
.ornament::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

.ornament span {
  font-size: .55rem;
  line-height: 1;
  color: var(--accent);
}

.hero__date {
  margin-top: 1.2rem;
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.hero__date .sep { color: var(--accent); margin-inline: .55rem; }

.hero__note {
  margin-top: .5rem;
  min-height: 1.2em;
  font-size: .73rem;
  letter-spacing: .05em;
  color: var(--muted);
}

.hero__note:empty { display: none; }

.tags {
  margin-top: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  justify-content: center;
}

.tags:empty { display: none; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: .42rem;
  padding: .3rem .72rem .32rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--accent-tint);
  font-size: .64rem;
  font-weight: 500;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.tag::before {
  content: "◆";
  font-size: .46rem;
  line-height: 1;
  color: var(--accent);
}

/* ---------- yolculuk çubuğu ---------- */

.journey {
  margin-top: clamp(1.5rem, 3.2vw, 2.1rem);
  padding-top: 1.25rem;
  border-top: 1px dashed var(--line);
}

.journey__track {
  position: relative;
  height: 3px;
  border-radius: 999px;
  background: var(--line-soft);
  overflow: hidden;
}

.journey__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 55%, #fff), var(--accent));
  transition: width .6s cubic-bezier(.22, .7, .3, 1);
}

.journey__legend {
  display: flex;
  gap: .4rem;
  margin-top: .8rem;
  font-size: .61rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}

.journey__legend li {
  flex: 1;
  display: flex;
  align-items: baseline;
  gap: .35rem;
  white-space: nowrap;
}

.journey__legend li:last-child { flex: .65; }

.journey__legend b {
  font-weight: 500;
  color: inherit;
}

.journey__legend .count {
  font-size: .56rem;
  letter-spacing: .08em;
  opacity: .75;
}

.journey__legend [aria-current="step"] { color: var(--accent-deep); }

.journey__legend li.is-done { color: var(--ink-soft); }

@media (max-width: 520px) {
  .journey__legend { font-size: .56rem; letter-spacing: .1em; gap: .25rem; }
  .journey__legend .count { display: none; }
}

/* ---------- esma detay bileşeni ---------- */

.detail {
  padding: clamp(1.4rem, 3.5vw, 2.3rem);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.detail__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: .6rem 1rem;
  padding-bottom: 1.05rem;
  border-bottom: 1px solid var(--line-soft);
}

.detail__kicker {
  font-size: .61rem;
  font-weight: 500;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--muted);
}

.detail__title {
  margin-top: .4rem;
  font-family: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  font-weight: 300;
  font-size: clamp(1.4rem, 3.2vw, 1.95rem);
  letter-spacing: .015em;
  color: var(--ink);
}

.detail__sub {
  font-size: .66rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.detail__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.3rem 2.2rem;
  margin-top: 1.35rem;
}

@media (max-width: 660px) {
  .detail__grid { grid-template-columns: 1fr; gap: 1.15rem; }
}

.field { display: flex; flex-direction: column; gap: .5rem; }
.field--wide { grid-column: 1 / -1; }

.field__label {
  font-size: .6rem;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.field__value {
  margin: 0;
  font-size: .89rem;
  line-height: 1.75;
  color: var(--ink-soft);
}

.field--empty .field__value { padding-block: .1rem; }

.field__ghost {
  display: block;
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--line-soft), #faf4f1 58%, var(--line-soft));
}

.field__ghost + .field__ghost { width: 62%; margin-top: .55rem; }

.detail__note {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-top: 1.4rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--line);
  font-size: .7rem;
  letter-spacing: .03em;
  color: var(--muted);
}

.detail__note::before {
  content: "◆";
  font-size: .46rem;
  color: var(--accent);
  flex: none;
}

/* ---------- gün gezinme ---------- */

.daynav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .5rem;
}

.daynav button {
  appearance: none;
  padding: .52rem .95rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .55);
  color: var(--ink-soft);
  font-size: .64rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color .2s, border-color .2s, background-color .2s;
}

.daynav button:hover {
  border-color: var(--accent);
  background: var(--accent-tint);
  color: var(--accent-deep);
}

.daynav button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.daynav button:disabled {
  opacity: .4;
  cursor: default;
  border-color: var(--line);
  background: rgba(255, 255, 255, .3);
  color: var(--muted);
}

/* ---------- alt bilgi ---------- */

.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .45rem;
  text-align: center;
  font-size: .62rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}

.footer__hint {
  letter-spacing: .06em;
  text-transform: none;
  font-size: .68rem;
  opacity: .85;
}

/* ---------- hareket ---------- */

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* ---------- baskı ---------- */

@media print {
  body { background: #fff; }
  .daynav, .footer__hint { display: none; }
  .hero, .detail { box-shadow: none; }
}
