/*
 * Quality Time / זמן איכות — marketing site.
 *
 * Palette and type are lifted from the app itself (iOS `Theme.swift`,
 * Android `Color.kt` / `Type.kt`) so the site and the product read as one
 * thing: lavender ground, aubergine primary, sage for the "protected" state,
 * Geist for Latin with Assistant covering Hebrew.
 *
 * The site is Hebrew-first: `dir` is rtl by default and every directional
 * rule uses logical properties, so the English switch needs no overrides.
 */

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --lav: #f0eef6;
  --lav-deep: #e7e3f0;
  --surface: #fffdfc;
  --plum: #503750;
  --plum-deep: #3d293e;
  --plum-soft: #eee6ef;
  --muted-lav: #a491a6;
  --ink: #2d2930;
  --ink-soft: #6b5f63;
  --sage: #557565;
  --soft-sage: #e0eae4;
  --divider: #e3ddea;

  --measure: 34rem;
  --wide: 68rem;
  --radius-card: 28px;
  --radius-phone: 30px;

  --font: "Geist", "Assistant", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--lav);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--plum);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--plum);
  outline-offset: 3px;
  border-radius: 4px;
}

img {
  max-width: 100%;
  height: auto;
}

/* ---------------------------------------------------------------- nav --- */

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px 20px;
  flex-wrap: wrap;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 22px 24px;
  font-size: 0.9375rem;
}

.site-nav .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--ink);
  margin-inline-end: auto;
}

.site-nav .brand:hover {
  text-decoration: none;
}

/* The nav uses the hourglass mark on its own: the full app icon carries the
   wordmark underneath, which is illegible at this size and repeats the name
   already sitting next to it. */
.site-nav .brand img {
  width: 26px;
  height: 26px;
}

.site-nav a {
  color: var(--ink-soft);
  font-weight: 400;
}

.site-nav a.active {
  color: var(--plum);
  font-weight: 600;
}

.site-nav .lang-switch {
  position: relative;
  margin-inline-start: 2px;
  flex-shrink: 0;
}

.site-nav .lang-switch-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  direction: ltr;
  margin: 0;
  padding: 4px 2px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  cursor: pointer;
}

.site-nav .lang-switch-btn:hover {
  color: var(--plum);
  text-decoration: none;
}

.site-nav .lang-flag {
  font-size: 1rem;
  line-height: 1;
}

.site-nav .lang-caret {
  width: 10px;
  height: 10px;
  transition: transform 0.16s ease;
}

.site-nav .lang-switch[open] .lang-caret,
.site-nav .lang-switch.is-open .lang-caret {
  transform: rotate(180deg);
}

.site-nav .lang-menu {
  position: absolute;
  inset-block-start: calc(100% + 8px);
  inset-inline-end: 0;
  z-index: 30;
  min-width: 11rem;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(80, 55, 80, 0.14);
}

.site-nav .lang-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  direction: ltr;
  margin: 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  background: none;
  font: inherit;
  font-size: 0.875rem;
  color: var(--ink);
  text-align: start;
  cursor: pointer;
}

.site-nav .lang-option:hover,
.site-nav .lang-option:focus-visible {
  background: var(--plum-soft);
  text-decoration: none;
}

.site-nav .lang-option .lang-prefix {
  font-weight: 600;
  letter-spacing: 0.04em;
  font-size: 0.75rem;
  color: var(--ink-soft);
  unicode-bidi: isolate;
}

.site-nav .lang-option .lang-name {
  font-weight: 400;
  unicode-bidi: isolate;
}

.site-nav .lang-option[aria-selected="true"] {
  color: var(--plum);
}

.site-nav .lang-option[aria-selected="true"] .lang-prefix {
  color: var(--plum);
}

/* The nav is shared across every page (see router.js), so its layout is not
   scoped to any one page's styles: it needs to look and behave identically
   no matter which page's content is currently showing underneath it. */
