/* ============================================================
   COZ Landing — "Desert to Oasis" editorial theme
   Sand canvas · royal purple bands · teal accents · Fraunces/Amiri
   ============================================================ */

:root {
  --sand: #F8F3E8;
  --sand-deep: #EFE6D2;
  --paper: #FFFDF7;
  --ink: #241B36;
  --ink-soft: rgba(36, 27, 54, 0.64);
  --oasis: #320A70;
  --oasis-deep: #1D0B40;
  --oasis-bright: #5A66D0;
  --accent: #07ACA9;
  --accent-soft: #4ED8CB;
  --teal: #07ACA9;
  --purple: #320A70;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Montserrat", sans-serif;
}

html:lang(ar) {
  --font-display: "Thmanyah Serif Display", "Amiri", serif;
  --font-body: "Thmanyah Sans", "Noto Sans Arabic", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  line-height: 1.65;
  color: var(--ink);
  background: var(--sand);
  position: relative;
}

/* Grain texture over everything */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}

img { max-width: 100%; }

.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 420;
  color: var(--ink);
}

.section-title {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 380;
}

/* Arabic shouldn't be letter-spaced */
html:lang(ar) .hero-eyebrow,
html:lang(ar) .impact-label,
html:lang(ar) .impact-journey-title { letter-spacing: 0 !important; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-block;
  padding: 0.7rem 1.7rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-solid {
  background: var(--oasis);
  color: var(--sand);
  box-shadow: 0 10px 24px rgba(50, 10, 112, 0.25);
}
.btn-solid:hover { background: var(--oasis-deep); box-shadow: 0 14px 28px rgba(50, 10, 112, 0.3); }

.btn-outline {
  border: 1.5px solid var(--oasis);
  color: var(--oasis);
  background: transparent;
}
.btn-outline:hover { background: var(--oasis); color: var(--sand); }

.btn-accent {
  background: var(--accent);
  color: var(--oasis-deep);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}
.btn-accent:hover { background: var(--accent-soft); }

.btn-ghost {
  border: 1.5px solid rgba(248, 243, 232, 0.6);
  color: var(--sand);
  background: transparent;
}
.btn-ghost:hover { background: rgba(248, 243, 232, 0.12); border-color: var(--sand); }

/* ---------------- Navbar ---------------- */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(248, 243, 232, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(36, 27, 54, 0.1);
  padding: 0.7rem 0;
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar ul {
  display: flex;
  list-style: none;
  gap: 1.6rem;
  align-items: center;
}

.navbar a {
  text-decoration: none;
  color: var(--ink);
  font-size: 14.5px;
}
.navbar a:hover { color: var(--oasis-bright); }
.navbar a.active {
  color: var(--oasis);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 3px;
}

a span.green-span {
  background: rgba(7, 172, 169, 0.12);
  border-radius: 4px;
  color: #009FBD;
  padding: 1px 5px;
  margin: 0 2px;
  font-weight: 600;
}

span.ai-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--oasis), var(--accent));
  border-radius: 6px;
  color: #ffffff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1;
  padding: 2px 5px;
  margin: 0 4px;
  vertical-align: middle;
  text-transform: uppercase;
}

.hamburger {
  display: none;
  font-size: 1.9rem;
  cursor: pointer;
  color: var(--oasis);
}

.menu {
  display: none;
  flex-direction: column;
  background: var(--sand);
  position: absolute;
  top: 100%;
  inset-inline: 0;
  padding: 0.5rem 1.2rem 1.2rem;
  border-bottom: 1px solid rgba(36, 27, 54, 0.12);
  box-shadow: 0 18px 30px rgba(36, 27, 54, 0.12);
  max-height: calc(100vh - 80px);
  overflow-y: auto;
}
.menu.open { display: flex; }
.menu a { padding: 0.85rem 0.3rem; border-bottom: 1px solid rgba(36, 27, 54, 0.07); }
.menu a:last-child { border-bottom: none; }

/* ---------------- Hero ---------------- */
.hero {
  position: relative;
  padding: 9.5rem 0 5rem;
  overflow: hidden;
}

.hero-sun {
  position: absolute;
  top: -140px;
  inset-inline-end: -120px;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(78, 216, 203, 0.55), rgba(7, 172, 169, 0.25) 45%, transparent 70%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem;
  align-items: center;
}

