/* ==========================================================================
   Evolution Tech — landing page
   Follows the brand guidelines (v1, 2026): dark by default, one accent colour,
   Readex Pro, 1px borders instead of shadows, no glow and no gradients.
   Layout uses logical properties (inline/block) so it mirrors for Arabic (RTL).
   ========================================================================== */

:root {
  /* Colours (guidelines 03) */
  --bg: #0A0F1C;          /* Night: the default background */
  --card: #0F172A;
  --card-border: #1B2740;
  --btn-border: #2A3A58;
  --text: #F5F8FF;        /* Snow white */
  --text-muted: #9AA8C2;
  --accent: #38BDF8;      /* Electric blue: one highlighted word, links */
  --deep: #1D4ED8;        /* Deep blue: primary buttons */
  --error: #F87171;

  /* Corners (guidelines 05): tag 9, button 14, card 24, frame 32 */
  --r-tag: 9px;
  --r-btn: 14px;
  --r-card: 24px;

  /* Spacing (guidelines 05): elements 16, cards 24, inside a card 32, sections 96 */
  --gap-el: 16px;
  --gap-card: 24px;
  --pad-card: 32px;
  --section: 96px;

  --header-h: 72px;
  --font: "Readex Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;           /* Body 16 / 400 */
  font-weight: 400;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
html[lang="ar"] body { line-height: 1.85; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
ul, ol { list-style: none; margin: 0; padding: 0; }

/* Type scale (guidelines 04) */
h1, h2, h3 { margin: 0 0 0.5em; line-height: 1.2; letter-spacing: -0.02em; }
html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3 { letter-spacing: 0; line-height: 1.4; }
h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 700; }   /* Display 72 / 700 */
h2 { font-size: clamp(1.75rem, 3.6vw, 2.75rem); font-weight: 700; } /* H1 44 / 700 */
h3 { font-size: 1.375rem; font-weight: 600; }                       /* H3 22 / 600 */
.lead,
.section-sub { font-size: 1.25rem; font-weight: 300; color: var(--text-muted); } /* Lead 20 / 300 */

.container {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: 24px;
}

.skip-link {
  position: absolute;
  inset-inline-start: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--text);
  color: var(--bg);
  border-radius: var(--r-btn);
  font-weight: 600;
}
.skip-link:focus { top: 16px; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Highlighted word in a headline: one per heading, electric blue */
.accent-word { color: var(--accent); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border: 1px solid transparent;
  border-radius: var(--r-btn);
  background: var(--deep);       /* Primary: deep blue, white text */
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.btn:hover { filter: brightness(1.12); }
.btn-ghost {                     /* Secondary: no fill, 1px border */
  background: transparent;
  color: var(--text);
  border-color: var(--btn-border);
}
.btn-ghost:hover { filter: none; border-color: var(--text-muted); }
.btn-light {                     /* Header call to action, as in the guidelines' website sample */
  background: var(--text);
  color: var(--bg);
}
.btn-small { padding: 8px 16px; font-size: 0.9rem; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.site-header.scrolled {
  background: var(--bg);
  border-bottom-color: var(--card-border);
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
/* The mark is never mirrored for Arabic (guidelines 02). */
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 44px; height: 28px; flex-shrink: 0; }
.brand-names { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text { font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.01em; } /* Name: Readex Pro 600 */
.brand-sub { font-size: 0.75rem; color: var(--text-muted); }

/* Menu and call to action sit together on the end side, as in the website design */
.nav { display: flex; align-items: center; gap: 30px; margin-inline-start: auto; }
.nav a:not(.btn) {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}
.nav a:not(.btn):hover { color: var(--text); }

.header-actions { display: flex; align-items: center; gap: 12px; }
.lang-toggle {                   /* Quiet text link, so the header reads like the design */
  padding: 6px 4px;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s ease;
}
.lang-toggle:hover { color: var(--text); }

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--btn-border);
  border-radius: var(--r-btn);
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  padding-block: calc(var(--header-h) + 64px) var(--section);
}
/* Text on the start side, the framed mark on the end side (left in Arabic),
   sized as in the website design: the frame is about 30% of the content width. */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr minmax(240px, 30.5%);
  gap: 64px;
  align-items: center;
}
.badge {                         /* Small pill above the headline */
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  padding: 5px 14px;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  color: var(--accent);
  font-size: 0.8125rem;
}
.badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.hero h1 { letter-spacing: -0.03em; margin-bottom: 24px; }
html[lang="ar"] .hero h1 { letter-spacing: 0; line-height: 1.25; }
/* English runs longer than Arabic; keep the headline to two lines (guidelines 04) */
html[lang="en"] .hero h1 { font-size: clamp(2.25rem, 4.6vw, 3.5rem); }
.lead { max-width: 560px; margin-bottom: 32px; }
.hero .lead { max-width: 520px; font-size: 1.125rem; }
.hero-cta .btn { padding: 12px 24px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: var(--gap-el); }
.hero-mark {                     /* The mark in a frame (32px corners) */
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 32px;
}
.hero-mark svg { width: 72%; height: auto; }

/* ---------- Sections ---------- */
.section { padding-block: var(--section); border-top: 1px solid var(--card-border); }
.section-tight { padding-block: 64px; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.section-head h2 { margin: 0; }
.section-head .section-sub { margin: 0; font-size: 1rem; font-weight: 400; }
.section-head-stack { display: block; max-width: 680px; margin-bottom: 64px; }
.section-head-stack h2 { margin-bottom: 0.5em; }
.section-head-stack .section-sub { font-size: 1.25rem; font-weight: 300; }
.eyebrow {                       /* Caption 13 / 400 */
  display: inline-block;
  margin-bottom: var(--gap-el);
  color: var(--accent);
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
html[lang="ar"] .eyebrow { letter-spacing: 0; font-size: 0.875rem; }

/* How we work */
.how-title { margin-bottom: 40px; }
.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
}
.principle-num {
  display: block;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}
.principle h3 { margin-bottom: 8px; }
.principle p { margin: 0; color: var(--text-muted); }

/* Products: cards #0F172A, 1px border, 24px corners, 32px inside */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap-card);
}
.product {
  display: flex;
  flex-direction: column;
  padding: var(--pad-card);
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--r-card);
  transition: border-color 0.2s ease;
}
.product:hover { border-color: var(--btn-border); }
.product-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 76px;
  margin-bottom: var(--pad-card);
}
.product-name { font-size: 1.375rem; margin: 0; }
.product-logo { width: auto; height: 36px; }
.product-logo-tile { height: 76px; border-radius: 16px; outline: 1px solid var(--card-border); }
.product-label {
  margin-bottom: 8px;
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
html[lang="ar"] .product-label { letter-spacing: 0; font-size: 0.875rem; }
.product-gap { margin: 0; }
.product-gap-muted { color: var(--text-muted); }
.product-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: auto;
  padding-top: 24px;
  font-size: 0.9rem;
}
.product-links a { color: var(--accent); }
.product-links a:hover { text-decoration: underline; }
/* Product name written in its wordmark's typeface */
.brand-pullup { font-family: "Comfortaa", var(--font); font-weight: 700; }