@media (max-width: 759px) {
  .site-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
    padding: 10px 14px;
    gap: 0 10px;
  }

  .site-nav::-webkit-scrollbar {
    display: none;
  }

  .site-nav .brand {
    margin-inline-end: 0;
    flex-shrink: 0;
  }

  .site-nav > a:not(.brand) {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    min-block-size: 44px;
    padding-inline: 2px;
    font-size: 0.8125rem;
  }

  .site-nav .lang-switch-btn {
    min-block-size: 44px;
    padding-inline: 6px;
  }
}

/* --------------------------------------------------------------- hero --- */

.hero {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 40px 24px 88px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.72fr);
  align-items: center;
  gap: 56px;
}

/* Wider than the body measure: the headline is short, and the extra room keeps
   the longer English wording to two lines without shrinking the Hebrew. */
.hero-copy {
  max-width: 38rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 5.6vw, 3.9rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 24px;
  text-wrap: balance;
}

.hero .lede {
  font-size: 1.1875rem;
  line-height: 1.65;
  color: var(--ink-soft);
  margin: 0 0 32px;
}

.hero .fineprint {
  margin: 20px 0 0;
  font-size: 0.9375rem;
  color: var(--muted-lav);
}

.store-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.store-row a {
  display: inline-flex;
  border-radius: 9px;
}

.store-row img {
  height: 52px;
  width: auto;
  display: block;
}

/* The two official badges have different proportions: Apple's is a
   noticeably more compact pill than Google's wider one, so at the same
   height Apple's reads smaller and lighter next to it. Sizing Apple's a
   little taller brings them to the same optical weight side by side. */
.store-row .badge-apple img {
  height: 58px;
}

/* ------------------------------------------------------------- phones --- */

.phone {
  border-radius: var(--radius-phone);
  display: block;
  width: 100%;
  box-shadow:
    0 2px 6px rgba(45, 41, 48, 0.06),
    0 18px 44px rgba(80, 55, 80, 0.16);
}

.hero-shot {
  justify-self: center;
  max-width: 305px;
}

/* -------------------------------------------------------------- steps --- */

.band {
  padding: 84px 24px;
}

.band-inner {
  max-width: var(--wide);
  margin: 0 auto;
}

.band h2 {
  font-size: clamp(1.75rem, 3.6vw, 2.5rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 12px;
}

.band .band-lede {
  font-size: 1.0625rem;
  color: var(--ink-soft);
  max-width: var(--measure);
  margin: 0 0 56px;
}

.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
}

.steps > li {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.step-num {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--plum);
  font-feature-settings: "tnum";
  border-block-end: 1px solid var(--divider);
  padding-block-end: 12px;
}

.steps h3 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
  color: var(--ink);
}

.steps p {
  margin: 0;
  font-size: 1rem;
  color: var(--ink-soft);
}

/* The screenshots are 640px wide, so capping the display width here keeps them
   at roughly 2x density instead of being upscaled to fill the grid column. */
.steps .phone {
  margin-block-start: 6px;
  max-width: 305px;
  margin-inline: auto;
}

/* ----------------------------------------------------------- features --- */

.features-band {
  background: var(--surface);
  border-block: 1px solid var(--divider);
}

.features-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.6fr);
  gap: 64px;
  align-items: start;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-list > li {
  padding-block: 26px;
  border-block-end: 1px solid var(--divider);
}

.feature-list > li:first-child {
  padding-block-start: 0;
}

.feature-list > li:last-child {
  border-block-end: none;
  padding-block-end: 0;
}

.feature-list h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--ink);
}

.feature-list p {
  margin: 0;
  font-size: 1rem;
  color: var(--ink-soft);
}

.feature-shot {
  position: sticky;
  top: 40px;
  max-width: 280px;
  justify-self: center;
}

/* ------------------------------------------------------------ privacy --- */

.privacy-band {
  background: var(--plum-deep);
  color: var(--lav);
}

