/* ---------------------------------------------------------------------------
   rega.benbasha.com - dusk-plum web identity for רגע (Rega).
   Dark-FIRST (the app is dark-first; the widget lives on wallpapers), with a
   light sibling via prefers-color-scheme. Tokens mirror SPEC-DESIGN.md §2-§4
   and src/theme: bg #171420 dusk plum, accent #B18CF2 soft violet, and the five
   fixed mood colors that ARE the palette of the app.
   Heebo for he + en. Same page skeleton as the mayim/shemot/yamim fleet sites
   (sticky header, two-col hero, feature grid, showcase rows, pricing, final
   CTA, footer) + shared legal-doc pages with an #en anchor.
--------------------------------------------------------------------------- */

:root {
  /* Dark is primary (SPEC-DESIGN §2 - dusk plum). */
  --bg: #171420;
  --surface: #211d2e;
  --surface-alt: #2b2640;
  --ink: #f3f0f9;
  --ink-soft: #aba5be;
  --ink-faint: #746e8a;
  --accent: #b18cf2;
  --accent-deep: #7c53d4;
  --accent-soft: #2f2548;
  --accent-bright: #c9adff;
  --line: #332d49;
  --chip-border: #4a4068;
  --dot-empty: #2a2539;
  --on-accent: #17102a;

  /* The five mood colors - dark values (SPEC-DESIGN §2). */
  --m-great: #5ed4a4;
  --m-good: #8cc96b;
  --m-meh: #e8c25a;
  --m-bad: #e89a6b;
  --m-awful: #e07a8b;

  --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.34);
  --shadow-lift: 0 16px 44px rgba(0, 0, 0, 0.52);

  --font: 'Heebo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius-card: 20px;
  --radius-button: 16px;
  --content: 1080px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f8f6fc;
    --surface: #ffffff;
    --surface-alt: #efebf8;
    --ink: #251f35;
    --ink-soft: #6a6480;
    --ink-faint: #9c96b0;
    --accent: #8b5cf6;
    --accent-deep: #6d35e8;
    --accent-soft: #ebe3fd;
    --accent-bright: #6d35e8;
    --line: #e6e2f1;
    --chip-border: #d5c9f3;
    --dot-empty: #e9e5f3;
    --on-accent: #ffffff;

    --m-great: #2fb483;
    --m-good: #6bae45;
    --m-meh: #d3a63a;
    --m-bad: #d57a45;
    --m-awful: #c95a70;

    --shadow-soft: 0 8px 24px rgba(37, 31, 53, 0.08);
    --shadow-lift: 0 16px 40px rgba(37, 31, 53, 0.14);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Streak / count numbers are tabular (SPEC-DESIGN §3). */
.num { font-variant-numeric: tabular-nums; }

h1, h2, h3 {
  font-family: var(--font);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.4px;
  margin: 0;
}

a { color: inherit; }

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

.wrap {
  max-width: var(--content);
  margin: 0 auto;
  padding: 0 24px;
}

/* --------------------------------- brand ---------------------------------
   The mark is the app icon redrawn as SVG: a 3x3 pixel-dot grid in the mood
   colors, the centre dot a tiny smiling face. No emoji, ever (AGENTS.md).   */

.mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  background: #171420;
  border-radius: 12px;
  width: 40px;
  height: 40px;
  overflow: hidden;
}

.mark svg { width: 78%; height: 78%; }

.mark-lg {
  width: 78px;
  height: 78px;
  border-radius: 22px;
  box-shadow: var(--shadow-soft), 0 0 48px rgba(177, 140, 242, 0.34);
}

/* --------------------------------- header -------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 66px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}

.brand .mark { width: 38px; height: 38px; }

.brand strong {
  font-weight: 800;
  font-size: 23px;
  letter-spacing: -0.5px;
}

.header-nav {
  margin-inline-start: auto;
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 15px;
  font-weight: 600;
}

.header-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  transition: color 0.15s ease;
}

.header-nav a:hover { color: var(--accent); }

/* ----------------------------- store badges ------------------------------ */

.store-badges {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  position: relative;
  height: 54px;
  padding: 0 20px;
  border-radius: 13px;
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
  border: 1px solid transparent;
}

.store-badge svg { width: 24px; height: 24px; flex: none; }

