/* ============================================================
   zzOwn — main.css
   Design tokens → Reset → Layout → Nav → Hero → Sections →
   Components → 404 → RTL → Responsive
   ============================================================ */

/* === TOKENS ================================================ */
:root {
  --bg:          #0e0e12;
  --bg2:         #13131a;
  --bg3:         #0b0b0f;
  --surface:     rgba(255,255,255,0.06);
  --surface2:    rgba(255,255,255,0.11);
  --border:      rgba(255,255,255,0.10);
  --border2:     rgba(255,255,255,0.18);
  --text:        #eaecf8;
  --muted:       #54547a;
  --muted2:      #8a8aaa;
  --brand:       #45b39d;
  --accent:      #ff9500;
  --accent-dim:  rgba(255,149,0,0.11);
  --accent-glow: rgba(255,149,0,0.38);
  --secondary:   #3b9eff;
  --sec-dim:     rgba(59,158,255,0.10);
  --sec-glow:    rgba(59,158,255,0.35);
  --nav-bg:      rgba(14,14,18,0.90);
  --font:        'Outfit', sans-serif;
  --mono:        'Space Mono', monospace;
  --ease:        cubic-bezier(.22,1,.36,1);
  --nav-h:       64px;
  --radius:      14px;
  --radius-sm:   8px;
  --max-w:       1500px;
  --dur:         0.6s;
  --fs-h1:       clamp(40px,5.5vw,82px);
  --fs-h2:       clamp(34px,5vw,60px);
  --fs-lg:       22px;
  --fs-md:       18px;
  --fs-sm:       16px;
}

body.light {
  --bg:          #f2ede7;
  --bg2:         #e8e2d8;
  --bg3:         #ede8e1;
  --surface:     rgba(40,30,10,0.07);
  --surface2:    rgba(40,30,10,0.13);
  --border:      rgba(40,30,10,0.14);
  --border2:     rgba(40,30,10,0.24);
  --text:        #18160f;
  --muted:       #aba89e;
  --muted2:      #52503e;
  --brand:       #2e8e7d;
  --accent:      #c07000;
  --accent-dim:  rgba(192,112,0,0.11);
  --accent-glow: rgba(192,112,0,0.30);
  --secondary:   #1a6fd4;
  --sec-dim:     rgba(26,111,212,0.10);
  --sec-glow:    rgba(26,111,212,0.28);
  --nav-bg:      rgba(242,237,231,0.94);
}

/* === SCROLLBAR ============================================= */
html { scrollbar-width: thin; scrollbar-color: var(--muted) var(--bg3); }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg3); }
::-webkit-scrollbar-thumb { background: var(--muted); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* === RESET ================================================= */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  min-height: 100vh;
  font-size: 18px;
  line-height: 1.65;
  transition: background .35s, color .35s;
}
img, svg { display: block; max-width: 100%; }
button { cursor: pointer; font-family: var(--font); border: none; background: none; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.1; letter-spacing: -0.02em; }

/* === GOOGLE FONTS ========================================== */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@200;300;400;600;700;900&family=Space+Mono:wght@400;700&display=swap');

/* === CONTAINER ============================================= */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5em;
}

/* === REVEAL ANIMATION ====================================== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.reveal.visible { opacity: 1; transform: none; }
.d1 { transition-delay: .1s; }
.d2 { transition-delay: .2s; }
.d3 { transition-delay: .3s; }
.d4 { transition-delay: .4s; }
.d5 { transition-delay: .5s; }

/* === HEADER / NAV ========================================== */
header#header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 299;
  height: var(--nav-h);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: height .3s var(--ease), background .35s;
}
header#header.scrolled { height: 52px; }

#nav {
  max-width: var(--max-w);
  height: 100%;
  margin: 0 auto;
  padding: 0 1.5em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.nav-logo { display: flex; align-items: center; gap: 0; flex-shrink: 0; }
