/* -----------------------------------------------------------------
   Safa · marketing site
   Design language borrowed from the app prototype.
----------------------------------------------------------------- */

:root {
  --paper:      #EFEAE0;
  --surface:    #FCFAF5;
  --card:       #FFFFFF;
  --cream:      #EFEBE1;
  --ink:        #2C2C2A;
  --ink-soft:   #6b6459;
  --muted:      #A8A296;
  --navy:       #1D3A5F;
  --navy-2:     #274c78;
  --line:       #EDE6D6;
  --border:     #E6DFD0;
  --amber:      #FAC775;
  --amber-bd:   #BA7517;
  --amber-ink:  #633806;
  --amber-tint: #F5E1B8;
  --green:      #C0DD97;
  --green-bd:   #639922;
  --green-ink:  #27500A;
  --green-tint: #EAF3DE;
  --clay:       #D85A30;
  --clay-soft:  #FBF3E7;
  --clay-ink:   #993C1D;

  --serif: 'Fraunces', ui-serif, Georgia, 'Times New Roman', serif;
  --sans:  -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;
  --hebrew:'Frank Ruhl Libre', 'David Libre', 'SBL Hebrew', 'Times New Roman', serif;

  --max: 1120px;
  --gutter: 22px;
  --radius-lg: 22px;
  --radius: 15px;
  --radius-sm: 11px;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.55;
  font-size: 17px;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--clay); }

.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.rtl { direction: rtl; }

/* ----- header ----- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(239, 234, 224, 0.85);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, background .2s ease;
}
.site-header.is-scrolled {
  border-bottom-color: var(--border);
  background: rgba(252, 250, 245, 0.88);
}
.site-header .inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px var(--gutter);
  max-width: var(--max);
  margin: 0 auto;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--navy);
  font-size: 18px;
  letter-spacing: .3px;
}
.brand .mark {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--navy);
  color: var(--surface);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--hebrew);
  font-size: 22px;
  direction: rtl;
  line-height: 1;
  padding-bottom: 2px;
}
.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 22px;
}
.nav a {
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 500;
}
.nav a:hover { color: var(--navy); }
.nav .btn { margin-left: 4px; }

/* ----- buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  border: none;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--navy);
  color: #fff;
  box-shadow: 0 8px 22px rgba(29, 58, 95, .18);
}
.btn-primary:hover { background: var(--navy-2); color: #fff; }
.btn-clay {
  background: var(--clay);
  color: #fff;
  box-shadow: 0 8px 22px rgba(216, 90, 48, .28);
}
.btn-clay:hover { background: #c14e28; color: #fff; }
.btn-ghost {
  background: transparent;
  color: var(--navy);
  padding: 12px 14px;
}
.btn-ghost:hover { color: var(--clay); }
.btn-outline {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--ink);
}
.btn-outline:hover { border-color: var(--navy); color: var(--navy); }
.btn-sm { padding: 9px 16px; font-size: 14px; }

/* ----- typography ----- */
h1, h2, h3 { font-family: var(--serif); color: var(--ink); letter-spacing: -0.01em; }
h1 { font-size: clamp(40px, 6vw, 68px); line-height: 1.05; font-weight: 500; }
h2 { font-size: clamp(28px, 3.5vw, 40px); line-height: 1.15; font-weight: 500; }
h3 { font-size: 20px; line-height: 1.3; font-weight: 600; }

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--clay-ink);
  background: var(--clay-soft);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #f0dcc9;
}

.lead {
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 640px;
}

/* ----- hero ----- */
.hero {
  padding: 60px 0 90px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 55% at 85% 0%, rgba(216, 90, 48, 0.10), transparent 70%),
    radial-gradient(45% 40% at 5% 20%, rgba(29, 58, 95, 0.09), transparent 70%);
  pointer-events: none;
}
.hero .container { position: relative; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 60px;
  align-items: center;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding: 36px 0 60px; }
}

.hero h1 { margin: 22px 0 22px; }
.hero h1 .accent { color: var(--navy); }
.hero h1 .hebrew {
  font-family: var(--hebrew);
  font-weight: 500;
  color: var(--navy);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}
.hero-note {
  margin-top: 18px;
  font-size: 14px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-note .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green-bd); box-shadow: 0 0 0 3px rgba(99,153,34,.18); }