.store-badge .badge-copy { display: flex; flex-direction: column; line-height: 1.1; }
.store-badge .badge-copy small { font-size: 11px; font-weight: 500; opacity: 0.8; }
.store-badge .badge-copy strong { font-size: 17px; font-weight: 700; }

/* Pre-launch: badge visible but marked "בקרוב" and inert. */
.store-badge.soon { pointer-events: none; opacity: 0.9; }

.store-badge.soon::after {
  content: 'בקרוב';
  position: absolute;
  top: -9px;
  inset-inline-end: -8px;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  padding: 1px 10px;
}

body[dir='ltr'] .store-badge.soon::after { content: 'Soon'; }

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

.hero {
  position: relative;
  overflow: hidden;
  padding: 80px 0 70px;
}

/* Soft violet dusk glow behind the hero. */
.hero::before {
  content: '';
  position: absolute;
  inset: -30% -10% auto -10%;
  height: 680px;
  background: radial-gradient(60% 60% at 70% 0%, rgba(177, 140, 242, 0.24), transparent 70%);
  z-index: 0;
  pointer-events: none;
}

.hero .wrap {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 48px;
  align-items: center;
}

.hero-copy > * {
  opacity: 0;
  animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

.hero-copy > *:nth-child(2) { animation-delay: 0.08s; }
.hero-copy > *:nth-child(3) { animation-delay: 0.16s; }
.hero-copy > *:nth-child(4) { animation-delay: 0.24s; }
.hero-copy > *:nth-child(5) { animation-delay: 0.32s; }
.hero-copy > *:nth-child(6) { animation-delay: 0.4s; }

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

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 15px;
  color: var(--ink-soft);
  margin: 0;
}

.hero-kicker .mark { width: 30px; height: 30px; border-radius: 9px; }

.hero h1 {
  font-size: clamp(38px, 6.2vw, 62px);
  margin: 18px 0 16px;
}

.hero h1 mark {
  background: transparent;
  color: var(--accent-bright);
}

.hero-lead {
  font-size: 19px;
  color: var(--ink-soft);
  max-width: 32em;
  margin: 0 0 26px;
}

.hero-note {
  font-size: 14px;
  color: var(--ink-faint);
  margin: 16px 0 0;
}

/* ----------------------- mood face row (SVG, no emoji) ------------------- */

.mood-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px;
  flex-wrap: wrap;
}

.mood-face {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.75px solid currentColor;
}

.mood-face svg { width: 100%; height: 100%; }

.mood-face.great { color: var(--m-great); }
.mood-face.good { color: var(--m-good); }
.mood-face.meh { color: var(--m-meh); }
.mood-face.bad { color: var(--m-bad); }
.mood-face.awful { color: var(--m-awful); }

/* --------------------------- phone frame + shots ------------------------- */

.hero-shot {
  position: relative;
  justify-self: center;
  opacity: 0;
  animation: rise 0.8s 0.2s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

.phone {
  container-type: inline-size;
  position: relative;
  width: min(300px, 78vw);
  aspect-ratio: 1178 / 2556;
  border-radius: 46px;
  padding: 10px;
  background: #0a0810;
  box-shadow: var(--shadow-lift), 0 0 66px rgba(177, 140, 242, 0.22);
}

.phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 38px;
  position: relative;
  z-index: 1;
}

/* Graceful fallback: until the composed store screenshots land under
   assets/01.webp .. 06.webp, a missing <img> is removed by its onerror handler
   and this CSS-drawn app screen shows through instead - so the frame is never
   an empty slab and the layout never shifts when the real shots arrive. */

.phone .screen {
  position: absolute;
  inset: 10px;
  border-radius: 38px;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(80% 42% at 50% 0%, rgba(177, 140, 242, 0.2), transparent 72%),
    #171420;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7%;
  padding: 16% 9% 14%;
  color: #f3f0f9;
}

.phone .screen b {
  font-size: clamp(12px, 5.2cqw, 20px);
  font-weight: 700;
  letter-spacing: -0.3px;
  text-align: center;
}

.phone .screen .s-faces {
  display: flex;
  gap: 5%;
  width: 100%;
  justify-content: center;
}

.phone .screen .s-faces i {
  flex: 0 1 16%;
  aspect-ratio: 1;
  border-radius: 999px;
}

.phone .screen .s-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4.5%;
  width: 100%;
}

.phone .screen .s-note {
  font-size: clamp(9px, 3.6cqw, 14px);
  color: #aba5be;
  font-weight: 600;
}