.nav-logo-brand {
  display: inline-flex; align-items: center;
  font-size: 1.3rem; font-weight: 900; letter-spacing: -.5px;
}
.nav-logo-brand .zz  { color: var(--text); }
.nav-logo-brand .own { color: var(--brand); }
.nav-logo-sep  { width: 1px; height: 20px; background: var(--border2); margin: 0 16px; }
.nav-logo-page { font-family: var(--mono); font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted2); }

/* Center links */
.nav-links {
  display: flex; align-items: center; gap: .5rem;
  position: absolute; left: 50%; transform: translateX(-50%);
}
.nav-link {
  font-size: var(--fs-sm); color: var(--muted2);
  padding: 7px 14px; border-radius: 7px;
  transition: color .2s, background .2s; white-space: nowrap;
}
.nav-link:hover, .nav-link.active { color: var(--text); background: var(--surface2); }

/* Right */
.nav-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* Lang select */
.lang-select {
  font-family: var(--mono); font-size: .75rem; letter-spacing: .05em;
  color: var(--muted2); background: var(--surface);
  border: 1px solid var(--border2); border-radius: 8px;
  padding: 6px 10px; cursor: pointer;
  transition: border-color .2s, color .2s;
  max-width: 130px;
}
.lang-select:hover { border-color: var(--accent); color: var(--text); }
.lang-select option { background: var(--bg2); color: var(--text); }

/* Theme toggle */
.btn-theme {
  width: 36px; height: 36px; border-radius: 8px;
  border: 1px solid var(--border2); background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  transition: all .2s; font-size: 16px; color: var(--muted2);
}
.btn-theme:hover { background: var(--surface2); border-color: rgba(255,149,0,.3); color: var(--accent); }

/* CTA */
.nav-cta {
  font-size: var(--fs-sm); font-weight: 700; letter-spacing: .06em;
  background: var(--accent); color: var(--bg);
  border-radius: 9px; padding: 9px 22px;
  white-space: nowrap; position: relative; overflow: hidden;
  transition: all .25s var(--ease);
  box-shadow: 0 2px 12px rgba(255,149,0,0);
}
.nav-cta::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 25%, rgba(255,255,255,.2) 50%, transparent 75%);
  transform: translateX(-100%); transition: transform .45s var(--ease);
}
.nav-cta:hover { box-shadow: 0 6px 22px var(--accent-glow); transform: translateY(-1px); }
.nav-cta:hover::after { transform: translateX(100%); }

/* Hamburger */
.nav-hamburger { display: none; flex-direction: column; gap: 5px; padding: 8px 0; flex-shrink: 0; }
.nav-hamburger span { display: block; width: 22px; height: 1.5px; background: var(--text); border-radius: 2px; transition: all .3s; }
.nav-hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile drawer */
#mobile-drawer { position: fixed; top: var(--nav-h); left: 0; right: 0; z-index: 290; background: var(--bg2); border-bottom: 1px solid var(--border); max-height: 0; overflow: hidden; transition: max-height .38s var(--ease); }
#mobile-drawer.open { max-height: 500px; }
.drawer-inner { padding: 0 2em; }
.drawer-link { display: block; font-size: var(--fs-sm); color: var(--muted2); padding: 14px 0; border-bottom: 1px solid var(--border); transition: color .2s; }
.drawer-link:last-child { border-bottom: none; }
.drawer-link:hover { color: var(--text); }

/* === SECTION SHARED ======================================== */
.section-label {
  display: block; font-family: var(--mono);
  font-size: var(--fs-sm); letter-spacing: 3px; text-transform: uppercase;
  color: var(--accent); margin-bottom: 16px;
}
.section-title {
  font-size: var(--fs-h2); font-weight: 900;
  line-height: 1.05; letter-spacing: -2px;
  margin-bottom: 20px; color: var(--text);
}
.section-sub {
  font-size: var(--fs-md); color: var(--muted2);
  max-width: 600px; line-height: 1.72; font-weight: 300;
  margin-bottom: 60px;
}
.section-body {
  font-size: var(--fs-md); color: var(--muted2);
  line-height: 1.72; font-weight: 300; max-width: 720px;
}