/* Hero visual — mock phone card */
.hero-visual {
  justify-self: center;
  width: 100%;
  max-width: 380px;
  position: relative;
}
.phone-card {
  background: var(--surface);
  border-radius: 32px;
  border: 1px solid var(--border);
  padding: 22px 22px 26px;
  box-shadow:
    0 40px 80px -30px rgba(30, 25, 20, 0.35),
    0 2px 0 rgba(255,255,255,.6) inset;
  position: relative;
}
.phone-card::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 26px;
  border: 1px solid rgba(255,255,255,.5);
  pointer-events: none;
}
.phone-card .row {
  display: flex; align-items: flex-end; gap: 10px; margin-bottom: 14px;
}
.phone-card .row.user { justify-content: flex-end; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--navy); color: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--hebrew); font-size: 17px; flex-shrink: 0; padding-bottom: 2px;
}
.bubble {
  padding: 12px 16px;
  border-radius: 20px;
  direction: rtl;
  font-family: var(--hebrew);
  font-size: 19px;
  line-height: 1.55;
  max-width: 78%;
}
.bubble.tutor { background: var(--cream); color: var(--ink); border-bottom-left-radius: 6px; }
.bubble.user  { background: var(--navy); color: #F4F1E9; border-bottom-right-radius: 6px; }
.trans {
  font-size: 12px;
  color: var(--muted);
  margin: -8px 46px 14px;
  font-style: italic;
}
.trans.right { text-align: right; margin: -8px 8px 14px 46px; }

.memory-chip {
  margin-top: 14px;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--clay-soft);
  border: 1px solid #F0DCC9;
  color: var(--clay-ink);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
}
.memory-chip .ic { font-size: 14px; }

/* ----- sections ----- */
section { padding: 90px 0; }
@media (max-width: 700px) { section { padding: 60px 0; } }

.section-head {
  max-width: 720px;
  margin: 0 auto 56px;
  text-align: center;
}
.section-head .eyebrow { margin-bottom: 18px; }
.section-head h2 { margin-bottom: 16px; }
.section-head p { color: var(--ink-soft); }

/* ----- "what safa is" quote block ----- */
.pull {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 44px clamp(24px, 5vw, 56px);
  position: relative;
  max-width: 860px;
  margin: 0 auto;
}
.pull .hebrew-word {
  font-family: var(--hebrew);
  color: var(--navy);
  font-size: clamp(48px, 6vw, 72px);
  line-height: 1;
  display: block;
  margin-bottom: 8px;
}
.pull p {
  font-family: var(--serif);
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.4;
  color: var(--ink);
  font-weight: 400;
}
.pull p + p {
  margin-top: 20px;
  font-size: clamp(17px, 1.5vw, 19px);
  color: var(--ink-soft);
  font-family: var(--sans);
  line-height: 1.6;
}

/* ----- feature cards ----- */
.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 980px;
  margin: 0 auto;
}
@media (max-width: 720px) { .features { grid-template-columns: 1fr; } }

.feature {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.feature:hover {
  transform: translateY(-2px);
  border-color: #d9cfba;
  box-shadow: 0 20px 40px -20px rgba(30, 25, 20, 0.18);
}
.feature .ic {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 22px;
  margin-bottom: 18px;
}
.feature .ic.clay  { background: var(--clay-soft);  color: var(--clay-ink); }
.feature .ic.green { background: var(--green-tint); color: var(--green-ink); }
.feature .ic.navy  { background: rgba(29, 58, 95, 0.09); color: var(--navy); }
.feature .ic.amber { background: var(--amber-tint); color: var(--amber-ink); }
.feature h3 { margin-bottom: 8px; }
.feature p  { color: var(--ink-soft); font-size: 15.5px; }

/* ----- flywheel ----- */
.flywheel {
  background: linear-gradient(180deg, var(--surface) 0%, var(--paper) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 48px);
  max-width: 980px;
  margin: 0 auto;
}
.flywheel-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 28px;
}
@media (max-width: 780px) {
  .flywheel-steps { grid-template-columns: repeat(2, 1fr); }
}
.fstep {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  position: relative;
}
.fstep .n {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--navy); color: #fff;
  font-size: 13px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 10px;
}
.fstep h4 { font-family: var(--serif); font-weight: 500; font-size: 17px; margin-bottom: 4px; }
.fstep p  { color: var(--ink-soft); font-size: 14px; line-height: 1.5; }

