/* =============================================
   زوارة بين قوسين — Design System
   ============================================= */

:root {
  --teal-deep:    #0a4f4f;
  --teal:         #0d7377;
  --teal-mid:     #14919b;
  --teal-light:   #1cb5bd;
  --cream:        #f0e6cc;
  --cream-light:  #faf6ee;
  --cream-dark:   #d4c4a0;
  --gold:         #c9a84c;
  --gold-light:   #e8c96a;
  --red-accent:   #8b3a3a;
  --dark:         #061818;
  --text:         #1a2e2e;
  --text-muted:   #5a7070;
  --white:        #ffffff;

  --font-ar:  'Cairo', sans-serif;
  --font-en:  'Playfair Display', serif;

  --radius:   12px;
  --radius-lg: 24px;
  --shadow:   0 8px 32px rgba(6, 24, 24, 0.18);
  --shadow-lg: 0 20px 60px rgba(6, 24, 24, 0.28);
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-ar);
  background: var(--cream-light);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container {
  width: min(1140px, 92vw);
  margin-inline: auto;
}

/* ── Amazigh pattern background ── */
.pattern-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cg fill='%230d7377'%3E%3Cpath d='M30 5 L35 20 L50 20 L38 30 L43 45 L30 36 L17 45 L22 30 L10 20 L25 20 Z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 60px 60px;
  pointer-events: none;
}

/* ── Header ── */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 0;
  transition: background var(--transition), box-shadow var(--transition), padding var(--transition);
}

.header.scrolled {
  background: rgba(6, 24, 24, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 24px rgba(0,0,0,0.25);
  padding: 0.6rem 0;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--white);
  transition: opacity var(--transition);
}

.nav-logo img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  object-fit: cover;
}

.nav-logo:hover { opacity: 0.85; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  color: rgba(255,255,255,0.85);
  font-weight: 600;
  font-size: 0.95rem;
  position: relative;
  transition: color var(--transition);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  right: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width var(--transition);
}

.nav-links a:hover { color: var(--gold-light); }
.nav-links a:hover::after { width: 100%; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: var(--transition);
}

/* ── Hero ── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.05);
  animation: heroZoom 20s ease-in-out infinite alternate;
}

@keyframes heroZoom {
  from { transform: scale(1.05); }
  to   { transform: scale(1.12); }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg,
      rgba(6, 24, 24, 0.75) 0%,
      rgba(10, 79, 79, 0.55) 40%,
      rgba(6, 24, 24, 0.88) 100%);
}

.hero-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23f0e6cc' stroke-width='1.5'%3E%3Cpath d='M40 10 L50 30 L70 30 L55 42 L62 62 L40 50 L18 62 L25 42 L10 30 L30 30 Z'/%3E%3Ccircle cx='40' cy='40' r='8'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 80px 80px;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 8rem 0 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1.2rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(240, 230, 204, 0.3);
  border-radius: 100px;
  color: var(--cream);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  backdrop-filter: blur(8px);
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: var(--gold-light);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.6; transform: scale(0.8); }
}

.hero-logo-wrap {
  margin: 0.5rem 0;
}

.hero-logo-ring {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 0 auto;
}

.hero-logo-ring::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  opacity: 0.6;
  animation: ringRotate 8s linear infinite;
}

.hero-logo-ring::after {
  content: '';
  position: absolute;
  inset: -16px;
  border-radius: 50%;
  border: 1px dashed rgba(201, 168, 76, 0.4);
  animation: ringRotate 12s linear infinite reverse;
}

@keyframes ringRotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.hero-avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--cream);
  box-shadow: var(--shadow-lg), 0 0 40px rgba(201, 168, 76, 0.25);
}

.hero-title {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.hero-title-en {
  font-family: var(--font-en);
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 700;
  color: var(--cream);
  letter-spacing: 0.15em;
  line-height: 1;
  text-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.hero-title-ar {
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  font-weight: 700;
  color: var(--gold-light);
  letter-spacing: 0.02em;
}

.hero-tagline {
  max-width: 620px;
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  color: rgba(240, 230, 204, 0.85);
  font-weight: 400;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.8rem;
  border-radius: 100px;
  font-family: var(--font-ar);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  color: var(--dark);
  box-shadow: 0 4px 20px rgba(201, 168, 76, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(201, 168, 76, 0.55);
}

.btn-ghost {
  background: transparent;
  color: var(--cream);
  border-color: rgba(240, 230, 204, 0.4);
  backdrop-filter: blur(4px);
}

.btn-ghost:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--cream);
}

.btn-lg {
  padding: 1rem 2.2rem;
  font-size: 1.05rem;
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: rgba(240, 230, 204, 0.5);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: scaleY(1); opacity: 1; }
  50%       { transform: scaleY(0.5); opacity: 0.4; }
}

/* ── Sections shared ── */
.section {
  padding: 6rem 0;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900;
  color: var(--teal-deep);
  line-height: 1.35;
}

.section-title em {
  font-style: normal;
  color: var(--teal-mid);
}

.section-divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--teal-mid));
  margin: 1.25rem auto 0;
  border-radius: 2px;
}

/* ── About ── */
.about {
  background: var(--cream-light);
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.about-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(13, 115, 119, 0.1);
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}

.about-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--teal), var(--gold));
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--transition);
}

.about-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.about-card:hover::before { transform: scaleX(1); }

.about-card--featured {
  background: linear-gradient(145deg, var(--teal-deep) 0%, var(--teal) 100%);
  color: var(--cream-light);
  transform: scale(1.03);
  border-color: rgba(201, 168, 76, 0.25);
}

.about-card--featured:hover { transform: scale(1.03) translateY(-6px); }

