/* =========================================================
   CarthaSoft — design tokens
   Palette:
     --ink        #0B1526  deep Carthage navy (base bg)
     --panel      #12203A  raised panel navy
     --panel-2    #182A4A  lighter panel / hover
     --steel      #8A97AC  muted secondary text
     --parchment  #EFEAE0  warm off-white (primary text on dark)
     --bronze     #C9A24B  primary accent (crest gold)
     --bronze-dim #8C7434  bronze, low emphasis
     --carthage   #B23A2E  secondary accent (flag red, used sparingly)
   Type:
     display: 'Marcellus'      (EN/FR headings — inscription serif)
     display-ar: 'Cairo'       (Arabic headings)
     body: 'Work Sans'
     body-ar: 'Cairo'
     mono: 'JetBrains Mono'    (eyebrows, labels, numerals)
   ========================================================= */

:root {
  --ink: #0B1526;
  --panel: #12203A;
  --panel-2: #182A4A;
  --steel: #8A97AC;
  --parchment: #EFEAE0;
  --bronze: #C9A24B;
  --bronze-dim: #8C7434;
  --carthage: #B23A2E;

  --font-display: 'Marcellus', 'Cairo', serif;
  --font-body: 'Work Sans', 'Cairo', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --max-w: 1180px;
  --edge: clamp(20px, 5vw, 64px);
  --radius: 14px;
}

html[lang="ar"] {
  --font-display: 'Cairo', serif;
  --font-body: 'Cairo', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--parchment);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body[dir="rtl"] { text-align: right; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  margin: 0 0 0.5em;
  letter-spacing: 0.01em;
  color: var(--parchment);
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); line-height: 1.08; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); line-height: 1.15; }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; color: var(--steel); max-width: 60ch; }
[dir="rtl"] p { max-width: none; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bronze);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
[dir="rtl"] .eyebrow { letter-spacing: 0; }
.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: var(--bronze);
  display: inline-block;
}

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left: var(--edge);
  padding-right: var(--edge);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn-primary {
  background: var(--bronze);
  color: var(--ink);
  font-weight: 600;
}
.btn-primary:hover { transform: translateY(-2px); background: #d8b25e; }
.btn-ghost {
  background: transparent;
  border-color: rgba(239,234,224,0.28);
  color: var(--parchment);
}
.btn-ghost:hover { border-color: var(--bronze); color: var(--bronze); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11,21,38,0.72);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(239,234,224,0.08);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: 0.02em;
}
.brand img { height: 40px; width: 40px; border-radius: 9px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.nav-links a { color: var(--steel); position: relative; padding: 6px 0; transition: color 0.2s ease; }
.nav-links a:hover, .nav-links a.active { color: var(--parchment); }
.nav-links a.active::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; background: var(--bronze);
}

.header-right { display: flex; align-items: center; gap: 22px; }

.lang-switch {
  display: flex;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: var(--panel);
  border-radius: 999px;
  padding: 4px;
}
.lang-switch button {
  background: transparent;
  border: none;
  color: var(--steel);
  padding: 6px 11px;
  border-radius: 999px;
  cursor: pointer;
  letter-spacing: 0.04em;
}
.lang-switch button.active { background: var(--bronze); color: var(--ink); font-weight: 700; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--parchment); }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .site-header.open .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 78px; left: 0; right: 0;
    background: var(--panel);
    padding: 24px var(--edge);
    gap: 20px;
    border-bottom: 1px solid rgba(239,234,224,0.1);
  }
}

/* ---------- Hero / columns-to-bars signature ---------- */
.hero {
  padding: clamp(60px, 10vw, 120px) 0 80px;
  position: relative;
  overflow: hidden;
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
[dir="rtl"] .hero .wrap { grid-template-columns: 0.9fr 1.1fr; }
[dir="rtl"] .hero .wrap > *:first-child { order: 2; }
[dir="rtl"] .hero .wrap > *:last-child { order: 1; }

.hero h1 span.accent { color: var(--bronze); }
.hero-actions { display: flex; gap: 16px; margin-top: 34px; flex-wrap: wrap; }

.hero-art { position: relative; }
.hero-art svg { width: 100%; height: auto; }
.bar {
  transform-origin: bottom;
  animation: rise 1.1s cubic-bezier(.2,.7,.2,1) both;
}
.bar:nth-child(1) { animation-delay: 0.05s; }
.bar:nth-child(2) { animation-delay: 0.16s; }
.bar:nth-child(3) { animation-delay: 0.27s; }
.bar:nth-child(4) { animation-delay: 0.38s; }
.bar:nth-child(5) { animation-delay: 0.49s; }
@keyframes rise {
  from { transform: scaleY(0); opacity: 0; }
  to { transform: scaleY(1); opacity: 1; }
}
.pixel { animation: drift 6s ease-in-out infinite alternate; }
.pixel:nth-child(odd) { animation-duration: 7.5s; }
@keyframes drift {
  from { transform: translateY(0); opacity: 0.55; }
  to { transform: translateY(-10px); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .bar, .pixel { animation: none !important; }
}

/* ---------- Sections & divider emblem ---------- */
section { padding: clamp(60px, 9vw, 100px) 0; }
.section-alt { background: var(--panel); }

.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 0;
  padding: 0;
}
.divider::before, .divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, transparent, rgba(201,162,75,0.4), transparent);
}
.divider .emblem {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--bronze-dim);
  display: flex; align-items: center; justify-content: center;
}
.divider .emblem::after {
  content: "";
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--bronze);
}

