/* Idan Ron — editorial-light system */
:root {
  --paper: #f8f5ef;
  --paper-2: #f2eee5;
  --surface: #ffffff;
  --ink: #1b1a16;
  --muted: #6f6857;
  --line: #e5dfd2;
  --line-strong: #d9d2c2;
  --accent: #1f5c3d;
  --accent-hover: #173f2b;
  --accent-soft: #e8efe9;
  --serif: "Newsreader", Georgia, serif;
  --sans: "Instrument Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.container { max-width: 1120px; margin: 0 auto; padding: 0 32px; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* ---------- Mono label utility ---------- */
.mono {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.mono .idx { color: var(--accent); }

/* ---------- Nav ---------- */
nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 245, 239, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.logo {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.logo:hover { color: var(--ink); }
.logo span { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { color: var(--muted); font-size: 0.92rem; font-weight: 500; }
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 13px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.94rem;
  font-family: var(--sans);
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}
.btn-primary { background: var(--accent); color: #f4f8f4; }
.btn-primary:hover { background: var(--accent-hover); color: #f4f8f4; transform: translateY(-1px); }
.btn-ghost { border: 1px solid var(--line-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--ink); }
.btn-sm { padding: 9px 16px; font-size: 0.86rem; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 96px 0 88px; overflow: hidden; }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 34px 34px;
  -webkit-mask-image: radial-gradient(circle at 2% 0%, #000 0%, transparent 42%);
  mask-image: radial-gradient(circle at 2% 0%, #000 0%, transparent 42%);
  opacity: 0.4;
}
.hero .container {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.hero-copy { max-width: 640px; }
.hero-media { display: flex; justify-content: center; }
.hero-media img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  box-shadow: 0 24px 60px rgba(27, 26, 22, 0.12);
}

/* Hero engine animation */
.engine-anim { width: 100%; max-width: 460px; aspect-ratio: 1; }
.engine-anim svg { width: 100%; height: 100%; overflow: visible; }
.ea-ring { fill: none; stroke: var(--line-strong); stroke-width: 1; }
.ea-ring.faint { stroke: var(--line); }
.ea-spoke { stroke: var(--line); stroke-width: 1; }
.ea-sweep {
  fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round;
  stroke-dasharray: 140 645; opacity: 0.9;
  transform-box: fill-box; transform-origin: center;
  animation: eaSweep 6s linear infinite;
}
.ea-node { fill: var(--surface); stroke: var(--accent); stroke-width: 1.6; transform-box: fill-box; transform-origin: center; }
.ea-node.n1 { animation: eaPulse 6s ease-in-out infinite; }
.ea-node.n2 { animation: eaPulse 6s ease-in-out 1.5s infinite; }
.ea-node.n3 { animation: eaPulse 6s ease-in-out 3s infinite; }
.ea-node.n4 { animation: eaPulse 6s ease-in-out 4.5s infinite; }
.ea-core { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1; }
.ea-core-dot { fill: var(--accent); transform-box: fill-box; transform-origin: center; animation: eaCore 3s ease-in-out infinite; }
.ea-label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; fill: var(--muted); }
@keyframes eaSweep { to { transform: rotate(360deg); } }
@keyframes eaPulse { 0%, 100% { opacity: 0.4; transform: scale(0.82); } 50% { opacity: 1; transform: scale(1.12); } }
@keyframes eaCore { 0%, 100% { transform: scale(0.8); opacity: 0.7; } 50% { transform: scale(1.15); opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .ea-sweep, .ea-node, .ea-core-dot { animation: none; }
}

.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 26px; }
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  max-width: 16ch;
  text-wrap: pretty;
}
h1 .accent, h1 em { font-style: italic; color: var(--accent); }
.hero p.lead { margin-top: 28px; font-size: 1.2rem; color: var(--muted); max-width: 56ch; text-wrap: pretty; }
.hero-cta { margin-top: 40px; display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Sections ---------- */
section { padding: 88px 0; }
section.alt { background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 62ch; }
h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin-top: 14px;
  text-wrap: pretty;
}
.section-sub { margin-top: 16px; color: var(--muted); max-width: 56ch; font-size: 1.08rem; text-wrap: pretty; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 20px; margin-top: 48px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 1px 2px rgba(27, 26, 22, 0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(27, 26, 22, 0.07); border-color: var(--line-strong); }
.card .icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.card .icon svg { width: 22px; height: 22px; display: block; }
.card h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}
.card p { color: var(--muted); font-size: 0.96rem; }

/* ---------- Engine diagram (How It Works) ---------- */
.engine { margin-top: 56px; }
.engine-track { display: grid; grid-template-columns: repeat(4, 1fr); position: relative; }
.node { position: relative; padding-right: 26px; }
.node:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 26px;
  left: 52px;
  right: 0;
  height: 1px;
  background: var(--line-strong);
}
.node-dot {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent);
  position: relative;
  z-index: 1;
  box-shadow: 0 1px 2px rgba(27, 26, 22, 0.04);
}
.node h4 { font-family: var(--serif); font-weight: 500; font-size: 1.18rem; margin: 20px 0 8px; letter-spacing: -0.01em; }
.node p { color: var(--muted); font-size: 0.92rem; padding-right: 8px; }
.loop {
  margin-top: 30px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 22px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  background: var(--accent-soft);
}
.loop svg { width: 22px; height: 22px; color: var(--accent); flex-shrink: 0; }
.loop p { font-size: 0.98rem; color: var(--ink); }
.loop b { color: var(--accent); font-weight: 600; }

/* ---------- Stats ---------- */
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 48px; }
.stat .num { font-family: var(--serif); font-weight: 500; font-size: 3.2rem; line-height: 1; letter-spacing: -0.02em; color: var(--ink); }
.stat .num span { color: var(--accent); }
.stat .label { color: var(--muted); font-size: 0.95rem; margin-top: 12px; max-width: 28ch; }
@media (max-width: 860px) { .stats-grid { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- Steps (fallback, legacy) ---------- */
.step { display: flex; gap: 22px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.step:last-child { border-bottom: none; }
.step-num { font-family: var(--mono); font-size: 0.95rem; font-weight: 500; color: var(--accent); min-width: 40px; }
.step h3 { font-family: var(--serif); font-weight: 500; font-size: 1.2rem; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 0.95rem; max-width: 60ch; }

/* ---------- Offers ---------- */
.offer-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

/* ---------- Testimonial ---------- */
.testimonial { max-width: 62ch; }
.testimonial blockquote {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1.32;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-wrap: pretty;
}
.testimonial blockquote .mark { color: var(--accent); }
.testimonial .attribution { margin-top: 28px; display: flex; align-items: center; gap: 14px; }
.testimonial .avatar {
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-weight: 500; font-size: 1.15rem;
}
.testimonial .who { font-weight: 600; font-size: 0.98rem; color: var(--ink); }
.testimonial .role { font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.06em; color: var(--muted); margin-top: 2px; }

.tstack { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 44px; }
.tcard {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 34px;
  box-shadow: 0 1px 2px rgba(27, 26, 22, 0.03);
  display: flex;
  flex-direction: column;
}
.tcard blockquote {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.4rem;
  line-height: 1.38;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-wrap: pretty;
  flex: 1;
}
.tcard blockquote .mark { color: var(--accent); }
.tcard .attribution { margin-top: 26px; display: flex; align-items: center; gap: 13px; }
.tcard .avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-weight: 500; font-size: 1.15rem;
  flex-shrink: 0;
}
.tcard .who { font-weight: 600; font-size: 0.98rem; color: var(--ink); }
.tcard .role { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.06em; color: var(--muted); margin-top: 3px; text-transform: uppercase; }
@media (max-width: 860px) { .tstack { grid-template-columns: 1fr; } }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 0.82fr 1.18fr; gap: 52px; align-items: center; margin-top: 44px; }
.about-portrait img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  box-shadow: 0 16px 40px rgba(27, 26, 22, 0.10);
}
.about-body p { color: var(--muted); font-size: 1.1rem; max-width: 56ch; }
.about-body .hero-cta { margin-top: 28px; }

/* ---------- CTA band (accent panel) ---------- */
.cta-band { text-align: center; padding: 96px 0; background: var(--accent); border: none; }
.cta-band h2 { margin: 0 auto; color: #f6faf6; }
.cta-band p { margin: 18px auto 34px; color: rgba(246, 250, 246, 0.82); max-width: 52ch; font-size: 1.08rem; }
.cta-band .btn-primary { background: var(--paper); color: var(--accent); }
.cta-band .btn-primary:hover { background: #ffffff; color: var(--accent-hover); }

/* ---------- Blog list ---------- */
.post-list { margin-top: 48px; display: grid; gap: 20px; }
.post-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 32px;
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(27, 26, 22, 0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.post-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(27, 26, 22, 0.07); border-color: var(--line-strong); color: var(--ink); }
.post-meta { font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.04em; color: var(--muted); margin-bottom: 12px; }
.post-meta .tag { color: var(--accent); font-weight: 500; }
.post-card h3 { font-family: var(--serif); font-weight: 500; font-size: 1.45rem; line-height: 1.2; margin-bottom: 10px; letter-spacing: -0.01em; }
.post-card p { color: var(--muted); font-size: 0.98rem; }
.read-more { display: inline-block; margin-top: 18px; font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.04em; font-weight: 500; color: var(--accent); }

/* ---------- Article ---------- */
.article { max-width: 700px; margin: 0 auto; padding: 72px 32px 40px; }
.article h1 { font-size: clamp(2rem, 4.5vw, 3rem); max-width: none; }
.article .post-meta { margin: 22px 0; }
.article h2 { font-size: 1.7rem; margin: 48px 0 16px; max-width: none; }
.article h3 { font-family: var(--serif); font-weight: 500; font-size: 1.25rem; margin: 34px 0 12px; }
.article p { margin-bottom: 20px; color: #34322b; font-size: 1.12rem; line-height: 1.7; }
.article ul, .article ol { margin: 0 0 20px 24px; color: #34322b; font-size: 1.1rem; }
.article li { margin-bottom: 10px; line-height: 1.65; }
.article strong { color: var(--ink); font-weight: 600; }
.article em { font-style: italic; }
.article blockquote {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 22px;
  margin: 30px 0;
  font-family: var(--serif);
  font-size: 1.3rem;
  font-style: italic;
  color: var(--ink);
}
.article code {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 2px 7px;
  font-family: var(--mono);
  font-size: 0.86em;
  color: var(--accent);
}
.article-cta {
  margin-top: 56px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 36px;
  text-align: center;
  box-shadow: 0 1px 2px rgba(27, 26, 22, 0.03);
}
.article-cta h3 { font-family: var(--serif); font-weight: 500; font-size: 1.3rem; margin-bottom: 10px; }
.article-cta p { color: var(--muted); margin-bottom: 24px; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--line); padding: 40px 0; color: var(--muted); font-size: 0.88rem; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--ink); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .container { padding: 0 24px; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .hero { padding: 68px 0 56px; }
  .hero .container { grid-template-columns: 1fr; gap: 36px; }
  .about-grid { grid-template-columns: 1fr; gap: 30px; }
  h1 { font-size: clamp(2.2rem, 9vw, 3rem); }
  section { padding: 60px 0; }
  .nav-links { gap: 16px; }
  .nav-links a.hide-mobile { display: none; }
  .engine-track { grid-template-columns: 1fr; gap: 28px; }
  .node { padding-right: 0; }
  .node:not(:last-child)::after { display: none; }
  .cta-band { padding: 68px 0; }
}