.phone .screen .s-grid i {
  aspect-ratio: 1;
  border-radius: 3px;
  background: #2a2539;
}

.phone .screen i.great { background: #5ed4a4; color: #5ed4a4; }
.phone .screen i.good { background: #8cc96b; color: #8cc96b; }
.phone .screen i.meh { background: #e8c25a; color: #e8c25a; }
.phone .screen i.bad { background: #e89a6b; color: #e89a6b; }
.phone .screen i.awful { background: #e07a8b; color: #e07a8b; }


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

.features { padding: 30px 0 60px; }

.section-title {
  font-size: clamp(28px, 4vw, 40px);
  margin-bottom: 10px;
  text-align: center;
}

.section-sub {
  color: var(--ink-soft);
  margin: 0 auto 40px;
  max-width: 40em;
  font-size: 18px;
  text-align: center;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.feature {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 28px 26px 30px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.feature:hover {
  transform: translateY(-4px);
  border-color: var(--chip-border);
  box-shadow: var(--shadow-lift);
}

.feature .icon {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  border-radius: 15px;
  margin-bottom: 18px;
}

.feature .icon svg { width: 27px; height: 27px; stroke: var(--accent); fill: none; }

.feature h3 { font-size: 20px; margin-bottom: 8px; }
.feature p { margin: 0; font-size: 15.5px; color: var(--ink-soft); }

/* ------------------------------- pixel band ------------------------------ */
/* A year-in-pixels strip: the product's identity, drawn in pure CSS so it
   never depends on a screenshot being present. */

.pixel-band { padding: 10px 0 56px; }

.pixel-band .wrap { max-width: 900px; }

.pixel-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 28px 30px 30px;
}

.pixel-grid {
  display: grid;
  grid-template-rows: repeat(7, 1fr);
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  margin-top: 6px;
}

.pixel-grid i {
  display: block;
  aspect-ratio: 1;
  border-radius: 3px;
  background: var(--dot-empty);
}

.pixel-grid i.great { background: var(--m-great); }
.pixel-grid i.good { background: var(--m-good); }
.pixel-grid i.meh { background: var(--m-meh); }
.pixel-grid i.bad { background: var(--m-bad); }
.pixel-grid i.awful { background: var(--m-awful); }

.pixel-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 20px;
  font-size: 14px;
  color: var(--ink-soft);
}

.pixel-legend span { display: inline-flex; align-items: center; gap: 7px; }

.pixel-legend b {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
}

/* ------------------------------- showcase -------------------------------- */

.showcase { padding: 10px 0 70px; }

.showcase-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  margin: 0 auto;
  max-width: 940px;
}

.showcase-row + .showcase-row { margin-top: 40px; }

.showcase-row.flip .showcase-shot { order: 2; }

.showcase-shot { justify-self: center; }

.showcase-shot .phone { width: min(268px, 70vw); }

.showcase-copy h3 {
  font-size: clamp(24px, 3.4vw, 32px);
  margin-bottom: 12px;
}

.showcase-copy p {
  color: var(--ink-soft);
  font-size: 17px;
  margin: 0 0 10px;
}

.showcase-copy .chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-soft);
  color: var(--accent-bright);
  border: 1px solid var(--chip-border);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 16px;
}

/* --------------------------------- gallery -------------------------------- */

.gallery { padding: 0 0 70px; }

.shots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 940px;
  margin: 0 auto;
}

.shots .phone { width: 100%; }

/* ------------------------------- free/iap -------------------------------- */

.pricing { padding: 10px 0 76px; }

.pricing .wrap { max-width: 760px; }

.price-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 34px 34px 36px;
  text-align: center;
}

.price-card h2 { font-size: clamp(26px, 3.6vw, 34px); margin-bottom: 10px; }

.price-card .price-lead { color: var(--ink-soft); margin: 0 auto 22px; max-width: 34em; }

.price-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  text-align: start;
  margin-top: 8px;
}

.price-col {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 22px 22px;
}

.price-col.premium { border-color: var(--chip-border); background: var(--accent-soft); }

.price-col h4 { font-size: 17px; margin: 0 0 12px; }
.price-col .tag { font-size: 13px; font-weight: 700; color: var(--accent-bright); }

.price-col ul { margin: 8px 0 0; padding: 0; list-style: none; }

