/* ───────────────────────────────────────────────
   Valan Company — design system
   Ported from valan-company.com reference design.
   Pair with Tailwind CDN; this file defines the
   editorial tokens, brand utilities and components.
   ─────────────────────────────────────────────── */

:root {
  --valan-red:      #E11D2A;
  --valan-red-deep: #B7141F;
  --valan-red-soft: #FBE9EA;
  --ink:        #0A0A0A;
  --ink-2:      #1A1A1A;
  --ink-soft:   #2B2B2B;
  --slate-900:  #0F1115;
  --slate-700:  #3A3F47;
  --slate-500:  #6B7280;
  --slate-300:  #D6D8DC;
  --slate-200:  #E5E7EB;
  --slate-100:  #F1F2F4;
  --surface:    #FAFAF8;
  --surface-2:  #F4F3EE;
  --line:       #E5E2DA;
}

/* ───── Page base ───── */
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: 'Inter', 'Noto Kufi Arabic', system-ui, sans-serif;
  background: var(--surface);
  color: var(--ink);
}

/* ───── Typography helpers ───── */
.display { font-feature-settings: "ss01", "cv11"; letter-spacing: -0.025em; }
.display-tight { letter-spacing: -0.035em; }
.num    { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.mono   { font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace; }

.section-num {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px; color: var(--slate-500); letter-spacing: 0.12em;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  font-weight: 600; color: var(--valan-red);
}
.eyebrow::before {
  content: ""; width: 18px; height: 1px; background: var(--valan-red);
}

/* ───── Line clamp ───── */
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ───── Buttons ───── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; font-weight: 600; transition: all .15s; cursor: pointer;
}
.btn-primary { background: var(--valan-red); color: #fff; padding: 14px 22px; border-radius: 10px; }
.btn-primary:hover { background: var(--valan-red-deep); }
.btn-dark { background: var(--ink); color: #fff; padding: 14px 22px; border-radius: 10px; }
.btn-dark:hover { background: var(--ink-soft); }
.btn-outline { border: 1px solid var(--ink); color: var(--ink); padding: 13px 22px; border-radius: 10px; background: transparent; }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-ghost { color: var(--ink); padding: 12px 18px; border-radius: 10px; }
.btn-ghost:hover { background: var(--slate-100); }

/* ───── Inline link ───── */
.link { color: var(--valan-red); font-weight: 500; }
.link:hover { color: var(--valan-red-deep); text-decoration: underline; text-underline-offset: 4px; }

/* ───── Pills ───── */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.02em;
}
.pill-red     { background: var(--valan-red-soft); color: var(--valan-red-deep); }
.pill-dark    { background: var(--ink); color: #fff; }
.pill-outline { background: #fff; border: 1px solid var(--line); color: var(--ink); }
.pill-green   { background: #E7F5EC; color: #15803D; }

/* ───── Product card ───── */
.pcard {
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  overflow: hidden; transition: border-color .15s, transform .15s, box-shadow .15s;
}
.pcard:hover { border-color: var(--ink); box-shadow: 0 12px 30px -16px rgba(0,0,0,.15); }
.pcard-media {
  aspect-ratio: 1/1; background: var(--surface-2);
  position: relative; display: flex; align-items: center; justify-content: center; padding: 22px;
}

/* ───── Mega category card ───── */
.mega-card {
  background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px;
  display: flex; gap: 14px; align-items: center; transition: all .15s;
}
.mega-card:hover { border-color: var(--ink); transform: translateY(-2px); }
.mega-icon {
  width: 48px; height: 48px; border-radius: 12px; background: var(--surface-2);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

/* ───── Spec rows ───── */
.spec-row { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--slate-100); }
.spec-row:last-child { border-bottom: none; }
.spec-label { color: var(--slate-500); font-size: 13px; }
.spec-value { color: var(--ink); font-weight: 500; font-size: 14px; text-align: right; }

/* ───── Tier card ───── */
.tier { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; transition: border-color .15s; }
.tier:hover { border-color: var(--valan-red); }
.tier-best { border-color: var(--ink); position: relative; }
.tier-best::after { content: "BEST"; position: absolute; top: -10px; right: 12px; background: var(--ink); color: #fff; font-size: 10px; padding: 3px 8px; border-radius: 6px; letter-spacing: 0.08em; }

/* ───── Marquee ───── */
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee-track { display: flex; gap: 56px; width: max-content; animation: marquee 40s linear infinite; }

/* ───── Brand mark / wordmark ───── */
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; letter-spacing: -0.02em;
  color: var(--slate-500);
  border: 1px solid var(--line); background: #fff; border-radius: 12px;
  height: 64px; min-width: 140px; padding: 0 18px;
  transition: color .15s, border-color .15s;
}
.brand-mark:hover { color: var(--ink); border-color: var(--ink); }

/* ───── Phone "device" placeholder ───── */
.device {
  position: relative; border-radius: 28px;
  background: linear-gradient(160deg, #1a1a1a 0%, #0a0a0a 100%);
  box-shadow:
    inset 0 0 0 2px #2a2a2a,
    inset 0 0 0 3px #0a0a0a,
    0 30px 60px -20px rgba(0,0,0,0.35),
    0 8px 20px -10px rgba(0,0,0,0.2);
}
.device::before {
  content: ""; position: absolute; inset: 8px; border-radius: 22px;
  background: linear-gradient(170deg, var(--screen-from, #1f2937) 0%, var(--screen-to, #111827) 100%);
}
.device::after {
  content: ""; position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
  width: 80px; height: 22px; border-radius: 999px; background: #050505; z-index: 2;
}
.device-screen {
  position: absolute; inset: 8px; border-radius: 22px; overflow: hidden; z-index: 1;
  display: flex; align-items: flex-end; justify-content: center; padding: 18px;
  color: rgba(255,255,255,0.85); font-size: 11px;
}
.device-side { position: absolute; right: -2px; top: 22%; width: 3px; height: 36px; border-radius: 2px; background: #1a1a1a; }

/* ───── Subtle dotted background ───── */
.dotgrid {
  background-image: radial-gradient(circle, rgba(10,10,10,.08) 1px, transparent 1px);
  background-size: 22px 22px;
}

/* ───── Surfaces & strips ───── */
.surface-dark { background: var(--ink); color: #fafafa; }
.surface-dark a { color: #fafafa; }
.utility-bar { background: var(--ink); color: #f5f5f5; font-size: 12px; }
.utility-bar a { color: #f5f5f5; }
.utility-bar a:hover { color: #fff; }
.promo-strip { background: var(--valan-red); color: #fff; }

/* ───── Hairline divider ───── */
.hairline { border-top: 1px solid var(--line); }

/* ───── RTL ───── */
[dir="rtl"] .ltr-only { direction: ltr; unicode-bidi: embed; }

/* ───── htmx swap transitions ───── */
.htmx-swapping { opacity: 0; transition: opacity 120ms ease-out; }
.htmx-settling { opacity: 1; transition: opacity 120ms ease-in; }

/* ───── Arabic / Kurdish font ───── */
.font-arabic { font-family: 'Noto Kufi Arabic', 'Inter', system-ui, sans-serif; }

/* Hide Alpine-managed elements until Alpine boots */
[x-cloak] { display: none !important; }
