/* ============================================================
   Thaki Tech — shared design tokens & base layer
   ============================================================ */

:root {
  /* Saudi-inspired premium palette */
  --paper: oklch(0.975 0.006 82);
  --paper-2: oklch(0.96 0.012 82);
  --sand: oklch(0.94 0.022 82);
  --sand-deep: oklch(0.88 0.030 82);
  --majlis: oklch(0.32 0.060 155);
  --majlis-deep: oklch(0.24 0.052 155);
  --majlis-soft: oklch(0.45 0.055 155);
  --brass: oklch(0.72 0.095 75);
  --brass-deep: oklch(0.62 0.105 70);
  --ink: oklch(0.18 0.012 240);
  --ink-2: oklch(0.36 0.010 240);
  --ink-3: oklch(0.54 0.008 240);
  --line: oklch(0.88 0.012 82);
  --line-2: oklch(0.82 0.014 82);

  /* Typography */
  --font-en: "Geist", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Instrument Serif", "Geist", serif;
  --font-mono: "Geist Mono", ui-monospace, monospace;
  --font-ar: "IBM Plex Sans Arabic", "Geist", sans-serif;

  /* Scale */
  --r-sm: 10px;
  --r-md: 18px;
  --r-lg: 28px;
  --r-xl: 40px;
  --r-pill: 999px;

  --shadow-soft: 0 1px 2px oklch(0.18 0.012 240 / 0.04),
                 0 8px 24px oklch(0.18 0.012 240 / 0.06);
  --shadow-lift: 0 2px 4px oklch(0.18 0.012 240 / 0.05),
                 0 24px 60px oklch(0.18 0.012 240 / 0.10);
}

/* RTL flips Arabic font as primary */
html[dir="rtl"] {
  --font-en: var(--font-ar);
  --font-display: var(--font-ar);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-en);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: -0.005em;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

::selection { background: var(--majlis); color: var(--paper); }

/* ============================================================
   Layout helpers
   ============================================================ */
.wrap {
  width: min(1200px, 92vw);
  margin: 0 auto;
}
.wrap-narrow {
  width: min(760px, 92vw);
  margin: 0 auto;
}

/* ============================================================
   Header / Nav
   ============================================================ */
.tt-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklch, var(--paper) 88%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid color-mix(in oklch, var(--line) 60%, transparent);
}
.tt-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}
.tt-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.tt-brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background-image: url("assets/thaki-logo.jpeg");
  background-size: cover;
  background-position: center;
  box-shadow: 0 1px 2px oklch(0.18 0.012 240 / 0.20);
}
.tt-nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 15px;
  color: var(--ink-2);
}
.tt-nav-links a:hover { color: var(--ink); }
.tt-nav-links a.active { color: var(--ink); }

.tt-lang {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-2);
  background: var(--paper);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  transition: all 0.18s ease;
}
.tt-lang:hover { border-color: var(--majlis); color: var(--majlis); }
.tt-lang-globe {
  width: 12px; height: 12px; border-radius: 50%;
  border: 1.5px solid currentColor;
  position: relative;
}
.tt-lang-globe::before {
  content: ""; position: absolute; inset: -1.5px;
  border-radius: 50%; border: 1.5px solid currentColor;
  transform: scaleY(0.45);
}

@media (max-width: 720px) {
  .tt-nav-links { gap: 18px; font-size: 14px; }
  .tt-nav-links .nav-only-wide { display: none; }
}

/* ============================================================
   Footer
   ============================================================ */
.tt-foot {
  margin-top: 120px;
  padding: 64px 0 40px;
  border-top: 1px solid var(--line);
  background: var(--paper-2);
}
.tt-foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 56px;
}
@media (max-width: 720px) {
  .tt-foot-grid { grid-template-columns: 1fr 1fr; }
}
.tt-foot h4 {
  margin: 0 0 16px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.tt-foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 14px; color: var(--ink-2); }
.tt-foot ul a:hover { color: var(--majlis); }
.tt-foot-tag {
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1.1;
  color: var(--ink);
  margin: 12px 0 0;
  max-width: 16ch;
}
.tt-foot-base {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-3);
}

/* ============================================================
   Buttons & chips
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--r-pill);
  font-size: 15px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn-primary {
  background: var(--ink);
  color: var(--paper);
}
.btn-primary:hover { background: var(--majlis); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-2);
}
.btn-ghost:hover { border-color: var(--ink); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 500;
  background: var(--sand);
  color: var(--majlis-deep);
  letter-spacing: 0.01em;
}
.chip-coming {
  background: color-mix(in oklch, var(--brass) 18%, var(--paper));
  color: var(--brass-deep);
}
.chip-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
}

/* ============================================================
   Page heading block
   ============================================================ */
.page-head {
  padding: 96px 0 48px;
}
.page-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--majlis);
  margin: 0 0 20px;
}
.page-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(46px, 7vw, 92px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0 0 24px;
  color: var(--ink);
  text-wrap: balance;
}
.page-title em {
  font-style: italic;
  color: var(--majlis);
}
.page-lede {
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 60ch;
  text-wrap: pretty;
}

/* ============================================================
   Long-form prose (privacy, support)
   ============================================================ */
.prose { font-size: 16px; line-height: 1.7; color: var(--ink-2); }
.prose h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 32px;
  letter-spacing: -0.015em;
  margin: 56px 0 16px;
  color: var(--ink);
}
.prose h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 32px 0 8px;
  color: var(--ink);
}
.prose p { margin: 0 0 14px; }
.prose a { color: var(--majlis); border-bottom: 1px solid color-mix(in oklch, var(--majlis) 35%, transparent); }
.prose a:hover { border-bottom-color: var(--majlis); }
.prose ul { padding-left: 22px; margin: 0 0 16px; }
html[dir="rtl"] .prose ul { padding-left: 0; padding-right: 22px; }
.prose li { margin-bottom: 6px; }
.prose code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--sand);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ============================================================
   Phone-shaped product placeholder
   ============================================================ */
.phone {
  position: relative;
  aspect-ratio: 9 / 19;
  border-radius: 36px;
  background:
    linear-gradient(180deg,
      oklch(0.18 0.01 240) 0%,
      oklch(0.14 0.012 240) 100%);
  padding: 8px;
  box-shadow:
    inset 0 0 0 1px oklch(0.30 0.012 240),
    var(--shadow-lift);
}
.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 28px;
  overflow: hidden;
  background:
    repeating-linear-gradient(
      135deg,
      oklch(0.92 0.012 82) 0 12px,
      oklch(0.94 0.014 82) 12px 24px
    );
}
.phone-screen::after {
  content: attr(data-label);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.phone-notch {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 28%;
  height: 22px;
  border-radius: 0 0 16px 16px;
  background: oklch(0.10 0.012 240);
  z-index: 2;
}
