:root {
  --espresso: oklch(16.8% 0.012 28);
  --espresso-soft: oklch(21.4% 0.019 30);
  --cream: oklch(98.2% 0.013 71);
  --sand: oklch(92.1% 0.022 63);
  --clay: oklch(74.3% 0.03 43);
  --primary: oklch(68.5% 0.204 31);
  --line: oklch(100% 0 0 / 14%);
  --line-strong: oklch(100% 0 0 / 22%);
  --max: 80rem;
  --font: Manrope, Tajawal, system-ui, sans-serif;
  --display: "Bricolage Grotesque", Tajawal, system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-glow: 0 18px 40px -14px color-mix(in oklab, var(--primary) 60%, transparent);
  --shadow-float: 0 30px 60px -25px color-mix(in oklab, var(--espresso) 45%, transparent);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--espresso);
  color: var(--cream);
  font-family: var(--font);
  font-size: 1.05rem;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.03em; line-height: 0.98; }
p { margin: 0; }
.ico { display: inline-flex; width: 1rem; height: 1rem; flex-shrink: 0; }
.ico svg { width: 100%; height: 100%; }
[dir="rtl"] .flip { transform: scaleX(-1); }
.skip {
  position: absolute; left: 1rem; top: 1rem; z-index: 20;
  transform: translateY(-150%);
  background: var(--cream); color: var(--espresso);
  padding: 0.5rem 1rem; border-radius: 999px;
}
.skip:focus { transform: none; }
.wrap { width: min(var(--max), 100%); margin-inline: auto; padding-inline: 2.5rem; }
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.3s var(--ease), border-color 0.3s, backdrop-filter 0.3s;
}
.site-header.is-scrolled {
  background: color-mix(in oklab, var(--espresso) 90%, transparent);
  backdrop-filter: blur(18px);
  border-bottom-color: oklch(100% 0 0 / 10%);
}
.header-bar { position: relative; height: 5rem; display: flex; align-items: center; gap: 1rem; }
.logo img { height: 2.4rem; width: auto; }
.nav { display: none; gap: 0.15rem; position: absolute; left: 50%; transform: translateX(-50%); }
.nav a {
  position: relative;
  padding: 0.45rem 0.9rem; border-radius: 0.7rem; border: 1px solid transparent;
  font-weight: 700; font-size: 0.92rem;
  color: color-mix(in oklab, var(--cream) 82%, transparent);
}
.nav a:hover { color: var(--cream); }
.nav a:not([aria-current="page"])::after {
  content: "";
  position: absolute; left: 0.9rem; right: 0.9rem; bottom: 0.28rem;
  height: 1.5px; background: var(--primary);
  transform: scaleX(0); transform-origin: center;
  transition: transform 1.1s var(--ease);
}
.nav a:not([aria-current="page"]):hover::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--primary); border-color: var(--primary); }
.tools { display: none; align-items: center; gap: 0.75rem; margin-inline-start: auto; }
.lang { display: flex; border: 1px solid var(--line-strong); border-radius: 999px; padding: 0.2rem; }
.lang button, .menu-btn { background: transparent; border: 0; cursor: pointer; }
.lang button { min-width: 2.6rem; min-height: 2.2rem; border-radius: 999px; font-weight: 800; font-size: 0.78rem; }
.lang button[aria-pressed="true"] { background: var(--cream); color: var(--espresso); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  min-height: 3rem; padding: 0.7rem 1.3rem; border-radius: 999px; width: fit-content;
  font-weight: 700; border: 1px solid transparent;
  transition: transform 0.3s var(--ease), background 0.3s, filter 0.3s, color 0.3s, border-color 0.3s;
}
.btn-brand { background: var(--primary); color: var(--espresso); box-shadow: var(--shadow-glow); }
.tools .btn-brand { min-height: 2.75rem; padding: 0.5rem 1.2rem; font-size: 0.95rem; }
.btn-brand:hover { transform: translateY(-2px); filter: brightness(1.05); }
.btn-ghost { border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--cream); color: var(--espresso); border-color: var(--cream); }
.btn-light { background: var(--cream); color: var(--espresso); }
.btn-light:hover { transform: translateY(-2px); background: var(--sand); }
.btn-lg { min-height: 3.5rem; padding: 0.85rem 2rem; font-size: 1rem; }
.menu-btn {
  width: 3rem; height: 3rem; border-radius: 999px; border: 1px solid var(--line-strong);
  display: grid; place-items: center; margin-inline-start: auto;
}
.menu-btn span, .menu-btn span:before, .menu-btn span:after {
  display: block; width: 1.1rem; height: 2px; background: var(--cream); position: relative; content: "";
}
.menu-btn span:before { position: absolute; top: -6px; }
.menu-btn span:after { position: absolute; top: 6px; }
.menu-panel { display: none; border-top: 1px solid var(--line); padding: 1rem 0 1.5rem; }
.menu-panel.is-open { display: grid; gap: 0.4rem; }
.menu-panel > a { font-weight: 800; font-size: 1.4rem; font-family: var(--display); padding: 0.35rem 0; }
.menu-panel .menu-tools { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin-top: 0.8rem; }
.menu-panel .lang { flex-shrink: 0; }
.menu-panel .btn {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 700;
  min-height: 2.75rem;
  padding: 0.5rem 1.25rem;
  width: fit-content;
}

