/* ==========================================================================
   Mitzvah Alarm — Galtworks
   Buildless static stylesheet. System fonts only; no external requests.
   Shared by index.html and the legal pages (/privacy/, /terms/, /support/).
   Legal pages: use <body class="legal-page"> with the shared header/footer and
   a <main id="main"><div class="container"><article class="legal-content">
   (or <main class="legal-content"> directly). Also styled: .legal-lede/.legal-lead,
   .legal-meta/.legal-date, .legal-note, .legal-toc, .legal-back, .legal-contact.
   Reference the stylesheet as /styles.css from nested pages.
   ========================================================================== */

:root {
  /* Palette taken from the app (src/components/ui.tsx) and its icon */
  --page: #F8F6F0;
  --card: #FFFDF8;
  --line: #E5E5DB;
  --ink: #282E25;
  --body: #333B2E;
  --muted: #6B6E63;          /* darker than the app's #82857A for AA contrast on cream */
  --accent: #E6623E;
  --accent-deep: #B5492E;    /* text-safe coral (app "bad" tone) */
  --accent-soft: #F7E2D6;
  --soft: #EEEDE5;
  --soft-ink: #45513B;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "Noto Serif", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --hebrew: "Noto Serif Hebrew", "Frank Ruhl Libre", "David Libre", "Times New Roman", "Noto Sans Hebrew", serif;

  --radius: 22px;
  --radius-sm: 14px;
  --gutter: clamp(1.25rem, 5vw, 2.5rem);
  --max: 70rem;
  --section-y: clamp(4.5rem, 11vw, 8.5rem);
  --shadow: 0 1px 0 rgba(40, 46, 37, .04), 0 18px 40px -22px rgba(40, 46, 37, .28);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--page);
  color: var(--body);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { color: var(--ink); margin: 0; font-weight: 600; }
p { margin: 0 0 1em; }
a { color: var(--accent-deep); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:lang(he) { font-family: var(--hebrew); }
:lang(he-Latn) { font-family: inherit; }
i, em { font-style: italic; }
[id] { scroll-margin-top: 1.5rem; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}
.words :focus-visible, .closing :focus-visible { outline-color: #FFD8C8; }

.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--ink); color: var(--page); padding: .75rem 1.1rem;
  border-radius: 10px; font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 1rem; }

/* ---------- Header ---------- */
.site-header { padding-block: 1.25rem; position: relative; z-index: 5; }
.header-inner { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--ink); }
.brand-icon { border-radius: 10px; box-shadow: 0 6px 14px -8px rgba(230, 98, 62, .8); }
.brand-name { font-weight: 700; letter-spacing: -.01em; font-size: 1.15rem; }
.nav { display: flex; gap: clamp(1rem, 3vw, 2rem); margin-inline-start: auto; }
.nav a {
  color: var(--soft-ink); text-decoration: none; font-weight: 500; font-size: .98rem;
  padding: .4rem 0; border-bottom: 1px solid transparent;
}
.nav a:hover { color: var(--ink); border-bottom-color: var(--accent); }