.hero-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.2rem;
}
.hero-eyebrow::before {
  content: "";
  display: inline-block;
  width: 34px;
  height: 1px;
  background: var(--accent);
  vertical-align: middle;
  margin-inline-end: 12px;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4.2rem);
  font-weight: 360;
  line-height: 1.12;
  letter-spacing: -0.5px;
}
html:lang(ar) .hero h1 { letter-spacing: 0; line-height: 1.35; }

.hero h1 em {
  font-style: italic;
  font-weight: 420;
  color: var(--oasis-bright);
}

.hero-sub {
  margin-top: 1.4rem;
  max-width: 480px;
  color: var(--ink-soft);
  font-size: 15.5px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2.2rem;
}

.hero-scanner {
  display: inline-block;
  margin-top: 1.6rem;
  color: var(--oasis);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid rgba(50, 10, 112, 0.3);
  padding-bottom: 2px;
  transition: border-color 0.25s ease, color 0.25s ease;
}
.hero-scanner:hover { color: var(--oasis-bright); border-color: var(--oasis-bright); }
.hero-scanner-arrow { margin-inline-start: 6px; display: inline-block; }
html[dir="rtl"] .hero-scanner-arrow { transform: scaleX(-1); }

.hero-art { position: relative; display: flex; justify-content: center; }

.arch {
  position: relative;
  width: min(400px, 100%);
  aspect-ratio: 4 / 5;
  border-radius: 999px 999px 28px 28px;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(36, 27, 54, 0.22);
  animation: arch-float 7s ease-in-out infinite;
}
.arch img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Hero SVG scene: dawn desert */
.hero-scene {
  width: 100%;
  height: 100%;
  display: block;
}

.hero-scene .blades {
  transform-box: fill-box;
  transform-origin: center;
  animation: blades-spin 8s linear infinite;
}
.hero-scene .turbine-slow .blades { animation-duration: 12s; }

@keyframes blades-spin {
  to { transform: rotate(360deg); }
}

.hero-scene .star { animation: twinkle 3.4s ease-in-out infinite; }
.hero-scene .star.s2 { animation-delay: 0.6s; }
.hero-scene .star.s3 { animation-delay: 1.2s; }
.hero-scene .star.s4 { animation-delay: 1.8s; }
.hero-scene .star.s5 { animation-delay: 2.4s; }
.hero-scene .star.s6 { animation-delay: 3s; }

@keyframes twinkle {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 1; }
}

.hero-scene .sun { animation: sun-breathe 7s ease-in-out infinite; }

@keyframes sun-breathe {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.88; }
}

.hero-scene .orb { opacity: 0; animation: orb-rise 7.5s ease-in-out infinite; }
.hero-scene .orb.o2 { animation-delay: 1.5s; }
.hero-scene .orb.o3 { animation-delay: 3s; }
.hero-scene .orb.o4 { animation-delay: 4.5s; }
.hero-scene .orb.o5 { animation-delay: 6s; }

@keyframes orb-rise {
  0%   { transform: translateY(0); opacity: 0; }
  15%  { opacity: 0.85; }
  60%  { opacity: 0.85; }
  100% { transform: translateY(-110px); opacity: 0; }
}
.hero-art::before {
  content: "";
  position: absolute;
  width: min(400px, 100%);
  aspect-ratio: 4 / 5;
  border-radius: 999px 999px 28px 28px;
  border: 1.5px solid var(--accent);
  transform: translate(16px, 16px);
  pointer-events: none;
}
html[dir="rtl"] .hero-art::before { transform: translate(-16px, 16px); }

@keyframes arch-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ---------------- Ecosystem marquee ---------------- */
.eco { padding: 3rem 0 3.5rem; }

.marquee {
  margin-top: 1.8rem;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.marquee-track {
  display: flex;
  align-items: center;
  gap: 4.5rem;
  width: max-content;
  padding-inline: 2.25rem;
  animation: marquee 32s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }

.marquee-track img {
  width: 96px;
  height: auto;
  filter: grayscale(1);
  opacity: 0.65;
  transition: filter 0.3s ease, opacity 0.3s ease;
}
.marquee-track img:hover { filter: none; opacity: 1; }

@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ---------------- Dune dividers ---------------- */
.dune { line-height: 0; }
.dune svg {
  display: block;
  width: 100%;
  height: 88px;
}
.dune path { fill: var(--oasis); }
.dune-flip svg { transform: rotate(180deg); }

/* ---------------- Impact (oasis band) ---------------- */
.impact {
  position: relative;
  padding: 3.5rem 0 4.5rem;
  background:
    radial-gradient(ellipse 55% 60% at 88% 8%, rgba(7, 172, 169, 0.18), transparent 70%),
    radial-gradient(ellipse 45% 55% at 8% 95%, rgba(7, 172, 169, 0.12), transparent 70%),
    var(--oasis);
  color: var(--sand);
  overflow: hidden;
}

.impact h2 {
  color: var(--sand);
  font-weight: 380;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
}

.impact-head { max-width: 580px; }
.impact-head p {
  color: rgba(248, 243, 232, 0.66);
  margin-top: 8px;
  font-size: 15px;
}

.impact-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  margin-top: 3.2rem;
}

