@font-face {
  font-family: "Vazirmatn";
  src: url("../assets/fonts/Vazirmatn-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ——— Design tokens ——— */
:root {
  --color-primary: #1f6b6d;
  --color-primary-dark: #134e4f;
  --color-primary-light: #2d8a8c;
  --color-accent: #c9a227;
  --color-accent-soft: #e8c547;
  --color-bg-dark: #0a1210;
  --color-bg-story: #f5f0e6;
  --color-bg-muted: #ebe4d6;
  --color-text: #1a1a1a;
  --color-text-muted: #5c5348;
  --color-text-on-dark: #f5f0e6;
  --color-border: rgba(45, 106, 79, 0.2);
  --font: "Vazirmatn", "Tahoma", system-ui, sans-serif;
  --header-h: 4.25rem;
  --radius: 12px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  --transition: 0.25s ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--color-text);
  background: #fff;
  text-align: right;
}

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(1120px, 92vw);
  margin-inline: auto;
}

/* ——— Buttons ——— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  border: none;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary));
  color: #fff;
  box-shadow: 0 4px 0 var(--color-primary-dark), 0 8px 24px rgba(45, 106, 79, 0.35);
}

.btn--primary:hover {
  background: linear-gradient(135deg, #52b788, var(--color-primary-light));
  box-shadow: 0 4px 0 var(--color-primary-dark), 0 12px 28px rgba(45, 106, 79, 0.45);
  text-decoration: none;
}

.btn--outline {
  background: transparent;
  color: var(--color-primary-dark);
  border: 2px solid var(--color-primary);
}

.btn--outline:hover {
  background: rgba(45, 106, 79, 0.08);
  text-decoration: none;
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.12);
  color: var(--color-text-on-dark);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
}

.btn--block {
  width: 100%;
}

/* ——— Header ——— */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background var(--transition), box-shadow var(--transition);
}

.site-header.is-scrolled {
  background: rgba(10, 18, 16, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(1120px, 92vw);
  margin-inline: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 1;
  min-width: 0;
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
  opacity: 0.95;
}

.brand__icon {
  display: block;
  height: 2.65rem;
  width: auto;
  flex-shrink: 0;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}

.brand__name {
  color: #fff;
  font-weight: 700;
  font-size: clamp(0.82rem, 2.8vw, 1.05rem);
  line-height: 1.35;
  letter-spacing: -0.01em;
}

@media (min-width: 900px) {
  .brand__icon {
    height: 3rem;
  }

  .brand__name {
    font-size: 1.08rem;
  }
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 1.25rem;
}

.nav-link {
  color: rgba(245, 240, 230, 0.88);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
}

.nav-link:hover {
  color: #fff;
  text-decoration: none;
}

.header-cta {
  display: none;
  padding: 0.55rem 1.1rem;
  font-size: 0.88rem;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: var(--transition);
}

.nav-panel {
  position: fixed;
  inset: var(--header-h) 0 auto 0;
  background: rgba(10, 18, 16, 0.98);
  padding: 1.25rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transform: translateY(-120%);
  opacity: 0;
  pointer-events: none;
  transition: transform var(--transition), opacity var(--transition);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-panel.is-open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.nav-panel .btn {
  margin-top: 0.5rem;
}

@media (min-width: 900px) {
  .nav-desktop {
    display: flex;
  }
  .header-cta {
    display: inline-flex;
  }
  .nav-toggle {
    display: none;
  }
  .nav-panel {
    display: none;
  }
}

/* ——— Hero ——— */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--header-h) + 2rem) 0 4rem;
  color: var(--color-text-on-dark);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 18, 16, 0.55) 0%,
    rgba(10, 18, 16, 0.72) 45%,
    rgba(10, 18, 16, 0.88) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 42rem;
  padding-inline: 1rem;
}

.hero__title {
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 5vw, 2.65rem);
  font-weight: 800;
  line-height: 1.35;
  animation: fadeUp 0.9s ease both;
}

.hero__subtitle {
  margin: 0 0 2rem;
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  color: rgba(245, 240, 230, 0.9);
  line-height: 1.85;
  animation: fadeUp 0.9s 0.15s ease both;
}

.hero__actions {
  animation: fadeUp 0.9s 0.3s ease both;
}

.scroll-hint {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.75rem;
  animation: bounce 2s infinite;
}

.scroll-hint__icon {
  width: 1.25rem;
  height: 2rem;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  position: relative;
}

.scroll-hint__icon::after {
  content: "";
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 6px;
  background: #fff;
  border-radius: 4px;
  animation: scrollDot 2s infinite;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounce {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(6px);
  }
}

