/* Zirek — commercial marketing site (zirek.org)
   ----------------------------------------------------------------------------
   Design tokens are copied 1:1 from the app (packages/test/src/styles/globals.css)
   so the brochure and the product feel like one brand. Kurdish (Sorani), RTL,
   Rudaw typeface. Light + dark themes (data-theme on <html>, set pre-paint by
   theme-init.js, toggled in app.js). */

/* ---- Rudaw: bundled Kurdish/Arabic typeface (same file the app ships) ----- */
@font-face {
  font-family: 'Rudaw';
  src: url('/fonts/RudawRegular.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------------------------------- Tokens --------------------------------- */
:root {
  --bg:        #FAFAF9;
  --card:      #FFFFFF;
  --surface:   #F4F4F2;
  --border:    #E7E5E0;
  --ink:       #18181B;
  --muted:     #71717A;
  --accent:    #EA580C;
  --accent-2:  #C2410C;
  --accent-text: #C2410C; /* accent text that clears WCAG AA (4.5:1) on the light bg */
  --success:   #15803D;

  --grad-accent: linear-gradient(135deg, #FB923C 0%, #EA580C 52%, #DC2626 100%);
  --grad-soft:   linear-gradient(135deg, rgba(251,146,60,.14), rgba(234,88,12,.05));
  --glow:        radial-gradient(60% 60% at 50% 0%, rgba(234,88,12,.18), transparent 70%);

  --shadow-card: 0 1px 2px rgba(16,16,18,.04), 0 1px 1px rgba(16,16,18,.03);
  --shadow-lift: 0 10px 30px -12px rgba(16,16,18,.18), 0 2px 6px rgba(16,16,18,.05);
  --shadow-glow: 0 22px 60px -18px rgba(234,88,12,.42);

  --font: 'Rudaw', 'Segoe UI', Tahoma, 'Noto Sans Arabic', system-ui, -apple-system, sans-serif;
  --font-num: 'Segoe UI', 'SF Pro', system-ui, sans-serif;

  --maxw: 1120px;
  --radius: 22px;
}

:root[data-theme="dark"] {
  --bg:        #000000;
  --card:      #0F0F0F;
  --surface:   #1A1A1A;
  --border:    #2A2A2A;
  --ink:       #F5F5F5;
  --muted:     #9CA3AF;
  --accent:    #F97316;
  --accent-2:  #EA580C;
  --accent-text: #F97316; /* bright orange already clears AA on the black bg */
  --success:   #34D399;

  --grad-accent: linear-gradient(135deg, #FDBA74 0%, #F97316 52%, #EF4444 100%);
  --grad-soft:   linear-gradient(135deg, rgba(249,115,22,.20), rgba(234,88,12,.06));
  --glow:        radial-gradient(60% 60% at 50% 0%, rgba(249,115,22,.22), transparent 70%);

  --shadow-card: 0 1px 2px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.02);
  --shadow-lift: 0 14px 40px -12px rgba(0,0,0,.65), 0 0 0 1px rgba(255,255,255,.03);
  --shadow-glow: 0 24px 70px -16px rgba(249,115,22,.40);
}

/* If the user hasn't toggled, follow the OS preference (no flash on 1st visit) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:#000; --card:#0F0F0F; --surface:#1A1A1A; --border:#2A2A2A;
    --ink:#F5F5F5; --muted:#9CA3AF; --accent:#F97316; --accent-2:#EA580C; --accent-text:#F97316; --success:#34D399;
    --grad-accent: linear-gradient(135deg,#FDBA74 0%,#F97316 52%,#EF4444 100%);
    --grad-soft: linear-gradient(135deg,rgba(249,115,22,.20),rgba(234,88,12,.06));
    --glow: radial-gradient(60% 60% at 50% 0%, rgba(249,115,22,.22), transparent 70%);
    --shadow-card: 0 1px 2px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.02);
    --shadow-lift: 0 14px 40px -12px rgba(0,0,0,.65), 0 0 0 1px rgba(255,255,255,.03);
    --shadow-glow: 0 24px 70px -16px rgba(249,115,22,.40);
  }
}

/* ---------------------------------- Reset ---------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  text-align: start; /* flips with dir (rtl ⇄ ltr) for the KU/EN toggle */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
html[lang="en"] { font-family: 'Segoe UI', system-ui, -apple-system, 'Inter', sans-serif; }
:root[data-theme="dark"] body { color-scheme: dark; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

/* Keyboard focus ring — visible on every interactive control (WCAG 2.4.7). */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.icon-btn:focus-visible, .lang-btn:focus-visible, .btn:focus-visible { outline-offset: 2px; }
.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 22px; }
section { position: relative; }

/* --------------------------------- Buttons --------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-size: 1.02rem; font-weight: 700; line-height: 1;
  padding: 15px 26px; border-radius: 999px; border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(.98); }
.btn-primary { color: #fff; background: var(--grad-accent); box-shadow: var(--shadow-glow); }
.btn-primary:hover { filter: brightness(1.05); transform: translateY(-2px); }
.btn-ghost { background: var(--card); color: var(--ink); border-color: var(--border); box-shadow: var(--shadow-card); }
.btn-ghost:hover { border-color: var(--accent); transform: translateY(-2px); }
.btn-sm { padding: 11px 20px; font-size: .95rem; }

/* ---------------------------------- Header --------------------------------- */
header.site {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, background .25s ease;
}
header.site.scrolled { border-bottom-color: var(--border); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 18px; }
.brand img { height: 30px; }

/* Theme-aware logo: ember (dark ink) on light, midnight (cream) on dark.
   CSS-driven so there's no JS flash of the wrong logo on a dark page. */
.logo-midnight { display: none; }
:root[data-theme="dark"] .logo-ember { display: none; }
:root[data-theme="dark"] .logo-midnight { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-ember { display: none; }
  :root:not([data-theme="light"]) .logo-midnight { display: block; }
}
.nav-links { display: flex; align-items: center; gap: 28px; font-size: .98rem; color: var(--muted); }
.nav-links a { transition: color .15s ease; }
.nav-links a:hover { color: var(--ink); }
.nav-right { display: flex; align-items: center; gap: 12px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--card); color: var(--ink); display: grid; place-items: center;
  transition: border-color .15s ease, transform .15s ease;
}
.icon-btn:hover { border-color: var(--accent); }
.icon-btn svg { width: 19px; height: 19px; }
.theme-icon-dark { display: none; }
:root[data-theme="dark"] .theme-icon-dark { display: block; }
:root[data-theme="dark"] .theme-icon-light { display: none; }
.menu-btn { display: none; }
.lang-btn {
  min-width: 40px; height: 40px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--card); color: var(--ink);
  font-size: .9rem; font-weight: 700; transition: border-color .15s ease;
}
.lang-btn:hover { border-color: var(--accent); }

/* Hero value strip (replaces numeric stats — no fabricated metrics) */
.values { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: clamp(22px, 4vw, 40px); }
.value {
  display: flex; align-items: center; gap: 11px; background: var(--card);
  border: 1px solid var(--border); border-radius: 16px; padding: 16px 18px;
  box-shadow: var(--shadow-card); font-weight: 600; font-size: .98rem;
}
.value svg { width: 22px; height: 22px; color: var(--accent); flex-shrink: 0; }

/* Contact channel buttons */
.contact-btns { display: flex; flex-wrap: wrap; gap: 13px; justify-content: center; }
.btn-channel { color: #fff; box-shadow: var(--shadow-lift); }
.btn-channel:hover { filter: brightness(1.06); transform: translateY(-2px); }
.btn-channel svg { flex-shrink: 0; }

/* --------------------------------- Hero ------------------------------------ */
.hero { padding: clamp(48px, 7vw, 96px) 0 clamp(40px, 6vw, 72px); overflow: hidden; }
.hero::before {
  content: ''; position: absolute; inset: -10% -20% auto -20%; height: 80%;
  background: var(--glow); pointer-events: none; z-index: 0;
}
.hero-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(30px, 5vw, 64px);
  align-items: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: .92rem; font-weight: 600; color: var(--accent-text);
  background: var(--grad-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  padding: 8px 15px; border-radius: 999px; margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(2.1rem, 5.4vw, 3.5rem); font-weight: 800; line-height: 1.2;
  letter-spacing: -0.01em; margin-bottom: 18px;
}
.hero h1 .accent { background: var(--grad-accent); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: clamp(1.05rem, 2.2vw, 1.22rem); color: var(--muted); max-width: 33ch; margin-bottom: 30px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 13px; margin-bottom: 22px; }
.hero-note { font-size: .9rem; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.hero-note svg { width: 17px; height: 17px; color: var(--success); flex-shrink: 0; }

/* Phone mockup */
.device-stage { position: relative; display: grid; place-items: center; }
.phone {
  position: relative; width: clamp(230px, 30vw, 300px); aspect-ratio: 1080 / 2180;
  background: #0a0a0a; border-radius: 42px; padding: 10px;
  box-shadow: var(--shadow-lift), 0 0 0 1px rgba(255,255,255,.04);
  animation: float 6s ease-in-out infinite;
}
.phone::before { /* notch */
  content: ''; position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
  width: 96px; height: 22px; background: #0a0a0a; border-radius: 999px; z-index: 3;
}
.phone-screen { width: 100%; height: 100%; border-radius: 33px; overflow: hidden; background: var(--bg); }
.phone-screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.float-badge {
  position: absolute; z-index: 4; background: var(--card); border: 1px solid var(--border);
  box-shadow: var(--shadow-lift); border-radius: 16px; padding: 12px 15px;
  display: flex; align-items: center; gap: 11px; animation: float 6s ease-in-out infinite;
}
.float-badge.b1 { top: 12%; inset-inline-start: -8%; animation-delay: -2s; }
.float-badge.b2 { bottom: 14%; inset-inline-end: -6%; animation-delay: -4s; }
.float-badge .dot { width: 38px; height: 38px; border-radius: 11px; background: var(--grad-soft); display: grid; place-items: center; color: var(--accent); }
.float-badge .dot svg { width: 20px; height: 20px; }
.float-badge .t1 { font-size: .72rem; color: var(--muted); }
.float-badge .t2 { font-size: 1.05rem; font-weight: 800; line-height: 1.1; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* ------------------------------- Section head ------------------------------ */
.sec { padding: clamp(56px, 8vw, 104px) 0; }
.sec-head { text-align: center; max-width: 640px; margin: 0 auto clamp(34px, 5vw, 56px); }
.sec-head .kicker { font-size: .92rem; font-weight: 700; color: var(--accent-text); letter-spacing: .02em; margin-bottom: 12px; }
.sec-head h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); font-weight: 800; line-height: 1.25; letter-spacing: -0.01em; }
.sec-head p { color: var(--muted); font-size: 1.08rem; margin-top: 14px; }

/* ------------------------------- Feature grid ------------------------------ */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 26px; box-shadow: var(--shadow-card);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.feature .ico { width: 50px; height: 50px; border-radius: 14px; background: var(--grad-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 18px; }
.feature .ico svg { width: 26px; height: 26px; }
.feature h3 { font-size: 1.22rem; font-weight: 700; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 1rem; }

/* --------------------------------- Steps ----------------------------------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step { position: relative; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px 26px; box-shadow: var(--shadow-card); }
.step .n {
  counter-increment: step; width: 46px; height: 46px; border-radius: 14px;
  background: var(--grad-accent); color: #fff; display: grid; place-items: center;
  font-size: 1.25rem; font-weight: 800; margin-bottom: 18px; box-shadow: var(--shadow-glow);
}
.step .n::before { content: counter(step); }
.step h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 8px; }
.step p { color: var(--muted); }

/* ---------------------------------- Team ----------------------------------- */
.team { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; max-width: 720px; margin-inline: auto; }
.member {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-card);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.member:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }
/* height:auto lets aspect-ratio control the box — without it the width/height
   attributes force a tall box and object-fit:cover zoom-crops the square photo. */
.member .photo { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; display: block; background: #0E1116; }
.member .info { padding: 20px 18px; text-align: center; }
.member .name { font-size: 1.25rem; font-weight: 800; }
.member .role { color: var(--accent-text); font-size: .95rem; font-weight: 600; margin-top: 5px; }

/* ----------------------------- Featured work ------------------------------- */
.price-wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(26px, 4vw, 50px); align-items: center; }
.price-list { list-style: none; display: grid; gap: 13px; margin-bottom: 28px; }
.price-list li { display: flex; align-items: flex-start; gap: 11px; }
.price-list svg { width: 21px; height: 21px; color: var(--success); flex-shrink: 0; margin-top: 2px; }

/* --------------------------------- CTA band -------------------------------- */
.cta-band { background: #0E1116; color: #FAF7F2; border-radius: 30px; padding: clamp(40px, 6vw, 70px) clamp(26px, 5vw, 60px); text-align: center; position: relative; overflow: hidden; box-shadow: var(--shadow-lift); }
.cta-band::before { content: ''; position: absolute; inset: -40% -10% auto -10%; height: 90%; background: radial-gradient(60% 60% at 50% 0%, rgba(249,115,22,.30), transparent 70%); }
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { font-size: clamp(1.7rem, 4.4vw, 2.7rem); font-weight: 800; line-height: 1.25; margin-bottom: 14px; }
.cta-band p { color: rgba(250,247,242,.72); font-size: 1.1rem; margin-bottom: 28px; }

/* --------------------------------- Footer ---------------------------------- */
footer.site { background: var(--surface); border-top: 1px solid var(--border); padding: 54px 0 30px; margin-top: clamp(56px, 8vw, 100px); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; margin-bottom: 36px; }
.foot-brand img { height: 30px; margin-bottom: 14px; }
.foot-brand p { color: var(--muted); font-size: .96rem; max-width: 34ch; }
.foot-col h4 { font-size: .9rem; font-weight: 700; color: var(--muted); margin-bottom: 14px; }
.foot-col a { display: block; color: var(--ink); padding: 6px 0; font-size: .98rem; transition: color .15s ease; }
.foot-col a:hover { color: var(--accent); }
.foot-bottom { border-top: 1px solid var(--border); padding-top: 22px; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: .9rem; }
.foot-bottom .made { display: inline-flex; align-items: center; gap: 7px; }

/* ------------------------------ Reveal anim -------------------------------- */
/* Hidden state only applies when JS is present (html.js, set in theme-init.js),
   so a no-JS / blocked-JS visitor still sees every section. */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s cubic-bezier(.22,1,.36,1), transform .6s cubic-bezier(.22,1,.36,1); }
.js .reveal.in { opacity: 1; transform: none; }

/* ------------------------------- Responsive -------------------------------- */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .menu-btn { display: grid; }
  .nav-right .btn-primary.btn-sm { display: none; } /* duplicate of the CTA already in the mobile menu */
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero p.lead { max-width: none; margin-inline: auto; }
  .hero-cta { justify-content: center; }
  .hero-note { justify-content: center; }
  .device-stage { order: -1; margin-bottom: 14px; }
  .eyebrow { margin-inline: auto; }
  .features, .steps { grid-template-columns: 1fr 1fr; }
  .price-wrap { grid-template-columns: 1fr; }
  .values { grid-template-columns: 1fr 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 580px) {
  .features, .steps, .values, .team, .foot-grid { grid-template-columns: 1fr; }
  .float-badge.b1 { inset-inline-start: -2%; }
  .float-badge.b2 { inset-inline-end: -2%; }
  .btn { width: 100%; }
  .hero-cta { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .phone, .float-badge { animation: none; }
  .js .reveal { transition: none; opacity: 1; transform: none; }
}

/* Mobile slide-in menu */
.mobile-menu { position: fixed; inset: 0; z-index: 60; display: none; }
.mobile-menu.open { display: block; }
.mobile-menu .scrim { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.mobile-menu .panel { position: absolute; inset-block: 0; inset-inline-start: 0; width: min(82vw, 320px); background: var(--bg); border-inline-end: 1px solid var(--border); padding: 22px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow-lift); }
.mobile-menu .panel a { padding: 14px 10px; font-size: 1.1rem; font-weight: 600; border-radius: 12px; }
.mobile-menu .panel a:hover { background: var(--surface); }
.mobile-menu .panel .btn { margin-top: 14px; }
.mobile-menu .panel .close { align-self: flex-start; margin-bottom: 10px; }
