/* דף הבית של Loop. כיוון: "מוטיב אחד" - הלולאה (∞) מהלוגו מריצה את כל הדף.
   כללי הבית: בלי גרדיאנטים, בלי צללים במנוחה, בלי קווים דקים (חוץ מטבלה), בלי תוויות מעל כותרות. */
@import url('/app/css/tokens.css');

:root {
  --ground: var(--bg);
  --tone-1: #E9E5CE;               /* צעד אחד מהרקע */
  --blue-1: #44566B; --blue-2: #5D6F84; --blue-3: #8395A7; --blue-4: #AEBBC8; --blue-5: #D7DEE6;
  --r: 28px;
  --m: clamp(16px, 4vw, 56px);     /* שוליים אחידים לכל הדף */
  --s-display: clamp(46px, 5.8vw, 92px);
  --s-h2: clamp(34px, 4vw, 60px);
  --s-lead: 20px;
  --s-body: 17px;
  --s-small: 15px;
  --ease-out-l: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.76, 0, 0.24, 1);
}
:root[data-theme="dark"] { --tone-1: #2A2824; --blue-1: #2F3B49; --blue-2: #3E4D5E; --blue-3: #586A7E; --blue-4: #6F8296; --blue-5: #8C9DAF; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; } /* clip ולא hidden: לא נוצר אזור גלילה, והמסך בטלפון לא מתרחב */
body { margin: 0; font-family: var(--font); font-size: var(--s-body); line-height: 1.6; color: var(--ink); background: var(--ground); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; font-weight: 700; letter-spacing: -0.025em; line-height: 1.02; }
p { margin: 0; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 10px; }
.wrap { padding-inline: var(--m); max-width: 1440px; margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* כפתור: צורת גלולה, כמו קצוות הלולאה. צורה אחת לכל הדף */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 0 30px; border: 0; border-radius: 999px; font: inherit; font-weight: 700; font-size: 18px; text-decoration: none; cursor: pointer; background: var(--pink); color: var(--on-accent); transition: transform 160ms var(--ease-out-l), background-color 180ms ease; }
.btn:active { transform: scale(0.97); }
.btn.ink { background: var(--ink); color: var(--ground); }
.btn.small { min-height: 44px; padding: 0 20px; font-size: 16px; }
@media (hover: hover) and (pointer: fine) { .btn:hover { background: #CD96A2; } .btn.ink:hover { background: #45433D; } }
.link { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.25em; transition: text-decoration-color 180ms ease; }
@media (hover: hover) and (pointer: fine) { .link:hover { text-decoration-color: currentColor; } }

/* ---------------------------------------------------------------- ניווט: סרגל פשוט */
.nav { position: absolute; inset-inline: 0; top: 0; z-index: 5; }
.nav .wrap { display: flex; align-items: center; gap: 28px; height: 84px; }
.word { font-family: var(--font-display); font-weight: 800; font-size: 32px; letter-spacing: -0.04em; text-decoration: none; direction: ltr; }
.nav nav { display: flex; gap: 26px; margin-inline-start: auto; font-weight: 500; }
.nav nav a { text-decoration: none; }
@media (max-width: 760px) { .nav nav a:not(.keep) { display: none; } .nav nav { gap: 0; } }

/* ---------------------------------------------------------------- גיבור: לולאה ענקית חתוכה */
.hero { position: relative; min-height: 100svh; display: grid; align-items: center; overflow: hidden; }
.hero > .wrap { width: 100%; } /* margin:auto על פריט grid מכווץ אותו לתוכן */
.hero .copy { position: relative; z-index: 2; max-width: 50%; padding-block: 120px 80px; }
.hero h1 .ln { display: block; white-space: nowrap; }
.hero h1 { font-size: var(--s-display); }
.hero .lead { font-size: var(--s-lead); max-width: 34ch; margin-top: 26px; }
.hero .act { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-top: 34px; }
.hero .note { font-size: var(--s-small); color: var(--ink-2); }
.motif { position: absolute; z-index: 1; width: 120vh; height: 120vh; inset-inline-end: -40vh; top: 50%; translate: 0 -50%; pointer-events: none; }
.motif svg { width: 100%; height: 100%; overflow: visible; }
.motif .loop-base { stroke: var(--pink); }
.motif .loop-run { stroke: var(--ink); stroke-dasharray: 40 960; opacity: 0.85; }
@media (max-width: 860px) {
  .hero { align-items: start; min-height: 100svh; }
  .hero .copy { max-width: none; padding-block: 15svh 0; }
  .hero h1 { font-size: 11.5vw; }
  .motif { width: 150vw; height: 150vw; inset-inline-end: -25vw; top: auto; bottom: -62vw; translate: none; }
}

/* ---------------------------------------------------------------- איך זה עובד: אקורדיון אופקי של גוונים */
section { position: relative; }
.how { padding-block: clamp(110px, 14vw, 200px) 0; }
.intro { display: grid; grid-template-columns: 5fr 1fr 6fr; gap: 0; align-items: end; }
.intro h2, .feat-head h2 { font-size: var(--s-h2); }
.intro p { grid-column: 3; font-size: 17px; max-width: 48ch; }
.stages { display: flex; height: 540px; margin-top: 64px; border-radius: var(--r); overflow: hidden; }
.stage { position: relative; flex: 1 1 0; min-width: 72px; border: 0; padding: 0; margin: 0; text-align: start; color: #fff; cursor: pointer; transition: flex-grow 450ms var(--ease-io); font: inherit; overflow: hidden; }
.stage[aria-expanded="true"] { flex-grow: 7; cursor: default; }
.stage:nth-child(1) { background: var(--blue-1); } .stage:nth-child(2) { background: var(--blue-2); }
.stage:nth-child(3) { background: var(--blue-3); color: var(--ink); } .stage:nth-child(4) { background: var(--blue-4); color: var(--ink); }
.stage .sliver { position: absolute; inset-block-end: 24px; inset-inline-start: 50%; translate: 50% 0; writing-mode: vertical-rl; transform: rotate(180deg); font-family: var(--font-display); font-weight: 700; font-size: 20px; white-space: nowrap; transition: opacity 200ms ease; }
.stage[aria-expanded="true"] .sliver { opacity: 0; }
.stage .open { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(260px, 1fr) minmax(300px, 1.1fr); gap: 32px; padding: 40px; opacity: 0; visibility: hidden; transition: opacity 260ms ease 120ms, visibility 0s linear 380ms; pointer-events: none; }
.stage[aria-expanded="true"] .open { opacity: 1; visibility: visible; transition: opacity 260ms ease 120ms, visibility 0s; pointer-events: auto; }
.stage .open h3 { font-size: 40px; }
.stage .open p { font-size: 17px; max-width: 36ch; align-self: end; grid-column: 1; }
.stage .open .copy-col { display: grid; align-content: space-between; }
.stage .frag { align-self: center; justify-self: center; width: min(100%, 400px); }
.stage .frag .ui-card { min-height: 210px; }
@media (max-width: 860px) {
  .intro { grid-template-columns: 1fr; gap: 16px; } .intro p { grid-column: 1; }
  .stages { flex-direction: column; height: auto; margin-top: 36px; }
  .stage { flex: none; min-height: 64px; }
  .stage .sliver { position: static; writing-mode: horizontal-tb; transform: none; translate: none; display: block; padding: 20px; font-size: 18px; }
  .stage[aria-expanded="true"] .sliver { display: none; }
  .stage .open { position: static; display: none; grid-template-columns: 1fr; padding: 24px 20px; }
  .stage[aria-expanded="true"] .open { display: grid; }
  .stage .open h3 { font-size: 30px; }
  .stage .open p { font-size: 17px; }
}

/* ---------------------------------------------------------------- קטעי ממשק אמיתיים (data-ui) */
[data-ui] { font-family: var(--font); color: #2B2A26; direction: rtl; text-align: start; }
.ui-card { background: #FBFAF3; border-radius: 20px; padding: 16px; font-size: 14px; line-height: 1.45; }
.ui-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; }
.ui-row + .ui-row { border-top: 1px solid rgba(122,107,88,.16); } /* taste-skill-ignore: קו של הממשק עצמו (data-ui) */
.ui-ch { width: 30px; height: 30px; border-radius: 9px; flex: none; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 13px; }
.ui-badge { margin-inline-start: auto; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: #E3EBDA; color: #4E6541; white-space: nowrap; }
.ui-badge.p { background: #F2DEE2; color: #8E4D5C; } .ui-badge.b { background: #DEE4EB; color: #44566B; }
.ui-bub { padding: 9px 13px; border-radius: 18px; max-width: 86%; unicode-bidi: plaintext; }
.ui-them { background: #EFEDE4; justify-self: start; border-end-start-radius: 6px; }
.ui-me { background: #6E5E8C; color: #fff; justify-self: end; border-end-end-radius: 6px; }
.ui-chat { display: grid; gap: 7px; }
.ui-btn { justify-self: end; width: 70%; text-align: center; padding: 8px; border-radius: 14px; border: 1px solid #DDD8C8; /* taste-skill-ignore: כפתור אמיתי בהודעה (data-ui) */ color: #3A5A8C; font-weight: 700; background: #fff; }
.ui-sys { justify-self: center; font-size: 13px; color: #5F584D; }
.ui-switch { width: 46px; height: 28px; border-radius: 999px; background: #4E6541; position: relative; flex: none; }
.ui-switch::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; translate: -18px 0; }
[dir="ltr"] .ui-switch::after { translate: 18px 0; }
.ui-chip { display: inline-block; padding: 4px 11px; border-radius: 999px; background: #F2DEE2; color: #8E4D5C; font-weight: 700; font-size: 13px; margin: 2px; }
.ui-count { font-size: 12px; color: #4E6541; font-weight: 700; }
.ui-count.over { color: #B9605F; }

/* ---------------------------------------------------------------- הדבר החי: שדה תגובה ענק */
.show { margin-top: clamp(110px, 14vw, 200px); min-height: 92svh; background: var(--pink); color: var(--on-accent); overflow: hidden; transition: background-color 380ms ease; }
.show.miss { background: var(--taupe); }
.show .wrap { position: relative; min-height: 92svh; padding-block: 72px; }
.show h2 { font-size: clamp(30px, 2.8vw, 44px); max-width: 16ch; }
.show .say { font-size: 17px; max-width: 36ch; margin-top: 12px; }
.show .say b { font-weight: 700; }
.tester { position: absolute; inset-inline-start: 30%; bottom: -6vh; font-size: clamp(16px, 2.2vw, 30px); width: 24em; }
.tester .ui-card { padding: 0.9em; border-radius: 1em; font-size: inherit; } /* הבקר מוגדל לגודל פוסטר: כל המידות ב-em */
.tester .ui-bub { font-size: 1em; } .tester .ui-btn { font-size: 0.9em; } .tester .ui-sys { font-size: 0.75em; }
.tester label { display: block; font-size: 0.6em; color: #6C5E4C; margin-bottom: 0.4em; font-weight: 700; }
.tester input { width: 100%; font: inherit; font-size: 1.05em; padding: 0.55em 0.7em; border-radius: 0.6em; border: 0; background: #EFEDE4; color: #2B2A26; }
.tester input:focus { outline: 0.12em solid #44566B; }
.tester .verdict { margin-top: 0.6em; font-weight: 700; font-size: 0.75em; }
.tester .ui-chat { margin-top: 0.6em; font-size: 0.66em; }
.tester .tries { display: flex; flex-wrap: wrap; gap: 0.3em; margin-top: 0.5em; }
.tester .tries button { font: inherit; font-size: 0.55em; border: 0; border-radius: 999px; padding: 0.35em 0.9em; background: #F2DEE2; color: #8E4D5C; font-weight: 700; cursor: pointer; transition: transform 160ms var(--ease-out-l); }
.tester .tries button:active { transform: scale(0.96); }
@media (max-width: 860px) {
  .show, .show .wrap { min-height: 86svh; }
  .show h2 { font-size: 26px; } .show .say { font-size: 16px; }
  .tester { position: relative; inset: auto; bottom: auto; margin-top: 32px; width: 100%; font-size: 4.4vw; }
}

/* ---------------------------------------------------------------- פיצ'רים: דגימות על אריחי צבע */
.feats { padding-block: clamp(110px, 14vw, 200px) 0; }
.feats .wrap { display: grid; grid-template-columns: 3fr 9fr; gap: 40px; }
.feat-head p { margin-top: 14px; max-width: 30ch; font-size: 17px; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 10px; }
.tile figure { margin: 0; }
.tile .ground { aspect-ratio: 4 / 5; border-radius: var(--r); display: grid; place-items: center; padding: 18px; overflow: hidden; }
.tile.wide { grid-column: span 2; }
.tile.wide .ground { aspect-ratio: 8 / 5; }
.tile .ground > .ui-card { width: 88%; }
.tile figcaption { padding: 12px 4px 18px; }
.tile figcaption b { display: block; font-size: 20px; font-weight: 600; font-family: var(--font-display); }
.tile figcaption span { font-size: 16px; color: var(--ink-2); }
.g-sage { background: var(--sage); } .g-blue { background: var(--blue-4); } .g-taupe { background: var(--taupe); } .g-tone { background: var(--tone-1); }
@media (max-width: 960px) {
  .feats .wrap { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .tile.wide { grid-column: span 2; order: -1; }
  .tile figcaption b { font-size: 17px; } .tile figcaption span { font-size: 15px; }
  .tile .ground { padding: 10px; } .tile .ground > .ui-card { width: 96%; font-size: 13px; }
}

/* ---------------------------------------------------------------- השוואה (טבלה אמיתית) */
.cmp { padding-block: clamp(110px, 14vw, 200px) 0; }
.cmp h2 { font-size: var(--s-h2); max-width: 14ch; }
.cmp .sub { font-size: 17px; margin-top: 14px; max-width: 46ch; }
.table-wrap { overflow-x: auto; margin-top: 44px; }
table { width: 100%; border-collapse: collapse; font-size: 17px; min-width: 620px; }
th, td { text-align: start; padding: 18px 16px; border-bottom: 1px solid var(--line-strong); vertical-align: top; }
th { font-family: var(--font-display); font-size: 20px; }
td.us, th.us { background: color-mix(in srgb, var(--pink) 28%, transparent); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
@media (max-width: 640px) { table { min-width: 0; font-size: 15px; } th, td { padding: 12px 8px; } th { font-size: 16px; } }

/* ---------------------------------------------------------------- מחירים: שמות המסלולים, מחיר אחד חי */
.price { padding-block: clamp(110px, 14vw, 200px) 0; }
.price .wrap { display: grid; grid-template-columns: 6fr 1fr 5fr; align-items: start; }
.plans { display: grid; }
.plans button { all: unset; cursor: pointer; font-family: var(--font-display); font-weight: 700; font-size: var(--s-display); line-height: 1.1; letter-spacing: -0.03em; color: var(--ink-3); display: flex; align-items: center; gap: 0.25em; transition: color 180ms ease; }
.plans button[aria-pressed="true"] { color: var(--ink); }
.plans button::before { content: ''; width: 0.3em; height: 0.3em; border-radius: 50%; background: var(--pink-ink); flex: none; opacity: 0; transition: opacity 180ms ease; }
.plans button[aria-pressed="true"]::before { opacity: 1; }
.plans button:focus-visible { outline: 3px solid var(--focus); border-radius: 12px; }
.pstage { grid-column: 3; position: sticky; top: 40px; transition: opacity 200ms ease; }
.pstage.swap { opacity: 0; }
.pstage .fig { font-family: var(--font-display); font-weight: 700; font-size: clamp(64px, 9vw, 140px); line-height: 1; letter-spacing: -0.04em; }
.pstage .fig small { font-size: 18px; font-weight: 500; letter-spacing: 0; color: var(--ink-2); }
.pstage p { font-size: 17px; margin: 22px 0 28px; max-width: 40ch; }
.pnote { grid-column: 1 / -1; margin-top: 40px; font-size: var(--s-small); color: var(--ink-2); }
.pinline { display: none; }
@media (max-width: 860px) {
  .price .wrap { grid-template-columns: 1fr; }
  .plans button { font-size: 10vw; }
  .pstage { display: none; }
  .pinline { display: block; padding: 10px 0 48px; }
  .pinline[hidden] { display: none; }
  .pinline .fig { font-family: var(--font-display); font-weight: 700; font-size: 20vw; line-height: 1; }
  .pinline .fig small { font-size: 16px; font-weight: 500; color: var(--ink-2); }
  .pinline p { font-size: 17px; margin: 14px 0 18px; }
  .pinline .btn { width: 100%; }
}

/* ---------------------------------------------------------------- שאלות: אריחים מלאים */
.faq { padding-block: clamp(110px, 14vw, 200px) 0; }
.faq .wrap { display: grid; grid-template-columns: 4fr 8fr; gap: 40px; align-items: start; }
.faq h2 { font-size: var(--s-h2); position: sticky; top: 96px; }
.faq .list { display: grid; gap: 8px; }
.faq details { background: var(--tone-1); border-radius: var(--r); transition: background-color 220ms ease; }
.faq details[open] { background: var(--pink); color: var(--on-accent); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 72px; padding: 18px 24px; font-size: 20px; font-weight: 500; }
.faq summary::-webkit-details-marker { display: none; }
.faq .pm { position: relative; width: 16px; height: 16px; flex: none; }
.faq .pm::before, .faq .pm::after { content: ''; position: absolute; inset-inline-start: 0; top: 6.5px; width: 16px; height: 3px; border-radius: 2px; background: currentColor; transition: transform 220ms var(--ease-out-l); }
.faq .pm::after { transform: rotate(90deg); }
.faq details[open] .pm::after { transform: rotate(0deg); }
.faq details p { padding: 0 24px 24px; font-size: 17px; max-width: 52ch; }
@media (max-width: 860px) {
  .faq .wrap { grid-template-columns: 1fr; gap: 24px; }
  .faq h2 { position: static; font-size: 9vw; }
  .faq summary { font-size: 18px; min-height: 64px; }
  .faq details p { font-size: 16px; padding: 0 20px 20px; }
}

/* ---------------------------------------------------------------- סיום: משפט עם רווח */
.cta { padding-block: clamp(120px, 16vw, 220px); }
.cta form { font-family: var(--font-display); font-weight: 700; font-size: var(--s-h2); line-height: 1.25; letter-spacing: -0.025em; max-width: 18em; }
.cta input { font: inherit; font-weight: 500; font-size: 0.8em; height: 1.25em; width: 8em; padding: 0 0.4em; vertical-align: baseline; border: 0; border-radius: 999px; background: var(--tone-1); color: var(--ink); direction: ltr; text-align: left; }
.cta input::placeholder { color: var(--ink-3); }
.cta form button { font: inherit; height: 1.25em; padding: 0 0.45em; border: 0; border-radius: 999px; background: var(--pink); color: var(--on-accent); cursor: pointer; transition: transform 160ms var(--ease-out-l); }
.cta form button:active { transform: scale(0.97); }
.cta .after { margin-top: 18px; font-size: 16px; color: var(--ink-2); }
@media (max-width: 860px) { .cta form { font-size: 10vw; } .cta input { display: block; width: 100%; margin: 0.2em 0; } }

/* ---------------------------------------------------------------- כותרת תחתונה: הסימן, בנוי בגדול */
footer { background: var(--tone-1); padding-block: 56px 40px; }
.mark { height: 34svh; min-height: 200px; display: block; width: 100%; }
.mark .a { fill: var(--pink); } .mark .b { fill: var(--blue-3); } .mark .c { fill: var(--sage); } .mark .d { fill: var(--taupe); }
.foot-cols { display: grid; grid-template-columns: repeat(4, 1fr) 2fr; gap: 24px; margin-top: 56px; font-size: 15px; }
.foot-cols h3 { font-size: 15px; font-family: var(--font); font-weight: 700; letter-spacing: 0; margin-bottom: 10px; }
.foot-cols a { display: block; text-decoration: none; padding: 3px 0; }
.foot-end { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 40px; font-size: 15px; color: var(--ink-2); }
@media (max-width: 760px) { .foot-cols { grid-template-columns: 1fr 1fr; } .mark { height: 22svh; } }

/* ---------------------------------------------------------------- תנועה */
@media (prefers-reduced-motion: no-preference) {
  .js .shutter { clip-path: inset(0 0 0 100%); transition: clip-path 1100ms var(--ease-io); }
  [dir="rtl"].js .shutter { clip-path: inset(0 100% 0 0); }
  .js .shutter svg { scale: 1.12; transition: scale 1500ms var(--ease-out-l); }
  .js .shutter.is-in { clip-path: inset(0); }
  .js .shutter.is-in svg { scale: 1; }
  .motif .loop-run { animation: run 9s linear infinite; }
  @keyframes run { to { stroke-dashoffset: -1000; } }
  .js [data-reveal] > * { opacity: 0; translate: 0 22px; transition: opacity 700ms var(--ease-out-l), translate 700ms var(--ease-out-l); }
  .js [data-reveal].is-in > * { opacity: 1; translate: 0 0; }
  .js [data-reveal].is-in > :nth-child(2) { transition-delay: 70ms; }
  .js [data-reveal].is-in > :nth-child(3) { transition-delay: 140ms; }
  .js [data-reveal].is-in > :nth-child(4) { transition-delay: 210ms; }
  .js [data-reveal].is-in > :nth-child(5) { transition-delay: 280ms; }
  .js [data-reveal].is-in > :nth-child(6) { transition-delay: 350ms; }
  .js [data-reveal].is-in > :nth-child(n+7) { transition-delay: 420ms; }
  .js .tiles[data-reveal] > * { translate: 0 0; scale: 0.97; transition: opacity 600ms var(--ease-out-l), scale 700ms var(--ease-out-l); }
  .js .tiles[data-reveal].is-in > * { scale: 1; }
  .js .rows[data-reveal] > * { translate: 16px 0; }
  .ui-me, .ui-btn { animation: bubble 420ms var(--ease-out-l) both; }
  @keyframes bubble { from { opacity: 0; translate: 0 8px; } }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: 1ms !important; animation: none !important; } }
