/* ════════════════════════════════════════════
   Путь Ислама — styles.css
   Palette: emerald / gold / cream
   ════════════════════════════════════════════ */

:root {
  --emerald-900: #0d2b22;
  --emerald-700: #14532d;
  --emerald-600: #1a6b3c;
  --emerald-100: #e3efe7;
  --gold-500: #c9a227;
  --gold-400: #d9b64a;
  --gold-300: #e8cf85;
  --cream: #faf6ec;
  --cream-dark: #f2ead8;
  --ink: #22302a;
  --ink-soft: #4c5a52;

  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Manrope", -apple-system, "Segoe UI", sans-serif;

  --arch: 999px 999px 0 0;
  --shadow-card: 0 10px 30px rgba(13, 43, 34, 0.10);
  --shadow-card-hover: 0 22px 55px rgba(13, 43, 34, 0.22);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

.container {
  width: min(1160px, 92%);
  margin-inline: auto;
}

.section { padding: clamp(4.5rem, 9vw, 7.5rem) 0; }

/* ── Reveal on scroll ─────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ── Section headings ─────────────────────── */
.section-head { text-align: center; margin-bottom: clamp(2.5rem, 6vw, 4rem); }

.section-mark {
  width: 44px; height: 44px;
  margin: 0 auto 1rem;
  color: var(--gold-500);
}
.section-mark svg { width: 100%; height: 100%; fill: currentColor; }
.section-mark--gold { color: var(--gold-400); }

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.15;
  color: var(--emerald-900);
}
.section-head--light .section-title { color: var(--cream); }

.section-sub {
  margin-top: .75rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
}
.section-head--light .section-sub { color: var(--gold-300); }

/* ── Buttons ──────────────────────────────── */
.btn {
  display: inline-block;
  padding: .95rem 2.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .04em;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s var(--ease);
}
.btn--gold {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
  color: var(--emerald-900);
  box-shadow: 0 8px 26px rgba(201, 162, 39, .35);
}
.btn--gold:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(201, 162, 39, .5);
}

/* ════════════ NAVIGATION ════════════ */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  padding: 1.1rem 0;
  transition: background .4s var(--ease), box-shadow .4s var(--ease), padding .4s var(--ease);
}
.nav.is-scrolled {
  background: rgba(13, 43, 34, .92);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, .25);
  padding: .7rem 0;
}
.nav__inner {
  width: min(1160px, 92%);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--cream);
  letter-spacing: .02em;
}
.nav__star {
  width: 26px; height: 26px;
  fill: var(--gold-400);
  flex-shrink: 0;
}
.nav__links {
  display: flex;
  gap: 2.2rem;
}
.nav__links a {
  color: var(--cream);
  font-size: .92rem;
  font-weight: 500;
  letter-spacing: .03em;
  position: relative;
  padding: .25rem 0;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 2px;
  background: var(--gold-400);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .35s var(--ease);
}
.nav__links a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
}
.nav__burger span {
  width: 24px; height: 2px;
  background: var(--cream);
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.nav__burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { opacity: 0; }
.nav__burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ════════════ HERO ════════════ */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--cream);
  background:
    linear-gradient(180deg, rgba(13, 43, 34, .55) 0%, rgba(13, 43, 34, .35) 45%, rgba(13, 43, 34, .82) 100%),
    url("images/hero-mosque-sunset.jpg") center / cover no-repeat;
}
.hero__content {
  width: min(820px, 90%);
  padding: 7rem 0 5rem;
  animation: heroIn 1.2s var(--ease) both;
}
@keyframes heroIn {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: none; }
}
.hero__eyebrow {
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--gold-300);
  margin-bottom: 1.4rem;
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.4rem, 6.5vw, 4.6rem);
  line-height: 1.12;
  margin-bottom: 1.4rem;
  text-shadow: 0 2px 30px rgba(0, 0, 0, .35);
}
.hero__subtitle {
  max-width: 640px;
  margin: 0 auto 2.4rem;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: rgba(250, 246, 236, .92);
}
.hero__scroll {
  position: absolute;
  bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 42px;
  border: 2px solid rgba(250, 246, 236, .6);
  border-radius: 14px;
}
.hero__scroll span {
  position: absolute;
  top: 8px; left: 50%;
  width: 4px; height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--gold-300);
  animation: scrollDot 1.8s ease-in-out infinite;
}
@keyframes scrollDot {
  0%   { transform: translateY(0); opacity: 1; }
  70%  { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ════════════ ABOUT ════════════ */
.about {
  position: relative;
  background: var(--cream);
  overflow: hidden;
}
.about__pattern {
  position: absolute;
  inset: 0;
  background: url("images/bg-pattern-geometric.jpg") center / 560px repeat;
  opacity: .07;
  pointer-events: none;
}
.about__inner {
  position: relative;
  max-width: 780px;
  text-align: center;
}
.about .section-title { margin-bottom: 1.6rem; }
.about__lead {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.4vw, 1.55rem);
  font-style: italic;
  color: var(--emerald-700);
  margin-bottom: 1.4rem;
  line-height: 1.5;
}
.about__text {
  color: var(--ink-soft);
  margin-bottom: 1.2rem;
  text-align: left;
}
.about__text:last-child { margin-bottom: 0; }

/* ════════════ CARDS ════════════ */
.foundations { background: var(--cream-dark); }

.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.4rem, 3vw, 2.4rem);
}

