/* Dana Studio — one shared style for every page (home, privacy, support).
   Every page carries Hebrew and English; site.js shows one at a time
   and handles the light/dark switch. */
:root {
  --paper: #FFFFFF;
  --ink: #171717;
  --muted: #625F58;
  --gold: #B08A3E;
  --acc-inventory: #8A6A26; --acc-milim: #9C5426; --acc-ringo: #B8452A;
  --line: #ECE6D8;
  --soft: #FAF8F3;
  --line-strong: #CFC5AE;
  --btn: #171717;
  --btn-text: #FFFFFF;
  --ease: cubic-bezier(.16, 1, .3, 1);
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0A0A0A; --ink: #F2EFE8; --muted: #A6A39C; --gold: #D2AE62;
    --acc-inventory: #D2AE62; --acc-milim: #E6A574; --acc-ringo: #F2876A;
    --line: #242322; --soft: #141413; --line-strong: #3B3A37;
    --btn: #F2EFE8; --btn-text: #0A0A0A;
  }
}
:root[data-theme="dark"] {
  --paper: #0A0A0A; --ink: #F2EFE8; --muted: #A6A39C; --gold: #D2AE62;
  --acc-inventory: #D2AE62; --acc-milim: #E6A574; --acc-ringo: #F2876A;
  --line: #242322; --soft: #141413; --line-strong: #3B3A37;
  --btn: #F2EFE8; --btn-text: #0A0A0A;
}

/* Each app has its own accent, taken from its icon. Outside an app: neutral. */
:root { --accent: var(--ink); }
[data-app="inventory"] { --accent: var(--acc-inventory); }
[data-app="milim"] { --accent: var(--acc-milim); }
[data-app="ringo"] { --accent: var(--acc-ringo); }

/* ===== Language: show only the active one (Hebrew by default) ===== */
:root:not([data-lang="en"]) [data-l="en"],
:root[data-lang="en"] [data-l="he"] { display: none !important; }

*, *::before, *::after { box-sizing: inherit; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Assistant", "Heebo", "Arial Hebrew", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-size-adjust: 100%;
}
.wrap { max-width: 640px; margin: 0 auto; padding: 20px 22px 48px; }
.wrap.narrow { max-width: 560px; }

h1, h2, .brand, .app-name { font-family: "Frank Ruhl Libre", "Times New Roman", serif; font-weight: 700; }
a { color: var(--ink); text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent); text-underline-offset: 3px; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }

