/* ============================================================
   Түлектер кездесуі — "Golden Years Reunion" template
   Dastur.Online · style.css
   ============================================================ */

@font-face {
  font-family: "AcademyKZ";
  src: url("assets/fonts/academy-bold-italic.ttf") format("truetype");
  font-weight: 1 1000;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "ShelleyKZ";
  src: url("assets/fonts/shelley.ttf") format("truetype");
  font-weight: 1 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f4ecd8;
  --paper: rgba(252, 247, 236, 0.82);
  --paper-strong: rgba(252, 247, 236, 0.94);
  --paper-solid: #fbf6ea;

  --ink: #4a3b22;
  --ink-soft: #6d5a35;
  --ink-mute: #8a774f;

  --gold: #b0842c;
  --gold-deep: #906a1c;
  --gold-light: #d8b464;
  --gold-pale: #ecdcae;
  --gold-line: rgba(176, 132, 44, 0.42);
  --gold-hair: rgba(176, 132, 44, 0.28);

  --shadow-card: 0 26px 60px -30px rgba(120, 86, 25, 0.45);
  --shadow-soft: 0 14px 34px -22px rgba(120, 86, 25, 0.4);

  --serif: "Playfair Display", "Times New Roman", Georgia, serif;
  --display: "AcademyKZ", "Playfair Display", Georgia, serif;
  --script: "ShelleyKZ", "Segoe Script", "Brush Script MT", cursive;
  --sans: "PT Sans", "Trebuchet MS", "Segoe UI", system-ui, sans-serif;

  --ease: cubic-bezier(0.22, 0.61, 0.24, 1);
  --maxw: 660px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  padding: 0 0 160px;
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.72;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- Fixed background ---------- */
.fixed-background {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image: url("assets/background-mobile.webp");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}
.fixed-background::after {
  /* gentle readability wash — never washes out the artwork */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(250, 245, 234, 0.14) 0%,
    rgba(250, 245, 234, 0.30) 46%,
    rgba(249, 243, 231, 0.40) 100%);
}
@media (min-width: 600px) {
  .fixed-background {
    background-image: url("assets/background-desktop.webp");
    background-position: center 82%;
  }
}

/* ---------- Layout shell ---------- */
.page {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

section { position: relative; }

.section {
  margin: 34px 0;
}

/* ---------- Decorative primitives ---------- */
.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--gold);
}
.ornament .rule {
  height: 1px;
  width: 54px;
  background: linear-gradient(90deg, transparent, var(--gold-line));
}
.ornament .rule.r { background: linear-gradient(90deg, var(--gold-line), transparent); }
.ornament .diamond {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid var(--gold);
}

.overline {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.section-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 27px;
  letter-spacing: 0.01em;
  color: var(--ink);
  margin: 0;
}

/* ---------- Card surface ---------- */
.card {
  position: relative;
  background: var(--paper);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
  border: 1px solid var(--gold-hair);
  border-radius: 4px;
  box-shadow: var(--shadow-card);
  padding: 34px 30px;
}
/* elegant corner brackets (top-left / bottom-right) */
.card::before,
.card::after {
  content: "";
  position: absolute;
  width: 20px; height: 20px;
  pointer-events: none;
}
.card::before {
  top: 12px; left: 12px;
  border-top: 1px solid var(--gold-line);
  border-left: 1px solid var(--gold-line);
}
.card::after {
  bottom: 12px; right: 12px;
  border-bottom: 1px solid var(--gold-line);
  border-right: 1px solid var(--gold-line);
}
/* thin gold rule drawn on reveal */
.card > .goldbar {
  position: absolute;
  top: -1px; left: 50%;
  transform: translateX(-50%);
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, transparent, var(--gold-light), var(--gold), var(--gold-light), transparent);
  transition: width 1.1s var(--ease) 0.15s;
}
.reveal.in .card > .goldbar,
.card.in > .goldbar { width: 60%; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100svh;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 68px 20px 40px;
  position: relative;
}
.hero__glow {
  position: absolute;
  top: 20%; left: 50%;
  width: 120vw; height: 70vh;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center,
    rgba(255, 236, 190, 0.55), rgba(255, 236, 190, 0) 62%);
  opacity: 0;
  transition: opacity 1.6s ease;
  pointer-events: none;
}
.hero.in .hero__glow { opacity: 1; }

