/* Leptis Magna — Extra Virgin Olive Oil landing */

:root {
  /* Palette — premium heritage olive */
  --ink: oklch(0.22 0.02 120);         /* deep charcoal-olive */
  --ink-soft: oklch(0.38 0.03 130);
  --olive-deep: oklch(0.32 0.05 130);  /* signature deep olive */
  --olive-mid: oklch(0.52 0.09 125);
  --olive-bright: oklch(0.68 0.13 120);
  --gold: oklch(0.74 0.12 82);         /* aged gold */
  --gold-soft: oklch(0.86 0.07 85);
  --cream: oklch(0.965 0.018 88);      /* warm cream bg */
  --cream-deep: oklch(0.93 0.025 85);
  --bone: oklch(0.985 0.008 85);
  --terracotta: oklch(0.58 0.11 45);   /* restrained accent */

  --line: oklch(0.78 0.02 100 / 0.6);
  --line-strong: oklch(0.55 0.04 120 / 0.35);

  --f-display: "IBM Plex Arabic", "Readex Pro", system-ui, sans-serif;
  --f-body: "Readex Pro", "IBM Plex Arabic", system-ui, sans-serif;
  --f-mono: "Readex Pro", "IBM Plex Arabic", system-ui, sans-serif;
  --f-serif: "Cormorant Garamond", "Libre Caslon Text", serif;

  --radius-sm: 6px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --maxw: 1240px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  overflow-x: hidden;
}

/* Direction inherits from <html dir>, which LangProvider toggles.
   --dir points toward the leading edge so directional micro-animations
   (see .grade-row:hover) flip with language. */
:root { --dir: 1; }
html[dir="ltr"] { --dir: -1; }

html[lang="en"] {
  --f-display: "Cormorant Garamond", "Readex Pro", system-ui, serif;
  --f-body: "Readex Pro", system-ui, sans-serif;
}
html[lang="en"] .h-display,
html[lang="en"] .h-section,
html[lang="en"] .h-sub {
  letter-spacing: -0.01em;
}
html[lang="en"] .hero .h-display { line-height: 1.08; }
html[lang="ar"] .hero .h-display { line-height: 1.25; }
.hero .h-display .accent-gold { vertical-align: middle; }
html[lang="en"] .hero-lede { line-height: 1.5; }

img { max-width: 100%; display: block; }

/* Noise overlay — very subtle */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 32px; }

/* Typography */
.eyebrow {
  font-family: var(--f-body);
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--olive-mid);
  font-weight: 500;
}

.h-display {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(38px, 5.2vw, 76px);
  line-height: 1.22;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}
.h-display em {
  font-style: normal;
  font-family: var(--f-display);
  font-weight: 500;
  color: var(--olive-deep);
}
.h-display .accent-gold {
  color: var(--gold);
  font-weight: 500;
}

.h-section {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(30px, 3.6vw, 52px);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
}

.h-sub {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--ink);
}

.lede {
  font-size: clamp(17px, 1.4vw, 21px);
  line-height: 1.65;
  color: var(--ink-soft);
  text-wrap: pretty;
  max-width: 60ch;
}

p { text-wrap: pretty; color: var(--ink-soft); }

.num {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 400;
}

/* Section shell */
section { position: relative; }
.section-pad { padding: 120px 0; }
.section-pad-sm { padding: 80px 0; }

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--f-body);
  font-size: 15px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--olive-mid);
  font-weight: 500;
}
.section-label::before {
  content: "";
  width: 34px;
  height: 1px;
  background: var(--olive-mid);
}

/* Top nav (minimal, since QR arrival) */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(10px);
  background: oklch(0.965 0.018 88 / 0.82);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 32px;
  max-width: var(--maxw);
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--f-display);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--olive-deep);
}
.brand-mark {
  width: 30px;
  height: 30px;
  color: var(--olive-deep);
  flex: 0 0 auto;
}
.topbar nav {
  display: flex;
  gap: 28px;
}
.topbar nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 14px;
  transition: color 0.2s;
}
.topbar nav a:hover { color: var(--olive-deep); }

@media (max-width: 720px) {
  .topbar nav { display: none; }
}

/* Utility */
.divider {
  height: 1px;
  background: linear-gradient(to left, transparent, var(--line-strong), transparent);
  border: 0;
  margin: 0;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bone);
  font-family: var(--f-body);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 400;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bone);
  font-family: var(--f-body);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--olive-mid);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.lang-toggle:hover {
  border-color: var(--olive-mid);
  color: var(--olive-deep);
}
.lang-toggle .lang-on {
  color: var(--olive-deep);
  font-weight: 600;
}
.lang-toggle .lang-off {
  color: var(--olive-mid);
  opacity: 0.7;
}
.lang-toggle .lang-sep {
  color: var(--line-strong);
  font-weight: 300;
}
.chip .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--olive-mid);
}

/* Placeholder pattern */
.placeholder {
  position: relative;
  background: repeating-linear-gradient(
    135deg,
    oklch(0.88 0.03 95) 0 10px,
    oklch(0.92 0.025 95) 10px 20px
  );
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.placeholder span {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--f-body);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--olive-deep);
  background: var(--bone);
  padding: 5px 12px;
  border-radius: 999px;
  white-space: nowrap;
  font-weight: 500;
}

/* Decorative olive branch (SVG used inline) */
.branch {
  color: var(--olive-mid);
  opacity: 0.6;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-family: var(--f-body);
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.2s, color 0.2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--olive-deep);
  color: var(--cream);
}
.btn-primary:hover { background: oklch(0.28 0.06 130); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-ghost:hover { background: var(--bone); }

/* Tweaks panel */
.tweaks-panel {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 100;
  background: var(--bone);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  min-width: 240px;
  box-shadow: 0 20px 60px -20px oklch(0.3 0.05 120 / 0.25);
  font-family: var(--f-body);
  display: none;
}
.tweaks-panel.open { display: block; }
.tweaks-panel h4 {
  margin: 0 0 12px;
  font-family: var(--f-body);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--olive-mid);
  font-weight: 500;
}
.tweak-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
}
.tweak-row label {
  font-size: 13px;
  color: var(--ink);
}
.tweak-seg {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  overflow: hidden;
}
.tweak-seg button {
  background: transparent;
  border: 0;
  padding: 4px 10px;
  font-family: var(--f-body);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  cursor: pointer;
}
.tweak-seg button.active {
  background: var(--olive-deep);
  color: var(--cream);
}
.tweak-swatches {
  display: flex;
  gap: 8px;
}
.tweak-swatches button {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
}
.tweak-swatches button.active {
  border-color: var(--ink);
}
