/* ===== 11-«B» sinf — Xotiralar sahifasi ===== */

:root {
  --paper: #f6efe3;
  --paper-2: #efe5d2;
  --white: #fffdf8;
  --ink: #2d2823;
  --ink-soft: #6b6157;
  --accent: #bf5b2d;
  --accent-dark: #a14a22;
  --sage: #73876c;
  --gold: #d9a441;
  --shadow: 0 14px 40px rgba(45, 40, 35, 0.14);
  --serif: 'Playfair Display', Georgia, serif;
  --hand: 'Caveat', cursive;
  --sans: 'Inter', -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 20%, rgba(217, 164, 65, 0.07), transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(115, 135, 108, 0.08), transparent 45%),
    var(--paper);
  line-height: 1.6;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ===== Navigation ===== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 32px;
  transition: background 0.3s, box-shadow 0.3s;
}
.nav.scrolled {
  background: rgba(246, 239, 227, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 18px rgba(45, 40, 35, 0.08);
}
.nav-logo {
  font-family: var(--hand);
  font-size: 30px;
  font-weight: 700;
  color: var(--ink);
}
.nav-logo::after { content: '✎'; color: var(--accent); font-size: 18px; margin-left: 6px; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links a {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-soft);
  position: relative;
  transition: color 0.25s;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -5px;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width 0.25s;
}
.nav-links a:hover { color: var(--accent); }
.nav-links a:hover::after { width: 100%; }

.lang-switch {
  display: flex;
  gap: 4px;
  background: rgba(45, 40, 35, 0.07);
  border-radius: 999px;
  padding: 4px;
}
.lang-btn {
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.25s;
}
.lang-btn.active { background: var(--ink); color: var(--paper); }

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 60;
}
.nav-burger span {
  width: 24px; height: 2px;
  background: var(--ink);
  transition: all 0.3s;
}
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Hero ===== */
.hero {
  min-height: 100svh;
  display: grid;
  place-items: center;
  position: relative;
  text-align: center;
  padding: 100px 24px 80px;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(45, 40, 35, 0.06) 100%);
  pointer-events: none;
}
.hero-inner { max-width: 760px; position: relative; z-index: 2; }
.hero-eyebrow {
  font-family: var(--hand);
  font-size: 28px;
  color: var(--accent);
  margin-bottom: 6px;
}
.hero-title {
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(58px, 9.5vw, 116px);
  line-height: 1.05;
  letter-spacing: -1px;
}
.hero-sub {
  font-size: 18px;
  color: var(--ink-soft);
  line-height: 1.75;
  max-width: 620px;
  margin: 26px auto 38px;
}
.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 999px;
  font-size: 15.5px;
  font-weight: 600;
  transition: all 0.25s;
}
.btn-primary {
  background: var(--accent);
  color: var(--white);
  box-shadow: 0 8px 22px rgba(191, 91, 45, 0.32);
}
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-2px); }
.btn-ghost {
  border: 1.5px solid rgba(45, 40, 35, 0.25);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

.hero-polaroid {
  position: absolute;
  width: 215px;
  background: var(--white);
  padding: 11px 11px 36px;
  box-shadow: var(--shadow);
  z-index: 1;
  animation: float 7s ease-in-out infinite alternate;
}
.hp-1 { top: 13%; left: 5%; transform: rotate(-8deg); }
.hp-2 { bottom: 13%; left: 9%; transform: rotate(5deg); width: 185px; animation-delay: 1.6s; }
.hp-3 { top: 17%; right: 6%; transform: rotate(7deg); animation-delay: 0.8s; }

@keyframes float {
  from { translate: 0 0; }
  to { translate: 0 -14px; }
}

.hero-scroll {
  position: absolute;
  bottom: 26px; left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink-soft);
  z-index: 2;
}
.hero-scroll-arrow { font-size: 18px; animation: bounce 1.8s infinite; }
@keyframes bounce {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 6px; }
}

/* ===== Stats ===== */
.stats {
  max-width: 1000px;
  margin: 0 auto;
  padding: 64px 28px 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  text-align: center;
  border-top: 1px dashed rgba(45, 40, 35, 0.18);
}
.stat-num {
  display: block;
  font-family: var(--serif);
  font-weight: 800;
  font-size: 52px;
  color: var(--accent);
  line-height: 1.1;
}
.stat-label { font-size: 14px; color: var(--ink-soft); }

/* ===== Sections ===== */
.section, .stats { scroll-margin-top: 70px; }
.section { max-width: 1120px; margin: 0 auto; padding: 110px 28px 0; }
.section-head { text-align: center; margin-bottom: 58px; }
.eyebrow {
  font-family: var(--hand);
  font-size: 25px;
  color: var(--accent);
  margin-bottom: 4px;
}
h2 {
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(34px, 4.5vw, 52px);
  line-height: 1.15;
}
.section-sub { color: var(--ink-soft); margin-top: 12px; font-size: 17px; }