.card {
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-8px) scale(1.015);
  box-shadow: var(--shadow-card-hover);
}
.card__media {
  height: 240px;
  overflow: hidden;
  position: relative;
}
.card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(13, 43, 34, .25));
}
.card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease);
}
.card:hover .card__media img { transform: scale(1.07); }

.card__body {
  padding: 1.8rem 1.9rem 2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card__title {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--emerald-900);
  margin-bottom: .7rem;
  position: relative;
  padding-bottom: .7rem;
}
.card__title::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 44px; height: 2px;
  background: var(--gold-500);
  transition: width .4s var(--ease);
}
.card:hover .card__title::after { width: 78px; }

.card__text {
  color: var(--ink-soft);
  font-size: .95rem;
  margin-bottom: 1.4rem;
  flex: 1;
}
.card__link {
  align-self: flex-start;
  font-weight: 700;
  font-size: .9rem;
  letter-spacing: .04em;
  color: var(--emerald-600);
  border-bottom: 2px solid transparent;
  transition: color .3s var(--ease), border-color .3s var(--ease);
}
.card__link:hover {
  color: var(--gold-500);
  border-color: var(--gold-500);
}

/* ════════════ HERITAGE ════════════ */
.heritage {
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(201, 162, 39, .12), transparent 60%),
    linear-gradient(160deg, var(--emerald-900), var(--emerald-700));
  color: var(--cream);
}
.heritage__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.4rem, 3vw, 2.2rem);
}
.heritage__item {
  background: rgba(250, 246, 236, .05);
  border: 1px solid rgba(217, 182, 74, .22);
  border-radius: 16px;
  padding: 2rem 1.9rem;
  transition: transform .4s var(--ease), background .4s var(--ease), border-color .4s var(--ease);
}
.heritage__item:hover {
  transform: translateY(-6px);
  background: rgba(250, 246, 236, .09);
  border-color: rgba(217, 182, 74, .55);
}
.heritage__icon {
  width: 46px; height: 46px;
  color: var(--gold-400);
  margin-bottom: 1.1rem;
}
.heritage__icon svg { width: 100%; height: 100%; }
.heritage__item h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: .6rem;
  color: var(--gold-300);
}
.heritage__item p {
  color: rgba(250, 246, 236, .82);
  font-size: .95rem;
}

/* ════════════ FOOTER ════════════ */
.footer {
  background: url("images/footer-bg-pattern.jpg") center / 500px repeat;
  color: var(--cream);
}
.footer__overlay {
  background: rgba(13, 43, 34, .93);
}
.footer__inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  padding: clamp(3.5rem, 7vw, 5.5rem) 0 2.5rem;
}
.footer__logo { font-size: 1.35rem; margin-bottom: 1rem; }
.footer__tagline {
  color: rgba(250, 246, 236, .7);
  font-size: .92rem;
}
.footer__col h4 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--gold-300);
  margin-bottom: 1rem;
}
.footer__col a {
  display: block;
  color: rgba(250, 246, 236, .78);
  font-size: .92rem;
  margin-bottom: .6rem;
  width: fit-content;
  transition: color .3s var(--ease), transform .3s var(--ease);
}
.footer__col a:hover {
  color: var(--gold-300);
  transform: translateX(4px);
}
.footer__social {
  display: flex;
  gap: .8rem;
  margin-top: 1.1rem;
}
.footer__social a {
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(217, 182, 74, .35);
  border-radius: 50%;
  margin-bottom: 0;
  transition: background .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}
.footer__social a:hover {
  background: var(--gold-500);
  border-color: var(--gold-500);
  color: var(--emerald-900);
  transform: translateY(-3px) translateX(0);
}
.footer__social svg { width: 18px; height: 18px; }

.footer__bottom {
  border-top: 1px solid rgba(250, 246, 236, .12);
  padding: 1.4rem 0;
  text-align: center;
  font-size: .82rem;
  color: rgba(250, 246, 236, .55);
}

/* ════════════ RESPONSIVE ════════════ */
@media (max-width: 900px) {
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .nav__burger { display: flex; }
  .nav__links {
    position: fixed;
    inset: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.4rem;
    background: rgba(13, 43, 34, .97);
    opacity: 0;
    pointer-events: none;
    transition: opacity .35s var(--ease);
  }
  .nav__links.is-open {
    opacity: 1;
    pointer-events: auto;
  }
  .nav__links a { font-size: 1.3rem; }
  .nav__logo, .nav__burger { position: relative; z-index: 102; }

  .cards { grid-template-columns: 1fr; }
  .heritage__grid { grid-template-columns: 1fr; }
  .about__text { text-align: center; }
}

/* ── Accessibility ────────────────────────── */
:focus-visible {
  outline: 3px solid var(--gold-400);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
