/* tarjem.app — the public website. Colours are the app's Daybreak palette
   (apps/mobile/src/ui/theme.ts) plus the violet of the app icon. */
:root {
  --ground: #FBF6EF;
  --card: #FFFFFF;
  --line: #E8DCC8;
  --line-strong: #D9CBB3;
  --ink: #2B2620;
  --ink-soft: #5C544A;
  --muted: #7A7166;
  --clay: #D4603A;
  --clay-ink: #B04B29;
  --clay-soft: #F6DDD2;
  --violet: #6A5BE3;
  --violet-soft: #ECE9FD;
  --teal: #2F8F7A;
  --gold: #A87D1E;
  --night: #2B2620;
  --night-raised: #3A332B;
  --night-line: #4A4239;
  --night-text: #D9CBB3;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: 'Readex Pro', system-ui, -apple-system, 'Segoe UI', 'Noto Sans Arabic', sans-serif;
  line-height: 1.6;
}
a { color: var(--clay-ink); }
a:hover { color: #8A3A1F; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: 1160px; margin: 0 auto; padding-inline: 24px; }

/* header */
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 20px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-size: 20px; font-weight: 600; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.site-nav { display: flex; align-items: center; gap: 8px 22px; flex-wrap: wrap; font-size: 15px; }
.site-nav a { color: var(--ink-soft); text-decoration: none; }
.site-nav a:hover { color: var(--ink); }
.lang { display: flex; gap: 4px; border: 1px solid var(--line); border-radius: 99px; padding: 3px; }
.lang a { padding: 4px 10px; border-radius: 99px; font-size: 14px; }
.lang a[aria-current="true"] { background: var(--ink); color: #FFFFFF; }

/* hero */
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; padding-block: 40px 72px; }
.hero-copy { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.pill { align-self: flex-start; font-size: 14px; font-weight: 500; color: var(--violet); background: var(--violet-soft); border-radius: 99px; padding: 6px 14px; }
h1 { margin: 0; font-size: clamp(38px, 5.6vw, 62px); line-height: 1.08; font-weight: 700; letter-spacing: -0.025em; }
[dir="rtl"] h1 { line-height: 1.25; letter-spacing: 0; }
.lede { margin: 0; font-size: 20px; line-height: 1.6; color: var(--ink-soft); max-width: 34ch; }
[dir="rtl"] .lede { line-height: 1.75; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 22px; border-radius: 14px; text-decoration: none; font-size: 16px; font-weight: 500; }
.btn-dark { background: var(--ink); color: #FFFFFF; }
.btn-dark:hover { background: #000000; color: #FFFFFF; }
.btn-line { border: 1px solid var(--line-strong); color: var(--ink); }
.btn-line:hover { background: var(--card); color: var(--ink); }
.btn-clay { background: var(--clay); color: #FFFFFF; font-size: 17px; }
.btn-clay:hover { background: var(--clay-ink); color: #FFFFFF; }
.fine { margin: 0; font-size: 14px; color: var(--muted); }

/* phone mockup: a copy of the app's Talk screen (Daybreak), animated by site.js */
.phone-col { flex: 1 1 400px; min-width: 0; display: flex; justify-content: center; position: relative; padding-block: 12px; }
.ripples { position: absolute; top: 50%; left: 50%; width: 560px; height: 560px; margin: -280px 0 0 -280px; color: var(--clay); opacity: 0.14; transition: color 0.6s, opacity 0.6s; pointer-events: none; }
.ripples span { position: absolute; inset: 0; border-radius: 50%; border: 2px solid currentColor; animation: ripple 3.6s cubic-bezier(.2,.6,.3,1) infinite; }
.ripples span:nth-child(2) { animation-delay: 1.2s; }
.ripples span:nth-child(3) { animation-delay: 2.4s; }
.ripples.on { opacity: 0.55; }
.ripples.teal { color: var(--teal); }
.ripples.gold { color: #C99A2E; }
@keyframes ripple { 0% { transform: scale(0.5); opacity: 0.6; } 100% { transform: scale(1.55); opacity: 0; } }

.phone { position: relative; width: 320px; max-width: 100%; height: 660px; background: #1C1915; border-radius: 52px; padding: 11px; box-shadow: 0 40px 80px -30px rgba(43, 38, 32, 0.45), inset 0 0 0 1px #3A332B; will-change: transform; }
.screen { position: relative; height: 100%; background: var(--ground); border-radius: 42px; overflow: hidden; display: flex; flex-direction: column; font-family: 'Readex Pro', system-ui, sans-serif; }
.island { position: absolute; top: 9px; left: 50%; width: 92px; height: 26px; margin-left: -46px; border-radius: 14px; background: #1C1915; z-index: 2; }
.app { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 9px; padding: 46px 12px 0; }
.app-top { display: flex; align-items: center; justify-content: space-between; }
.app-title { font-size: 23px; font-weight: 700; letter-spacing: -0.3px; }
[dir="rtl"] .app-title { font-family: 'IBM Plex Sans Arabic', 'Readex Pro', sans-serif; letter-spacing: 0; }
.status { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 999px; font-size: 10px; font-weight: 600; background: rgba(63, 143, 99, 0.12); color: #3F8F63; transition: background 0.3s, color 0.3s; }
.status i { width: 6px; height: 6px; border-radius: 3px; background: currentColor; }
.status[data-state="listening"] { background: rgba(196, 69, 58, 0.12); color: #C4453A; }
.status[data-state="translating"] { background: rgba(106, 91, 227, 0.12); color: var(--violet); }
.status[data-state="speaking"] { background: rgba(212, 96, 58, 0.12); color: var(--clay); }
.status:not([data-state="ready"]) i { animation: blink 0.9s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.3; } }

.feed { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; overflow: hidden; position: relative; }
.empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; color: var(--muted); font-size: 10px; line-height: 1.4; }
.empty strong { font-size: 12px; color: var(--ink); font-weight: 600; }
.skeleton { display: none; border: 1px dashed var(--line); border-radius: 16px; padding: 12px; flex-direction: column; gap: 7px; }
.skeleton span { display: block; height: 9px; width: 60%; border-radius: 5px; background: linear-gradient(90deg, #EFE6D6 0, #F8F2E8 50%, #EFE6D6 100%); background-size: 320px 100%; animation: shimmer 1.1s linear infinite; }
.skeleton span + span { height: 12px; width: 85%; }
.skeleton.on { display: flex; }
@keyframes shimmer { from { background-position: -160px 0; } to { background-position: 160px 0; } }
.turn { display: none; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px; flex-direction: column; gap: 8px; }
.turn.on { display: flex; }
.turn-head { display: flex; align-items: center; justify-content: space-between; font-size: 9.5px; font-weight: 500; color: var(--muted); }
.turn-head > span:first-child { display: flex; align-items: center; gap: 6px; }
.dot { width: 6px; height: 6px; border-radius: 3px; display: inline-block; }
.dot.teal { background: var(--teal); }
.dot.gold { background: #C99A2E; }
.turn p { margin: 0; }
.turn .src { font-size: 11.5px; line-height: 1.5; color: var(--muted); }
.turn .out { font-size: 14.5px; line-height: 1.45; font-weight: 600; color: var(--ink); visibility: hidden; }
.turn .out.on { visibility: visible; }
.out.gold { border-inline-start: 3px solid #C99A2E; padding-inline-start: 9px; text-align: left; }
.out.teal { border-inline-start: 3px solid var(--teal); padding-inline-start: 9px; line-height: 1.7; }
.ar-text { font-family: 'IBM Plex Sans Arabic', 'Readex Pro', sans-serif; }
.turn .src.ar-text, .turn .out.ar-text { text-align: right; }

.eq { display: inline-flex; align-items: center; gap: 2px; height: 12px; opacity: 0; transition: opacity 0.25s; }
.eq i { display: block; width: 3px; height: 100%; border-radius: 2px; background: currentColor; transform: scaleY(0.3); }
.eq.on { opacity: 1; }
.eq.on i { animation: eq 0.9s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -0.25s; } .eq i:nth-child(3) { animation-delay: -0.55s; } .eq i:nth-child(4) { animation-delay: -0.1s; }
.eq i:nth-child(5) { animation-delay: -0.7s; } .eq i:nth-child(6) { animation-delay: -0.4s; } .eq i:nth-child(7) { animation-delay: -0.6s; }
@keyframes eq { 0%, 100% { transform: scaleY(0.3); } 50% { transform: scaleY(1); } }
.t1 .turn-head .eq { color: #C99A2E; }
.t2 .turn-head .eq { color: var(--teal); }

.langs { display: flex; gap: 8px; padding: 6px 0 10px; }
.lang-btn { flex: 1; min-width: 0; min-height: 118px; padding: 11px; border-radius: 22px; border: 1px solid var(--line); background: var(--card); color: var(--ink); display: flex; flex-direction: column; justify-content: space-between; transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.25s, box-shadow 0.25s; }
.lb-top { display: flex; justify-content: space-between; align-items: center; }
.badge { width: 28px; height: 28px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; }
.b-ar .badge { background: rgba(47, 143, 122, 0.14); color: var(--teal); font-size: 13px; }
.b-pt .badge { background: rgba(201, 154, 46, 0.16); color: #A87D1E; }
.time { display: none; font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.mic { width: 28px; height: 28px; border-radius: 14px; display: flex; align-items: center; justify-content: center; color: #FFFFFF; }
.b-ar .mic { background: var(--teal); }
.b-pt .mic { background: #C99A2E; color: var(--ink); }
.lang-btn > .eq { height: 22px; justify-content: center; display: none; }
.lb-name { display: flex; flex-direction: column; }
.lb-name .name { font-size: 15px; line-height: 1.4; font-weight: 700; }
.b-ar .lb-name .name { font-size: 16px; }
.lb-name .sub { font-size: 9.5px; color: var(--muted); transition: color 0.25s; }
.lang-btn.rec { transform: scale(0.97); }
.lang-btn.rec .badge { display: none; }
.lang-btn.rec .time { display: block; }
.lang-btn.rec > .eq { display: flex; opacity: 1; }
.lang-btn.rec > .eq i { animation: eq 0.9s ease-in-out infinite; }
.lang-btn.rec .mic { background: rgba(255, 255, 255, 0.24); color: inherit; }
.lang-btn.rec .sub { color: inherit; }
.b-ar.rec { background: var(--teal); border-color: var(--teal); color: #FFFFFF; box-shadow: 0 0 0 3px var(--ground), 0 0 0 5px var(--teal); }
.b-pt.rec { background: #C99A2E; border-color: #C99A2E; color: var(--ink); box-shadow: 0 0 0 3px var(--ground), 0 0 0 5px #C99A2E; }

.tabs { height: 58px; flex: none; display: flex; background: var(--card); border-top: 1px solid var(--line); padding-bottom: 8px; }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: 8.5px; font-weight: 600; white-space: nowrap; }
.tab.on { color: var(--clay); }
[dir="rtl"] .tab { font-family: 'IBM Plex Sans Arabic', 'Readex Pro', sans-serif; }

/* headline rotator */
.rotator .line { display: block; white-space: nowrap; }
.rotator .w { display: inline-block; }
.pill { display: inline-flex; align-items: center; gap: 8px; }
.pill i { width: 7px; height: 7px; border-radius: 4px; background: currentColor; animation: blink 1.6s ease-in-out infinite; }

/* scroll reveals: only hidden once site.js has loaded, so the page never depends on it */
.js [data-reveal] { opacity: 0; transform: translateY(24px); }

@media (prefers-reduced-motion: reduce) {
  .ripples span, .pill i, .status i, .eq i, .skeleton span { animation: none !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* sections */
.band { background: var(--card); border-block: 1px solid var(--line); }
.section { padding-block: 80px; display: flex; flex-direction: column; gap: 40px; }
h2 { margin: 0; font-size: clamp(30px, 4vw, 40px); line-height: 1.15; font-weight: 600; letter-spacing: -0.02em; }
[dir="rtl"] h2 { line-height: 1.35; letter-spacing: 0; }
h3 { margin: 0; font-size: 20px; font-weight: 600; line-height: 1.35; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.step { display: flex; flex-direction: column; gap: 12px; padding: 28px; border-radius: 20px; background: var(--ground); }
.step p, .feature p { margin: 0; font-size: 16px; color: var(--ink-soft); }
.num { width: 44px; height: 44px; border-radius: 14px; background: var(--clay); color: #FFFFFF; display: flex; align-items: center; justify-content: center; }
.num.teal { background: var(--teal); }
.num.gold { background: #C99A2E; color: var(--ink); }
.features { padding-block: 80px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 48px 72px; }
.feature { display: flex; flex-direction: column; gap: 10px; }
.feature svg { color: var(--violet); }
[dir="rtl"] .flip { transform: scaleX(-1); }

.dark { background: var(--night); color: var(--ground); }
.dark .intro { display: flex; flex-direction: column; gap: 12px; max-width: 640px; }
.dark .intro p { margin: 0; font-size: 18px; color: var(--night-text); }
.packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.pack { border: 1px solid var(--night-line); border-radius: 20px; padding: 28px; display: flex; flex-direction: column; gap: 8px; }
.pack.best { border: 2px solid var(--clay); background: var(--night-raised); }
.pack .label { font-size: 15px; color: var(--night-text); }
.pack.best .label { color: #F2B9A3; }
.pack .price { font-size: 40px; font-weight: 700; direction: ltr; text-align: start; }
[dir="rtl"] .pack .price { text-align: right; }
.pack .sub { font-size: 15px; color: var(--night-text); }
.dark .fine { color: #A89B88; }

.cta { padding-block: 88px; display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; }
.cta img { width: 72px; height: 72px; border-radius: 18px; }

/* footer */
.site-footer { border-top: 1px solid var(--line); }
.site-footer .wrap { padding-block: 32px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; font-size: 14px; color: var(--muted); }
.site-footer nav { display: flex; gap: 8px 20px; flex-wrap: wrap; }
.site-footer a { color: var(--ink-soft); }

/* long-form pages: privacy, support */
.doc { max-width: 760px; margin: 0 auto; padding: 32px 24px 96px; }
.doc h1 { font-size: clamp(34px, 5vw, 44px); margin-bottom: 8px; }
.doc .updated { color: var(--muted); font-size: 15px; margin: 0 0 32px; }
.doc h2 { font-size: 24px; margin: 40px 0 12px; letter-spacing: -0.01em; }
.doc p, .doc li { font-size: 17px; color: var(--ink-soft); }
.doc ul { padding-inline-start: 22px; }
.doc li { margin-bottom: 8px; }
.doc strong { color: var(--ink); font-weight: 600; }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 8px 0 16px; }
.doc th, .doc td { text-align: start; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc th { color: var(--muted); font-weight: 500; }
.table-scroll { overflow-x: auto; }
.callout { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; margin: 24px 0; }
.callout p { margin: 0; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; margin-bottom: 12px; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 17px; color: var(--ink); }
.faq details p { margin: 12px 0 0; }
.contact { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0 8px; }

@media (max-width: 560px) {
  .site-nav { gap: 6px 16px; font-size: 14px; }
  .hero { padding-block: 16px 56px; gap: 40px; }
  .section, .features { padding-block: 56px; }
  .phone { height: 620px; }
  .ripples { width: 420px; height: 420px; margin: -210px 0 0 -210px; }
}
