@import url(https://fonts.googleapis.com/earlyaccess/opensanshebrew.css);

:root {
  --bg: #f4f7f8;
  --surface: #ffffff;
  --ink: #1a2b32;
  --muted: #5c6b73;
  --accent: #1caea2;
  --accent-dark: #14867d;
  --line: #d7e1e5;
  --max: 920px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Open Sans Hebrew", "Segoe UI", sans-serif;
  background:
    radial-gradient(1200px 500px at 100% -10%, rgba(28, 174, 162, 0.12), transparent 55%),
    radial-gradient(900px 400px at -10% 20%, rgba(26, 58, 74, 0.08), transparent 50%),
    var(--bg);
  color: var(--ink);
  line-height: 1.65;
}
a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { width: min(var(--max), calc(100% - 2rem)); margin: 0 auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(244, 247, 248, 0.92);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  width: min(1180px, calc(100% - 1rem));
}
.header-inner {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.25rem 0;
}
.brand {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand span { color: var(--accent-dark); font-weight: 500; display: block; font-size: 0.78rem; }
.nav {
  flex: 1 1 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 2rem;
  justify-content: flex-end; /* RTL: pack toward physical left */
  min-width: 0;
}
.nav > a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.nav > a:hover,
.nav > a[aria-current="page"] {
  color: var(--accent-dark);
}

.hero {
  padding: 3.5rem 0 2.5rem;
}
.hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.hero p {
  margin: 0 0 1.5rem;
  max-width: 38rem;
  color: var(--muted);
  font-size: 1.08rem;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.btn {
  display: inline-block;
  padding: 0.75rem 1.15rem;
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); text-decoration: none; color: #fff; }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost:hover { border-color: var(--accent); text-decoration: none; }

.section { padding: 1.25rem 0 3rem; }
.section h2 {
  margin: 0 0 0.75rem;
  font-size: 1.45rem;
}
.section .lead { color: var(--muted); margin: 0 0 1.5rem; max-width: 40rem; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.15rem 1.2rem;
}
.tile h3 { margin: 0 0 0.4rem; font-size: 1.05rem; }
.tile p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.tile .tag {
  display: inline-block;
  margin-bottom: 0.55rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-dark);
  letter-spacing: 0.02em;
}

.list { list-style: none; padding: 0; margin: 0; }
.list li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1rem 1.15rem;
  margin-bottom: 0.75rem;
}
.list li strong { display: block; margin-bottom: 0.25rem; }
.list li span { color: var(--muted); font-size: 0.92rem; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer a { color: var(--muted); }
.site-footer .footer-secondary {
  margin-top: 0.55rem;
}

@media (max-width: 720px) {
  .site-header .wrap {
    width: calc(100% - 1rem);
  }
  .header-inner {
    flex-wrap: nowrap;
    gap: 0.45rem;
    align-items: center;
  }
  .brand {
    min-width: 0;
    gap: 0.35rem;
  }
  .brand-text strong {
    font-size: 0.92rem;
  }
  .brand-text span {
    display: none;
  }
  .nav {
    flex: 1 1 auto;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 0.55rem 0.8rem;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .nav::-webkit-scrollbar {
    display: none;
  }
  .nav > a {
    font-size: 0.82rem;
  }
  .hero {
    padding: 2rem 0 1.75rem;
  }
  .section {
    padding-bottom: 2rem;
  }
  .grid {
    grid-template-columns: 1fr;
  }
}

/* Bullets */
.bullets { margin: 0; padding-inline-start: 1.2rem; color: var(--ink); }
.bullets li { margin-bottom: 0.5rem; }

/* Accordion (expandable cards) */
.accordion { display: flex; flex-direction: column; gap: 0.6rem; }
.accordion details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.accordion summary {
  cursor: pointer;
  list-style: none;
  padding: 0.9rem 1.1rem;
  font-weight: 700;
  color: var(--ink);
  position: relative;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: "+";
  position: absolute;
  inset-inline-start: 1.1rem;
  color: var(--accent-dark);
  font-weight: 700;
}
.accordion details[open] summary::after { content: "–"; }
.accordion .details-body {
  padding: 0 1.1rem 1rem;
  color: var(--muted);
}

/* Carousel — internal LTR track so slides never scramble under dir=rtl */
.carousel {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  direction: ltr;
  touch-action: pan-y;
  user-select: none;
}
.carousel-track {
  display: flex;
  flex-direction: row;
  width: 100%;
  transition: transform 0.45s ease;
  will-change: transform;
}
.carousel-track .slide {
  flex: 0 0 100%;
  width: 100%;
  min-width: 100%;
  max-width: 100%;
  height: 460px;
  position: relative;
  overflow: hidden;
  background: #1a2b32;
}
.carousel-track .slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
@media (max-width: 720px) {
  .carousel-track .slide { height: 300px; }
}
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(26, 58, 74, 0.65);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.carousel-btn.prev { left: 10px; right: auto; }
.carousel-btn.next { right: 10px; left: auto; }
.carousel-btn:hover { background: var(--accent-dark); }
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 10px 0;
}
.carousel-dots button {
  width: 8px; height: 8px;
  border: 0; border-radius: 50%;
  background: var(--line);
  cursor: pointer;
}
.carousel-dots button[aria-current="true"] { background: var(--accent); }
.carousel-empty {
  margin: 0;
  padding: 2.5rem 1.2rem;
  text-align: center;
  color: var(--muted);
}
.carousel-empty code {
  background: #eef3f4;
  padding: 2px 6px;
  border-radius: 4px;
}
.carousel.has-slides .carousel-empty { display: none; }
.carousel:not(.has-slides) .carousel-btn,
.carousel:not(.has-slides) .carousel-dots { display: none; }

/* Detail pages */
.prose { max-width: 46rem; }
.prose h3 { margin-top: 1.6rem; margin-bottom: 0.4rem; font-size: 1.15rem; }
.prose p { color: var(--muted); margin: 0 0 0.9rem; }
.prose ul { margin: 0 0 1rem; padding-inline-start: 1.2rem; color: var(--ink); }
.prose ul li { margin-bottom: 0.4rem; }
.back-link { display: inline-block; margin-bottom: 1rem; color: var(--muted); font-weight: 600; }
.meta-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.25rem 0 1rem; }
.chip {
  background: #eef3f4; color: var(--accent-dark);
  border-radius: 999px; padding: 4px 12px; font-size: 0.82rem; font-weight: 600;
}
.card-link {
  display: block; background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 1.15rem 1.2rem; text-decoration: none; color: inherit;
}
.card-link:hover { border-color: var(--accent); text-decoration: none; }
.card-link h3 { margin: 0 0 0.35rem; font-size: 1.05rem; color: var(--ink); }
.card-link p { margin: 0; color: var(--muted); font-size: 0.93rem; }
.card-link .go { color: var(--accent-dark); font-weight: 700; font-size: 0.9rem; }

/* Brand logo — right side of the single header row (RTL) */
.brand-logo {
  height: 120px;
  width: auto;
  display: block;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

/* Product / detail imagery */
.detail-hero {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  margin: 0 0 1rem;
}
.detail-hero img.logo { height: 110px; width: auto; max-width: 100%; }
.detail-hero img.logo.sparta-logo { height: 140px; }
.shot {
  width: 100%; border: 1px solid var(--line); border-radius: 10px;
  margin: 0.5rem 0 1.25rem; display: block;
}
.shot-caption { color: var(--muted); font-size: 0.9rem; margin: -0.75rem 0 1.25rem; }
.card-logo { height: 48px; width: auto; margin-bottom: 0.5rem; display: block; }
.card-logo.sparta-logo { height: 64px; }
.figure { margin: 0 0 1.25rem; }
.figure img { width: 100%; border: 1px solid var(--line); border-radius: 10px; display: block; }
.figure figcaption { color: var(--muted); font-size: 0.9rem; margin-top: 0.35rem; }
.prose .patent-notice,
.patent-notice {
  background: #eef3f4;
  border-inline-start: 3px solid var(--accent);
  padding: 0.75rem 1rem;
  margin: 0 0 1.25rem;
  color: var(--ink);
  font-weight: 600;
}
.photo-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
  margin: 0 0 1.5rem;
}
.photo-strip figure { margin: 0; }
.photo-strip img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: block;
}
.photo-strip figcaption {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 0.3rem;
}
@media (max-width: 720px) {
  .brand-logo { height: 52px; }
  .detail-hero img.logo { height: 88px; }
  .detail-hero img.logo.sparta-logo { height: 110px; }
}