/* === BUTTONS =============================================== */
.btn-primary {
  display: inline-block;
  font-size: var(--fs-sm); font-weight: 700; letter-spacing: .06em;
  background: var(--accent); color: var(--bg);
  border: none; border-radius: 10px; padding: 14px 40px;
  cursor: pointer; position: relative; overflow: hidden;
  transition: all .28s var(--ease);
  box-shadow: 0 2px 12px rgba(255,149,0,0);
}
.btn-primary::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 20%, rgba(255,255,255,.22) 50%, transparent 80%);
  transform: translateX(-100%); transition: transform .5s var(--ease);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 10px 36px var(--accent-glow); }
.btn-primary:hover::before { transform: translateX(100%); }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: var(--fs-sm); font-weight: 400; color: var(--muted2);
  background: transparent; padding: 14px 24px;
  border: 1px solid var(--border2); border-radius: 10px;
  cursor: pointer; transition: all .22s;
}
.btn-ghost:hover { color: var(--text); border-color: rgba(255,255,255,.30); background: var(--surface2); }

/* === HERO ================================================== */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  padding: calc(var(--nav-h) + 60px) 0 80px;
  position: relative; overflow: hidden;
  background: var(--bg);
}
.hero-sm { min-height: 50vh; padding: calc(var(--nav-h) + 40px) 0 60px; }

/* Ambient glow */
.hero::before {
  content: ''; position: absolute;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 80vh; height: 80vh;
  background: radial-gradient(circle, rgba(255,149,0,.055) 0%, transparent 65%);
  pointer-events: none; z-index: 0;
  animation: breathe 7s ease-in-out infinite;
}
@keyframes breathe { 0%,100%{opacity:.55;} 50%{opacity:1;} }

.hero .container { position: relative; z-index: 1; }

.hero-inner {
  display: flex; align-items: center;
  gap: 80px;
}
.hero-left { flex: 1; }
.hero-right {
  flex: 0 0 auto;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 16px; width: 380px;
}

/* Eyebrow */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent-dim); border: 1px solid rgba(255,149,0,.2);
  border-radius: 100px; padding: 6px 16px;
  font-family: var(--mono); font-size: .72rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 28px;
}

/* Hero title */
.hero-title {
  font-size: var(--fs-h1); font-weight: 900;
  line-height: 1.0; letter-spacing: -3px;
  color: var(--text); margin-bottom: 24px;
}
.hero-title .accent { color: var(--accent); text-shadow: 0 0 32px rgba(255,149,0,.35); }
.title-row-1, .title-row-2 { display: block; }

/* Hero sub */
.hero-sub {
  font-size: var(--fs-md); color: var(--muted2);
  font-weight: 300; line-height: 1.7; margin-bottom: 36px;
  max-width: 520px;
}

/* CTA row */
.cta-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 40px; }

/* Trust row */
.trust-row { display: flex; flex-wrap: wrap; gap: 20px; }
.trust-item { display: flex; align-items: center; gap: 7px; font-size: var(--fs-sm); color: var(--muted2); }

/* Stat cards */
.stat-card {
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: var(--radius); padding: 24px 20px;
  backdrop-filter: blur(12px);
  transition: transform .3s var(--ease), border-color .3s;
}
.stat-card:hover { transform: translateY(-4px); border-color: rgba(255,149,0,.3); }
.stat-val {
  font-size: clamp(28px, 3.5vw, 42px); font-weight: 900;
  color: var(--accent); line-height: 1; margin-bottom: 8px;
  letter-spacing: -1.5px;
}
.stat-lab { font-family: var(--mono); font-size: .7rem; color: var(--muted2); letter-spacing: .5px; text-transform: uppercase; line-height: 1.5; }
.stat-pill {
  display: inline-block; margin-top: 10px;
  font-family: var(--mono); font-size: .6rem; letter-spacing: 1px;
  background: var(--sec-dim); color: var(--secondary);
  border: 1px solid rgba(59,158,255,.20); border-radius: 100px; padding: 3px 10px; text-transform: uppercase;
}

