/* ---------------------------------------------------------------------------
   yamim.benbasha.com — deep night-sky web identity for ימים (Yamim).
   Dark-FIRST (the app skews dark; widgets live on wallpapers), with a light
   variant via prefers-color-scheme. Tokens mirror SPEC-DESIGN.md §2 and
   src/theme (bg #141520, accent #7C8CF8 periwinkle). Heebo for he + en.
   Same page skeleton as the shemot fleet site (sticky header, two-col hero,
   feature grid, final CTA, footer) + shared legal-doc + /e/ share-receiver.
--------------------------------------------------------------------------- */

:root {
  /* Dark is primary (SPEC-DESIGN §2). */
  --bg: #141520;
  --surface: #1D1F2E;
  --surface-alt: #262940;
  --ink: #F0EFF7;
  --ink-soft: #A6A7BD;
  --ink-faint: #6E7089;
  --accent: #7C8CF8;
  --accent-soft: #2B2F52;
  --accent-bright: #B9C2FB;
  --line: #2E3147;
  --chip-border: #3A3F63;
  --on-accent: #141520;

  --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.25);
  --shadow-lift: 0 16px 40px rgba(0, 0, 0, 0.45);

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

@media (prefers-color-scheme: light) {
  :root {
    --bg: #F7F6FB;
    --surface: #FFFFFF;
    --surface-alt: #EEEDF6;
    --ink: #23243A;
    --ink-soft: #666880;
    --ink-faint: #9C9DB2;
    --accent: #5B6CF0;
    --accent-soft: #E4E7FD;
    --accent-bright: #4A5AD8;
    --line: #E5E4EF;
    --chip-border: #D8D7E6;
    --on-accent: #FFFFFF;

    --shadow-soft: 0 8px 24px rgba(30, 32, 60, 0.08);
    --shadow-lift: 0 16px 40px rgba(30, 32, 60, 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;
}

/* Tabular numerals everywhere — countdowns must not shift (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 --------------------------------- */
/* Glowing dot-on-a-timeline mark — a day marked on a line (SPEC-DESIGN §5). */

.mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  background: var(--accent);
  border-radius: 12px;
  width: 40px;
  height: 40px;
  box-shadow: 0 0 0 0 rgba(124, 140, 248, 0.5);
}

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

.mark-lg {
  width: 76px;
  height: 76px;
  border-radius: 22px;
  box-shadow: var(--shadow-soft), 0 0 40px rgba(124, 140, 248, 0.35);
}

/* --------------------------------- 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 aurora glow behind the hero. */
.hero::before {
  content: '';
  position: absolute;
  inset: -30% -10% auto -10%;
  height: 640px;
  background: radial-gradient(60% 60% at 70% 0%, rgba(124, 140, 248, 0.22), 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; }

@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);
}

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

.hero h1 {
  font-size: clamp(40px, 6.4vw, 66px);
  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;
}

/* -------------------------- hero lock-screen mock ------------------------ */

.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 {
  width: min(300px, 78vw);
  aspect-ratio: 300 / 640;
  border-radius: 46px;
  padding: 12px;
  background: #05060b;
  box-shadow: var(--shadow-lift), 0 0 60px rgba(124, 140, 248, 0.18);
}

.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 36px;
  overflow: hidden;
  /* Deep night-sky wallpaper. */
  background:
    radial-gradient(120% 80% at 70% 8%, #2b2f66 0%, #1a1c39 42%, #0d0e1c 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #fff;
  padding: 22px 18px;
}

.phone-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 108px;
  height: 26px;
  background: #05060b;
  border-radius: 0 0 16px 16px;
}

.lock-date { margin-top: 22px; font-size: 15px; font-weight: 600; opacity: 0.85; }
.lock-time { font-size: 68px; font-weight: 700; line-height: 1; margin: 2px 0 20px; letter-spacing: -1px; }

/* Lock-screen widget row: circular + rectangular (SPEC-DESIGN §9). */
.lock-widgets { display: flex; gap: 12px; width: 100%; align-items: stretch; }

.lw {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  padding: 12px 14px;
  color: #fff;
}

.lw-circular {
  flex: none;
  width: 82px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}

.lw-ring { position: relative; width: 62px; height: 62px; }
.lw-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.lw-ring .lw-ring-num {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
}

.lw-rect { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.lw-rect .lw-title { font-size: 13px; font-weight: 600; opacity: 0.9; }
.lw-rect .lw-count { display: flex; align-items: baseline; gap: 6px; }
.lw-rect .lw-count b { font-size: 34px; font-weight: 800; line-height: 1.05; }
.lw-rect .lw-count span { font-size: 13px; font-weight: 600; opacity: 0.85; }
.lw-rect .lw-bar { height: 5px; border-radius: 999px; background: rgba(255, 255, 255, 0.22); margin-top: 8px; overflow: hidden; }
.lw-rect .lw-bar i { display: block; height: 100%; width: 72%; background: var(--accent-bright); border-radius: 999px; }

/* Home-screen small widget floating below, full-color. */
.home-widget {
  margin-top: 16px;
  align-self: stretch;
  border-radius: 20px;
  padding: 14px 16px;
  background: linear-gradient(155deg, #7C8CF8, #5a68d4);
  color: #fff;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
}

.home-widget .hw-num { font-size: 40px; font-weight: 800; line-height: 1; }
.home-widget .hw-unit { font-size: 13px; font-weight: 600; opacity: 0.9; }
.home-widget .hw-title { margin-top: 10px; font-size: 13px; font-weight: 600; }

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

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

.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); }

/* ------------------------------- 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 p, .legal-doc li { color: var(--ink-soft); }
.legal-doc strong { color: var(--ink); }
.legal-doc ul { padding-inline-start: 22px; }

.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); }

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

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; }
  .hero-shot { order: -1; }
  .feature-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .legal-doc { padding: 26px 22px 32px; }
  .header-nav { gap: 14px; font-size: 14px; }
}

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