.impact-stat {
  padding-inline-start: 1.5rem;
  border-inline-start: 1px solid transparent;
  border-image: linear-gradient(180deg, var(--accent), rgba(7, 172, 169, 0)) 1;
}
.impact-stat p {
  color: rgba(248, 243, 232, 0.55);
  font-size: 13px;
  margin-top: 6px;
  max-width: 260px;
}

.impact-value {
  display: block;
  font-family: var(--font-display);
  font-size: 3.6rem;
  font-weight: 300;
  line-height: 1.1;
  color: var(--accent-soft);
  font-variant-numeric: tabular-nums;
}
.impact-suffix { font-size: 2rem; font-weight: 300; }

.impact-label {
  display: block;
  margin-top: 4px;
  color: #7FD6C2;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
}

.impact-journey-title {
  margin-top: 4rem;
  text-align: center;
  color: rgba(248, 243, 232, 0.5);
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.impact-journey {
  position: relative;
  display: flex;
  justify-content: space-between;
  margin-top: 1.8rem;
  padding: 0 8px;
}

.impact-track {
  position: absolute;
  top: 27px;
  inset-inline: 60px;
  height: 2px;
  background: linear-gradient(90deg, rgba(248, 243, 232, 0.15), rgba(7, 172, 169, 0.5), rgba(78, 216, 203, 0.7));
  border-radius: 2px;
}

.impact-spark {
  position: absolute;
  top: 50%;
  inset-inline-start: 0;
  width: 10px;
  height: 10px;
  border-radius: 99px;
  background: var(--accent-soft);
  box-shadow: 0 0 12px 3px rgba(78, 216, 203, 0.75);
  transform: translate(-50%, -50%);
  animation: impact-travel 5s ease-in-out infinite;
}
.impact-spark:dir(rtl) { transform: translate(50%, -50%); }

@keyframes impact-travel {
  0%   { inset-inline-start: 0%; opacity: 0; }
  8%   { opacity: 1; }
  92%  { opacity: 1; }
  100% { inset-inline-start: 100%; opacity: 0; }
}

.impact-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 120px;
  text-align: center;
}
.impact-step span {
  font-size: 13px;
  color: rgba(248, 243, 232, 0.85);
}

.impact-node {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 99px;
  color: var(--accent-soft);
  background: rgba(248, 243, 232, 0.07);
  border: 1px solid rgba(78, 216, 203, 0.4);
  backdrop-filter: blur(4px);
  animation: impact-pulse 5s ease-in-out infinite;
}
.impact-node svg { width: 26px; height: 26px; }

.impact-step:nth-child(2) .impact-node { animation-delay: 0s; }
.impact-step:nth-child(3) .impact-node { animation-delay: 1.4s; }
.impact-step:nth-child(4) .impact-node { animation-delay: 2.8s; }
.impact-step:nth-child(5) .impact-node { animation-delay: 4.2s; }

@keyframes impact-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(78, 216, 203, 0); border-color: rgba(78, 216, 203, 0.4); }
  12% { box-shadow: 0 0 18px 2px rgba(78, 216, 203, 0.5); border-color: rgba(78, 216, 203, 0.95); }
  30% { box-shadow: 0 0 0 0 rgba(78, 216, 203, 0); border-color: rgba(78, 216, 203, 0.4); }
}

/* ---------------- Services ---------------- */
.services { padding: 5rem 0 4rem; }

.services-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3rem;
  align-items: end;
  max-width: 900px;
}
.services-head p { color: var(--ink-soft); font-size: 15px; }

.svc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
  margin-top: 2.8rem;
}

.svc {
  background: var(--paper);
  border: 1px solid rgba(36, 27, 54, 0.09);
  border-radius: 20px;
  padding: 2rem 1.8rem 2.2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.svc:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 44px rgba(36, 27, 54, 0.14);
  border-color: rgba(7, 172, 169, 0.5);
}

