/* שער הקור · "השלט": מסך LCD ומקשי גומי. design.md הוא המקור. */
:root {
  --bg: #F3F7FB;
  --surface: #FFFFFF;
  --ink: #052766;
  --muted: #3B4F75;
  --primary: #0248A6;
  --primary-ink: #FFFFFF;
  --soft: #DCEBF7;
  --accent: #1275C0;
  --line: #A7B6CA;
  --focus: #052766;
  --warm-1: #F1E3D3;
  --warm-2: #E8CDB0;
  --radius: 18px;
  --k-btn-radius: 22px;
  --font-head: "Rubik Variable", system-ui, sans-serif;
  --lcd: "Handjet Variable", "Rubik Variable", monospace;
  --gutter: 16px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-head); font-size: 17px; line-height: 1.65; overflow-x: clip; }
main { overflow-x: clip; }
img, svg { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 36px; line-height: 1.1; font-weight: 700; }
h2 { font-size: 28px; line-height: 1.2; font-weight: 700; margin-bottom: 24px; }
h3 { font-size: 19px; line-height: 1.3; font-weight: 600; }
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: 10px; }
.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; text-align: center; line-height: 1.4; }

/* ---------- Header ---------- */
.top { position: sticky; top: 0; z-index: 50; background: var(--surface); border-bottom: 1px solid var(--soft); }
.top__inner { max-width: 1240px; margin-inline: auto; padding: 8px var(--gutter); display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { color: var(--ink); text-decoration: none; font-weight: 700; font-size: 22px; line-height: 1.1; display: flex; flex-direction: column; gap: 2px; min-height: 44px; justify-content: center; }
.brand__wave { width: 72px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; }
.top__nav { display: none; }
.top__call { margin-inline-start: auto; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: #fff; box-shadow: 0 3px 0 #C9D6E6; }
.top__call svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Layout: device + scroll ---------- */
.layout { position: relative; max-width: 1240px; margin-inline: auto; padding-inline: var(--gutter); display: grid; grid-template-columns: minmax(0, 1fr); }
.heat { display: none; }
.air { display: none; }
.hero { padding: 32px 0 28px; position: relative; z-index: 1; }
.eyebrow { font-size: 15px; font-weight: 600; color: var(--accent); margin-bottom: 10px; }
.hero__lead { margin-top: 14px; color: var(--muted); }
.hero__actions { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
.hero__actions .k-btn { width: 100%; }
.rating { margin-top: 14px; font-size: 15px; color: var(--muted); }
.rating strong { color: var(--ink); }

/* The remote */
.remote {
  position: relative; z-index: 1; background: var(--surface); border-radius: 40px; padding: 16px;
  border: 1px solid var(--line); box-shadow: 0 24px 48px -24px rgb(5 39 102 / .35); margin-bottom: 48px;
}
.lcd {
  position: relative; height: 128px; border-radius: 14px; background: var(--soft); overflow: hidden;
  display: grid; grid-template-columns: 1fr auto; grid-template-rows: 1fr auto; padding: 10px 16px; color: var(--ink);
  box-shadow: inset 0 2px 6px rgb(5 39 102 / .12);
}
.lcd__glow { position: absolute; inset: 0; background: radial-gradient(120% 90% at 70% 30%, rgb(255 255 255 / .35), transparent 70%); }
.lcd__temp { grid-row: 1 / span 2; align-self: center; font-family: var(--lcd); font-weight: 600; font-size: 72px; line-height: 1; font-variant-numeric: tabular-nums; position: relative; }
.lcd__mode { font-family: var(--lcd); font-weight: 500; font-size: 20px; line-height: 1.1; overflow: hidden; height: 24px; position: relative; justify-self: end; }
.lcd__line { display: block; }
.lcd__fan { width: 22px; height: 22px; justify-self: end; margin-top: 4px; fill: var(--ink); position: absolute; left: 16px; top: 42px; }
.lcd__brand { position: absolute; left: 16px; bottom: 8px; font-family: var(--lcd); font-size: 16px; }
.keys { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.key {
  display: flex; align-items: center; justify-content: center; gap: 8px; height: 64px; border-radius: 22px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: 0 4px 0 #C9D6E6;
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: 17px;
  transition: transform 120ms var(--k-ease), box-shadow 120ms var(--k-ease);
}
.key svg { width: 22px; height: 22px; fill: none; stroke: var(--primary); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.key:active { transform: translateY(3px); box-shadow: 0 1px 0 #C9D6E6; }
@media (hover: hover) { .key:hover { background: #F7FAFD; } }

/* ---------- Sections ---------- */
.layout > section:not(.hero) { padding-block: 56px; position: relative; z-index: 1; }
.modes__grid { display: grid; gap: 16px; }
.mode { background: var(--surface); border: 1px solid var(--soft); border-radius: var(--radius); padding: 22px; scroll-margin-top: 90px; }
.mode__tag { font-family: var(--lcd); font-weight: 500; font-size: 20px; color: var(--accent); line-height: 1.1; margin-bottom: 6px; }
.mode > p:not(.mode__tag) { color: var(--muted); margin-top: 6px; }
.mode blockquote { margin: 14px 0 0; padding: 12px 14px; background: var(--bg); border-radius: 12px; font-size: 16px; }
.mode blockquote footer, .clean__quotes footer, .reviews__grid footer, .big-quote footer { font-size: 15px; color: var(--muted); margin-top: 6px; }
@media (prefers-reduced-motion: no-preference) {
  .mode:target .mode__tag { animation: blink 400ms var(--k-ease); }
}
@keyframes blink { 50% { opacity: .3; } }

.story { }
.big-quote { margin: 0; padding: 28px 24px; background: var(--soft); border-radius: var(--radius); }
.big-quote p { font-size: 21px; line-height: 1.5; font-weight: 500; }

.clean__grid { display: grid; gap: 28px; }
.mem { list-style: none; margin: 0 calc(var(--gutter) * -1); padding: 4px var(--gutter) 12px; display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; }
.mem li { position: relative; flex: 0 0 75%; scroll-snap-align: center; }
.mem a { display: block; border-radius: 14px; overflow: hidden; }
.mem img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.mem__tag { position: absolute; top: 10px; inset-inline-start: 10px; background: var(--ink); color: #fff; font-family: var(--lcd); font-size: 18px; line-height: 1; padding: 6px 10px; border-radius: 8px; pointer-events: none; }
.clean__quotes { display: grid; gap: 14px; }
.clean__quotes blockquote, .reviews__grid blockquote { margin: 0; padding: 18px 20px; background: var(--surface); border-radius: var(--radius); border: 1px solid var(--soft); }

.waves svg { width: 100%; height: 40px; overflow: visible; fill: none; stroke-width: 5; stroke-linecap: round; }
.waves .w1 { stroke: #052766; }
.waves .w2 { stroke: #0248A6; }
.waves .w3 { stroke: #1275C0; }
.van__grid { margin-top: 20px; border-radius: var(--radius); overflow: hidden; background: var(--ink); }
.van__photo img { width: 100%; }
.van__band { padding: 22px 20px 24px; color: #fff; }
.van__band h2 { color: #fff; margin-bottom: 10px; font-size: 24px; }
.van__line { font-size: 17px; }
.van__band a { color: #fff; font-weight: 700; display: inline-block; min-height: 44px; padding-block: 10px; }
.van__band :focus-visible { outline-color: #fff; }

.reviews__grid { display: grid; gap: 14px; }
.reviews__more { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; }
.k-link { min-height: 44px; display: inline-flex; align-items: center; }

.ask { text-align: start; }
.ask h2 { margin-bottom: 8px; }
.ask__by { color: var(--muted); font-size: 15px; margin-bottom: 22px; }

.foot { padding: 32px 0 28px; border-top: 1px solid var(--soft); font-size: 15px; background: var(--surface); }
.foot__inner { max-width: 1240px; margin-inline: auto; padding-inline: var(--gutter); display: grid; gap: 6px; }
.foot a { color: var(--ink); display: inline-block; min-height: 44px; padding-block: 10px; }

.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: var(--surface); border-top: 1px solid var(--soft); 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; }

/* ---------- Intro: warm room cools down (html.intro only) ---------- */
html.intro .heat {
  display: block; position: absolute; inset-inline: 0; top: 0; height: 100%; max-height: 1180px; z-index: 0; pointer-events: none;
  background: linear-gradient(var(--warm-1), var(--warm-2)); opacity: 0;
  -webkit-mask: linear-gradient(#000 70%, transparent); mask: linear-gradient(#000 70%, transparent);
}
@media (prefers-reduced-motion: no-preference) {
  html.intro .heat { animation: heat-out 1600ms var(--k-ease-inout) 450ms both; }
  html.intro .lcd__glow { animation: glow-on 200ms ease-out 300ms both; }
  html.intro .lcd__mode { animation: fade-in 300ms var(--k-ease-out) 2050ms both; }
  html.intro .lcd__fan { animation: spin 1200ms var(--k-ease-out) 2050ms both; }
  html.intro .air {
    display: block; position: absolute; top: 0; inset-inline: 10%; width: 80%; height: 60px; z-index: 0; pointer-events: none;
    fill: none; stroke: rgb(18 117 192 / .4); stroke-width: 2; stroke-linecap: round;
    animation: air 800ms ease-out 2100ms 2 both;
  }
  .lcd__line.is-out { animation: line-out 220ms var(--k-ease) both; }
  .lcd__line.is-in { animation: line-in 220ms var(--k-ease) both; }
}
@keyframes heat-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes glow-on { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes spin { from { transform: rotate(0); } to { transform: rotate(720deg); } }
@keyframes air { 0% { opacity: 0; transform: translateY(-6px); } 50% { opacity: .5; } 100% { opacity: 0; transform: translateY(10px); } }
@keyframes line-out { to { transform: translateY(-100%); opacity: 0; } }
@keyframes line-in { from { transform: translateY(100%); opacity: 0; } to { transform: none; opacity: 1; } }
.lcd__fan { transform-origin: 50% 50%; }

@media (prefers-reduced-motion: no-preference) {
  .k-motion .waves path { transform: translateX(-8%); opacity: 0; transition: transform 700ms var(--k-ease-out), opacity 700ms var(--k-ease-out); }
  .k-motion .waves .w2 { transition-delay: 80ms; }
  .k-motion .waves .w3 { transition-delay: 160ms; }
  .k-motion .waves.is-in path { transform: none; opacity: 1; }
}

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

/* ================= Desktop: the remote stays on the right ================= */
@media (min-width: 1100px) {
  :root { --gutter: 24px; }
  body { font-size: 18px; }
  h1 { font-size: 56px; }
  h2 { font-size: 38px; margin-bottom: 32px; }
  h3 { font-size: 21px; }
  .top__inner { min-height: 72px; }
  .top__nav { display: flex; gap: 6px; margin-inline: auto 24px; }
  .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: 0; }
  .layout { grid-template-columns: 360px minmax(0, 1fr); column-gap: 72px; }
  .layout > * { grid-column: 2; }
  .heat, html.intro .heat { grid-column: 1 / -1; grid-row: 1; max-height: none; }
  .remote { grid-column: 1; grid-row: 1 / span 20; position: sticky; top: 96px; align-self: start; margin: 40px 0 48px; }
  .hero { padding: 120px 0 64px; }
  .hero__actions { flex-direction: row; }
  .hero__actions .k-btn { width: auto; }
  .lcd { height: 150px; }
  .lcd__temp { font-size: 96px; }
  .lcd__mode { font-size: 22px; height: 26px; }
  .lcd__fan { top: 50px; }
  .modes__grid { grid-template-columns: 1fr 1fr; }
  .big-quote { padding: 40px; }
  .big-quote p { font-size: 28px; }
  .clean__grid { grid-template-columns: 1.6fr 1fr; align-items: start; }
  .mem { display: grid; grid-template-columns: 1fr 1fr; margin: 0; padding: 0; overflow: visible; }
  .mem li { flex: none; }
  .mem li:first-child { grid-column: 1 / -1; }
  .mem__tall img { aspect-ratio: 3 / 4; }
  .van__grid { display: grid; grid-template-columns: 60% 40%; align-items: stretch; }
  .van__photo img { height: 100%; object-fit: cover; }
  .van__band { display: flex; flex-direction: column; justify-content: center; padding: 32px; }
  .van__band h2 { font-size: 30px; }
  .reviews__grid { grid-template-columns: 1fr 1fr; }
  .dock { display: none; }
  body { padding-bottom: 0; }
  .foot__inner { grid-template-columns: repeat(3, auto); justify-content: space-between; }
}