.hero__panel {
  position: relative;
  width: 100%;
  max-width: 500px;
  text-align: center;
  background: linear-gradient(180deg, rgba(252,247,236,0.9), rgba(251,245,231,0.8));
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
  border: 1px solid var(--gold-line);
  border-radius: 5px;
  box-shadow: var(--shadow-card);
  padding: 44px 34px 40px;
}
.hero__panel::before,
.hero__panel::after {
  content: "";
  position: absolute;
  width: 22px; height: 22px;
  pointer-events: none;
}
.hero__panel::before {
  top: 13px; left: 13px;
  border-top: 1px solid var(--gold-line);
  border-left: 1px solid var(--gold-line);
}
.hero__panel::after {
  bottom: 13px; right: 13px;
  border-bottom: 1px solid var(--gold-line);
  border-right: 1px solid var(--gold-line);
}

.hero__monogram {
  width: 46px; height: 46px;
  margin: 0 auto 20px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--gold-deep);
  font-family: var(--serif);
  font-size: 20px;
  position: relative;
}
.hero__monogram::after {
  content: "";
  position: absolute; inset: 4px;
  border: 1px solid var(--gold-hair);
  border-radius: 50%;
}

.hero__occasion {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 21px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin: 0 0 18px;
}
.hero__place {
  font-family: var(--sans);
  font-size: 14.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0 0 18px;
}
.hero__milestone {
  font-family: var(--display);
  font-weight: 700;
  font-size: 40px;
  line-height: 1.08;
  color: var(--ink);
  margin: 0 0 4px;
  background: linear-gradient(180deg, #a3781f, #c7a24d 55%, #8f6716);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero__year {
  font-family: var(--sans);
  font-size: 15px;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
  margin: 2px 0 0;
}

.hero__divider {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; margin: 24px 0 22px;
  color: var(--gold);
}
.hero__divider .rule { height: 1px; width: 60px; background: var(--gold-line); }
.hero__divider .diamond {
  width: 7px; height: 7px; border-radius: 50%;
  background: transparent; border: 1.5px solid var(--gold);
}

.hero__when {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0;
}
.hero__when .cell {
  padding: 0 22px;
  min-width: 116px;
}
.hero__when .cell + .cell { border-left: 1px solid var(--gold-hair); }
.hero__when .k {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 4px;
}
.hero__when .v {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
}

.hero__scroll {
  position: absolute;
  bottom: 26px; left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-deep);
  opacity: 0.85;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.hero__scroll .line {
  width: 1px; height: 34px;
  background: linear-gradient(var(--gold), transparent);
  animation: scrollpulse 2.2s var(--ease) infinite;
}
@keyframes scrollpulse {
  0%,100% { transform: scaleY(0.5); transform-origin: top; opacity: 0.4; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* ============================================================
   INVITATION TEXT
   ============================================================ */
.invite__text {
  text-align: center;
  font-size: 18px;
  line-height: 1.9;
  color: var(--ink-soft);
  white-space: pre-line;
  margin: 20px 0 0;
  text-wrap: pretty;
}
.invite .card { text-align: center; }
.invite__head { margin-bottom: 4px; }

/* ============================================================
   ORGANIZERS
   ============================================================ */
.org { text-align: center; }
.org__label {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin: 0 0 16px;
}
.org__list { list-style: none; margin: 0; padding: 0; }
.org__list li {
  font-family: var(--display);
  font-size: 21px;
  color: var(--ink);
  padding: 7px 0;
}
.org__list li + li { border-top: 1px solid var(--gold-hair); }

/* ============================================================
   TIMELINE / БАҒДАРЛАМА
   ============================================================ */
.timeline__head { text-align: center; margin-bottom: 26px; }
.timeline__list {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0 0 0 4px;
}
.tl-item {
  position: relative;
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 18px;
  align-items: center;
  padding: 0 0 22px 26px;
}
.tl-item::before { /* the vertical line */
  content: "";
  position: absolute;
  left: 0; top: 8px; bottom: -8px;
  width: 1px;
  background: var(--gold-hair);
}
.tl-item:last-child::before { bottom: 50%; }
.tl-item::after { /* node dot */
  content: "";
  position: absolute;
  left: -4px; top: 8px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--paper-solid);
  border: 2px solid var(--gold);
  box-shadow: 0 0 0 4px rgba(176,132,44,0.12);
}
.tl-time {
  font-family: var(--display);
  font-weight: 700;
  font-size: 19px;
  color: var(--gold-deep);
  text-align: right;
}
.tl-title {
  font-size: 16.5px;
  color: var(--ink-soft);
  line-height: 1.5;
}

/* ============================================================
   PHOTO / ФОТОСУРЕТ
   ============================================================ */
.photo__head { text-align: center; margin-bottom: 22px; }
.photo__frame {
  position: relative;
  padding: 14px;
  background: linear-gradient(180deg, rgba(252,247,236,0.96), rgba(248,240,224,0.92));
  border: 1px solid var(--gold-line);
  border-radius: 4px;
  box-shadow: var(--shadow-card);
}
.photo__frame::before {
  content: "";
  position: absolute; inset: 6px;
  border: 1px solid var(--gold-hair);
  pointer-events: none;
  z-index: 2;
}
.photo__img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 2px;
  filter: saturate(1.02);
}
.photo__caption {
  text-align: center;
  font-family: var(--script);
  font-size: 23px;
  line-height: 1.3;
  color: var(--gold-deep);
  margin: 12px 0 2px;
}

/* ============================================================
   VENUE / МЕКЕН-ЖАЙ
   ============================================================ */
.venue { text-align: center; }
.venue__head { margin-bottom: 20px; }
.venue__hall {
  font-family: var(--display);
  font-weight: 700;
  font-size: 24px;
  color: var(--ink);
  margin: 0 0 6px;
}
.venue__addr {
  font-size: 16.5px;
  color: var(--ink-soft);
  margin: 0;
}
.venue__city { color: var(--ink-mute); font-size: 14.5px; margin-top: 2px; }
.venue__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  padding: 13px 28px;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-deep);
  text-decoration: none;
  background: linear-gradient(180deg, rgba(252,247,236,0.9), rgba(246,236,216,0.9));
  border: 1px solid var(--gold);
  border-radius: 40px;
  white-space: nowrap;
  box-shadow: var(--shadow-soft);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.35s var(--ease);
}
.venue__btn:hover {
  transform: translateY(-2px);
  background: linear-gradient(180deg, var(--gold), var(--gold-deep));
  color: #fdf6e6;
  box-shadow: 0 18px 34px -18px rgba(144,106,28,0.7);
}
.venue__btn .pin {
  width: 7px; height: 7px; border-radius: 50%;
  border: 1.5px solid currentColor; background: transparent;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  text-align: center;
  padding: 30px 20px 10px;
}
.footer .ornament { margin-bottom: 14px; }
.footer__note {
  font-family: var(--script);
  font-size: 25px;
  color: var(--gold-deep);
}