.svc-num {
  display: block;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 2.6rem;
  font-weight: 300;
  line-height: 1;
  color: var(--accent);
}

.svc h3 {
  margin-top: 0.9rem;
  font-size: 1.25rem;
  font-weight: 460;
  color: var(--oasis);
}

.svc p {
  margin-top: 0.6rem;
  color: var(--ink-soft);
  font-size: 13.5px;
}

.services-cta { margin-top: 2.4rem; text-align: center; }

/* ---------------- Capabilities ---------------- */
.caps {
  padding: 4rem 0 5rem;
  background: var(--sand-deep);
}

.caps-sub {
  color: var(--ink-soft);
  font-size: 15px;
  max-width: 540px;
  margin-top: 8px;
}

.caps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  margin-top: 2.8rem;
}

.cap {
  border-top: 2px solid var(--accent);
  padding-top: 1.4rem;
}

.cap-num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.4rem;
  color: var(--accent);
}

.cap h3 {
  margin-top: 0.4rem;
  font-size: 1.3rem;
  font-weight: 460;
  color: var(--oasis);
}

.cap p {
  margin-top: 0.5rem;
  color: var(--ink-soft);
  font-size: 13.5px;
}

/* ---------------- FAQ ---------------- */
.faq { padding: 4.5rem 0; }

.faq-list { max-width: 780px; margin-top: 1.8rem; }

.faq details {
  border-bottom: 1px solid rgba(36, 27, 54, 0.16);
  padding: 1.1rem 0.2rem;
}

.faq summary {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 440;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  transition: color 0.25s ease;
}
.faq summary:hover { color: var(--oasis-bright); }
.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--accent);
  line-height: 1;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details[open] summary { color: var(--oasis); }

.faq details p {
  margin-top: 0.7rem;
  color: var(--ink-soft);
  font-size: 14px;
  max-width: 640px;
}

/* ---------------- CTA band ---------------- */
.cta {
  position: relative;
  background:
    radial-gradient(ellipse 50% 80% at 80% 20%, rgba(7, 172, 169, 0.2), transparent 70%),
    var(--oasis-deep);
  padding: 4rem 0;
  overflow: hidden;
}

.cta-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.cta h2 {
  color: var(--sand);
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  font-weight: 360;
  max-width: 520px;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

/* ---------------- Footer ---------------- */
.footer {
  background: #14062E;
  color: rgba(248, 243, 232, 0.75);
  padding: 2rem 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.5rem;
  align-items: center;
  text-align: center;
}
.footer p { font-size: 13.5px; }
.footer a { color: inherit; text-decoration: none; }
.footer a:hover { color: var(--accent-soft); }
.footer svg { vertical-align: middle; position: relative; top: -1px; margin-inline-start: 4px; }

/* ---------------- Reveal on scroll ---------------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s ease var(--d, 0s), transform 0.8s ease var(--d, 0s);
}
.reveal.in { opacity: 1; transform: none; }

/* ---------------- Reduced motion ---------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .arch, .impact-spark, .impact-node { animation: none; }
  .hero-scene .blades, .hero-scene .star, .hero-scene .sun, .hero-scene .orb { animation: none; }
  .hero-scene .orb { opacity: 0.7; }
  .marquee-track { animation: none; flex-wrap: wrap; justify-content: center; width: 100%; }
  .marquee { mask-image: none; -webkit-mask-image: none; }
}

/* ---------------- Responsive ---------------- */
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; gap: 3rem; }
  .hero-art { order: -1; }
  .arch, .hero-art::before { width: min(300px, 80%); }
  .hero { padding-top: 7.5rem; }
  .svc-grid, .caps-grid { grid-template-columns: 1fr; gap: 1.4rem; }
  .services-head { grid-template-columns: 1fr; gap: 0.6rem; align-items: start; }
  .impact-stats { grid-template-columns: 1fr; gap: 2rem; }
  .impact-value { font-size: 2.9rem; }
  .impact-journey {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.8rem 1rem;
    justify-items: center;
  }
  .impact-track { display: none; }
  .impact-step { width: auto; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 768px) {
  .navbar ul.desktop-nav { display: none; }
  .hamburger { display: block; }
}

@media (min-width: 769px) {
  .hamburger { display: none; }
  .menu { display: none !important; }
}