@keyframes scrollDot {
  0% {
    opacity: 1;
    top: 6px;
  }
  100% {
    opacity: 0;
    top: 14px;
  }
}

/* ——— Sections ——— */
.section {
  padding: 4.5rem 0;
}

.section--story {
  background: var(--color-bg-story);
}

.section--timeline {
  background: #fff;
  padding-top: 2rem;
}

.section--projects {
  background: #fff;
}

.section--video {
  background: var(--color-bg-muted);
}

.section--join {
  background: linear-gradient(180deg, #fff 0%, var(--color-bg-story) 100%);
}

.section__header {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto 2.5rem;
}

.section__title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  color: var(--color-primary-dark);
}

.section__lead {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 1.05rem;
}

/* ——— Story ——— */
.story-layout {
  display: grid;
  gap: 2rem;
  align-items: start;
}

@media (min-width: 900px) {
  .story-layout {
    grid-template-columns: 1fr min(340px, 38vw);
    gap: 2.5rem;
  }
}

.story-figure {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.story-figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.story-figure figcaption {
  padding: 0.65rem 0.85rem;
  font-size: 0.82rem;
  color: var(--color-text-muted);
  background: rgba(255, 255, 255, 0.9);
  text-align: center;
}

.timeline-figure {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--color-border);
}

.timeline-figure img {
  width: 100%;
  display: block;
}

.projects-banner {
  margin: 0 0 2rem;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.projects-banner img {
  width: 100%;
  max-height: 22rem;
  object-fit: cover;
}

.projects-banner figcaption {
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  background: var(--color-bg-muted);
  text-align: center;
}

.section--join-bg {
  position: relative;
  isolation: isolate;
}

.section--join-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: url("../assets/images/gathering-night.jpg") center / cover no-repeat;
  opacity: 0.14;
}

.section--join-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(245, 240, 230, 0.92) 0%, rgba(245, 240, 230, 0.97) 100%);
}

.section--join-bg .container {
  position: relative;
}

.story {
  max-width: 38rem;
  margin: 0;
  font-family: "Vazirmatn", "Iranian Sans", var(--font);
  font-size: clamp(1.05rem, 2.2vw, 1.2rem);
  line-height: 2;
  color: #3d3428;
}

.story p {
  margin: 0 0 1.75rem;
}

.story p:last-child {
  margin-bottom: 0;
}

.story__quote-mark {
  display: block;
  font-size: 3rem;
  line-height: 1;
  color: var(--color-accent);
  opacity: 0.5;
  margin-bottom: -0.5rem;
}

.story__highlight {
  color: var(--color-primary-dark);
  font-weight: 700;
}

.story__aside {
  margin-top: 2rem;
  padding: 1rem 1.25rem;
  border-right: 4px solid var(--color-accent);
  background: rgba(201, 162, 39, 0.12);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.95rem;
  font-style: italic;
  color: var(--color-text-muted);
}

/* ——— Project cards ——— */
.projects-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.project-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem 1.35rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.project-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: rgba(45, 106, 79, 0.35);
}

.project-card__icon {
  width: 3rem;
  height: 3rem;
  border-radius: 10px;
  background: rgba(45, 106, 79, 0.1);
  color: var(--color-primary);
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
}

.project-card__icon svg {
  width: 1.6rem;
  height: 1.6rem;
}

.project-card__title {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  color: var(--color-primary-dark);
}

.project-card__text {
  margin: 0;
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* ——— Video ——— */
.video-block {
  max-width: 880px;
  margin: 0 auto;
}

.video-player {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.video-player img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-player video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.video-player:not(.is-playing) video {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.video-player.is-playing img {
  display: none;
}

.video-player.is-playing video {
  position: static;
  width: 100%;
  height: 100%;
  opacity: 1;
  pointer-events: auto;
}

.video-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.35);
  border: none;
  cursor: pointer;
  transition: background var(--transition);
}

.video-play:hover {
  background: rgba(0, 0, 0, 0.45);
}

.video-play__circle {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  animation: pulse 2s infinite;
}

.video-play__circle svg {
  width: 1.5rem;
  height: 1.5rem;
  margin-inline-start: 4px;
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(64, 145, 108, 0.5);
  }
  50% {
    box-shadow: 0 0 0 12px rgba(64, 145, 108, 0);
  }
}

.video-note {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.88rem;
  color: var(--color-text-muted);
}

.video-note a {
  font-weight: 600;
}

/* ——— Join ——— */
.join-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 28rem;
  margin: 2rem auto 0;
}