/* ===== Top bar: home button, theme switch, language switch ===== */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 44px; margin-bottom: 24px; font-size: 15px;
}
.tools { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 6px 14px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: transparent; color: var(--ink);
  font: inherit; font-weight: 600; font-size: 15px; line-height: 1;
  text-decoration: none; cursor: pointer;
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.pill svg { width: 17px; height: 17px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.home-link { padding-inline-start: 6px; }
.home-link .mark {
  width: 28px; height: 28px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: #111111; color: #D2AE62;
  font-family: "Frank Ruhl Libre", Georgia, serif; font-weight: 700; font-size: 17px; line-height: 1;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 14%, transparent);
}
.theme-btn { width: 40px; padding: 0; }
.theme-btn .i-sun { display: none; }
:root[data-theme="dark"] .theme-btn .i-sun { display: block; }
:root[data-theme="dark"] .theme-btn .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme-btn .i-sun { display: block; }
  :root:not([data-theme]) .theme-btn .i-moon { display: none; }
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ===== Home: header ===== */
.home-head { text-align: center; margin: 20px 0 38px; }
.brand {
  font-size: clamp(20px, 6.2vw, 40px);
  line-height: 1.1;
  white-space: nowrap;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  letter-spacing: -0.01em;
  margin: 0;
  direction: ltr;
}
.brand .sep { color: var(--gold); font-weight: 500; margin: 0 .35em; }
.brand .b-en { justify-self: end; }
.brand .b-he { justify-self: start; }
.tagline { margin: 14px 0 0; color: var(--muted); }

/* ===== Home: app ===== */
.app { padding: 28px 0; border-top: 1px solid var(--line); }
.app:last-of-type { border-bottom: 1px solid var(--line); }
.app-head { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.app-icon {
  flex: none; width: 72px; height: 72px; border-radius: 17px; display: block;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 12%, transparent);
}
.app-name { font-size: 26px; line-height: 1.2; margin: 0; }
.app-lead { margin: 0 0 6px; font-weight: 700; font-size: 18px; line-height: 1.4; }
.app-desc { margin: 0 0 20px; color: var(--muted); max-width: 60ch; }
.app-devices {
  display: flex; align-items: flex-start; gap: 6px;
  margin: -8px 0 20px; font-size: 14px; line-height: 1.5; color: var(--muted);
}
.app-devices svg { flex: none; width: 16px; height: 16px; margin-top: 2px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.app-links { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 14px; font-size: 14px; }
.app-links a { color: var(--muted); }

/* Store buttons: Apple's official badge, and matching buttons for Google Play beta / coming soon */
.stores { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.badge, .store {
  flex: none; width: 156px; height: 52px; border-radius: 9px;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.badge { display: block; line-height: 0; }
.badge img { display: block; width: 100%; height: 100%; }
.badge .on-dark { display: none; }
:root[data-theme="dark"] .badge .on-light { display: none; }
:root[data-theme="dark"] .badge .on-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .badge .on-light { display: none; }
  :root:not([data-theme]) .badge .on-dark { display: block; }
}
.store {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  text-decoration: none;
  background: var(--btn); color: var(--btn-text); border: 1px solid var(--btn);
}
.badge:active, .store:active { transform: scale(.98); }
.store svg { flex: none; width: 20px; height: 20px; fill: currentColor; }
.store span { display: flex; flex-direction: column; line-height: 1.2; }
.store small { font-size: 11px; opacity: .8; }
.store strong { font-size: 16px; }
.store.soon { background: transparent; color: var(--muted); border: 1px dashed var(--line-strong); cursor: default; }
.store.beta { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.store.beta small { color: var(--accent); opacity: 1; font-weight: 600; }
.beta-note { margin: 12px 0 0; font-size: 14px; color: var(--muted); }
/* Screenshots. Phone: collapsed under a small button, a swipeable strip when open.
   Wide screens: always open, three small shots at the top of the card.
   Tapping a shot opens it large (site.js). */
.shots-box, .shots-box:last-of-type { margin-top: 16px; padding: 0; border: 0; }
.shots-box > summary {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 36px; padding: 6px 14px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  color: var(--ink); font-size: 14px; font-weight: 600;
  cursor: pointer; list-style: none; user-select: none;
}
.shots-box > summary::-webkit-details-marker { display: none; }
.shots-box > summary svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s var(--ease); }
.shots-box[open] > summary svg { transform: rotate(180deg); }
.shots {
  display: flex; gap: 8px;
  margin: 12px -22px 0; padding: 2px 22px 4px;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-inline: 22px;
  scrollbar-width: none;
}
.shots::-webkit-scrollbar { display: none; }
.shots img {
  flex: none; width: 112px; height: auto; aspect-ratio: 414 / 900;
  border-radius: 14px; scroll-snap-align: start; cursor: zoom-in;
  background: var(--soft);
  box-shadow: 0 0 0 1px var(--line);
}

/* Large view of one screenshot */
.viewer {
  border: 0; padding: 0; background: transparent; max-width: none; max-height: none;
  width: 100%; height: 100%; display: grid; place-items: center;
}
.viewer:not([open]) { display: none; }
.viewer::backdrop { background: rgba(0, 0, 0, .86); }
.viewer figure { margin: 0; display: grid; justify-items: center; gap: 12px; }
.viewer img {
  max-width: min(84vw, 414px); max-height: calc(100vh - 110px); width: auto; height: auto;
  border-radius: 22px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
  touch-action: pan-y;
}
.viewer figcaption {
  color: rgba(255, 255, 255, .75); font-size: 14px; font-weight: 600;
  direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums;
}
.viewer button {
  position: fixed; display: grid; place-items: center;
  width: 46px; height: 46px; border-radius: 50%; border: 0; padding: 0;
  background: rgba(255, 255, 255, .14); color: #fff; cursor: pointer;
  transition: background-color .2s var(--ease);
}
.viewer .v-close { top: max(16px, env(safe-area-inset-top)); inset-inline-end: 16px; font-size: 26px; line-height: 1; }
.viewer .v-nav { top: 50%; transform: translateY(-50%); }
.viewer .v-prev { inset-inline-start: max(12px, 3vw); }
.viewer .v-next { inset-inline-end: max(12px, 3vw); }
.viewer .v-nav svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* The chevron points left; flip it on whichever side points right */
:root[dir="ltr"] .viewer .v-next svg, :root[dir="rtl"] .viewer .v-prev svg { transform: scaleX(-1); }
.viewer.single .v-nav, .viewer.single figcaption { display: none; }
@media (hover: hover) { .viewer button:hover { background: rgba(255, 255, 255, .26); } }
/* Small phones: arrows sit low, over the dark area, so they don't cover the picture */
@media (max-width: 520px) {
  .viewer .v-nav { top: auto; bottom: max(14px, env(safe-area-inset-bottom)); transform: none; }
  .viewer img { max-height: calc(100vh - 150px); }
}

/* On Android the Google Play button comes first */
.is-android .store.play { order: -1; }

/* ===== Privacy / support pages ===== */
.page-head { display: flex; align-items: center; gap: 16px; }
.page-head .app-icon { width: 64px; height: 64px; border-radius: 15px; }
.page-head h1 { font-size: 30px; line-height: 1.2; margin: 0; }
.subtitle { margin: 2px 0 0; color: var(--muted); font-size: 16px; }
.page-side { margin-bottom: 24px; }
.page-side .updated { margin-top: 18px; }
h2 { font-size: 21px; line-height: 1.3; margin: 32px 0 8px; }
ul { padding-inline-start: 1.2em; margin: 8px 0; }
li { margin: 6px 0; }
.updated { color: var(--muted); font-size: 15px; margin: 0 0 8px; }

/* Privacy ↔ support, under the app title */
.page-nav {
  display: flex; gap: 4px; width: fit-content;
  margin: 18px 0 8px; padding: 4px;
  background: var(--soft); border: 1px solid var(--line); border-radius: 999px;
}
.page-nav a {
  padding: 7px 16px; border-radius: 999px;
  color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 600;
}
.page-nav a[aria-current="page"] {
  background: var(--paper); color: var(--ink);
  box-shadow: 0 0 0 1px var(--line), 0 1px 3px color-mix(in srgb, var(--ink) 10%, transparent);
}
.highlight {
  background: var(--soft); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 18px; margin: 20px 0;
}
.highlight p { margin: 0; }
.highlight p + p { margin-top: 8px; color: var(--muted); font-size: 15px; }
.highlight strong:first-child { color: var(--accent); }

/* FAQ */
details { border-top: 1px solid var(--line); padding: 14px 0; }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 700; list-style-position: inside; }
details p { margin: 10px 0 0; color: var(--muted); }
details ul { color: var(--muted); }

/* ===== Footer ===== */
footer { text-align: center; margin-top: 44px; color: var(--muted); font-size: 15px; }
footer p { margin: 6px 0; }

/* ===== Wide screens (computer, landscape tablet) ===== */
@media (min-width: 900px) {
  .wrap, .wrap.narrow { max-width: 1120px; padding: 28px 40px 56px; }
  .topbar { margin-bottom: 40px; }

  /* Home: apps side by side as cards */
  .home-head { margin: 32px 0 56px; }
  .brand { font-size: 48px; }
  .tagline { font-size: 19px; }
  .apps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: stretch; }
  .app, .app:last-of-type {
    display: flex; flex-direction: column;
    padding: 28px; border: 1px solid var(--line); border-radius: 20px; background: var(--soft);
  }
  .app-head { flex-direction: column; align-items: flex-start; gap: 16px; margin-bottom: 12px; }
  .app-name { font-size: 24px; }
  .app-desc { margin-bottom: 24px; }
  .shots-box { order: -1; margin: 0 0 22px; }
  .shots-box > summary { display: none; }
  .shots {
    margin: 0; padding: 0; overflow: hidden;
    display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 16px) / 3); gap: 8px;
  }
  .shots img { width: 100%; border-radius: 12px; }
  .app-links { margin-top: auto; padding-top: 18px; }

  /* Privacy / support: title column beside the text */
  .lang-block {
    display: grid; grid-template-columns: 260px minmax(0, 680px);
    gap: 72px; justify-content: center;
  }
  .page-side { position: sticky; top: 32px; align-self: start; }
  .page-side .page-head { flex-direction: column; align-items: flex-start; gap: 18px; }
  .page-side .app-icon { width: 88px; height: 88px; border-radius: 20px; }
  .page-side h1 { font-size: 34px; }
  .page-side .page-nav { flex-direction: column; width: 100%; margin-top: 28px; border-radius: 16px; }
  .page-side .page-nav a { border-radius: 12px; padding: 10px 14px; border-inline-start: 3px solid transparent; }
  .page-side .page-nav a[aria-current="page"] { border-inline-start-color: var(--accent); }
  .page-body > :first-child { margin-top: 0; }
  .page-body > h2:first-child { margin-top: 0; }
  footer { margin-top: 72px; }
}

::selection { background: color-mix(in srgb, var(--accent) 25%, transparent); color: var(--ink); }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px;
}
.badge:focus-visible, .store:focus-visible { border-radius: 9px; }
.pill:focus-visible { border-radius: 999px; }
@media (hover: hover) {
  a.store:hover, a.badge:hover { transform: translateY(-1px); box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--ink) 45%, transparent); }
  .pill:hover { border-color: var(--ink); background: var(--soft); }
  .page-nav a:not([aria-current]):hover, .app-links a:hover { color: var(--ink); }
  a:hover { text-decoration-thickness: 2px; }
}
@media (prefers-reduced-motion: reduce) { .store, .badge, .pill { transition: none; } }
