/* evenzza content pages: /guide, /guide/*, /eva
   Static, prerendered, no framework. Shipped as a plain file so nginx serves
   it before the SPA fallback and Google gets real HTML on first request.
   Bump the ?v= query in each page when this changes; nginx caches css immutable for a year. */

:root {
  /* Brand identity, from DESIGN.md. These are the two voices: plum is authority, coral is action. */
  --plum: #77036c;
  --plum-hover: #9f2eb6;
  --plum-wash: #faf4fc;
  --plum-light: #d8b7ff;
  --coral: #fd5432;
  --coral-warm: #fd7053;

  /* Neutrals tinted toward the brand hue. Nothing here is pure black or pure white. */
  --ink: oklch(0.245 0.014 330);
  --body: oklch(0.395 0.011 330);
  --soft: oklch(0.545 0.009 330);
  --ground: oklch(0.985 0.004 330);
  --raised: oklch(0.997 0.002 330);
  --rule: oklch(0.915 0.007 330);
  --rule-soft: oklch(0.952 0.005 330);

  /* Fluid scale, ~1.3 between steps. Hebrew needs generous leading; body runs at 1.8. */
  --t-display: clamp(2.5rem, 6.4vw, 4.75rem);
  --t-h1: clamp(2rem, 4.4vw, 3.15rem);
  --t-h2: clamp(1.45rem, 2.5vw, 1.95rem);
  --t-h3: clamp(1.15rem, 1.7vw, 1.35rem);
  --t-lead: clamp(1.15rem, 1.7vw, 1.4rem);
  --t-body: clamp(1.04rem, 1.15vw, 1.14rem);
  --t-small: 0.95rem;
  --t-label: 0.78rem;

  --measure: 63ch;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --shell: 74rem;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--body);
  font-family: "Noto Sans Hebrew", system-ui, -apple-system, sans-serif;
  font-size: var(--t-body);
  line-height: 1.8;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--plum); text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
a:hover { color: var(--plum-hover); }

h1, h2, h3 {
  color: var(--ink);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.012em;
  margin: 0;
  text-wrap: balance;
}