/* === WHY SECTION =========================================== */
.why-section { padding: 120px 0; background: var(--bg2); position: relative; overflow: hidden; }
.why-section::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--accent-dim) 0%, transparent 45%),
              linear-gradient(225deg, var(--sec-dim) 55%, transparent 100%);
  pointer-events: none;
}
.why-section .container { position: relative; z-index: 1; }

/* === HOW SECTION =========================================== */
.how-section { padding: 120px 0; background: var(--bg); position: relative; overflow: hidden; }
.how-section::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 50% 60% at 20% 50%, var(--accent-dim), transparent 70%),
              radial-gradient(ellipse 40% 50% at 80% 30%, var(--sec-dim), transparent 70%);
  pointer-events: none;
}
.how-section .container { position: relative; z-index: 1; }

/* === MISSION SECTION ======================================= */
.mission-section { padding: 120px 0; background: var(--bg); }

/* === VALUES SECTION ======================================== */
.values-section { padding: 80px 0 120px; background: var(--bg2); }
.values-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
.value-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 36px 28px;
  transition: all .35s var(--ease);
}
.value-card:hover { border-color: rgba(255,149,0,.3); transform: translateY(-4px); background: var(--surface2); }
.value-card h3 { font-size: var(--fs-lg); font-weight: 700; color: var(--text); margin-bottom: 12px; }
.value-card p  { font-size: var(--fs-sm); color: var(--muted2); line-height: 1.65; }

/* === BLOG / DOCS SECTIONS ================================== */
.posts-section, .docs-section { padding: 80px 0 120px; background: var(--bg); }

.post-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 36px;
  margin-bottom: 20px;
  transition: all .3s var(--ease);
}
.post-card:hover { border-color: rgba(255,149,0,.3); transform: translateX(4px); }
.post-card h2 { font-size: var(--fs-lg); font-weight: 700; margin-bottom: 8px; }
.post-card h2 a { color: var(--text); transition: color .2s; }
.post-card h2 a:hover { color: var(--accent); }
.post-date { font-family: var(--mono); font-size: .75rem; color: var(--muted); letter-spacing: .5px; display: block; margin-bottom: 12px; }
.post-excerpt { font-size: var(--fs-sm); color: var(--muted2); line-height: 1.65; margin-bottom: 16px; }
.read-more { font-size: var(--fs-sm); color: var(--accent); font-weight: 600; transition: gap .2s; }
.read-more:hover { text-decoration: underline; }
.no-posts { font-size: var(--fs-md); color: var(--muted2); font-style: italic; }

/* === CONTACT SECTION ======================================= */
.contact-section { padding: 80px 0 120px; background: var(--bg); }
.contact-grid { display: grid; grid-template-columns: 1fr 320px; gap: 60px; align-items: start; }

/* Form */
.contact-form { display: flex; flex-direction: column; gap: 20px; }
.form-field { display: flex; flex-direction: column; gap: 8px; }
.form-field label { font-family: var(--mono); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted2); }
.form-field input, .form-field textarea {
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: var(--radius-sm); padding: 14px 18px;
  font-family: var(--font); font-size: var(--fs-sm); color: var(--text);
  outline: none; transition: border-color .2s;
  resize: vertical;
}
.form-field input:focus, .form-field textarea:focus { border-color: var(--accent); }
.form-field input::placeholder, .form-field textarea::placeholder { color: var(--muted); }
.form-success { color: var(--brand); font-size: var(--fs-sm); margin-top: 4px; }
.form-error   { color: #ff5555; font-size: var(--fs-sm); margin-top: 4px; }
.hidden       { display: none; }

/* Contact info */
.contact-info {
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: var(--radius); padding: 36px 28px;
  display: flex; flex-direction: column; gap: 12px;
}
.contact-label { font-family: var(--mono); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted2); }
.contact-email { font-size: var(--fs-md); color: var(--accent); font-weight: 600; }
.contact-email:hover { text-decoration: underline; }

