/* ==========================================================================
   רחלי כהן | יצרנית פאות — Design System
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Frank+Ruhl+Libre:wght@300;400;500;700;900&family=Rubik:wght@300;400;500;600;700&display=swap');

@font-face {
  font-family: 'Gloria DL AAA';
  src: url('assets/fonts/gloria-regular-aaa.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Gloria DL AAA';
  src: url('assets/fonts/gloria-bold-aaa.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --rose-1: #e07a8a;
  --rose-2: #c97a3c;
  --gradient: linear-gradient(135deg, var(--rose-1) 0%, var(--rose-2) 100%);
  --gradient-bar: linear-gradient(90deg, var(--rose-1) 0%, var(--rose-2) 100%);
  --pink-pale: #fff6f7;
  --black: #0c0c0c;
  --white: #ffffff;
  --gray-bg: #d9d9d9;
  --gray-text: #6b6b6b;
  --line: #ececec;

  --font-display: 'Gloria DL AAA', 'Frank Ruhl Libre', serif;
  --font-ui: 'Rubik', sans-serif;

  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 32px;
  --radius-pill: 999px;

  --shadow-card: 0 12px 30px -10px rgba(0, 0, 0, 0.18);
  --shadow-soft: 0 6px 18px -6px rgba(0, 0, 0, 0.12);

  --rail-w: 76px;
  --header-h: 42px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-ui);
  color: var(--black);
  background: var(--white);
  direction: rtl;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; border: none; background: none; cursor: pointer; }
ul { list-style: none; }

.container { width: min(1240px, 92vw); margin-inline: auto; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
}

/* ---------- top promo bar ---------- */
.promo-bar {
  background: var(--gradient-bar);
  color: var(--white);
  text-align: center;
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: clamp(12px, 1.6vw, 16px);
  padding: 10px 16px;
  letter-spacing: 0.2px;
}

/* ---------- app shell: side column (logo + rail) + content ---------- */
.body-row {
  display: flex;
  align-items: flex-start;
  min-height: calc(100vh - 40px);
}
.side-col {
  width: var(--rail-w);
  flex: 0 0 var(--rail-w);
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-left: 1px solid var(--line);
  background: var(--white);
  z-index: 40;
}
.content { flex: 1 1 auto; min-width: 0; }

/* ---------- side icon rail (desktop) ---------- */
.icon-rail {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding: 18px 0 28px;
}

.icon-rail a {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-pill);
  color: var(--black);
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.icon-rail a svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.6; transition: transform .25s ease; }
.icon-rail a:hover,
.icon-rail a.active {
  background: linear-gradient(135deg, var(--pink-pale), #fdeee1);
  color: var(--rose-2);
  transform: translateY(-2px) scale(1.06);
}
.icon-rail a:hover svg { transform: scale(1.08); }
.icon-rail a:active { transform: translateY(0) scale(.96); }

/* ---------- logo ---------- */
.logo {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 14px 0 6px;
}
.logo-inner { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1.5px solid var(--rose-1);
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; color: var(--rose-1); font-size: 12px;
}
.logo-text { text-align: center; }
.logo-text .en1 { font-family: var(--font-display); font-weight: 600; letter-spacing: 1.5px; font-size: 13px; color: var(--rose-1); display:block; line-height:1.15; }
.logo-tagline { font-size: 8px; color: var(--black); font-family: var(--font-ui); line-height: 1.3; display:block; }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 640px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center 20%;
}
.hero-bg::after {
  content: "";
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.38);
}
.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  text-align: center;
  color: var(--white);
  padding: 0 24px 64px;
  margin-top: auto;
}
.hero-content .eyebrow {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(18px, 2.4vw, 28px);
  line-height: 1.3;
}
.hero-content h1 {
  margin-top: 10px;
  font-size: clamp(32px, 4.6vw, 48px);
  text-transform: uppercase;
}

