/* SDN Water Solutions — Design Tokens */
:root {
  /* Brand blues — derived from logo */
  --navy-900: #061E3A;
  --navy-800: #0A2B4F;
  --navy-700: #0E3D6E;
  --navy-600: #124F8C;
  --navy-500: #1866A8;
  --cyan-600: #007FB8;
  --cyan-500: #00A9DE;
  --cyan-400: #2FBEE8;
  --cyan-300: #7FD5F0;
  --cyan-100: #D9F0FA;
  --cyan-50:  #EDF7FC;

  /* Neutrals */
  --ink:       #0B1F33;
  --ink-2:     #1F3A55;
  --slate-700: #33506B;
  --slate-500: #5B7590;
  --slate-400: #8299AE;
  --slate-300: #B8C7D6;
  --slate-200: #DCE5EE;
  --slate-100: #EDF2F7;
  --paper:     #F6F9FC;
  --white:     #FFFFFF;

  /* Semantic */
  --bg:         var(--paper);
  --bg-alt:     var(--white);
  --bg-dark:    var(--navy-900);
  --fg:         var(--ink);
  --fg-muted:   var(--slate-500);
  --border:     var(--slate-200);
  --accent:     var(--cyan-500);
  --accent-2:   var(--navy-700);

  /* Radii */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 18px;
  --r-xl: 28px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(11,31,51,.06), 0 1px 3px rgba(11,31,51,.04);
  --shadow-md: 0 4px 12px rgba(11,31,51,.08), 0 2px 4px rgba(11,31,51,.04);
  --shadow-lg: 0 24px 48px -12px rgba(11,31,51,.18), 0 8px 16px -8px rgba(11,31,51,.08);
  --shadow-glow: 0 0 0 6px rgba(0,169,222,.12);

  /* Type */
  --font-display: "Instrument Serif", "Times New Roman", serif;
  --font-sans: "Instrument Sans", "Inter Tight", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --font-arabic: "IBM Plex Sans Arabic", "Noto Sans Arabic", system-ui, sans-serif;

  /* Layout */
  --container: 1280px;
  --gutter: 32px;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html {
  font-family: var(--font-sans);
  color: var(--fg);
  background: var(--bg);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}
body { font-size: 16px; line-height: 1.55; }

/* Arabic mode overrides */
html[dir="rtl"] { font-family: var(--font-arabic); }
html[dir="rtl"] body { letter-spacing: 0; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* Typographic scale */
.display-1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(56px, 7vw, 104px);
  line-height: .96;
  letter-spacing: -.02em;
}
.display-2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1;
  letter-spacing: -.015em;
}
.h1 { font-size: clamp(36px, 4vw, 56px); font-weight: 500; letter-spacing: -.02em; line-height: 1.05; }
.h2 { font-size: clamp(28px, 3vw, 40px); font-weight: 500; letter-spacing: -.015em; line-height: 1.15; }
.h3 { font-size: 22px; font-weight: 500; letter-spacing: -.01em; line-height: 1.3; }
.h4 { font-size: 18px; font-weight: 500; letter-spacing: -.005em; }

.eyebrow {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--cyan-600);
}

.lead { font-size: 20px; line-height: 1.5; color: var(--slate-700); font-weight: 400; }
.muted { color: var(--fg-muted); }
.mono { font-family: var(--font-mono); font-size: 13px; letter-spacing: .02em; }

/* Container */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.container-wide { max-width: 1440px; margin: 0 auto; padding: 0 var(--gutter); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -.005em;
  transition: all .3s var(--ease-out);
  white-space: nowrap;
}
.btn-primary {
  background: var(--navy-800);
  color: var(--white);
}
.btn-primary:hover { background: var(--cyan-600); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-cyan {
  background: var(--cyan-500);
  color: var(--white);
}
.btn-cyan:hover { background: var(--cyan-600); transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--navy-700); background: var(--white); }
.btn-dark-ghost {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255,255,255,.24);
}
.btn-dark-ghost:hover { border-color: rgba(255,255,255,.6); background: rgba(255,255,255,.06); }
.btn .arrow { transition: transform .3s var(--ease-out); }
.btn:hover .arrow { transform: translateX(4px); }
html[dir="rtl"] .btn:hover .arrow { transform: translateX(-4px); }

/* Section */
section { position: relative; }
.section-pad { padding: 120px 0; }
.section-pad-sm { padding: 80px 0; }
@media (max-width: 720px) {
  .section-pad { padding: 72px 0; }
  .section-pad-sm { padding: 56px 0; }
}

/* Dividers */
.rule {
  height: 1px;
  background: var(--border);
  border: none;
  margin: 0;
}

/* Utility */
.grid { display: grid; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; } .gap-2 { gap: 16px; } .gap-3 { gap: 24px; } .gap-4 { gap: 32px; }
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; } .mt-5 { margin-top: 48px; } .mt-6 { margin-top: 64px; }
.hidden { display: none !important; }

/* Placeholder image slot */
.ph {
  background:
    linear-gradient(135deg, rgba(0,169,222,.06), rgba(14,61,110,.08)),
    repeating-linear-gradient(45deg, rgba(14,61,110,.04) 0 8px, transparent 8px 16px);
  border: 1px dashed rgba(14,61,110,.28);
  color: var(--slate-500);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: .12em;
  border-radius: var(--r-md);
  aspect-ratio: 4/3;
  position: relative;
}
.ph::before {
  content: "";
  position: absolute; inset: 12px;
  border: 1px solid rgba(14,61,110,.12);
  border-radius: calc(var(--r-md) - 4px);
  pointer-events: none;
}
.ph.dark {
  background:
    linear-gradient(135deg, rgba(0,169,222,.14), rgba(255,255,255,.03)),
    repeating-linear-gradient(45deg, rgba(255,255,255,.03) 0 8px, transparent 8px 16px);
  border-color: rgba(0,169,222,.32);
  color: var(--cyan-300);
}

/* Chip */
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px; font-weight: 500;
  background: var(--cyan-50);
  color: var(--cyan-600);
  border: 1px solid rgba(0,127,184,.15);
}
.chip.dark {
  background: rgba(0,169,222,.12);
  color: var(--cyan-300);
  border-color: rgba(0,169,222,.25);
}
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan-500); }

/* Card */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  transition: all .3s var(--ease-out);
}
.card:hover { border-color: var(--slate-300); box-shadow: var(--shadow-md); }

/* Dark section */
.dark-section {
  background: var(--navy-900);
  color: var(--white);
}
.dark-section .muted { color: var(--slate-300); }
.dark-section .eyebrow { color: var(--cyan-400); }
.dark-section .rule { background: rgba(255,255,255,.1); }

/* Water motif animation */
@keyframes waveFlow {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@keyframes gentleRise {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