.section-head { max-width: 640px; margin: 0 auto 54px; text-align: center; }
[dir="rtl"] .section-head { text-align: center; }

/* ---------- Cards / grids ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
@media (max-width: 860px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--panel);
  border: 1px solid rgba(239,234,224,0.06);
  border-radius: var(--radius);
  padding: 32px 28px;
}
.card .num {
  font-family: var(--font-mono);
  color: var(--bronze-dim);
  font-size: 0.8rem;
  margin-bottom: 14px;
  display: block;
}
.card h3 { margin-bottom: 10px; }
.card p { margin: 0; }

/* ---------- Product feature (Tuni Budget) ---------- */
.product-feature {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 56px;
  align-items: center;
}
[dir="rtl"] .product-feature { grid-template-columns: 1.15fr 0.85fr; }
[dir="rtl"] .product-feature > *:first-child { order: 2; }
[dir="rtl"] .product-feature > *:last-child { order: 1; }
@media (max-width: 860px) {
  .product-feature { grid-template-columns: 1fr !important; }
  [dir="rtl"] .product-feature > * { order: initial !important; }
}

.tb-mark {
  width: 100%;
  max-width: 340px;
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 28%;
  background: linear-gradient(160deg, #16264A, #0C1729);
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(201,162,75,0.18);
}
.tb-mark svg { width: 62%; }

.feature-list { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 14px; }
.feature-list li {
  display: flex; gap: 12px; align-items: flex-start;
  color: var(--parchment);
  font-size: 0.98rem;
}
.feature-list li::before {
  content: "";
  width: 6px; height: 6px;
  margin-top: 9px;
  border-radius: 50%;
  background: var(--bronze);
  flex-shrink: 0;
}

.badge-row { display: flex; gap: 10px; margin-top: 26px; flex-wrap: wrap; }
.badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--steel);
  border: 1px solid rgba(239,234,224,0.18);
  padding: 6px 12px;
  border-radius: 999px;
}

/* ---------- Roadmap / coming soon ---------- */
.roadmap-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px 0;
  border-bottom: 1px solid rgba(239,234,224,0.08);
  gap: 20px;
}
.roadmap-item:last-child { border-bottom: none; }
.roadmap-item h3 { margin: 0 0 4px; font-size: 1.1rem; }
.roadmap-item p { margin: 0; font-size: 0.92rem; }
.roadmap-status {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--bronze);
  white-space: nowrap;
  border: 1px solid var(--bronze-dim);
  padding: 6px 12px;
  border-radius: 999px;
}

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.info-row { display: flex; gap: 16px; margin-bottom: 22px; align-items: flex-start; }
.info-row .label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bronze);
  width: 110px;
  flex-shrink: 0;
  padding-top: 3px;
}
.info-row .value { color: var(--parchment); margin: 0; }

form.contact-form { display: grid; gap: 18px; }
.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--steel);
  margin-bottom: 8px;
}
.field input, .field textarea {
  width: 100%;
  background: var(--panel);
  border: 1px solid rgba(239,234,224,0.14);
  border-radius: 8px;
  padding: 13px 15px;
  color: var(--parchment);
  font-family: var(--font-body);
  font-size: 0.95rem;
}
.field input:focus, .field textarea:focus {
  outline: 2px solid var(--bronze);
  outline-offset: 1px;
  border-color: var(--bronze);
}
.field textarea { resize: vertical; min-height: 120px; }
.form-note { font-size: 0.82rem; color: var(--steel); margin-top: -4px; }

/* ---------- CTA band ---------- */
.cta-band {
  text-align: center;
  border-top: 1px solid rgba(239,234,224,0.08);
  border-bottom: 1px solid rgba(239,234,224,0.08);
}
.cta-band h2 { margin-bottom: 22px; }
.cta-band .wrap { display: flex; flex-direction: column; align-items: center; }

/* ---------- Footer ---------- */
.site-footer { padding: 50px 0 34px; }
.footer-top {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 40px; flex-wrap: wrap;
  padding-bottom: 34px;
  border-bottom: 1px solid rgba(239,234,224,0.08);
}
.footer-brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-size: 1.1rem; }
.footer-brand img { height: 34px; width: 34px; border-radius: 8px; }
.footer-cols { display: flex; gap: 60px; flex-wrap: wrap; }
.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bronze);
  margin-bottom: 14px;
}
.footer-col a, .footer-col p { display: block; color: var(--steel); font-size: 0.9rem; margin-bottom: 10px; }
.footer-col a:hover { color: var(--parchment); }
.footer-bottom {
  padding-top: 24px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--steel);
}

/* ---------- About page specifics ---------- */
.value-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 960px) { .value-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .value-grid { grid-template-columns: 1fr; } }

.timeline { max-width: 720px; margin: 0 auto; }
.timeline-item {
  display: grid; grid-template-columns: 130px 1fr; gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid rgba(239,234,224,0.08);
}
.timeline-item:last-child { border-bottom: none; }
.timeline-item .when { font-family: var(--font-mono); color: var(--bronze); font-size: 0.85rem; }
[dir="rtl"] .timeline-item { grid-template-columns: 1fr 130px; }
[dir="rtl"] .timeline-item .when { order: 2; text-align: left; }
@media (max-width: 640px) {
  .timeline-item, [dir="rtl"] .timeline-item { grid-template-columns: 1fr; gap: 6px; }
}

/* Page intro banner (about/products/contact) */
.page-hero { padding: clamp(50px, 8vw, 90px) 0 40px; }
.page-hero .wrap { max-width: 780px; }