.privacy-band .band-inner {
  max-width: 46rem;
  text-align: center;
}

.privacy-band h2 {
  color: #fff;
  margin-block-end: 20px;
}

.privacy-band p {
  color: rgba(240, 238, 246, 0.82);
  margin: 0 auto;
  max-width: 38rem;
  font-size: 1.0625rem;
}

.privacy-band a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------------------------------------------------------------- cta --- */

.cta-band {
  text-align: center;
}

.cta-band .band-inner {
  max-width: 40rem;
}

.cta-band .store-row {
  justify-content: center;
  margin-block-start: 32px;
}

.cta-band .fineprint {
  margin: 20px 0 0;
  font-size: 0.9375rem;
  color: var(--muted-lav);
}

/* ------------------------------------------------- interior text pages --- */

.container {
  max-width: 44rem;
  margin: 0 auto;
  padding: 24px 24px 40px;
}

header.page-head {
  padding: 40px 0 32px;
}

header.page-head h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 10px;
  color: var(--ink);
}

header.page-head .tagline {
  font-size: 1.125rem;
  color: var(--ink-soft);
  margin: 0;
}

.card {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--radius-card);
  padding: 32px;
  margin-block-end: 24px;
}

.card h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 16px;
  color: var(--plum);
}

.card p {
  margin: 0 0 12px;
}

.card p:last-child {
  margin-block-end: 0;
}

.policy h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 32px 0 12px;
  color: var(--plum);
}

.policy h2:first-of-type {
  margin-block-start: 0;
}

.policy ul {
  padding-inline-start: 1.25rem;
  margin: 0 0 12px;
}

.policy li {
  margin-block-end: 8px;
}

.policy .updated {
  color: var(--muted-lav);
  font-size: 0.9375rem;
  margin-block-end: 24px;
}

.faq dt {
  font-weight: 600;
  margin-block-start: 24px;
  color: var(--ink);
}

.faq dd {
  margin: 8px 0 0;
  color: var(--ink-soft);
}

.contact-box {
  background: var(--soft-sage);
  border-radius: 16px;
  padding: 20px;
  margin-block-start: 16px;
}

.contact-box p {
  margin: 0;
}

.contact-box a {
  font-weight: 600;
  color: var(--sage);
}

.meta-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.meta-list li {
  padding-block: 10px;
  border-block-end: 1px solid var(--divider);
}

.meta-list li:last-child {
  border-block-end: none;
}

.meta-list strong {
  display: inline-block;
  min-width: 9rem;
  color: var(--muted-lav);
  font-weight: 400;
}

/* The download row carries two store links; keep them readable as two. */
.meta-list a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.meta-list a + a {
  margin-inline-start: 18px;
}

/* ------------------------------------------------------------- footer --- */

footer {
  border-block-start: 1px solid var(--divider);
  padding: 36px 24px 56px;
  color: var(--ink-soft);
  font-size: 0.9375rem;
  text-align: center;
}

footer p {
  margin: 0 0 8px;
}

footer a {
  color: var(--ink-soft);
  margin-inline: 10px;
}

/* ------------------------------------------------------------- motion --- */

/* One deliberate entrance: the hero settles as the page opens. Nothing else
   on the page animates on scroll. */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy,
  .hero-shot {
    animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.3, 1) both;
  }

  .hero-shot {
    animation-delay: 0.1s;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ----------------------------------------------------------- responsive --- */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 44px;
    padding-block-end: 64px;
  }

  .hero-shot {
    max-width: 260px;
  }

  .features-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .feature-shot {
    position: static;
  }

  .steps {
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
  }

  .steps > li {
    max-width: 30rem;
  }

  .steps .phone {
    max-width: 260px;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 1rem;
  }

  .band {
    padding-block: 64px;
  }

  .card {
    padding: 24px;
  }

  .store-row img {
    height: 46px;
  }

  .store-row .badge-apple img {
    height: 52px;
  }
}