.shell { max-width: var(--shell); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- top bar ---------- */

.topbar {
  border-block-end: 1px solid var(--rule-soft);
  background: var(--raised);
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { width: 7.25rem; height: auto; }
.topbar__actions { display: flex; align-items: center; gap: clamp(0.75rem, 2.5vw, 1.5rem); }
.topbar a.up { color: var(--soft); text-decoration: none; font-size: var(--t-small); font-weight: 600; white-space: nowrap; }
.topbar a.up:hover { color: var(--plum); }

/* The sticky bar carries the only way out of a long article, so the CTA rides
   along with the reader. Outline, not filled: the solid gradient button belongs
   to the end of the page, and two of them competing flattens the hierarchy.
   Colours follow components/Button's `transparent-orange` variant. */
.btn.btn--sm {
  height: 32px;
  padding: 0 0.85rem;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  background: transparent;
  color: var(--coral);
  border: 1px solid var(--coral);
}
.btn.btn--sm:hover {
  background: #ffeeeb;
  color: var(--coral);
  opacity: 1;
}

@media (max-width: 30rem) {
  .topbar a.up { display: none; }
}

/* ---------- Zz watermark ---------- */
/* ONE oversized ZZ per surface, bled off an edge. Not a repeating pattern:
   at page scale the mark has to read as the logo, not as wallpaper. Every
   host needs position:relative AND overflow:hidden, or the mark pushes the
   page sideways. */

.page { position: relative; overflow: hidden; }

.zz {
  position: absolute;
  height: auto;
  pointer-events: none;
  fill: var(--plum);
  z-index: 0;
}
.zz--page { width: 72%; bottom: 7%; inset-inline-start: -15%; opacity: 0.045; }
.zz--hero { width: 54%; top: -34%; inset-inline-start: -12%; opacity: 0.05; }
.zz--head { width: 78%; top: -58%; inset-inline-start: -20%; opacity: 0.05; }

@media (max-width: 48rem) {
  .zz--page { width: 118%; bottom: 4%; inset-inline-start: -30%; }
  .zz--hero { width: 82%; top: -14%; }
  .zz--head { width: 100%; top: -26%; }
}

/* ---------- heroes ---------- */

/* The hero sits on the same ground as the page. The brand shows in the title,
   not in a coloured slab behind it. */
.hero {
  padding-block: clamp(3.5rem, 8vw, 6rem) clamp(2.5rem, 5vw, 4rem);
  position: relative;
  overflow: hidden;
}
.hero > *:not(.zz) { position: relative; z-index: 1; }
.hero h1 { color: var(--plum); font-size: var(--t-display); letter-spacing: -0.022em; max-width: 17ch; }
.hero .lead { color: var(--soft); font-size: var(--t-lead); max-width: 46ch; margin-block-start: 1.5rem; line-height: 1.65; }
.eyebrow {
  display: inline-block;
  font-size: var(--t-label);
  font-weight: 700;
  letter-spacing: 0.09em;
  color: var(--coral);
  margin-block-end: 1.4rem;
}

/* Restrained: article headers stay on the light ground so long Hebrew stays readable. */
.masthead {
  padding-block: clamp(2.75rem, 6vw, 4.5rem) clamp(1.5rem, 3vw, 2.5rem);
  position: relative;
}
.masthead > *:not(.zz) { position: relative; z-index: 1; }
.masthead .eyebrow { color: var(--coral); }
.masthead h1 { color: var(--plum); font-size: var(--t-h1); max-width: 20ch; }
.masthead .lead {
  font-size: var(--t-lead);
  color: var(--soft);
  max-width: var(--measure);
  margin-block-start: 1.1rem;
  line-height: 1.65;
}

/* ---------- hub index ---------- */
/* Deliberately not a card grid. Numbered rows, full-bleed hover, arrow that moves. */

.index { border-block-start: 1px solid var(--rule); margin-block-start: clamp(2.5rem, 6vw, 4rem); }

.row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  padding-block: clamp(1.5rem, 3vw, 2.1rem);
  border-block-end: 1px solid var(--rule);
  text-decoration: none;
  color: inherit;
  transition: background-color 0.35s var(--ease);
  position: relative;
}
.row::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline: calc(var(--gutter) * -0.5);
  background: var(--plum-wash);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
  z-index: -1;
  border-radius: 12px;
}
.row:hover::before { opacity: 1; }
.row__when {
  font-size: var(--t-label);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--plum);
  background: var(--plum-wash);
  border: 1px solid var(--plum-light);
  border-radius: 9999px;
  padding: 0.35rem 0.8rem;
  white-space: nowrap;
  line-height: 1.3;
  transition: background-color 0.35s var(--ease), border-color 0.35s var(--ease);
}
.row:hover .row__when { background: #fff2ee; border-color: var(--coral); color: var(--coral); }
.row__t { display: block; font-size: var(--t-h3); font-weight: 800; color: var(--ink); margin-block-end: 0.3rem; }
.row__d { display: block; font-size: var(--t-small); color: var(--soft); line-height: 1.6; max-width: 54ch; }
.row__a { color: var(--coral); font-size: 1.5rem; line-height: 1; transition: transform 0.35s var(--ease); }
.row:hover .row__a { transform: translateX(0.45rem); }

/* ---------- coverage list ---------- */
/* Two columns of name + one line. Not cards: the point is the breadth of the
   list, so the rules between rows carry it and nothing gets card chrome. */

.covers-wrap { padding-block: clamp(3rem, 6vw, 4.5rem) 0; }
.covers-wrap h2 { font-size: var(--t-h2); margin-block-end: 0.7rem; }
.covers-wrap > p { max-width: var(--measure); color: var(--soft); margin-block-end: 0; }

.covers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 0 clamp(1.5rem, 4vw, 3.5rem);
  list-style: none;
  padding: 0;
  margin-block: 1.6rem 0;
  border-block-start: 1px solid var(--rule);
}
.covers li { margin: 0; padding-block: 1.15rem; border-block-end: 1px solid var(--rule); }
.covers b { display: block; color: var(--ink); font-weight: 700; }
.covers span { display: block; font-size: var(--t-small); color: var(--soft); line-height: 1.6; }

/* ---------- prose ---------- */

.prose { max-width: var(--measure); padding-block-end: clamp(2rem, 5vw, 3.5rem); }
.prose h2 { font-size: var(--t-h2); margin-block: clamp(2.5rem, 5vw, 3.5rem) 0.85rem; }
.prose h3 { font-size: var(--t-h3); margin-block: 2rem 0.6rem; }
.prose p { margin-block: 0 1.25rem; }
.prose ul, .prose ol { margin-block: 0 1.5rem; padding-inline-start: 1.3rem; }
.prose li { margin-block-end: 0.6rem; }
.prose li::marker { color: var(--coral); font-weight: 700; }
.prose strong { color: var(--ink); font-weight: 700; }