/* ---------- topics row ---------- */
.topics-row {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: clamp(14px, 2vw, 28px);
  padding: 26px 16px 0;
  flex-wrap: wrap;
}
.topic {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  width: 78px;
  cursor: pointer;
  border: none; background: none; padding: 0;
  font-family: inherit;
  transition: transform .2s ease;
}
.topic:hover { transform: translateY(-2px); }
.topic:active { transform: translateY(0) scale(.96); }
.topic:focus-visible .topic-ring { outline: 2px solid var(--rose-1); outline-offset: 3px; }
.topic-ring {
  width: 58px; height: 58px; border-radius: 50%;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.topic-ring::before {
  content: "";
  position: absolute;
  inset: -35%;
  background: conic-gradient(from 0deg,
    var(--rose-1), var(--rose-2), #f3c66b, var(--rose-1), var(--rose-2), #f3c66b, var(--rose-1));
  animation: ring-spin 5s linear infinite;
  will-change: transform;
}
@keyframes ring-spin {
  to { transform: rotate(360deg); }
}
.topic-ring-in {
  position: absolute; inset: 3px; z-index: 1;
  border-radius: 50%; background: var(--white); padding: 2px;
  display: flex;
}
/* מספר הפסים בטבעת הסטורי מתאים לכמות הפריטים בטופיק (--seg-count נקבע ב-JS) */
.topic-ring.has-segments::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: 50%;
  background: repeating-conic-gradient(
    from calc(-180deg / var(--seg-count, 1)),
    var(--white) 0deg 7deg,
    transparent 7deg calc(360deg / var(--seg-count, 1))
  );
  animation: ring-spin 5s linear infinite;
  will-change: transform;
  pointer-events: none;
}
.topic.seen .topic-ring.has-segments::after { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .topic-ring.has-segments::after { animation: none; }
}
.topic-ring img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.topic span { font-size: 12px; color: var(--black); text-align: center; }
body[data-page="home"] .topic span { color: var(--white); text-shadow: 0 1px 4px rgba(0,0,0,.4); }
.topic.seen .topic-ring::before { animation: none; background: var(--gray-bg); }
@media (prefers-reduced-motion: reduce) {
  .topic-ring::before { animation: none; background: var(--gradient); }
}

/* ---------- journeys row ---------- */
.journeys {
  position: relative;
  z-index: 3;
  background: var(--white);
  display: flex;
  justify-content: center;
  gap: clamp(10px, 2vw, 22px);
  padding: 22px 16px;
  flex-wrap: wrap;
}
.journey-btn {
  display: flex; align-items: center; gap: 10px;
  background: var(--white);
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-card);
  font-weight: 600;
  font-size: clamp(13px, 1.6vw, 16px);
  background-image: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}
.journey-btn svg { width: 16px; height: 16px; stroke: var(--rose-2); flex-shrink: 0; }
.journey-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; order: -1; }

/* ---------- footer ---------- */
footer.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 28px;
  font-size: 10px;
  color: var(--gray-text);
  flex-wrap: wrap;
  gap: 8px;
}
footer.site-footer a { color: var(--gray-text); }
footer.site-footer .links { display: flex; gap: 18px; }

/* ---------- generic page header (sub-pages) ---------- */
.page-hero {
  padding: 70px 24px 46px;
  text-align: center;
}
.page-hero h1 { font-size: clamp(28px, 4vw, 42px); }
.page-hero p { margin-top: 10px; color: var(--gray-text); font-size: 15px; }

/* ---------- buttons ---------- */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(120deg, var(--rose-1), var(--rose-2), #f3c66b, var(--rose-2), var(--rose-1));
  background-size: 260% auto;
  background-position: 0% center;
  color: var(--white);
  padding: 14px 32px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 15px;
  box-shadow: var(--shadow-soft);
  transition: transform .2s ease, box-shadow .2s ease, background-position .6s ease;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); background-position: 100% center; }
.btn-primary:active { transform: translateY(0) scale(.98); }

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  position: relative;
  overflow: hidden;
  border: 1.5px solid var(--rose-1);
  color: var(--rose-2);
  padding: 13px 30px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 15px;
  transition: color .3s ease, border-color .3s ease;
  z-index: 1;
}
.btn-ghost::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: var(--gradient);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .35s ease;
}
.btn-ghost:hover { color: var(--white); border-color: transparent; }
.btn-ghost:hover::before { transform: scaleX(1); }

/* ---------- mobile ---------- */
@media (max-width: 860px) {
  .body-row { flex-direction: column; min-height: 0; }
  .side-col {
    width: 100%; flex: 0 0 auto; height: auto; position: sticky; top: 0;
    flex-direction: row; justify-content: space-between; align-items: center;
    border-left: none; border-bottom: 1px solid var(--line);
    padding: 8px 14px;
  }
  .logo { width: auto; padding: 0; }
  .logo-inner { flex-direction: row-reverse; }
  .icon-rail {
    width: auto; flex-direction: row; gap: 4px; padding: 0;
    overflow-x: auto;
  }
  .icon-rail a { width: 32px; height: 32px; flex: 0 0 auto; }
  .icon-rail a svg { width: 18px; height: 18px; }
  .hero { min-height: 560px; }
}
@media (max-width: 520px) {
  .icon-rail a:nth-child(n+7) { display: none; }
}