@media (min-width: 520px) {
  .join-actions {
    flex-direction: row;
    justify-content: center;
  }
}

.join-note {
  max-width: 36rem;
  margin: 2rem auto 0;
  padding: 1rem 1.25rem;
  background: rgba(45, 106, 79, 0.06);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--color-text-muted);
  text-align: center;
}

/* ——— Footer ——— */
.site-footer {
  background: #0d1614;
  color: rgba(245, 240, 230, 0.85);
  padding: 3rem 0 1.5rem;
  font-size: 0.92rem;
}

.footer-grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1.2fr 1fr 1fr;
  }
}

.footer-logo {
  display: block;
  width: min(11rem, 72vw);
  height: auto;
  margin-bottom: 0.75rem;
  border-radius: 8px;
  background: rgba(245, 240, 230, 0.95);
  padding: 0.35rem 0.5rem;
}

.footer-tagline {
  margin: 0 0 0.5rem;
}

.social-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.social-links a {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  display: grid;
  place-items: center;
  color: #fff;
  text-decoration: none;
}

.social-links svg {
  width: 1.35rem;
  height: 1.35rem;
}

.social-links a:hover {
  background: var(--color-primary);
  text-decoration: none;
}

.footer-contact a {
  color: var(--color-accent-soft);
}

.footer-ext {
  font-size: 0.88em;
  opacity: 0.9;
}

.footer-sms {
  margin-top: 0.75rem;
  margin-bottom: 0;
}

.footer-sms strong {
  display: inline;
  margin-left: 0.35rem;
}

.footer-sms a {
  color: var(--color-accent-soft);
  font-weight: 600;
  text-decoration: none;
}

.footer-sms a:hover {
  text-decoration: underline;
}

.modal__dialog--soon .modal__subtitle {
  text-align: center;
  line-height: 1.85;
}

.modal__dialog--soon .modal__subtitle a {
  font-weight: 700;
  white-space: nowrap;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.25rem;
  text-align: center;
  font-size: 0.82rem;
  color: rgba(245, 240, 230, 0.55);
  line-height: 1.7;
}

/* ——— Modals ——— */
.modal-open {
  overflow: hidden;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.modal__dialog {
  position: relative;
  z-index: 1;
  background: #fff;
  width: 100%;
  max-width: 480px;
  max-height: 92vh;
  overflow-y: auto;
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 1.5rem 1.35rem 2rem;
  transform: translateY(100%);
  transition: transform 0.35s ease;
}

.modal.is-open .modal__dialog {
  transform: translateY(0);
}

@media (min-width: 520px) {
  .modal {
    align-items: center;
    padding: 1rem;
  }
  .modal__dialog {
    border-radius: var(--radius);
    max-height: 88vh;
  }
  .modal.is-open .modal__dialog {
    transform: translateY(0);
  }
}

.modal__close {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  background: var(--color-bg-muted);
  border-radius: 50%;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  color: var(--color-text);
}

.modal__logo {
  display: block;
  width: 7.5rem;
  height: auto;
  margin: 0 auto 0.75rem;
  border-radius: 8px;
}

.modal__title {
  margin: 0 0 0.25rem;
  font-size: 1.25rem;
  color: var(--color-primary-dark);
  text-align: center;
}

.modal__subtitle {
  margin: 0 0 1.25rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.form-field {
  margin-bottom: 1rem;
}

.form-field label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--color-text);
}

.form-field input,
.form-field select {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
}

.form-field input:focus,
.form-field select:focus {
  outline: 2px solid var(--color-primary-light);
  border-color: var(--color-primary);
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 400;
  cursor: pointer;
}

.form-error {
  color: #b00020;
  font-size: 0.88rem;
  margin-bottom: 0.75rem;
}

.amount-grid {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.amount-preset {
  text-align: right;
  padding: 0.85rem 1rem;
  border: 2px solid var(--color-border);
  border-radius: 8px;
  background: #fff;
  font-family: inherit;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}

.amount-preset:hover,
.amount-preset.is-selected {
  border-color: var(--color-primary);
  background: rgba(45, 106, 79, 0.06);
}

.amount-preset strong {
  display: block;
  color: var(--color-primary-dark);
  margin-bottom: 0.15rem;
}

.amount-preset span {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.card-preview {
  margin-top: 1.25rem;
  text-align: center;
}

.card-preview canvas {
  max-width: 100%;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .hero__title,
  .hero__subtitle,
  .hero__actions,
  .scroll-hint,
  .video-play__circle,
  .reveal {
    animation: none;
    transition: none;
    opacity: 1;
    transform: none;
  }
}
