/* Shared Zigmi landing-page tokens and primitives. The colors come from the
   Flutter Sanctuary theme so the public site and app feel related. */

:root {
  --cream: #f7f5fa;
  --plum-950: #0e0913;
  --plum-900: #1b1126;
  --plum-800: #271836;
  --plum-700: #321f47;
  --plum: #4a2d6b;
  --plum-lit: #5b3a82;
  --plum-300: #9879ba;
  --lavender: #c9b7da;
  --lavender-100: #e5dded;
  --gold-100: #fff0d4;
  --gold-300: #ffc96e;
  --gold: #d4a24c;
  --gold-600: #9a712c;
  --ink: #19171e;
  --ink-soft: #595462;
  --ink-mute: #8a8494;
  --line: #e6e4ea;
  --white: #fff;
  --rose: #c4756a;
  --rose-300: #dda9a1;
  --sage: #7a9b7e;
  --sage-300: #a3c1a8;
  --page: min(1180px, calc(100% - 48px));
  --shadow-lg: 0 32px 80px rgb(27 17 38 / 18%);
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

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

body, button, a, input { font-family: inherit; }
a { color: inherit; }
button { color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, blockquote, figure { margin: 0; }
h1, h2, h3 { font-family: var(--display); text-wrap: balance; }
p { line-height: 1.6; }
ul, ol { margin: 0; padding: 0; list-style: none; }

/* Hebrew never gets Latin tracking: the tokens below zero it out per script. */
html[data-lang="he"] :is(h1, h2, h3, .eyebrow, .label) { letter-spacing: 0; }

.skip-link {
  position: fixed;
  inset-block-start: 12px;
  inset-inline-start: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--white);
  color: var(--plum);
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

.container { width: var(--page); margin-inline: auto; }

/* ---------- nav ---------- */
.site-header { position: absolute; inset: 0 0 auto; z-index: 20; }
.nav-shell {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  min-height: 84px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.zigmi-mark { width: 28px; height: 28px; overflow: visible; flex: none; }
.zigmi-mark path {
  fill: none;
  stroke: currentcolor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav-links, .nav-actions, .language-toggle, .button-row { display: flex; align-items: center; }
.nav-links { gap: 28px; }
.nav-links a { font-size: 15px; font-weight: 500; text-decoration: none; opacity: 0.85; }
.nav-links a:hover { opacity: 1; }
.nav-shell > .wordmark { justify-self: start; }
.nav-actions { gap: 14px; justify-self: end; }
.nav-login { font-weight: 600; font-size: 15px; text-decoration: none; opacity: 0.85; }
.nav-login:hover { opacity: 1; }

.language-toggle {
  gap: 2px;
  padding: 3px;
  border: 1px solid currentcolor;
  border-radius: 999px;
  opacity: 0.8;
}
.language-toggle button {
  min-width: 36px;
  padding: 5px 9px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}
.language-toggle button[aria-pressed="true"] {
  background: var(--white);
  box-shadow: 0 1px 5px rgb(14 9 19 / 18%);
  color: var(--plum-900);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms var(--ease-out), box-shadow 180ms ease, background 180ms ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible,
.nav-links a:focus-visible,
.nav-login:focus-visible,
.language-toggle button:focus-visible { outline: 3px solid var(--gold-300); outline-offset: 4px; }

/* ---------- labels ---------- */
.eyebrow, .label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.eyebrow::before { width: 22px; height: 1px; background: currentcolor; content: ""; }

/* ---------- language switching (EN/HE twins in the markup) ---------- */
[data-copy="he"] { display: none !important; }
html[data-lang="he"] [data-copy="en"] { display: none !important; }
html[data-lang="he"] [data-copy="he"] { display: revert !important; }

/* ---------- reveal: visible at rest, animates in when it enters ---------- */
.reveal { opacity: 1; }
.js .reveal.is-visible { animation: reveal-in 720ms var(--ease-out) both; }
@keyframes reveal-in {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}
.js .reveal.is-visible[data-delay="1"] { animation-delay: 120ms; }
.js .reveal.is-visible[data-delay="2"] { animation-delay: 240ms; }
.js .reveal.is-visible[data-delay="3"] { animation-delay: 360ms; }

/* ---------- footer ---------- */
.site-footer { padding: 40px 0; }
.footer-shell { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; font-size: 14px; }
.footer-links a { opacity: 0.75; text-decoration: none; }
.footer-links a:hover { opacity: 1; }
.footer-meta { margin-top: 6px; opacity: 0.6; font-size: 13px; }

@media (max-width: 820px) {
  :root { --page: min(100% - 32px, 680px); }
  .nav-shell { min-height: 72px; grid-template-columns: 1fr auto; }
  .nav-links { display: none; }
  .footer-shell { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 520px) {
  .wordmark { font-size: 21px; }
  .zigmi-mark { width: 24px; height: 24px; }
  .button-row { align-items: stretch; flex-direction: column; }
  .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
