/* ===================================================================
   Dastur.Online — Түлектер кездесуі
   Style concept: "Golden Years Reunion" — navy & gold ribbon,
   elegant academic serif, formal invitation panels.
   =================================================================== */

@font-face {
  font-family: "Academy Display";
  src: url("assets/fonts/Academy-BoldItalic.ttf") format("truetype");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Shelley Script";
  src: url("assets/fonts/Shelley-Script.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy-900: #0e1a33;
  --navy-800: #16294c;
  --navy-700: #22406b;
  --gold:      #c99a4e;
  --gold-light:#e7c377;
  --gold-deep: #a2762f;
  --ivory:     #f6efdd;
  --cream:     #efe4c8;
  --ink:       #23324c;
  --ink-soft:  #55617a;
  --paper:     #fbf6ea;
  --shadow:    0 22px 48px -22px rgba(6, 14, 30, 0.75);
  --edge:      color-mix(in srgb, var(--gold) 55%, transparent);
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  background: var(--navy-900);
}

body {
  margin: 0;
  padding-bottom: 160px;
  font-family: "PT Serif", Georgia, "Times New Roman", serif;
  color: var(--ivory);
  background: transparent;
  line-height: 1.55;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Fixed background ---------- */
.fixed-background {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: url("assets/background-mobile.webp");
  background-size: cover;
  background-position: left center;
  background-repeat: no-repeat;
}
.fixed-background::after {
  /* readability scrim + vignette, keeps navy artwork intact */
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10,18,36,.35) 0%, rgba(10,18,36,.12) 32%, rgba(10,18,36,.55) 100%),
    radial-gradient(120% 80% at 62% 40%, rgba(10,18,36,0) 40%, rgba(10,18,36,.45) 100%);
}
@media (min-width: 720px) {
  .fixed-background {
    background-image: url("assets/background-desktop.webp");
    background-position: left center;
  }
}

/* ---------- Page frame ---------- */
.page {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Reusable pieces ---------- */
.kicker {
  font-family: "Shelley Script", cursive;
  color: var(--gold-light);
  font-size: 30px;
  line-height: 1;
  margin: 0;
}
.rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 20px auto;
  width: min(240px, 70%);
  color: var(--gold);
}
.rule::before, .rule::after {
  content: "";
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.rule .diamond {
  width: 8px; height: 8px;
  transform: rotate(45deg);
  background: var(--gold-light);
  box-shadow: 0 0 0 3px rgba(201,154,78,.25);
  flex: 0 0 auto;
}

.eyebrow {
  font-family: "PT Serif", Georgia, serif;
  letter-spacing: .32em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--gold);
  margin: 0 0 14px;
  font-weight: 700;
}

.section-title {
  font-family: "Academy Display", "PT Serif", serif;
  font-style: italic;
  font-weight: 700;
  color: var(--gold-light);
  font-size: 30px;
  line-height: 1.05;
  margin: 0 0 4px;
}

/* ---------- Card / invitation panel ---------- */
.panel {
  position: relative;
  background:
    linear-gradient(180deg, var(--paper), var(--cream));
  color: var(--ink);
  border-radius: 4px;
  padding: 34px 26px;
  box-shadow: var(--shadow);
  outline: 1px solid var(--edge);
  outline-offset: 6px;
  border: 1px solid rgba(162,118,47,.35);
}
.panel::before {
  /* inner gold hairline frame */
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(162,118,47,.28);
  border-radius: 2px;
  pointer-events: none;
}
.panel-body { position: relative; z-index: 1; }

/* section spacing */
section { margin-top: 40px; }
section:first-of-type { margin-top: 0; }

/* ===================================================================
   HERO
   =================================================================== */
.hero {
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 6px 40px;
}
.hero .crest {
  width: 58px; height: 58px;
  display: grid; place-items: center;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--gold-light);
  margin-bottom: 26px;
  position: relative;
}
.hero .crest::after {
  content: "";
  position: absolute; inset: 5px;
  border: 1px solid rgba(201,154,78,.45);
  border-radius: 50%;
}
.hero .crest span {
  font-family: "Academy Display", serif;
  font-style: italic;
  font-size: 22px;
  line-height: 1;
}
.hero-title {
  font-family: "Academy Display", "PT Serif", serif;
  font-style: italic;
  font-weight: 700;
  color: var(--ivory);
  font-size: clamp(44px, 15vw, 72px);
  line-height: .98;
  margin: 6px 0 0;
  text-shadow: 0 8px 30px rgba(0,0,0,.45);
}
.hero-sub {
  margin: 22px 0 0;
  font-size: 17px;
  letter-spacing: .04em;
  color: var(--cream);
}
.hero-sub .place { color: var(--gold-light); }
.hero-milestone {
  font-family: "Shelley Script", cursive;
  color: var(--gold-light);
  font-size: clamp(40px, 13vw, 58px);
  line-height: 1;
  margin: 12px 0 0;
  text-shadow: 0 6px 24px rgba(0,0,0,.4);
}
.hero-when {
  margin-top: 30px;
  display: flex;
  gap: 14px;
  align-items: stretch;
  justify-content: center;
}
.when-chip {
  min-width: 118px;
  padding: 12px 18px;
  border: 1px solid var(--edge);
  border-radius: 3px;
  background: rgba(14,26,51,.42);
  backdrop-filter: blur(2px);
}
.when-chip .lbl {
  font-size: 10px; letter-spacing: .28em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 6px;
}
.when-chip .val {
  font-family: "Academy Display", serif; font-style: italic;
  color: var(--ivory); font-size: 20px; line-height: 1;
}
.scroll-hint {
  margin-top: 42px;
  color: var(--gold);
  font-size: 22px;
  animation: bob 2.2s ease-in-out infinite;
}