/* ---------- Buttons ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 3.25rem; padding: .8rem 1.7rem;
  background: var(--ink); color: var(--page);
  font: 600 1rem/1.2 var(--sans); text-decoration: none; letter-spacing: .005em;
  border: 1.5px solid var(--ink); border-radius: 999px; cursor: pointer;
  transition: transform .2s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
}
.button:hover { background: #1b201a; border-color: #1b201a; transform: translateY(-2px); text-decoration: none; }
.button-ghost { background: transparent; color: var(--ink); border-color: rgba(40, 46, 37, .35); }
.button-ghost:hover { background: var(--ink); color: var(--page); }
.button-small { min-height: 2.6rem; padding: .5rem 1.2rem; font-size: .94rem; }
.button-light { background: var(--page); color: var(--ink); border-color: var(--page); }
.button-light:hover { background: #fff; border-color: #fff; }
.button-outline-light { background: transparent; color: var(--page); border-color: rgba(248, 246, 240, .55); }
.button-outline-light:hover { background: var(--page); color: var(--ink); border-color: var(--page); }
.cta-row { display: flex; flex-wrap: wrap; gap: .85rem; }
.cta-center { justify-content: center; }

/* ---------- Typographic bits ---------- */
.eyebrow {
  display: flex; align-items: center; gap: .65rem;
  margin: 0 0 1.25rem;
  font: 700 .74rem/1.2 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
}
.eyebrow::before { content: ""; width: 1.75rem; height: 1.5px; background: var(--accent); flex: none; }
.eyebrow-light { color: #D9D6C9; }
h2 {
  font-family: var(--serif); font-weight: 500; letter-spacing: -.02em;
  font-size: clamp(2rem, 4.6vw, 3.25rem); line-height: 1.08;
}
h3 { font-size: 1.2rem; line-height: 1.3; letter-spacing: -.005em; }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(2rem, 6vw, 4.5rem) var(--section-y); overflow-x: clip; }
.hero-grid { display: grid; gap: clamp(3rem, 7vw, 4rem); align-items: center; }
.hero h1 {
  font-family: var(--serif); font-weight: 500; letter-spacing: -.035em;
  font-size: clamp(3.1rem, 11.5vw, 5.6rem); line-height: .98; margin-bottom: 1.6rem;
}
.hero h1 em { color: var(--accent); font-style: italic; font-weight: 400; display: inline-block; }
.lede { font-size: clamp(1.1rem, 2.2vw, 1.3rem); line-height: 1.6; color: var(--body); max-width: 33rem; margin-bottom: 2rem; }
.lede i { font-family: var(--serif); }
.fineprint { margin: 1.4rem 0 0; font-size: .92rem; color: var(--muted); }

.hero-visual { position: relative; display: grid; place-items: center; padding-block: 1.5rem; isolation: isolate; }
.sun {
  position: absolute; z-index: -2; width: min(30rem, 96%); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #F6A07F 0%, var(--accent) 55%, #D5522F 100%);
  top: 50%; left: 50%; transform: translate(-50%, -50%); overflow: hidden;
}
.sun::after { /* decorative mem, as in the app icon */
  content: "\05DE"; content: "\05DE" / "";
  position: absolute; left: 5%; top: -4%;
  font-family: var(--hebrew); font-weight: 700; line-height: 1; direction: rtl;
  font-size: clamp(11rem, 36vw, 17rem); color: var(--page); opacity: .2;
}
.hero-note {
  position: absolute; z-index: 2; left: 0; bottom: 10%;
  margin: 0; padding: .55rem 1.25rem .65rem;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow);
  font-family: var(--hebrew); font-size: clamp(1.4rem, 4vw, 1.9rem); color: var(--ink); line-height: 1.3;
}

/* ---------- Phone frame (code-native, Pixel-style: slim even bezel, punch-hole camera, side keys) ---------- */
.phone { margin: 0; width: min(15.5rem, 64vw); position: relative; }
.phone::before, .phone::after { /* power key and volume rocker on the right edge */
  content: ""; position: absolute; right: -3px; width: 3px; border-radius: 0 2px 2px 0; background: #1d211b;
}
.phone::before { top: 22%; height: 11%; }
.phone::after { top: 36%; height: 7%; }
.phone-screen {
  position: relative; overflow: hidden;
  aspect-ratio: 9 / 20;
  background: var(--page); border: 7px solid #1d211b; border-radius: 40px;
  box-shadow: 0 0 0 1.5px #9b9d92, 0 44px 60px -30px rgba(40, 46, 37, .55);
}
.phone-screen::before { /* punch-hole camera */
  content: ""; position: absolute; z-index: 2; top: 11px; left: 50%; width: 11px; height: 11px; margin-left: -5.5px;
  background: #0b0d0a; border-radius: 50%; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .08);
}
.phone-screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