/* Status tags: brand colours only, told apart by colour and dot */
.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 12px;
  border: 1px solid currentColor;
  border-radius: var(--r-tag);
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
}
.status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.status-live { color: var(--accent); }
.status-dev { color: var(--text); }
.status-concept { color: var(--text-muted); }
.status-concept::before { background: transparent; border: 1px solid currentColor; }

/* Call to action: deep blue band, white text, light button */
.section-cta { border-top: 0; padding-top: 0; }
.cta-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  padding: 48px var(--pad-card);
  background: var(--deep);
  border-radius: var(--r-card);
  color: #fff;
}
.cta-band h2 { margin-bottom: 8px; font-size: clamp(1.5rem, 3vw, 2.25rem); }
.cta-band p { margin: 0; color: rgba(255, 255, 255, 0.85); }
@media (min-width: 761px) { .cta-band { padding-inline: 48px; } }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Footer */
.site-footer {
  padding-block: 40px;
  border-top: 1px solid var(--card-border);
  color: var(--text-muted);
  font-size: 0.8125rem;          /* Caption 13 / 400 */
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--gap-el);
  flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: var(--gap-el); }
.footer-mark { width: 36px; height: 23px; flex-shrink: 0; }  /* White mark; at least 24px wide */
.footer-inner p { margin: 0; }
.footer-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.footer-meta a:hover { color: var(--text); }

/* ---------- Reveal on scroll ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.js .reveal.visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  /* On narrow screens the framed mark sits above the headline, shorter */
  .hero-mark { order: -1; aspect-ratio: auto; height: 220px; }
  .hero-mark svg { width: 40%; max-width: 220px; }
  .product-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  :root { --section: 64px; --pad-card: 24px; }
  .container { padding-inline: 16px; }

  .menu-toggle { display: flex; }
  .nav {
    position: fixed;
    top: var(--header-h);
    inset-inline: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--card-border);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  }
  .nav.open { transform: none; opacity: 1; visibility: visible; }
  .nav a:not(.btn) { padding: 12px 8px; font-size: 1.05rem; }
  .nav .btn { margin-top: 8px; }
  .site-header:has(.nav.open) {
    background: var(--bg);
    border-bottom-color: var(--card-border);
  }

  .principles,
  .product-grid { grid-template-columns: 1fr; }
  .principles { gap: 32px; }
  .hero-cta .btn { flex: 1 1 100%; }
  .cta-band .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