.eyebrow { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--primary); font-size: 0.75rem; font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase; }
.dot { width: 0.5rem; height: 0.5rem; border-radius: 999px; background: var(--primary); flex-shrink: 0; }
.lede { margin-top: 1.4rem; max-width: 42rem; color: var(--clay); }
.star { color: var(--primary); }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2.2rem; }

.page-hero { padding: 3.5rem 0 3rem; }
.page-hero h1 {
  margin: 1.4rem 0 0;
  max-width: 18ch;
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 800;
  line-height: 0.95;
}
.page-hero .lede { font-size: clamp(1.1rem, 2vw, 1.25rem); }

.story-band { padding: 0 0 6rem; }
.story-grid { display: grid; gap: 3rem; align-items: center; }
.mark {
  position: relative;
  width: 100%;
  max-width: 26rem;
  margin-inline: auto;
  aspect-ratio: 1;
}
.blob {
  position: absolute;
  inset: 0;
  background: var(--primary);
  border-radius: 72% 28% 64% 36% / 42% 68% 32% 58%;
  animation: float 8s ease-in-out infinite;
}
.mark img {
  position: absolute;
  inset: 22%;
  width: 56%;
  height: 56%;
  border-radius: 2rem;
  object-fit: cover;
  box-shadow: var(--shadow-float);
}
.story { display: grid; gap: 1.5rem; font-size: 1.125rem; line-height: 1.7; color: color-mix(in oklab, var(--cream) 80%, transparent); }
.story .punch {
  font-family: var(--display);
  font-size: clamp(1.4rem, 3vw, 1.7rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--cream);
}

.guides { padding: 6rem 0; }
.guides h2 { margin: 0; font-size: clamp(2.2rem, 5vw, 3.75rem); font-weight: 800; }
.principles { display: grid; gap: 1.5rem; margin-top: 3.5rem; }
.principles article {
  border: 1px solid oklch(100% 0 0 / 12%);
  border-radius: 1.5rem;
  padding: 2rem;
  transition: background 0.3s var(--ease);
}
.principles article:hover { background: var(--espresso-soft); }
.principles span { display: block; font-size: 0.85rem; font-weight: 800; color: color-mix(in oklab, var(--primary) 70%, white); }
.principles h3 { margin: 1rem 0 0; font-size: 1.5rem; font-weight: 800; }
.principles p { margin-top: 0.75rem; color: var(--clay); }

.grain { position: relative; }
.grain:before {
  content: ""; pointer-events: none; position: absolute; inset: 0; opacity: 0.07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.cta { position: relative; overflow: hidden; padding: 6rem 0 7rem; }
.cta h2 { font-size: clamp(3rem, 8vw, 6rem); max-width: 14ch; margin: 0; line-height: 0.95; }
.cta .lede { max-width: 34rem; font-size: 1.15rem; }
.asterisk {
  position: absolute; inset-inline-end: 5%; top: 1.5rem;
  font-size: clamp(10rem, 28vw, 28rem); color: var(--primary); opacity: 0.2;
  font-family: var(--display); line-height: 1; pointer-events: none;
  animation: spin 30s linear infinite;
}

.site-footer { background: var(--espresso); padding: 4rem 0 2rem; }
.footer-grid { display: grid; gap: 2.5rem; }
.footer-grid img { height: 2.5rem; width: auto; margin-bottom: 1.1rem; }
.footer-grid .btn { margin-top: 1rem; }
.footer-grid nav { display: grid; gap: 0.45rem; align-content: start; font-weight: 700; }
.footer-grid nav a { width: fit-content; padding: 0.2rem 0; color: color-mix(in oklab, var(--cream) 85%, transparent); }
.footer-grid nav a:hover { color: color-mix(in oklab, var(--primary) 70%, white); }
.legal { display: flex; justify-content: space-between; gap: 1rem; align-items: center; margin-top: 3.5rem; padding-top: 1.3rem; border-top: 1px solid oklch(100% 0 0 / 12%); color: var(--clay); font-size: 0.78rem; }
.legal img { width: 2rem; height: 2rem; border-radius: 0.45rem; }

.reveal { opacity: 0; transform: translateY(1.75rem); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.d1 { transition-delay: 80ms; }
.d2 { transition-delay: 160ms; }
.d3 { transition-delay: 240ms; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(8deg); }
}

@media (min-width: 640px) {
  .wrap { padding-inline: 2rem; }
  .page-hero { padding: 5rem 0 5rem; }
  .principles { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .nav, .tools { display: flex; }
  .menu-btn { display: none; }
  .story-grid { grid-template-columns: 1fr 1.3fr; gap: 3rem; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .asterisk, .blob { animation: none; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

@media (max-width: 639px) {
  .page-hero { padding: 2.5rem 0 1.5rem; }
  .page-hero h1 { font-size: clamp(2.25rem, 11vw, 3.25rem); line-height: 1.12; max-width: none; }
  .story-band { padding-bottom: 4rem; }
  .story-grid { gap: 2rem; }
  .story { font-size: 1.05rem; }
  .principles { gap: 1.25rem; }
  .cta { padding: 4rem 0 4.5rem; }
  .actions { display: grid; width: 100%; }
  .actions .btn { width: 100%; justify-content: center; }
}