.about-card-icon {
  width: 48px;
  height: 48px;
  color: var(--teal);
  margin-bottom: 1.25rem;
}

.about-card-icon svg { width: 100%; height: 100%; }

.about-card h3 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.85rem;
  color: var(--teal-deep);
  line-height: 1.4;
}

.about-card p {
  font-size: 1rem;
  color: #3d5252;
  line-height: 1.85;
}

/* البطاقة المميزة — ألوان فاتحة فوق الخلفية الداكنة */
.about-card--featured .about-card-icon { color: var(--gold-light); }

.about-card--featured h3 {
  color: var(--white);
  font-size: 1.3rem;
}

.about-card--featured p {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 400;
}

/* ── Heritage ── */
.heritage {
  background: var(--teal-deep);
  color: var(--cream);
  overflow: hidden;
}

.heritage-bg {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cg fill='none' stroke='%23f0e6cc' stroke-width='1'%3E%3Cpath d='M50 10 L60 35 L85 35 L65 50 L75 75 L50 60 L25 75 L35 50 L15 35 L40 35 Z'/%3E%3Cpath d='M50 25 L55 38 L68 38 L58 46 L62 59 L50 52 L38 59 L42 46 L32 38 L45 38 Z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 100px 100px;
}

.heritage-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.heritage-visual { position: relative; }

.heritage-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.heritage-frame img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  filter: saturate(0.85);
  transition: transform 0.6s ease;
}

.heritage-frame:hover img { transform: scale(1.04); }

.heritage-frame-accent {
  position: absolute;
  inset: 0;
  border: 3px solid var(--gold);
  border-radius: var(--radius-lg);
  transform: translate(12px, 12px);
  z-index: -1;
}

.heritage-stats {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.stat {
  flex: 1;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(240, 230, 204, 0.15);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
  backdrop-filter: blur(4px);
}

.stat-number {
  display: block;
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--gold-light);
  line-height: 1;
  margin-bottom: 0.3rem;
}

.stat-label {
  font-size: 0.8rem;
  color: rgba(240, 230, 204, 0.7);
  font-weight: 600;
}

.heritage-text .section-label { color: var(--gold-light); }

.heritage-text .section-title {
  color: var(--cream);
  text-align: right;
  margin-bottom: 1.5rem;
}

.heritage-text .section-title em { color: var(--gold-light); }

.heritage-desc {
  color: rgba(240, 230, 204, 0.8);
  margin-bottom: 1rem;
  font-size: 1rem;
  line-height: 1.85;
}

.heritage-list {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.heritage-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  color: var(--cream);
  font-size: 0.95rem;
}

.heritage-list li::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--gold);
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Connect ── */
.connect {
  background: var(--cream-light);
  padding-bottom: 5rem;
}

.connect-box {
  position: relative;
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-deep) 100%);
  border-radius: var(--radius-lg);
  padding: 4rem 2rem;
  text-align: center;
  color: var(--cream);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.connect-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.08;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cg fill='%23f0e6cc'%3E%3Cpath d='M30 5 L35 20 L50 20 L38 30 L43 45 L30 36 L17 45 L22 30 L10 20 L25 20 Z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 60px 60px;
}

.connect-logo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--gold);
  margin: 0 auto 1.5rem;
  box-shadow: 0 0 30px rgba(201, 168, 76, 0.3);
  position: relative;
}

.connect-box h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 900;
  margin-bottom: 0.75rem;
  position: relative;
}

.connect-box p {
  max-width: 480px;
  margin: 0 auto 2rem;
  color: rgba(240, 230, 204, 0.85);
  font-size: 1.05rem;
  position: relative;
}

.connect-box .btn { position: relative; }

/* ── Footer ── */
.footer {
  background: var(--dark);
  padding: 1.75rem 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--cream);
  font-weight: 700;
  font-size: 0.95rem;
}

.footer-brand img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--gold);
}

.footer-copy {
  color: rgba(240, 230, 204, 0.45);
  font-size: 0.85rem;
}

.footer-social {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: var(--cream);
  transition: background var(--transition), color var(--transition);
}

.footer-social:hover {
  background: var(--gold);
  color: var(--dark);
}

/* ── Reveal animations ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* stagger children in hero */
.hero-content .reveal:nth-child(1) { transition-delay: 0.1s; }
.hero-content .reveal:nth-child(2) { transition-delay: 0.25s; }
.hero-content .reveal:nth-child(3) { transition-delay: 0.4s; }
.hero-content .reveal:nth-child(4) { transition-delay: 0.55s; }
.hero-content .reveal:nth-child(5) { transition-delay: 0.7s; }
.hero-content .reveal:nth-child(6) { transition-delay: 0.85s; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin-inline: auto;
  }

  .about-card--featured { transform: none; }
  .about-card--featured:hover { transform: translateY(-6px); }

  .heritage-layout {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .heritage-text .section-title { text-align: center; }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(280px, 80vw);
    height: 100vh;
    background: rgba(6, 24, 24, 0.97);
    backdrop-filter: blur(16px);
    flex-direction: column;
    align-items: flex-start;
    padding: 5rem 2rem 2rem;
    gap: 1.5rem;
    transition: right var(--transition);
    box-shadow: -8px 0 32px rgba(0,0,0,0.3);
  }

  .nav-links.open { right: 0; }

  .nav-links a { font-size: 1.1rem; }

  .nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

  .hero-content { padding-top: 7rem; }

  .hero-scroll { display: none; }

  .footer-inner { justify-content: center; text-align: center; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; align-items: center; }
  .btn { width: 100%; justify-content: center; max-width: 280px; }
  .heritage-stats { flex-direction: column; }
}
