/* דן פלג · "פלג": נחל אחד שיוצא מהשם ונשפך לבריכה. design.md הוא המקור. */
:root {
  --bg: #F4F4F2;
  --surface: #FFFFFF;
  --ink: #393939;
  --muted: #5F625F;
  --primary: #0B6F7A;
  --primary-ink: #FFFFFF;
  --soft: #EAE4D8;
  --accent: #D1A209;
  --line: #D6D3CC;
  --focus: #393939;
  --water-soft: #DCEEEE;
  --water-core: #7FC4CA;
  --radius: 22px;
  --font-head: "Playpen Sans Hebrew Variable", system-ui, sans-serif;
  --font-body: "Heebo Variable", system-ui, sans-serif;
  --gutter: 16px;
  --spine: 56px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 18px; line-height: 1.7; overflow-x: clip; }
main { overflow-x: clip; }
img, svg { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p { margin: 0; }
h2 { font-family: var(--font-head); font-size: 30px; line-height: 1.15; font-weight: 700; margin-bottom: 22px; }
a { color: var(--primary); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.skip-link { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px; }
.skip-link:focus { top: 12px; }
.demo-banner { min-height: 40px; display: flex; align-items: center; justify-content: center; padding: 8px var(--gutter); background: var(--ink); color: #fff; font-size: 14px; line-height: 1.4; text-align: center; }
.wrap { max-width: 1180px; margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Header ---------- */
.top { position: sticky; top: 0; z-index: 50; background: color-mix(in oklab, var(--bg) 94%, transparent); backdrop-filter: blur(8px); }
.top__inner { max-width: 1180px; margin-inline: auto; padding: 8px var(--gutter); display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); line-height: 1.15; min-height: 44px; justify-content: center; }
.brand__name { font-family: var(--font-head); font-weight: 600; font-size: 20px; }
.brand__sub { font-size: 14px; color: var(--muted); }
.top__nav { display: none; }
.top__call { margin-inline-start: auto; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--primary); color: var(--primary); }
.top__call svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 28px 0 72px; }
.hero__inner { padding-inline-start: var(--spine); position: relative; z-index: 1; }
.eyebrow { font-size: 15px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
h1 { font-family: var(--font-head); font-weight: 600; }
.name { display: inline-block; font-weight: 700; font-size: 76px; line-height: .95; color: var(--ink); }
.h1-line { display: block; font-size: 24px; line-height: 1.25; margin-top: 34px; }
.hero__lead { margin-top: 14px; }
.hero__actions { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
.hero__actions .k-btn { width: 100%; }
.omer { margin: 20px 0 0; font-size: 16px; color: var(--muted); }
.omer footer { font-size: 15px; }
.rating { margin-top: 10px; font-size: 15px; color: var(--muted); }
.rating strong { color: var(--ink); }

/* The spout from the "ג" to the spine: placed by js/stream.js, hidden without it. */
.spout { display: none; position: absolute; pointer-events: none; z-index: 0; }
.spout.is-placed { display: block; }
.spout svg:not(.drop), .stream svg { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; overflow: visible; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.spout__bed path, .stream__bed path { stroke: var(--line); stroke-width: 2px; vector-effect: non-scaling-stroke; }
.spout__win, .stream__win { position: absolute; inset: -6px; overflow: hidden; }
.spout__water, .stream__water { inset: 6px !important; width: calc(100% - 12px) !important; height: calc(100% - 12px) !important; }
.w { stroke: var(--primary); stroke-width: 6px; vector-effect: non-scaling-stroke; }
.c { stroke: var(--water-core); stroke-width: 2px; vector-effect: non-scaling-stroke; }
.drop { display: none; position: absolute; width: 14px; height: 18px; fill: var(--primary); }
.drop circle { fill: #fff; opacity: .8; }

/* ---------- Stations along the stream ---------- */
.st { position: relative; padding-block: 56px; }
.st__body { padding-inline-start: var(--spine); position: relative; z-index: 1; }
.stream { position: absolute; top: 0; bottom: 0; right: 16px; width: 16px; pointer-events: none; }
.stream .d { display: none; }
.pebble { position: absolute; top: -6px; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--soft); border: 2px solid var(--primary); }
.pebble span { position: absolute; inset: 1px; border-radius: 50%; background: var(--accent); }
.ripple { display: none; }
.st__sub { color: var(--muted); margin: -10px 0 20px; }

.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li { background: var(--soft); padding: 10px 18px; font-weight: 600; font-size: 16px; line-height: 1.2; border-radius: 46% 54% 52% 48% / 55% 45% 55% 45%; }
.chips li:nth-child(2n) { border-radius: 58% 42% 40% 60% / 45% 52% 48% 55%; }
.chips li:nth-child(3n) { border-radius: 40% 60% 55% 45% / 60% 40% 60% 40%; }

.big-quote { margin: 0; padding: 26px 22px; background: var(--surface); border-radius: var(--radius); box-shadow: 0 14px 30px -22px rgb(11 111 122 / .5); }
.big-quote p { font-size: 21px; line-height: 1.5; font-weight: 500; }
blockquote footer { font-size: 15px; color: var(--muted); margin-top: 8px; }

.photos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.photos a { display: block; overflow: hidden; aspect-ratio: 3 / 4; }
.photos img { width: 100%; height: 100%; object-fit: cover; }
.pb1 { border-radius: 46% 54% 52% 48% / 55% 45% 55% 45%; }
.pb2 { border-radius: 58% 42% 40% 60% / 45% 52% 48% 55%; }
.pb3 { border-radius: 40% 60% 55% 45% / 60% 40% 60% 40%; }
.pb4 { border-radius: 52% 48% 62% 38% / 48% 58% 42% 52%; }
.pb5 { border-radius: 60% 40% 45% 55% / 52% 46% 54% 48%; }
.pb6 { border-radius: 44% 56% 50% 50% / 40% 60% 40% 60%; }

.stones { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.stones blockquote { margin: 0; padding: 22px 24px; background: var(--soft); border-radius: 38% 62% 44% 56% / 18% 22% 20% 24%; }
.stones li:nth-child(1) blockquote { transform: rotate(-1.5deg); }
.stones li:nth-child(2) blockquote { transform: rotate(1.2deg); border-radius: 56% 44% 60% 40% / 22% 18% 24% 20%; }
.stones li:nth-child(3) blockquote { transform: rotate(-.6deg); }
.stones li:nth-child(4) blockquote { transform: rotate(2deg); border-radius: 44% 56% 40% 60% / 20% 24% 18% 22%; }
.stones li:nth-child(5) blockquote { transform: rotate(-2deg); }

.long-quotes { display: grid; gap: 16px; }
.long-quotes blockquote { margin: 0; padding: 22px; background: var(--surface); border-radius: var(--radius); }

/* ---------- The pool ---------- */
.pool-wrap { padding: 24px 0 64px; }
.pool {
  position: relative; background: var(--water-soft); border-radius: 50% / 34%;
  padding: 64px 28px 56px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.pool h2 { margin: 0; }
.pool__call a, .pool__rating a { display: inline-block; min-height: 44px; padding-block: 10px; font-weight: 700; }
.pool__rating { font-size: 15px; }
.pool__fx { position: absolute; top: 18px; left: 50%; width: 0; height: 0; }
.pool__drop, .pool__ring { display: none; }

.foot { padding: 28px 0 24px; font-size: 15px; line-height: 1.5; border-top: 1px solid var(--line); }
.foot__inner { display: grid; gap: 4px; }
.foot a { color: var(--ink); display: inline-block; min-height: 44px; padding-block: 11px; }
.dock { position: fixed; inset-inline: 0; bottom: 0; z-index: 60; display: flex; gap: 10px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: color-mix(in oklab, var(--bg) 94%, transparent); backdrop-filter: blur(8px); border-top: 1px solid var(--line); transition: transform 300ms var(--k-ease), opacity 300ms var(--k-ease); }
.dock > * { flex: 1 1 0; }
.dock.is-hidden { transform: translateY(110%); opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .dock { transition: none; } }
body { padding-bottom: 76px; }

/* ---------- Motion: drop, water, ripples (html.intro = JS + motion allowed) ---------- */
@media (prefers-reduced-motion: no-preference) {
  html.intro .drop { display: block; animation: drop-grow 400ms var(--k-spring) 200ms both, drop-fall 400ms cubic-bezier(.5, 0, 1, 1) 750ms both; transform-origin: 50% 0; }
  html.intro .spout__win { animation: win-fill 1200ms var(--k-ease-inout) 900ms both; }
  html.intro .spout__water { animation: water-fill 1200ms var(--k-ease-inout) 900ms both; }
  html.intro .st--1 .ripple {
    display: block; position: absolute; top: -12px; left: 50%; width: 24px; height: 24px; margin-left: -12px;
    border: 2px solid var(--primary); border-radius: 50%; animation: ripple 700ms ease-out 2100ms both;
  }
  .k-motion .pool__drop { display: block; position: absolute; width: 14px; height: 18px; margin-left: -7px; top: -6px; fill: var(--primary); opacity: 0; }
  .k-motion .pool__ring { display: block; position: absolute; width: 60px; height: 22px; margin: 6px 0 0 -30px; border: 2px solid var(--primary); border-radius: 50%; opacity: 0; }
  .k-motion .pool.is-in .pool__drop { animation: pool-drop 500ms cubic-bezier(.5, 0, 1, 1) 200ms both; }
  .k-motion .pool.is-in .pool__ring { animation: ring 800ms ease-out 700ms both; }
  .k-motion .pool.is-in .pool__ring--2 { animation-delay: 950ms; }
}
/* Stream fill tied to scrolling, where the browser supports it. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    html.intro .st { view-timeline-name: --st; }
    html.intro .st .stream__win { animation: win-fill linear both; animation-timeline: --st; animation-range: entry 20% cover 60%; }
    html.intro .st .stream__water { animation: water-fill linear both; animation-timeline: --st; animation-range: entry 20% cover 60%; }
    html.intro .st .pebble span { animation: pebble linear both; animation-timeline: --st; animation-range: entry 20% entry 60%; }
    html.intro .stream[data-reveal] { opacity: 1 !important; }
  }
}
/* No scroll timelines: the kit's reveal adds .is-in and the water fills over 1200ms. */
@supports not (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .k-motion .stream__win { transform: translateY(-100%); transition: transform 1200ms var(--k-ease-inout); }
    .k-motion .stream__water { transform: translateY(100%); transition: transform 1200ms var(--k-ease-inout); }
    .k-motion .stream.is-in .stream__win, .k-motion .stream.is-in .stream__water { transform: none; }
    .k-motion .pebble span { opacity: 0; transition: opacity 400ms 900ms; }
    .k-motion .stream.is-in .pebble span { opacity: 1; }
  }
}
@keyframes win-fill { from { transform: translateY(-100%); } to { transform: none; } }
@keyframes water-fill { from { transform: translateY(100%); } to { transform: none; } }
@keyframes pebble { from { opacity: 0; } to { opacity: 1; } }
@keyframes drop-grow { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes drop-fall { 0% { translate: 0 0; opacity: 1; } 75% { opacity: 1; } 100% { translate: 0 36px; opacity: 0; } }
@keyframes ripple { from { transform: scale(.6); opacity: .5; } to { transform: scale(1.6); opacity: 0; } }
@keyframes pool-drop { 0% { transform: translateY(-60px); opacity: 0; } 30% { opacity: 1; } 90% { opacity: 1; } 100% { transform: none; opacity: 0; } }
@keyframes ring { from { transform: scale(.5); opacity: .6; } to { transform: scale(1.5); opacity: 0; } }

/* ---------- Subpages ---------- */
.subpage__main { max-width: 720px; margin-inline: auto; padding: 48px var(--gutter) 64px; }
.subpage__main h1 { font-size: 34px; line-height: 1.2; margin-bottom: 16px; }
.subpage__main h2 { font-size: 22px; margin: 28px 0 10px; }
.subpage__main p, .subpage__main li { margin-bottom: 8px; }
.subpage__eyebrow { color: var(--primary); font-weight: 600; }
.subpage__back { display: inline-block; min-height: 44px; padding-block: 10px; font-weight: 700; }
body.subpage { padding-bottom: 0; }

/* ================= Desktop: an S between two columns ================= */
@media (min-width: 1000px) {
  :root { --gutter: 24px; --spine: 0px; }
  h2 { font-size: 44px; }
  .top__inner { min-height: 72px; }
  .top__nav { display: flex; gap: 6px; margin-inline-start: auto; }
  .top__nav a { color: var(--ink); text-decoration: none; font-weight: 600; padding: 10px 14px; border-radius: 22px; }
  .top__nav a:hover { background: var(--soft); }
  .top__call { margin-inline-start: 8px; }
  .hero { padding: 48px 0 120px; }
  .name { font-size: 150px; }
  .h1-line { font-size: 34px; margin-top: 28px; }
  .hero__inner > :not(h1):not(.eyebrow) { max-width: calc(5 / 12 * 100%); }
  .hero__actions { flex-direction: row; flex-wrap: wrap; }
  .hero__actions .k-btn { width: auto; }
  .stream { right: auto; left: calc(50% - 80px); width: 160px; }
  .stream .m { display: none; }
  .stream .d { display: inline; }
  .st { padding-block: 88px; }
  .st__body { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; }
  .st__body > * { grid-column: 1 / span 5; }
  .st--2 .st__body > *, .st--5 .st__body > * { grid-column: 8 / span 5; }
  .big-quote { padding: 36px; }
  .big-quote p { font-size: 28px; }
  .photos { grid-template-columns: repeat(3, 1fr); align-items: start; }
  .photos li:nth-child(3n + 2) { margin-top: 40px; }
  .st--4 .st__body > h2 { grid-column: 8 / span 5; }
  .stones { grid-column: 1 / -1 !important; grid-template-columns: repeat(12, 1fr); column-gap: 24px; row-gap: 28px; }
  .stones li:nth-child(odd) { grid-column: 1 / span 5; }
  .stones li:nth-child(even) { grid-column: 8 / span 5; margin-top: 40px; }
  .pool-wrap .wrap { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; }
  .pool { grid-column: 6 / span 6; padding: 80px 48px 64px; }
  .foot__inner { grid-template-columns: repeat(3, auto); justify-content: space-between; }
  .dock { display: none; }
  body { padding-bottom: 0; }
}