/* ---------- Words (dark band) ---------- */
.words { background: var(--ink); color: #E8E6DB; padding-block: var(--section-y); }
.words-grid { display: grid; gap: 3rem; }
.words h2 { color: var(--page); margin-bottom: 1.25rem; }
.words-intro p { color: #CFCDC0; max-width: 30rem; }
.words-intro i { font-family: var(--serif); color: #fff; }
.scripture { margin: 0; }
.scripture blockquote { margin: 0; }
.scripture .he {
  font-size: clamp(1.9rem, 5.4vw, 3.2rem); line-height: 1.7; color: #fff; font-weight: 400;
  margin: 0 0 1.5rem; text-wrap: balance;
}
.scripture .tr { font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: #F2B9A3; margin: 0 0 1.1rem; }
.scripture .en { font-size: 1.05rem; color: #CFCDC0; margin: 0; padding-top: 1.1rem; border-top: 1px solid rgba(255, 255, 255, .16); }
.scripture figcaption { margin-top: 1.5rem; font-size: .88rem; color: #A9A79B; }

/* ---------- Sections ---------- */
.section { padding-block: var(--section-y); }
.section-tint { background: var(--soft); background: linear-gradient(var(--soft), var(--soft)); }
.section-head { margin-bottom: clamp(2.25rem, 5vw, 3.75rem); max-width: 40rem; }

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--line); counter-reset: none; }
.steps li { position: relative; padding: 2rem 0 2rem 4.5rem; border-bottom: 1px solid var(--line); }
.step-num {
  position: absolute; left: 0; top: 1.35rem;
  font-family: var(--serif); font-size: 3.4rem; line-height: 1; color: var(--accent); font-weight: 400; font-style: italic;
}
.steps h3 { font-family: var(--serif); font-weight: 500; font-size: 1.6rem; margin-bottom: .5rem; }
.steps p { margin: 0; max-width: 28rem; }

/* Feature cards */
.features { display: grid; gap: 1.15rem; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.5rem, 3.2vw, 2.1rem);
}
.card h3 { margin-bottom: .6rem; }
.card p { margin: 0; color: var(--body); }
.card-accent { background: var(--accent); border-color: var(--accent); }
.card-accent h3 { color: #fff; font-family: var(--serif); font-weight: 500; font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -.01em; }
.card-accent p { color: #FFF1EA; font-size: 1.08rem; max-width: 40rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: 1.25rem 0 0; padding: 0; }
.chips li {
  padding: .3rem .8rem; border-radius: 999px; font: 500 .9rem/1.4 var(--sans);
  background: var(--accent-soft); color: var(--soft-ink);
}
.chips li:lang(he) { font-family: var(--hebrew); font-size: 1rem; }

/* Showcase */
.showcase-grid { display: grid; gap: 3.5rem; align-items: center; }
.phone-alt { justify-self: center; }
.showcase-copy h2 { margin-bottom: 1.25rem; }
.showcase-copy > p { max-width: 32rem; }
.callout {
  margin-top: 2rem; padding: 1.5rem 1.6rem; max-width: 34rem;
  border-inline-start: 3px solid var(--accent); background: var(--card);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.callout h3 { font-size: 1rem; text-transform: uppercase; letter-spacing: .1em; color: var(--accent-deep); margin-bottom: .5rem; }
.callout p { margin: 0; font-size: .98rem; }

/* Values */
.values { display: grid; gap: 2.5rem; }
.values > div { padding-top: 1.5rem; border-top: 1.5px solid var(--ink); }
.values h3 { font-family: var(--serif); font-weight: 500; font-size: 1.6rem; margin-bottom: .6rem; }
.values p { margin: 0; max-width: 30rem; }

/* FAQ */
.faq-grid { display: grid; gap: 1rem; }
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.3rem 0; font-weight: 600; font-size: 1.1rem; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none; width: 2rem; height: 2rem; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-deep);
  font-size: 1.3rem; line-height: 1; transition: transform .25s ease, background-color .25s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); background: var(--accent); color: #fff; }
.faq details p { margin: 0 0 1.4rem; max-width: 36rem; animation: fade-in .3s ease both; }

/* Closing */
.closing { background: var(--accent); color: #fff; text-align: center; padding-block: var(--section-y); position: relative; overflow: hidden; }
.closing-inner { position: relative; }
.closing-he { font-family: var(--hebrew); font-size: clamp(2.6rem, 9vw, 5rem); color: rgba(255, 255, 255, .92); margin: 0 0 1rem; line-height: 1.3; }
.closing h2 { color: #fff; max-width: 34rem; margin-inline: auto; margin-bottom: 1rem; }
.closing p { color: #FFF1EA; margin-bottom: 2rem; }
.closing .cta-row { margin-top: .5rem; }
.closing .button { word-break: break-word; }

/* ---------- Footer ---------- */
.site-footer { padding-block: 3rem 3.25rem; border-top: 1px solid var(--line); }
.footer-inner { display: grid; gap: 1.75rem; }
.footer-brand p { margin: .6rem 0 0; font-size: .95rem; color: var(--muted); }
.footer-nav { display: flex; flex-wrap: wrap; gap: .5rem 1.75rem; }
.footer-nav a { color: var(--soft-ink); text-decoration: none; font-weight: 500; padding-block: .35rem; }
.footer-nav a:hover { color: var(--ink); text-decoration: underline; }
.copyright { margin: 0; font-size: .9rem; color: var(--muted); }

/* ---------- Legal pages ---------- */
.legal-page .site-header { border-bottom: 1px solid var(--line); margin-bottom: 0; }
.legal-page main:not(.legal-content) { padding-block: clamp(2.5rem, 7vw, 5rem) var(--section-y); }
.legal-content { max-width: 44rem; margin-inline: auto; font-size: 1.05rem; line-height: 1.75; }
.legal-content > header { margin-bottom: 2.5rem; padding-bottom: 2rem; border-bottom: 1px solid var(--line); }
.legal-content h1 {
  font-family: var(--serif); font-weight: 500; letter-spacing: -.03em;
  font-size: clamp(2.4rem, 7vw, 3.8rem); line-height: 1.04; margin-bottom: 1rem;
}
.legal-content h2 {
  font-size: clamp(1.45rem, 3.2vw, 1.85rem); letter-spacing: -.015em; line-height: 1.2;
  margin: 3rem 0 1rem; padding-top: 2rem; border-top: 1px solid var(--line);
}
.legal-content h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 2.25rem; }
.legal-content h3 { font-size: 1.15rem; margin: 2rem 0 .5rem; }
.legal-content p, .legal-content li { max-width: 40rem; }
.legal-content ul, .legal-content ol { padding-inline-start: 1.4rem; margin: 0 0 1.25em; }
.legal-content li { margin-bottom: .5em; }
.legal-content li::marker { color: var(--accent); }
.legal-content strong { color: var(--ink); }
.legal-content code { font: .92em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--soft); padding: .1em .4em; border-radius: 5px; }
.legal-content hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
.legal-content table { width: 100%; border-collapse: collapse; margin: 0 0 1.5rem; font-size: .96rem; display: block; overflow-x: auto; }
.legal-content th, .legal-content td { text-align: left; padding: .7rem .9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal-content th { color: var(--ink); font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; }
.legal-content blockquote { margin: 1.5rem 0; padding: .2rem 0 .2rem 1.25rem; border-inline-start: 3px solid var(--accent); color: var(--soft-ink); }
.legal-meta, .legal-date { margin: 0; font-size: .92rem; color: var(--muted); }
.legal-lede, .legal-lead { font-size: 1.2rem; line-height: 1.6; color: var(--body); margin: 0 0 1rem; }
.legal-note {
  margin: 1.75rem 0; padding: 1.1rem 1.3rem; background: var(--card); border: 1px solid var(--line);
  border-inline-start: 3px solid var(--accent); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: .98rem;
}
.legal-note > :last-child { margin-bottom: 0; }
.legal-toc { margin: 0 0 2rem; padding: 1.25rem 1.5rem; background: var(--soft); border-radius: var(--radius-sm); }
.legal-toc h2 { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 .6rem; padding: 0; border: 0; font-family: var(--sans); }
.legal-toc ol { margin: 0; }
.legal-back { display: inline-block; margin-bottom: 1.75rem; font-weight: 600; text-decoration: none; color: var(--soft-ink); }
.legal-back:hover { color: var(--ink); text-decoration: underline; }
.legal-contact { margin-top: 3rem; padding: 1.75rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.legal-contact h2 { border: 0; padding: 0; margin: 0 0 .5rem; font-size: 1.4rem; }
.legal-contact p { margin: 0; }

/* ---------- Motion ---------- */
@keyframes rise { from { transform: translateY(16px); } to { transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.hero-copy > * { animation: rise .8s cubic-bezier(.2, .7, .2, 1) both; }
.hero-copy > :nth-child(2) { animation-delay: .08s; }
.hero-copy > :nth-child(3) { animation-delay: .16s; }
.hero-copy > :nth-child(4) { animation-delay: .24s; }
.hero-copy > :nth-child(5) { animation-delay: .32s; }
.hero-visual .phone { animation: rise 1s .15s cubic-bezier(.2, .7, .2, 1) both; }
.hero-note { animation: rise 1s .5s cubic-bezier(.2, .7, .2, 1) both, float 7s 1.6s ease-in-out infinite; }

/* ---------- Responsive ---------- */
@media (max-width: 43.75em) { /* ≤ 700px */
  .site-header { padding-block: 1rem .5rem; }
  .header-cta { display: none; }
  .nav { width: 100%; margin: 0; justify-content: space-between; gap: .75rem; border-top: 1px solid var(--line); padding-top: .6rem; }
  .nav a { font-size: .92rem; padding: .55rem 0; }
  .hero-note { left: 2%; bottom: 6%; }
  .button { width: 100%; }
  .steps li { padding-left: 3.6rem; }
  .step-num { font-size: 2.8rem; }
}
@media (min-width: 48em) { /* ≥ 768px */
  .features { grid-template-columns: repeat(6, 1fr); }
  .features .card { grid-column: span 3; }
  .features .card-accent { grid-column: span 6; }
  .steps { grid-template-columns: repeat(3, 1fr); border-top: 0; column-gap: 2.5rem; }
  .steps li { padding: 2.25rem 0 0; border-bottom: 0; border-top: 1.5px solid var(--ink); }
  .step-num { position: static; display: block; font-size: 4rem; margin-bottom: 1rem; }
  .values { grid-template-columns: 1fr 1fr; gap: 4rem; }
  .faq-grid { grid-template-columns: 1fr 1.5fr; gap: 4rem; align-items: start; }
  .faq-grid .section-head { margin-bottom: 0; }
  .showcase-grid { grid-template-columns: .9fr 1.1fr; gap: 5rem; }
  .footer-inner { grid-template-columns: 1fr auto; align-items: end; }
  .copyright { grid-column: 1 / -1; padding-top: 1.5rem; border-top: 1px solid var(--line); }
}
@media (min-width: 60em) { /* ≥ 960px */
  .hero-grid { grid-template-columns: 1.15fr .85fr; }
  .words-grid { grid-template-columns: .9fr 1.1fr; gap: 6rem; align-items: center; }
  .phone { width: 17rem; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important;
    transition-duration: .001ms !important;
  }
  .button:hover { transform: none; }
}

/* ---------- Forced colors / print ---------- */
@media (forced-colors: active) {
  .button, .phone-screen { border: 2px solid CanvasText; }
  .sun { display: none; }
}
@media print {
  .skip-link, .nav, .header-cta, .hero-visual, .closing { display: none; }
  body { background: #fff; }
  .words { background: none; color: #000; }
  .words h2, .scripture .he, .scripture .tr, .scripture .en { color: #000; }
}
