/* evenpaz — layout & type.
   No colour literals in this file: everything comes from colors.css.
   Logical properties throughout (inline-start/end) so RTL needs no overrides. */

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

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

body {
  margin: 0;
  background: var(--ep-sand);
  color: var(--ep-ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
               "Noto Sans", "Noto Naskh Arabic", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Arabic wants a touch more line height and slightly larger glyphs */
html[lang="ar"] body { font-size: 18px; line-height: 1.85; }

.wrap { width: min(100% - 2.5rem, 62rem); margin-inline: auto; }

a { color: inherit; text-decoration-color: var(--ep-clay); text-underline-offset: 3px; }
a:hover { color: var(--ep-clay); }

:focus-visible { outline: 3px solid var(--ep-focus); outline-offset: 3px; border-radius: 4px; }

/* --- header --------------------------------------------------------------- */
.site-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-block: 1.6rem;
}
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; }
.brand svg { inline-size: 30px; block-size: 30px; flex: none; }
.brand span { font-size: 1.45rem; letter-spacing: .005em; }

/* --- hero ----------------------------------------------------------------- */
.hero { text-align: center; padding-block: clamp(3.5rem, 12vh, 8rem) clamp(3rem, 9vh, 6rem); }
.hero .mark { inline-size: clamp(112px, 20vw, 168px); block-size: auto; margin-inline: auto; display: block; }

h1 {
  font-size: clamp(2.4rem, 7vw, 4rem);
  line-height: 1.1; font-weight: 500; letter-spacing: -0.02em;
  margin: clamp(2rem, 5vh, 3rem) 0 0;
}
.tagline { color: var(--ep-clay); font-style: italic; margin: .5rem 0 0; font-size: 1.05rem; }
.lede {
  color: var(--ep-ink-muted); font-size: clamp(1.05rem, 2.4vw, 1.3rem);
  margin: 1.4rem auto 0; max-width: 34ch;
}

/* --- pillars -------------------------------------------------------------- */
.pillars {
  display: grid; gap: 1px; background: var(--ep-line);
  border: 1px solid var(--ep-line); border-radius: var(--ep-radius-card);
  overflow: hidden; margin-block: clamp(2rem, 6vh, 4rem);
}
@media (min-width: 46rem) { .pillars { grid-template-columns: repeat(3, 1fr); } }
.pillar { background: var(--ep-sand-deep); padding: 2rem 1.75rem; }
.pillar h2 { font-size: 1.06rem; font-weight: 600; margin: 0 0 .5rem; letter-spacing: .005em; }
.pillar p { margin: 0; color: var(--ep-ink-muted); font-size: .97rem; }

/* --- manifesto ------------------------------------------------------------ */
.manifesto {
  text-align: center; margin-block: clamp(3rem, 9vh, 6rem);
  font-size: clamp(1.2rem, 3.4vw, 1.75rem); line-height: 1.45;
  max-width: 30ch; margin-inline: auto; font-weight: 400;
  border: 0; padding: 0;
}
.manifesto::before,
.manifesto::after { content: none; }

/* --- signup --------------------------------------------------------------- */
.signup { text-align: center; padding-block: clamp(2rem, 6vh, 3.5rem); }
.signup h2 { font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 500; margin: 0 0 .6rem; }
.signup p { color: var(--ep-ink-muted); margin: 0 auto 1.8rem; max-width: 40ch; }

.form { display: flex; flex-wrap: wrap; gap: .7rem; justify-content: center; max-width: 34rem; margin-inline: auto; }
.form input[type="email"] {
  flex: 1 1 16rem; min-inline-size: 0;
  padding: .95rem 1.25rem; font: inherit; font-size: 1rem;
  color: var(--ep-ink); background: var(--ep-sand-deep);
  border: 1px solid var(--ep-line); border-radius: var(--ep-radius);
}
.form input::placeholder { color: var(--ep-ink-muted); opacity: .75; }
.form button {
  flex: 0 0 auto; padding: .95rem 2rem; font: inherit; font-size: 1rem; font-weight: 600;
  color: var(--ep-on-clay); background: var(--ep-clay);
  border: 0; border-radius: var(--ep-radius); cursor: pointer;
  transition: background .15s ease;
}
.form button:hover { background: var(--ep-clay-strong); }
.form-msg { margin-block-start: 1rem; min-block-size: 1.5rem; font-size: .95rem; color: var(--ep-clay); }

/* --- faq (present for AEO; visually quiet) -------------------------------- */
.faq { margin-block: clamp(2.5rem, 7vh, 4rem); max-width: 44rem; margin-inline: auto; }
.faq details {
  border-block-end: 1px solid var(--ep-line); padding-block: 1rem;
}
.faq summary { cursor: pointer; font-weight: 500; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: inline-end; color: var(--ep-clay); font-size: 1.2rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq p { color: var(--ep-ink-muted); margin: .7rem 0 0; font-size: .97rem; }

/* --- footer --------------------------------------------------------------- */
.site-foot {
  border-block-start: 1px solid var(--ep-line);
  padding-block: 2rem 3rem; margin-block-start: 2rem;
  display: flex; flex-wrap: wrap; gap: 1rem 1.75rem;
  align-items: center; justify-content: space-between;
  font-size: .9rem; color: var(--ep-ink-muted);
}
.langs { display: flex; flex-wrap: wrap; gap: .35rem 1rem; margin: 0; padding: 0; list-style: none; }
.langs a { text-decoration: none; }
.langs [aria-current="true"] { color: var(--ep-clay); font-weight: 600; }
.foot-links { display: flex; gap: 1.25rem; }

/* --- the rotating ring ----------------------------------------------------
   One node is lit and moves around the circle. This is the whole idea,
   stated visually and explained nowhere. Seven nodes, 2.1s each.        */
.node { fill: var(--ep-sand); stroke: var(--ep-clay); stroke-width: 5; }
.node.lit { animation: ep-lit 14.7s infinite; }
.node.lit:nth-of-type(1) { animation-delay: 0s; }
@keyframes ep-lit {
  0%, 12%   { fill: var(--ep-clay); }
  14.3%,100%{ fill: var(--ep-sand); }
}
.mark .n1 { animation-delay:  0.0s; }
.mark .n2 { animation-delay:  2.1s; }
.mark .n3 { animation-delay:  4.2s; }
.mark .n4 { animation-delay:  6.3s; }
.mark .n5 { animation-delay:  8.4s; }
.mark .n6 { animation-delay: 10.5s; }
.mark .n7 { animation-delay: 12.6s; }

@media (prefers-reduced-motion: reduce) {
  .node.lit { animation: none; }
  .mark .n1 { fill: var(--ep-clay); }
}

@media print { .signup, .langs { display: none; } }

/* --- header language switcher -------------------------------------------
   Present so a visitor sees their own language exists before the browser
   offers to translate the page (which would also mangle the brand name). */
.head-langs .langs { gap: .3rem .85rem; font-size: .84rem; }
.head-langs a { color: var(--ep-ink-muted); text-decoration: none; }
.head-langs a:hover { color: var(--ep-clay); }
.head-langs [aria-current="true"] { color: var(--ep-clay); font-weight: 600; }
@media (max-width: 32rem) { .head-langs { inline-size: 100%; } .site-head { flex-wrap: wrap; } }