/* ===== Story ===== */
.story {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 72px;
  align-items: center;
}
.story-text h2 { margin-bottom: 22px; }
.story-text p:not(.eyebrow):not(.story-sign) {
  color: var(--ink-soft);
  line-height: 1.85;
  font-size: 16.5px;
  margin-bottom: 18px;
}
.story-sign {
  font-family: var(--hand);
  font-size: 27px;
  color: var(--accent);
  margin-top: 10px;
}
.story-stack { position: relative; height: 470px; }
.polaroid {
  background: var(--white);
  padding: 14px 14px 52px;
  box-shadow: var(--shadow);
  position: absolute;
  width: min(300px, 78%);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.polaroid::before {
  content: '';
  position: absolute;
  top: -13px; left: 50%;
  transform: translateX(-50%) rotate(-3deg);
  width: 95px; height: 26px;
  background: rgba(217, 164, 65, 0.45);
  box-shadow: 0 1px 3px rgba(45, 40, 35, 0.12);
}
.pol-a { top: 0; left: 3%; transform: rotate(-6deg); z-index: 1; }
.pol-b { bottom: 0; right: 2%; transform: rotate(4deg); z-index: 2; }
.polaroid:hover { transform: rotate(0deg) scale(1.04); z-index: 5; }
.pol-cap {
  position: absolute;
  bottom: 12px; left: 0; right: 0;
  text-align: center;
  font-family: var(--hand);
  font-size: 23px;
  color: var(--ink-soft);
}

/* ===== Timeline ===== */
.t-line { position: relative; max-width: 740px; margin: 0 auto; }
.t-line::before {
  content: '';
  position: absolute;
  left: 89px; top: 10px; bottom: 10px;
  width: 2px;
  background: repeating-linear-gradient(180deg, rgba(45, 40, 35, 0.25) 0 6px, transparent 6px 13px);
}
.t-item {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 46px;
  margin-bottom: 42px;
  position: relative;
}
.t-item::after {
  content: '';
  position: absolute;
  left: 84px; top: 12px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 5px rgba(217, 164, 65, 0.22);
}
.t-year {
  font-family: var(--serif);
  font-weight: 800;
  font-size: 26px;
  color: var(--accent);
  text-align: right;
  line-height: 1.3;
}
.t-card {
  background: var(--white);
  border-radius: 14px;
  padding: 24px 28px;
  box-shadow: 0 8px 26px rgba(45, 40, 35, 0.08);
  border: 1px solid rgba(45, 40, 35, 0.06);
  transition: transform 0.3s, box-shadow 0.3s;
}
.t-card:hover { transform: translateX(6px); box-shadow: 0 12px 32px rgba(45, 40, 35, 0.13); }
.t-card h3 { font-family: var(--serif); font-size: 21px; margin-bottom: 8px; }
.t-card p { color: var(--ink-soft); line-height: 1.7; font-size: 15.5px; }

/* ===== Gallery ===== */
.g-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 14px;
}
.chip {
  padding: 9px 22px;
  border-radius: 999px;
  border: 1.5px solid rgba(45, 40, 35, 0.18);
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.25s;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.g-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 32px;
  margin-top: 44px;
}
.g-card {
  background: var(--white);
  padding: 12px 12px 14px;
  box-shadow: 0 10px 28px rgba(45, 40, 35, 0.10);
  cursor: zoom-in;
  transform: rotate(var(--tilt, 0deg));
  transition: transform 0.35s, box-shadow 0.35s;
}
.g-card:hover {
  transform: rotate(0deg) translateY(-6px) scale(1.02);
  box-shadow: 0 20px 44px rgba(45, 40, 35, 0.18);
  z-index: 3;
}
.g-imgwrap {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--paper-2);
}
.g-imgwrap img { width: 100%; height: 100%; object-fit: cover; }
.g-card figcaption {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding: 12px 4px 2px;
}
.g-cap { font-family: var(--hand); font-size: 21px; color: var(--ink); }
.g-year { font-size: 12.5px; color: var(--ink-soft); letter-spacing: 0.5px; white-space: nowrap; }

.g-note {
  width: fit-content;
  margin: 44px auto 0;
  text-align: center;
  color: var(--ink-soft);
  font-size: 15px;
  background: rgba(217, 164, 65, 0.13);
  padding: 14px 24px;
  border-radius: 12px;
  border: 1px dashed rgba(191, 91, 45, 0.35);
}