.flywheel-line {
  margin-top: 26px;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(17px, 1.8vw, 21px);
  color: var(--navy);
  text-align: center;
  line-height: 1.5;
}

/* ----- "who it's for" ----- */
.audience {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  max-width: 980px;
  margin: 0 auto;
}
@media (max-width: 780px) { .audience { grid-template-columns: repeat(2, 1fr); } }
.audience-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 18px;
  text-align: center;
}
.audience-card .emoji { font-size: 28px; margin-bottom: 10px; }
.audience-card h4 { font-family: var(--serif); font-weight: 500; font-size: 16px; margin-bottom: 4px; }
.audience-card p { font-size: 13px; color: var(--muted); }

/* ----- final CTA ----- */
.cta-final {
  padding: 100px 0 90px;
  text-align: center;
}
.cta-final .card-cta {
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: clamp(36px, 5vw, 60px);
  max-width: 880px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}
.cta-final .card-cta::before {
  content: "";
  position: absolute;
  inset: -60% -30% auto auto;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(216, 90, 48, .55), transparent 65%);
  pointer-events: none;
}
.cta-final h2 { color: #fff; }
.cta-final p { color: rgba(255,255,255,.75); margin: 14px auto 30px; max-width: 560px; }
.cta-final .btn-clay { box-shadow: 0 12px 28px rgba(216, 90, 48, .5); }

.cta-final .sub {
  margin-top: 14px;
  font-size: 13px;
  color: rgba(255,255,255,.55);
}

/* ----- footer ----- */
.site-footer {
  padding: 40px 0 60px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
}
.site-footer .inner {
  display: flex; flex-wrap: wrap;
  align-items: center; gap: 16px;
}
.site-footer nav { margin-left: auto; display: flex; gap: 22px; }
.site-footer a { color: var(--ink-soft); }
.site-footer a:hover { color: var(--navy); }

/* ============================================================
   Privacy page
============================================================ */
.doc {
  max-width: 760px;
  margin: 0 auto;
  padding: 60px var(--gutter) 100px;
}
.doc .kicker {
  color: var(--clay-ink);
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  font-size: 12px;
}
.doc h1 { font-size: clamp(34px, 4.5vw, 48px); margin: 12px 0 8px; }
.doc .updated { color: var(--muted); font-size: 14px; margin-bottom: 30px; }
.doc .beta-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--clay-soft);
  border: 1px solid #f0dcc9;
  color: var(--clay-ink);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 24px;
}
.doc p { color: var(--ink); margin-bottom: 16px; }
.doc p + p { margin-top: 0; }
.doc h2 {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  margin: 40px 0 12px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--navy);
}
.doc h2:first-of-type { border-top: none; padding-top: 0; margin-top: 30px; }
.doc strong { color: var(--ink); font-weight: 600; }
.doc ul { margin: 0 0 18px 22px; }
.doc li { margin-bottom: 8px; color: var(--ink); }
.doc a { border-bottom: 1px solid rgba(29,58,95,.25); }
.doc a:hover { border-bottom-color: var(--clay); }

.doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 15px;
}
.doc th, .doc td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
.doc th {
  background: var(--surface);
  color: var(--navy);
  font-family: var(--serif);
  font-weight: 500;
  font-size: 15px;
}
.doc tr:last-child td { border-bottom: none; }
.doc td:first-child { font-weight: 600; white-space: nowrap; }
@media (max-width: 640px) {
  .doc table, .doc thead, .doc tbody, .doc th, .doc td, .doc tr { display: block; }
  .doc thead { display: none; }
  .doc td { border-bottom: none; padding: 4px 16px; }
  .doc tr { border-bottom: 1px solid var(--line); padding: 12px 0; }
  .doc td:first-child { padding-top: 12px; font-family: var(--serif); font-size: 17px; color: var(--navy); }
}

.doc .callout {
  background: var(--clay-soft);
  border: 1px solid #f0dcc9;
  border-radius: var(--radius);
  padding: 16px 18px;
  color: var(--clay-ink);
  font-size: 15px;
  margin: 12px 0 24px;
}

/* focus */
:focus-visible {
  outline: 3px solid rgba(216, 90, 48, .45);
  outline-offset: 3px;
  border-radius: 6px;
}