/* === CTA SECTION =========================================== */
.cta-section {
  padding: 120px 40px; text-align: center;
  background: var(--bg2); position: relative; overflow: hidden;
}
.cta-section::before {
  content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(255,149,0,.05) 0%, transparent 65%);
  pointer-events: none;
}
.cta-title {
  font-size: var(--fs-h2); font-weight: 900; letter-spacing: -2px;
  margin-bottom: 16px; color: var(--text); position: relative;
}
.cta-sub {
  font-size: var(--fs-md); color: var(--muted2); margin-bottom: 40px;
  font-weight: 300; position: relative;
}

/* === FOOTER ================================================ */
#footer {
  width: 100%; background: var(--bg3);
  border-top: 1px solid var(--border); padding: 2em 0;
}
.footer-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 1.5em;
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 32px;
}
.footer-logo { display: inline-flex; font-size: 1.2rem; font-weight: 900; letter-spacing: -.5px; }
.footer-logo .zz  { color: var(--text); }
.footer-logo .own { color: var(--brand); }
.footer-tagline { font-size: var(--fs-sm); color: var(--muted); margin-top: 6px; }
.footer-links { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }
.footer-link { font-size: var(--fs-sm); color: var(--muted2); transition: color .2s; }
.footer-link:hover { color: var(--accent); }
.footer-contact { text-align: right; display: flex; flex-direction: column; gap: 6px; }
.footer-email { font-size: var(--fs-sm); color: var(--accent); }
.footer-email:hover { text-decoration: underline; }
.footer-copy { font-family: var(--mono); font-size: .72rem; color: var(--muted); letter-spacing: .4px; }

/* === 404 PAGE ============================================== */
.page-404 { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.not-found { width: 100%; }
.not-found-inner { max-width: 480px; margin: 0 auto; padding: 2em; text-align: center; }
.not-found-code { font-size: clamp(80px, 15vw, 160px); font-weight: 900; color: var(--accent); opacity: .2; line-height: 1; letter-spacing: -6px; }
.not-found-title { font-size: var(--fs-h2); font-weight: 900; margin-bottom: 16px; }
.not-found-body  { font-size: var(--fs-md); color: var(--muted2); margin-bottom: 36px; line-height: 1.65; }

/* === SECTION BORDER TOP ==================================== */
.sect-bord { position: relative; }
.sect-bord::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent 10%, var(--accent) 40%, var(--secondary) 60%, transparent 90%);
  opacity: .35; pointer-events: none; z-index: 2;
}

/* === RTL SUPPORT =========================================== */
[dir="rtl"] .nav-links          { left: auto; right: 50%; transform: translateX(50%); }
[dir="rtl"] .hero-inner         { flex-direction: row-reverse; }
[dir="rtl"] .footer-inner       { direction: rtl; }
[dir="rtl"] .footer-contact     { text-align: left; }
[dir="rtl"] .contact-grid       { direction: rtl; }
[dir="rtl"] .section-sub        { margin-left: auto; margin-right: 0; }
[dir="rtl"] .cta-row            { flex-direction: row-reverse; }
[dir="rtl"] .trust-row          { flex-direction: row-reverse; }
[dir="rtl"] .values-grid        { direction: rtl; }
[dir="rtl"] .post-card:hover    { transform: translateX(-4px); }

/* === RESPONSIVE ============================================ */
@media (max-width: 1100px) {
  .nav-links { gap: 0; }
  .hero-right { width: 300px; }
  .values-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 960px) {
  .nav-links    { display: none; }
  .nav-hamburger { display: flex; }
  .hero { padding: calc(var(--nav-h) + 40px) 0 60px; }
  .hero-inner   { flex-direction: column; gap: 48px; }
  .hero-right   { width: 100%; grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; text-align: center; }
  .footer-contact { text-align: center; }
  .footer-links { justify-content: center; }
}

@media (max-width: 640px) {
  :root { --nav-h: 56px; }
  .hero-right   { grid-template-columns: 1fr 1fr; }
  .values-grid  { grid-template-columns: 1fr; }
  .cta-section  { padding: 80px 1.5em; }
  .nav-logo-sep, .nav-logo-page { display: none; }
  .footer-inner { gap: 20px; }
  [dir="rtl"] .hero-inner { flex-direction: column; }
}