/* ===== Classmates ===== */
.m-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(172px, 1fr));
  gap: 22px;
}
.m-card {
  background: var(--white);
  border-radius: 16px;
  padding: 28px 16px 24px;
  text-align: center;
  box-shadow: 0 6px 20px rgba(45, 40, 35, 0.07);
  border: 1px solid rgba(45, 40, 35, 0.05);
  transition: transform 0.3s, box-shadow 0.3s;
}
.m-card:hover { transform: translateY(-5px); box-shadow: 0 14px 32px rgba(45, 40, 35, 0.13); }
.m-ava {
  width: 64px; height: 64px;
  border-radius: 50%;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-weight: 800;
  font-size: 22px;
  color: var(--white);
}
.m-ava-photo { padding: 0; overflow: hidden; background: var(--paper-2); }
.m-ava-photo img { width: 100%; height: 100%; object-fit: cover; }
.m-ava-0 { background: linear-gradient(135deg, #bf5b2d, #d9824f); }
.m-ava-1 { background: linear-gradient(135deg, #73876c, #92a989); }
.m-ava-2 { background: linear-gradient(135deg, #b98a2e, #d9a441); }
.m-ava-3 { background: linear-gradient(135deg, #7a6a8f, #998bb0); }
.m-name { font-weight: 600; font-size: 15px; }
.m-city { font-size: 13px; color: var(--ink-soft); margin-top: 4px; }
.m-card.join {
  border: 1.5px dashed rgba(191, 91, 45, 0.4);
  background: transparent;
  box-shadow: none;
}
.m-card.join .m-ava {
  background: rgba(191, 91, 45, 0.12);
  color: var(--accent);
  font-size: 30px;
  font-family: var(--sans);
  font-weight: 400;
}
.m-card.join .m-city { font-size: 12.5px; }

/* ===== Footer ===== */
.footer {
  background: var(--ink);
  color: #efe8db;
  margin-top: 130px;
  padding: 84px 28px 44px;
  text-align: center;
}
.footer-title { font-family: var(--hand); font-weight: 700; font-size: 42px; color: var(--gold); }
.footer p:not(.footer-credit) {
  max-width: 560px;
  margin: 16px auto 0;
  color: rgba(239, 232, 219, 0.75);
  line-height: 1.8;
  font-size: 15.5px;
}
.footer-credit { margin-top: 52px; font-size: 13.5px; color: rgba(239, 232, 219, 0.5); }

/* ===== Lightbox ===== */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(24, 20, 16, 0.93);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 30px;
}
.lightbox.open { display: flex; }
.lb-figure { max-width: min(1000px, 92vw); text-align: center; }
#lbImg {
  max-width: 100%;
  max-height: 76vh;
  margin: 0 auto;
  background: var(--white);
  padding: 8px;
  border-radius: 4px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.lb-figure figcaption {
  color: #efe8db;
  margin-top: 18px;
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: baseline;
}
#lbCap { font-family: var(--hand); font-size: 26px; }
#lbCount { font-size: 13px; opacity: 0.55; }
.lb-close, .lb-prev, .lb-next {
  position: fixed;
  border: none;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.1);
  transition: background 0.25s;
  z-index: 101;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: rgba(255, 255, 255, 0.22); }
.lb-close {
  top: 18px; right: 22px;
  width: 46px; height: 46px;
  border-radius: 50%;
  font-size: 26px;
  line-height: 1;
}
.lb-prev, .lb-next {
  top: 50%;
  transform: translateY(-50%);
  width: 52px; height: 52px;
  border-radius: 50%;
  font-size: 30px;
  line-height: 1;
}
.lb-prev { left: 18px; }
.lb-next { right: 18px; }

/* ===== Reveal animations ===== */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===== Responsive ===== */
@media (max-width: 1080px) {
  .hero-polaroid { display: none; }
}

@media (max-width: 900px) {
  .story { grid-template-columns: 1fr; gap: 56px; }
  .story-stack { height: 430px; max-width: 480px; margin: 0 auto; width: 100%; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 36px 16px; }
  .stat:last-child { grid-column: 1 / -1; }
}

@media (max-width: 740px) {
  .nav { padding: 12px 20px; }
  .nav-burger { display: flex; }
  .nav-links {
    position: fixed;
    top: 0; right: -110%;
    height: 100vh;
    width: min(78vw, 320px);
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    padding: 96px 36px;
    gap: 24px;
    box-shadow: -10px 0 40px rgba(45, 40, 35, 0.15);
    transition: right 0.35s ease;
  }
  .nav-links.open { right: 0; }
  .nav-links a { font-size: 18px; }

  .section { padding-top: 86px; }
  .hero-sub { font-size: 16px; }

  .t-line::before { left: 63px; }
  .t-item { grid-template-columns: 48px 1fr; gap: 34px; }
  .t-item::after { left: 58px; }
  .t-year { font-size: 18px; }
  .t-card { padding: 20px 22px; }

  .g-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 20px; }
  .g-cap { font-size: 18px; }

  .lb-prev, .lb-next { width: 42px; height: 42px; font-size: 24px; }
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }

  .footer-title { font-size: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