/* Breaks the measure once per page. The only place coral runs as a large surface. */
.pull {
  margin-block: clamp(2.5rem, 5vw, 3.5rem);
  padding-inline-start: 0;
  max-width: 34rem;
  font-size: clamp(1.3rem, 2.4vw, 1.75rem);
  font-weight: 800;
  line-height: 1.35;
  color: var(--plum);
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.pull::before {
  content: "";
  display: block;
  width: 3.25rem;
  height: 4px;
  background: var(--coral);
  border-radius: 2px;
  margin-block-end: 1.25rem;
}

/* ---------- template gallery ---------- */
/* Real product mockups, so the grid is the honest affordance here: the image IS the content.
   No card chrome, no icon-heading-text repetition. */

.templates {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: clamp(1rem, 2.4vw, 1.6rem);
  margin-block: clamp(1.75rem, 4vw, 2.5rem) clamp(2rem, 4vw, 3rem);
  list-style: none;
  padding: 0;
}
.templates li { margin: 0; }
.templates img {
  border-radius: 12px;
  border: 1px solid var(--rule);
  background: var(--raised);
  aspect-ratio: 9 / 16;
  object-fit: cover;
  object-position: top center;
  width: 100%;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease);
}
.templates li:hover img { transform: translateY(-4px); border-color: var(--plum-light); }
.templates b {
  display: block;
  font-size: var(--t-small);
  color: var(--ink);
  font-weight: 700;
  margin-block-start: 0.65rem;
  letter-spacing: 0;
}

figure { margin: clamp(2.5rem, 5vw, 3.5rem) 0; }
figure img { border-radius: 14px; border: 1px solid var(--rule); background: var(--raised); }
figcaption { font-size: var(--t-small); color: var(--soft); margin-block-start: 0.75rem; }

/* ---------- eva capability list ---------- */

.does { list-style: none; margin: 2rem 0 0; padding: 0; border-block-start: 1px solid var(--rule); }
.does li {
  padding-block: 1.1rem;
  border-block-end: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.2rem;
  margin: 0;
}
.does b { color: var(--ink); font-weight: 700; }
.does span { font-size: var(--t-small); color: var(--soft); line-height: 1.6; }

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

.cta {
  background: var(--plum-wash);
  border: 1px solid var(--plum-light);
  border-radius: 16px;
  padding: clamp(1.75rem, 4vw, 2.75rem);
  margin-block: clamp(2.5rem, 5vw, 3.5rem);
  max-width: var(--measure);
}
.cta h2 { font-size: var(--t-h3); margin: 0 0 0.5rem; }
.cta p { margin: 0 0 1.5rem; color: var(--body); font-size: var(--t-small); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(90deg, #fd4e2b -5.4%, #fd7053 120.19%);
  color: #ffffff;
  font-weight: 700;
  font-size: 16px;
  line-height: 19.6px;
  height: 56px;
  padding: 16px 34px;
  border-radius: 50px;
  text-decoration: none;
  box-sizing: border-box;
  transition: opacity 0.25s var(--ease);
}
.btn:hover { opacity: 0.9; color: #ffffff; }

/* ---------- related ---------- */

.related { border-block-start: 1px solid var(--rule); padding-block: clamp(2rem, 4vw, 3rem); }
.related h2 { font-size: var(--t-h3); margin-block-end: 1.25rem; }
.related ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.85rem; }
.related a { font-weight: 700; color: var(--ink); text-decoration: none; }
.related a:hover { color: var(--plum); }
.related span { color: var(--coral); }

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

.foot {
  border-block-start: 1px solid var(--rule);
  padding-block: 2.5rem 3.5rem;
  color: var(--soft);
  font-size: var(--t-small);
}
.foot nav { display: flex; flex-wrap: wrap; gap: 0.6rem 1.5rem; margin-block-end: 1.25rem; }
.foot a { color: var(--soft); text-decoration: none; }
.foot a:hover { color: var(--plum); }

/* ---------- entrance ---------- */

@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise 0.75s var(--ease) both; }

  /* Scroll reveal with zero JS. Browsers without scroll-driven animations simply
     get the static page, which is the correct fallback for a reading surface. */
  @supports (animation-timeline: view()) {
    .row,
    .templates li,
    .prose figure,
    .prose .pull {
      animation: rise 0.6s var(--ease) both;
      animation-timeline: view();
      animation-range: entry 4% cover 20%;
    }
  }
  .rise:nth-child(2) { animation-delay: 0.07s; }
  .rise:nth-child(3) { animation-delay: 0.14s; }
  .rise:nth-child(4) { animation-delay: 0.21s; }
  @keyframes rise {
    from { opacity: 0; transform: translateY(0.9rem); }
    to { opacity: 1; transform: none; }
  }
}

@media (max-width: 34rem) {
  .row { grid-template-columns: auto 1fr; }
  .row__a { display: none; }
  body { line-height: 1.75; }
}