/* ============================================================
   AUDIO PLAYER (floating, optional)
   ============================================================ */
.audio {
  position: fixed;
  right: 16px; bottom: 176px;
  z-index: 40;
  width: 50px; height: 50px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: rgba(252,247,236,0.92);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: var(--shadow-soft);
  display: none;
  align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--gold-deep);
}
.audio.show { display: flex; }
.audio__bars { display: flex; gap: 3px; align-items: flex-end; height: 18px; }
.audio__bars span {
  width: 3px; background: var(--gold-deep); border-radius: 2px;
  height: 6px;
}
.audio.playing .audio__bars span { animation: eq 0.9s ease-in-out infinite; }
.audio__bars span:nth-child(2){ animation-delay: .15s; }
.audio__bars span:nth-child(3){ animation-delay: .3s; }
.audio__bars span:nth-child(4){ animation-delay: .45s; }
@keyframes eq { 0%,100%{ height:6px; } 50%{ height:18px; } }

/* ============================================================
   REVEAL ANIMATIONS
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(26px) scale(0.986);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  will-change: opacity, transform;
}
.reveal.in {
  opacity: 1;
  transform: none;
}
/* stagger utility for children lists */
.stagger > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.stagger.in > * { opacity: 1; transform: none; }

.hidden { display: none !important; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (min-width: 600px) {
  body { font-size: 18px; }
  .section { margin: 46px 0; }
  .card { padding: 44px 46px; }
  .hero__panel { max-width: 540px; padding: 54px 48px 46px; }
  .hero__occasion { font-size: 27px; }
  .hero__milestone { font-size: 50px; }
  .section-title { font-size: 32px; }
  .tl-item { grid-template-columns: 92px 1fr; gap: 24px; }
  .tl-time { font-size: 22px; }
}

@media (max-width: 380px) {
  .hero__when .cell { padding: 0 15px; min-width: 100px; }
  .hero__milestone { font-size: 34px; }
  .card { padding: 28px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal, .stagger > * { opacity: 1 !important; transform: none !important; }
  .hero__glow { opacity: 1 !important; }
}