.price-col li {
  position: relative;
  padding-inline-start: 24px;
  margin: 8px 0;
  font-size: 15px;
  color: var(--ink-soft);
}

.price-col li::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  top: 8px;
  width: 14px;
  height: 8px;
  border-inline-start: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

.price-note {
  margin-top: 20px;
  font-size: 14px;
  color: var(--ink-faint);
}

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

.final-cta {
  text-align: center;
  padding: 8px 0 96px;
}

.final-cta .mark { margin: 0 auto 26px; }

.final-cta h2 {
  font-size: clamp(30px, 4.5vw, 44px);
  margin-bottom: 24px;
  max-width: 16em;
  margin-inline: auto;
}

.final-cta .store-badges { justify-content: center; }

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

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 14px;
  padding: 42px 0 50px;
}

.site-footer .wrap { display: grid; gap: 10px; }

.site-footer a { color: var(--ink); text-decoration-color: var(--line); }

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  font-size: 19px;
  margin-bottom: 8px;
}

.footer-brand .mark { width: 30px; height: 30px; border-radius: 9px; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  font-weight: 600;
}

/* ------------------------------ legal pages ------------------------------ */

.legal-main { padding: 40px 0 80px; }
.legal-main .wrap { max-width: 760px; }

.legal-toggle {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 28px;
  font-size: 15px;
  font-weight: 600;
  background: var(--surface);
}

.legal-toggle a { padding: 8px 22px; text-decoration: none; color: var(--ink-soft); cursor: pointer; }
.legal-toggle a.active { background: var(--accent); color: var(--on-accent); }

.legal-doc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 36px 40px 44px;
}

.legal-doc h1 { font-size: 34px; margin-bottom: 4px; }

.legal-doc .effective {
  color: var(--ink-faint);
  font-size: 14px;
  margin: 0 0 24px;
}

.legal-doc h2 {
  font-size: 21px;
  margin: 34px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--line);
}

.legal-doc h3 { font-size: 17px; margin: 22px 0 6px; }

.legal-doc p, .legal-doc li { color: var(--ink-soft); }
.legal-doc strong { color: var(--ink); }
.legal-doc ul { padding-inline-start: 22px; margin: 8px 0; }
.legal-doc li { margin: 6px 0; }

.legal-doc a {
  color: var(--accent);
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
}

.callout {
  background: var(--accent-soft);
  border: 1px solid var(--chip-border);
  border-radius: var(--radius-card);
  padding: 16px 20px;
  margin: 18px 0 4px;
}

.callout, .callout strong { color: var(--ink); }

/* --------------------------- support page extras ------------------------- */

.faq { margin-top: 10px; }

.faq details {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
  padding: 4px 18px;
  margin: 10px 0;
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
  padding: 12px 0;
  color: var(--ink);
  list-style: none;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: '+';
  float: inline-end;
  color: var(--accent);
  font-weight: 800;
}

.faq details[open] summary::after { content: '\2212'; }

.faq p { margin: 0 0 14px; }

.contact-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--accent-soft);
  border: 1px solid var(--chip-border);
  border-radius: var(--radius-card);
  padding: 20px 22px;
  margin-top: 18px;
}

.contact-card .icon {
  width: 46px;
  height: 46px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--bg);
}

.contact-card .icon svg { width: 24px; height: 24px; stroke: var(--accent); fill: none; }

.contact-card strong { display: block; color: var(--ink); }
.contact-card a { color: var(--accent); font-weight: 700; }

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

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; }
  .hero-shot { order: -1; }
  .feature-grid { grid-template-columns: 1fr; }
  .showcase-row { grid-template-columns: 1fr; gap: 28px; }
  .showcase-row.flip .showcase-shot { order: -1; }
  .showcase-shot { order: -1; }
  .price-cols { grid-template-columns: 1fr; }
  .shots { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .legal-doc { padding: 26px 22px 32px; }
  .header-nav { gap: 14px; font-size: 14px; }
  .shots { grid-template-columns: 1fr; max-width: 320px; }
  .pixel-card { padding: 20px 18px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-copy > *, .hero-shot { animation: none; opacity: 1; }
}

.legal-doc code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 6px;
  color: var(--ink);
  unicode-bidi: isolate;
  direction: ltr;
}

@media (max-width: 640px) {
  .pixel-grid { gap: 2px; }
  .pixel-grid i { border-radius: 2px; }
}