/* ===================================================================
   INVITATION TEXT
   =================================================================== */
.invite-text p {
  margin: 0 0 15px;
  font-size: 17px;
  color: var(--ink);
}
.invite-text p:first-child {
  font-family: "Academy Display", serif;
  font-style: italic;
  font-size: 22px;
  color: var(--gold-deep);
  margin-bottom: 18px;
}
.invite-text p:last-child { margin-bottom: 0; }

/* ===================================================================
   ORGANIZERS
   =================================================================== */
.organizers .panel-body { text-align: center; }
.org-list {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.org-list li {
  font-family: "Academy Display", serif;
  font-style: italic;
  font-size: 21px;
  color: var(--ink);
}

/* ===================================================================
   TIMELINE / БАҒДАРЛАМА
   =================================================================== */
.timeline .panel-body { text-align: center; }
.tl-list {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  text-align: left;
  position: relative;
}
.tl-list::before {
  content: "";
  position: absolute;
  left: 62px; top: 6px; bottom: 6px;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--gold), transparent);
}
.tl-item {
  display: grid;
  grid-template-columns: 62px 22px 1fr;
  align-items: center;
  gap: 0 14px;
  padding: 11px 0;
}
.tl-time {
  font-family: "Academy Display", serif;
  font-style: italic;
  font-size: 18px;
  color: var(--gold-deep);
  text-align: right;
  padding-right: 4px;
}
.tl-dot {
  width: 9px; height: 9px;
  justify-self: center;
  transform: rotate(45deg);
  background: var(--gold);
  box-shadow: 0 0 0 4px var(--paper), 0 0 0 5px rgba(162,118,47,.3);
}
.tl-title { font-size: 16px; color: var(--ink); }

/* ===================================================================
   PHOTO
   =================================================================== */
.photo .frame {
  position: relative;
  padding: 12px;
  background: linear-gradient(160deg, var(--gold-light), var(--gold-deep));
  border-radius: 4px;
  box-shadow: var(--shadow);
}
.photo .frame::before {
  content: "";
  position: absolute; inset: 6px;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 2px;
  z-index: 2; pointer-events: none;
}
.photo .frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 2px;
  border: 1px solid rgba(14,26,51,.25);
}
.photo .caption {
  text-align: center;
  margin-top: 16px;
  font-family: "Shelley Script", cursive;
  color: var(--gold-light);
  font-size: 26px;
}

/* ===================================================================
   VENUE
   =================================================================== */
.venue .panel-body { text-align: center; }
.venue .hall {
  font-family: "Academy Display", serif;
  font-style: italic;
  font-size: 26px;
  color: var(--gold-deep);
  margin: 14px 0 6px;
}
.venue .addr { font-size: 17px; color: var(--ink); margin: 2px 0; }
.venue .city { color: var(--ink-soft); font-size: 15px; margin-top: 2px; }
.map-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  padding: 14px 30px;
  min-height: 48px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  color: var(--navy-900);
  font-family: "PT Serif", Georgia, serif;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: 13px;
  text-decoration: none;
  box-shadow: 0 12px 26px -12px rgba(162,118,47,.9);
  border: 1px solid var(--gold-deep);
  transition: transform .18s ease, box-shadow .18s ease;
}
.map-btn:hover { transform: translateY(-2px); box-shadow: 0 18px 32px -14px rgba(162,118,47,1); }
.map-btn:active { transform: translateY(0); }

/* ===================================================================
   FOOTER
   =================================================================== */
.footer {
  text-align: center;
  padding: 46px 0 10px;
  color: var(--gold);
}
.footer .monogram {
  font-family: "Shelley Script", cursive;
  font-size: 40px;
  color: var(--gold-light);
}
.footer .foot-note {
  margin-top: 8px;
  font-size: 12px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--cream);
  opacity: .7;
}

/* ===================================================================
   AUDIO PLAYER (optional / floating)
   =================================================================== */
.audio-toggle {
  position: fixed;
  right: 16px; bottom: 176px;
  z-index: 40;
  width: 50px; height: 50px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: rgba(14,26,51,.82);
  color: var(--gold-light);
  display: grid; place-items: center;
  cursor: pointer;
  box-shadow: 0 10px 24px -10px rgba(0,0,0,.8);
}
.audio-toggle svg { width: 22px; height: 22px; }
.audio-toggle.playing { animation: spin 6s linear infinite; }

/* ===================================================================
   REVEAL ANIMATIONS
   =================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(26px) scale(.985);
  transition: opacity .8s ease, transform .8s cubic-bezier(.22,.7,.28,1);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }

.reveal-hero { opacity: 0; transform: translateY(16px); transition: opacity 1s ease, transform 1s ease; }
.reveal-hero.in { opacity: 1; transform: none; }

.tl-item { opacity: 0; transform: translateX(-14px); transition: opacity .6s ease, transform .6s ease; }
.tl-item.in { opacity: 1; transform: none; }

.photo .frame { opacity: 0; transform: scale(.94); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.8,.2,1); }
.photo .frame.in { opacity: 1; transform: none; }

@keyframes bob { 0%,100%{transform:translateY(0)} 50%{transform:translateY(8px)} }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-hero, .tl-item, .photo .frame {
    opacity: 1 !important; transform: none !important; transition: none !important;
  }
  .scroll-hint, .audio-toggle.playing { animation: none !important; }
}

/* ---------- utility ---------- */
[hidden] { display: none !important; }

@media (min-width: 720px) {
  .page { max-width: 560px; }
  .panel { padding: 42px 40px; }
}
