/* ═══════════════════════════════════════════════════════════════════
   KR HOME DESIGN — global stylesheet (rebuilt 17.11.2026)
   Loaded on every page. Logical properties only: the same rules serve
   RTL (Hebrew, the default) and LTR.

   Type: ONE family, Noto Sans Hebrew. Thin (100-200) for display,
   light (300) for text. Hebrew has no italic and no capitals, so
   hierarchy comes from size, weight and space, never from tracking
   tricks that break Hebrew letters.

   Rules that keep Hebrew from being cut:
   - display line-height is never below 1.12
   - nothing that holds text has overflow:hidden on the block axis
   - sizes are clamp()ed with a ceiling, headings use text-wrap:balance
   ═══════════════════════════════════════════════════════════════════ */

:root {
  /* Palette (17.11.2026, Avni: "more of the beige style, soft"): the bone and paper tones of the
     earlier beige design, a warm soft ink, one terracotta accent.
     21.11.2026, Katya ("instead of black, a dark brown", "combine the two"): a few blocks per
     page are a dark brown band (.is-night: it sets --night and the light text colours for
     everything inside it). Outside such a block the --night names keep their beige values:
     footer, phone menu and lightbox stay beige. Nothing is black. */
  --paper: #ece4d4;
  --paper-2: #ddd3bf;
  --paper-3: #d9cfba;
  --card: #f4efe3;
  --ink: #2a2520;
  --ink-2: #554c42;
  --muted: #7d7464;
  --line: rgba(42, 37, 32, .15);
  --line-strong: rgba(42, 37, 32, .34);
  --accent: #a65e3c;
  --accent-deep: #8a4a2c;
  --accent-soft: var(--accent);
  --night: #ddd3bf;
  --night-2: #d0c5ae;
  --on-night: var(--ink);
  --on-night-muted: var(--ink-2);
  --line-night: rgba(42, 37, 32, .24);
  --foot: var(--night);
  --brown: #382c23;
  --brown-2: #46382d;
  --on-brown: #f3ecdf;
  --shade: #2a211a;
  --on-media: #f7f2e8;

  /* Old variable names still used by the style editor (theme.json) */
  --bone: var(--paper);
  --bone-2: var(--paper-2);

  /* Type */
  --font: 'Noto Sans Hebrew', 'Heebo', 'Assistant', system-ui, sans-serif;
  --hebrew: var(--font);
  --hebrew-serif: var(--font);
  --serif: var(--font);
  --mono: var(--font);

  --fs-hero: clamp(2.5rem, 1.1rem + 5.4vw, 6rem);       /* 40 → 96 */
  --fs-h1: clamp(2.25rem, 1.2rem + 4.2vw, 4.75rem);     /* 36 → 76 */
  --fs-h2: clamp(1.875rem, 1.2rem + 2.7vw, 3.5rem);     /* 30 → 56 */
  --fs-h3: clamp(1.375rem, 1.1rem + 1.1vw, 2rem);       /* 22 → 32 */
  --fs-lead: clamp(1.125rem, 1rem + .55vw, 1.4375rem);  /* 18 → 23 */
  --fs-body: clamp(1rem, .96rem + .2vw, 1.125rem);      /* 16 → 18 */
  --fs-small: .875rem;
  --fs-label: .8125rem;

  /* Layout */
  --wrap: 1360px;
  --gutter: clamp(20px, 4.4vw, 64px);
  --gap: clamp(16px, 2vw, 28px);
  --section: clamp(64px, 8.5vw, 136px);
  --nav-h: 76px;
  --radius: clamp(8px, .9vw, 14px);

  /* Motion */
  --ease: cubic-bezier(.22, 1, .36, 1);
  --slow: cubic-bezier(.65, 0, .2, 1);

  /* Legacy spacing names */
  --pad-page: var(--gutter);
  --pad-section: var(--section);
}

/* ─── Reset ─── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-block-start: var(--nav-h);
}
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-body);
  font-weight: 300;
  line-height: 1.75;
  text-align: start;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  min-block-size: 100vh;
  min-block-size: 100dvh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }
img, video, svg { display: block; max-inline-size: 100%; }
img, video { block-size: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-weight: 200; line-height: 1.16; text-wrap: balance; }
p { text-wrap: pretty; }
::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; }
[hidden] { display: none !important; }

/* Latin words and numbers inside Hebrew text keep their own direction */
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }

/* Hebrew emphasis: colour, not italic */
.ac { color: var(--accent); }
.is-media .ac, .is-night .ac { color: var(--accent-soft); }

.sr-only {
  position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
  position: fixed; inset-block-start: 8px; inset-inline-start: 8px; z-index: 1000;
  background: var(--ink); color: var(--paper); padding: 10px 18px; font-size: var(--fs-small);
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* ─── Layout ─── */
.wrap {
  inline-size: 100%;
  max-inline-size: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--narrow { max-inline-size: calc(880px + 2 * var(--gutter)); }
.section { position: relative; padding-block: var(--section); }
.section--tight { padding-block: calc(var(--section) * .6); }
.section--flush-top { padding-block-start: 0; }
/* A dark brown band: light text inside */
.is-night {
  --night: var(--brown); --night-2: var(--brown-2); --on-night: var(--on-brown);
  --on-night-muted: rgba(243, 236, 223, .74); --line-night: rgba(243, 236, 223, .24); --accent-soft: #e2bd9c;
  background: var(--night); color: var(--on-night);
}
/* Words on top of a picture or a clip */
.is-media {
  --on-night: var(--on-media); --on-night-muted: rgba(247, 242, 232, .8); --line-night: rgba(247, 242, 232, .3);
  --night: var(--shade); --night-2: #3a2e25; --accent-soft: #e6c4a6;
  background: var(--shade); color: var(--on-media);
}
.is-tint { background: var(--paper-2); }
/* Two blocks of the same tone that follow each other share ONE gap, not two paddings */
.section:not(.is-night):not(.is-tint) + .section:not(.is-night):not(.is-tint),
.section.is-night + .section.is-night,
.section.is-tint + .section.is-tint { padding-block-start: 0; }

/* ─── Type roles ─── */
.t-hero { font-size: var(--fs-hero); font-weight: 100; line-height: 1.12; letter-spacing: -.01em; }
.t-h1 { font-size: var(--fs-h1); font-weight: 100; line-height: 1.14; letter-spacing: -.008em; }
.t-h2 { font-size: var(--fs-h2); font-weight: 200; line-height: 1.18; }
.t-h3 { font-size: var(--fs-h3); font-weight: 200; line-height: 1.3; }
.t-lead { font-size: var(--fs-lead); font-weight: 300; line-height: 1.7; color: var(--ink-2); }
.is-night .t-lead { color: var(--on-night-muted); }
.t-body { font-size: var(--fs-body); line-height: 1.85; color: var(--ink-2); }
.is-night .t-body { color: var(--on-night-muted); }
.t-small { font-size: var(--fs-small); line-height: 1.6; color: var(--muted); }
.is-night .t-small { color: var(--on-night-muted); }

/* Small label above a heading: a short line, then the words */
.label {
  display: inline-flex; align-items: center; gap: 14px;
  font-size: var(--fs-label); font-weight: 400; letter-spacing: .08em;
  color: var(--muted); line-height: 1.4;
}
.label::before { content: ''; inline-size: 36px; block-size: 1px; background: currentColor; flex: none; }
.is-night .label { color: var(--on-night-muted); }
.label--plain::before { display: none; }

/* Section heading block: label, title, optional lead: one shape everywhere */
.head { display: grid; gap: 20px; max-inline-size: 760px; margin-block-end: clamp(36px, 5vw, 72px); }
.head--center { margin-inline: auto; text-align: center; justify-items: center; }
.head--split {
  max-inline-size: none; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: clamp(32px, 6vw, 96px); align-items: end;
}
.head--split .label { grid-column: 1 / -1; }
@media (max-width: 860px) { .head--split { grid-template-columns: 1fr; } }

/* ─── Links and buttons ─── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  min-block-size: 54px; padding-block: 14px; padding-inline: 34px;
  border: 1px solid var(--ink); border-radius: 999px;
  font-size: 1rem; font-weight: 300; line-height: 1.2; letter-spacing: .02em;
  transition: background .5s var(--ease), color .5s var(--ease), border-color .5s var(--ease);
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn--solid { background: var(--ink); color: var(--paper); }
.btn--solid:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.is-media .btn, .btn--light { border-color: var(--on-media); color: var(--on-media); }
.is-media .btn:hover, .btn--light:hover { background: var(--on-media); color: var(--shade); }
.is-night .btn { border-color: var(--on-night); color: var(--on-night); }
.is-night .btn:hover { background: var(--on-night); color: var(--night); }
.is-night .btn--solid { background: var(--on-night); color: var(--night); border-color: var(--on-night); }
.is-night .btn--solid:hover { background: var(--accent-soft); border-color: var(--accent-soft); color: var(--night); }
.btn .arrow { transition: transform .5s var(--ease); }
.btn:hover .arrow { transform: translateX(-6px); }
[dir="ltr"] .btn:hover .arrow { transform: translateX(6px); }

/* Arrow that points "forward" in the reading direction */
.arrow { display: inline-block; inline-size: 22px; block-size: 10px; flex: none; }
[dir="ltr"] .arrow { transform: scaleX(-1); }

.link {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 1rem; line-height: 1.4; padding-block: 6px;
  background: linear-gradient(currentColor, currentColor) no-repeat;
  background-size: 100% 1px; background-position: 0 100%;
  transition: color .4s var(--ease), gap .4s var(--ease);
}
.link:hover { color: var(--accent); gap: 18px; }
.is-night .link:hover, .is-media .link:hover { color: var(--accent-soft); }

/* ─── Header / navigation ─── */
.nav {
  position: fixed; inset-block-start: 0; inset-inline: 0; z-index: 200;
  block-size: var(--nav-h);
  transition: background .5s var(--ease), color .5s var(--ease), transform .5s var(--ease), box-shadow .5s var(--ease);
  color: var(--ink); background: var(--paper);
}
.nav__in {
  block-size: 100%; display: grid; align-items: center;
  grid-template-columns: 1fr auto 1fr; column-gap: 24px;
}
.nav--over { color: var(--on-media); }                    /* on top of a dark hero */
.nav__in { position: relative; isolation: isolate; }
.nav__in::before {
  content: ''; position: absolute; z-index: -1; inset-block: 9px; inset-inline: calc(var(--gutter) - 20px);
  border-radius: 999px; background: var(--card);
  box-shadow: 0 16px 38px -22px rgba(42, 37, 32, .55), 0 0 0 1px rgba(42, 37, 32, .07);
  opacity: 0; transition: opacity .45s var(--ease);
}
.nav--solid { color: var(--ink); background: transparent; }
.menu-open .nav { background: transparent; }
.nav--solid .nav__in::before { opacity: 1; }
.menu-open .nav__in::before { opacity: 0; }
.nav--hidden { transform: translateY(-100%); }
.nav__brand { justify-self: start; display: block; line-height: 0; transition: opacity .5s var(--ease); }
.logo {
  display: block; aspect-ratio: 468 / 448; background: currentColor;
  -webkit-mask: var(--logo) center / contain no-repeat; mask: var(--logo) center / contain no-repeat;
}
.nav__brand .logo { block-size: calc(var(--nav-h) - 24px); }
.nav__list { display: flex; gap: clamp(20px, 2.6vw, 44px); font-size: .9375rem; line-height: 1.2; }
.nav__list a { position: relative; padding-block: 10px; display: block; white-space: nowrap; }
.nav__list a::after {
  content: ''; position: absolute; inset-inline: 0; inset-block-end: 4px; block-size: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: center;
  transition: transform .5s var(--ease);
}
.nav__list a:hover::after, .nav__list a[aria-current="page"]::after { transform: scaleX(1); }
.nav__cta {
  justify-self: end; display: inline-flex; align-items: center; min-block-size: 42px;
  padding-inline: 24px; border: 1px solid currentColor; border-radius: 999px;
  font-size: .9375rem; line-height: 1.2; white-space: nowrap;
  transition: background .4s var(--ease), color .4s var(--ease), border-color .4s var(--ease);
}
.nav__cta:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.nav--over:not(.nav--solid) .nav__cta:hover { background: var(--on-media); border-color: var(--on-media); color: var(--shade); }
.nav__burger { display: none; justify-self: end; inline-size: 44px; block-size: 44px; position: relative; }
.nav__burger i { position: absolute; inset-inline: 9px; block-size: 1px; background: currentColor; transition: transform .5s var(--ease), inset-block-start .5s var(--ease); }
.nav__burger i:nth-child(1) { inset-block-start: 17px; }
.nav__burger i:nth-child(2) { inset-block-start: 26px; }
.menu-open .nav__burger i:nth-child(1) { inset-block-start: 22px; transform: rotate(45deg); }
.menu-open .nav__burger i:nth-child(2) { inset-block-start: 22px; transform: rotate(-45deg); }

/* Full-screen menu (phones and tablets) */
.menu {
  position: fixed; inset: 0; z-index: 190; background: var(--night); color: var(--on-night);
  display: flex; flex-direction: column; justify-content: center;
  padding-block: calc(var(--nav-h) + 24px) 40px; padding-inline: var(--gutter);
  opacity: 0; visibility: hidden; transition: opacity .5s var(--ease), visibility 0s .5s;
  overflow-y: auto;
}
.menu-open .menu { opacity: 1; visibility: visible; transition: opacity .5s var(--ease); }
.menu-open .nav { color: var(--ink); transform: none; }
.menu-open { overflow: hidden; }
.menu__list { display: grid; gap: 6px; }
.menu__list a {
  display: block; font-size: clamp(2rem, 9vw, 3.25rem); font-weight: 100; line-height: 1.35;
  opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease), color .3s;
}
.menu-open .menu__list a { opacity: 1; transform: none; transition-delay: calc(.06s * var(--i) + .1s); }
.menu__list a:hover, .menu__list a[aria-current="page"] { color: var(--accent); }
.menu__foot { margin-block-start: 44px; padding-block-start: 24px; border-block-start: 1px solid var(--line-night); display: flex; flex-wrap: wrap; gap: 12px 28px; font-size: var(--fs-small); color: var(--on-night-muted); }
.menu__foot a:hover { color: var(--on-night); }

@media (max-width: 980px) {
  :root { --nav-h: 64px; }
  .nav__in { grid-template-columns: 1fr auto; }
  .nav__in > nav, .nav__cta { display: none; }
  .nav__burger { display: block; }
}

/* ─── Reveal on scroll ───
   It starts a little before the element reaches the screen (main.js) and is short, so nothing
   is still half hidden while the page is being scrolled. Text fades and rises; a picture only
   settles (it is visible from the first moment, never clipped or transparent). */
[data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--d, 0) * 60ms); }
[data-reveal].in { opacity: 1; transform: none; }
[data-reveal="fade"] { transform: none; }
/* A block that holds a picture or a clip is never transparent: it only rises into place */
[data-reveal]:has(img, video) { opacity: 1; transform: translateY(12px); transition: transform .8s var(--ease); }
[data-reveal].in:has(img, video) { transform: none; }
[data-reveal="frame"] { opacity: 1; transform: none; transition: none; }
[data-reveal="frame"] > img, [data-reveal="frame"] > video { transform: scale(1.05); transition: transform 1.4s var(--ease); transition-delay: calc(var(--d, 0) * 60ms); }
[data-reveal="frame"].in > img, [data-reveal="frame"].in > video { transform: none; }
.no-js [data-reveal] { opacity: 1; transform: none; }

/* ─── Picture frames ─── */
.frame { position: relative; overflow: hidden; background: var(--paper-3); border-radius: var(--radius); }
.frame > img, .frame > video { inline-size: 100%; block-size: 100%; object-fit: cover; }
.is-night .frame { background: var(--night-2); }
.zoom > img { transition: transform 1.6s var(--ease); }
a:hover .zoom > img, .zoom:hover > img { transform: scale(1.045); }

/* ─── Before / after (model → render) ─── */
.ba { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--night-2); user-select: none; -webkit-user-select: none; touch-action: pan-y; --pos: 50%; direction: ltr; }
.ba img { inline-size: 100%; block-size: 100%; object-fit: cover; pointer-events: none; }
.ba__top { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--pos)); }
.ba__handle { position: absolute; inset-block: 0; left: var(--pos); inline-size: 44px; margin-left: -22px; cursor: ew-resize; display: grid; place-items: center; }
.ba__handle::before { content: ''; position: absolute; inset-block: 0; left: 50%; inline-size: 1px; background: #fff; opacity: .9; }
.ba__knob { position: relative; inline-size: 52px; block-size: 52px; border-radius: 50%; background: rgba(244, 239, 227, .97); color: #2a2520; display: grid; place-items: center; box-shadow: 0 6px 26px rgba(42, 37, 32, .22); transition: transform .4s var(--ease); }
.ba:hover .ba__knob, .ba.dragging .ba__knob { transform: scale(1.08); }
.ba__knob svg { inline-size: 22px; block-size: 22px; }
.ba__tag { position: absolute; inset-block-end: 16px; padding: 7px 14px; font-size: .8125rem; line-height: 1.3; color: #2a2520; background: rgba(244, 239, 227, .82); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-radius: 999px; direction: rtl; transition: opacity .4s; }
.ba__tag--a { left: 16px; }
.ba__tag--b { right: 16px; }
[dir="ltr"] .ba__tag { direction: ltr; }

/* ─── Video tile ─── */
.clip { position: relative; display: block; inline-size: 100%; overflow: hidden; border-radius: var(--radius); background: var(--night-2); cursor: pointer; text-align: start; }
.clip video, .clip img { inline-size: 100%; block-size: 100%; object-fit: cover; }
.clip video { position: absolute; inset: 0; opacity: 0; transition: opacity .8s var(--ease); }
.clip.playing video { opacity: 1; }
.clip__cap { position: absolute; inset-inline: 0; inset-block-end: 0; padding: 48px 18px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #fff; font-size: .875rem; line-height: 1.4; background: linear-gradient(to top, rgba(0, 0, 0, .55), transparent); opacity: 0; transition: opacity .5s var(--ease); pointer-events: none; }
.clip:hover .clip__cap, .clip:focus-visible .clip__cap { opacity: 1; }
.clip__play { inline-size: 40px; block-size: 40px; flex: none; border: 1px solid rgba(255, 255, 255, .8); border-radius: 50%; display: grid; place-items: center; }
.clip__play svg { inline-size: 12px; block-size: 12px; }
@media (hover: none) { .clip__cap { opacity: 1; } }
.clip__sound { position: absolute; z-index: 2; inset-block-start: 12px; inset-inline-start: 12px; display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 10px; border-radius: 999px; font-size: .75rem; line-height: 1.3; letter-spacing: .04em; color: #2a2520; background: rgba(244, 239, 227, .88); pointer-events: none; }
.clip__sound svg { inline-size: 14px; block-size: 14px; flex: none; }

/* ─── Lightbox (pictures and videos) ─── */
.lb { position: fixed; inset: 0; z-index: 500; background: rgba(233, 225, 208, .985); color: var(--ink); display: grid; grid-template-rows: auto 1fr auto; opacity: 0; visibility: hidden; transition: opacity .45s var(--ease), visibility 0s .45s; }
.lb.open { opacity: 1; visibility: visible; transition: opacity .45s var(--ease); }
.lb__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px var(--gutter); font-size: var(--fs-small); color: var(--on-night-muted); min-block-size: 64px; }
.lb__count { direction: ltr; font-variant-numeric: tabular-nums; letter-spacing: .1em; }
.lb__close { inline-size: 44px; block-size: 44px; border: 1px solid var(--line-night); border-radius: 50%; display: grid; place-items: center; transition: background .3s, color .3s; }
.lb__close:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.lb__stage { position: relative; min-block-size: 0; display: grid; place-items: center; padding-inline: clamp(8px, 6vw, 96px); touch-action: pan-y; }
.lb__stage img, .lb__stage video { box-shadow: 0 30px 80px -30px rgba(42, 37, 32, .45); max-inline-size: 100%; max-block-size: 100%; inline-size: auto; block-size: auto; object-fit: contain; position: absolute; inset: 0; margin: auto; opacity: 0; transition: opacity .5s var(--ease); border-radius: var(--radius); }
.lb__stage .show { opacity: 1; }
.lb__nav { position: absolute; inset-block-start: 50%; transform: translateY(-50%); inline-size: 52px; block-size: 52px; border: 1px solid var(--line-night); border-radius: 50%; display: grid; place-items: center; z-index: 2; background: rgba(244, 239, 227, .7); transition: background .3s, color .3s; }
.lb__nav:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.lb__nav--prev { inset-inline-start: clamp(8px, 2vw, 28px); }
.lb__nav--next { inset-inline-end: clamp(8px, 2vw, 28px); }
.lb__nav svg { inline-size: 20px; block-size: 20px; }
[dir="rtl"] .lb__nav--prev svg, [dir="ltr"] .lb__nav--next svg { transform: scaleX(-1); }
.lb__cap { padding: 16px var(--gutter) 22px; text-align: center; font-size: .9375rem; line-height: 1.5; color: var(--on-night-muted); min-block-size: 60px; }
.lb--single .lb__nav, .lb--single .lb__count { display: none; }
@media (max-width: 700px) { .lb__nav { inset-block-start: auto; inset-block-end: 8px; transform: none; inline-size: 46px; block-size: 46px; } .lb__stage { padding-inline: 0; } }
.lb-open { overflow: hidden; }

/* ─── Drag-to-scroll rail ─── */
.rail { display: flex; gap: var(--gap); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; flex: none; }
.rail.dragging { scroll-snap-type: none; cursor: grabbing; }
.rail.dragging a { pointer-events: none; }
.rail-ctl { display: flex; gap: 10px; }
.rail-ctl button { inline-size: 52px; block-size: 52px; border: 1px solid var(--line-strong); border-radius: 50%; display: grid; place-items: center; transition: background .3s, color .3s, opacity .3s, border-color .3s; }
.is-night .rail-ctl button { border-color: var(--line-night); }
.rail-ctl button:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.is-night .rail-ctl button:hover { background: var(--on-night); color: var(--night); border-color: var(--on-night); }
.rail-ctl button:disabled { opacity: .3; pointer-events: none; }
.rail-ctl svg { inline-size: 20px; block-size: 20px; }
[dir="rtl"] .rail-ctl [data-rail="prev"] svg, [dir="ltr"] .rail-ctl [data-rail="next"] svg { transform: scaleX(-1); }

/* ─── Inner page head ─── */
.page-head { padding-block: calc(var(--nav-h) + clamp(56px, 9vw, 130px)) clamp(40px, 6vw, 84px); }
.page-head__in { display: grid; gap: 24px; max-inline-size: 900px; }
.page-head--center .page-head__in { margin-inline: auto; text-align: center; justify-items: center; }

/* ─── Footer ─── */
.foot { background: var(--foot); color: var(--ink); padding-block: clamp(48px, 6vw, 80px) 28px; }
.foot__top { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px clamp(32px, 6vw, 96px); padding-block-end: clamp(40px, 5vw, 72px); border-block-end: 1px solid var(--line-night); }
.foot__brand .logo { inline-size: clamp(104px, 10vw, 136px); }
.foot__brand p { margin-block-start: 22px; color: var(--on-night-muted); font-size: .9375rem; line-height: 1.7; max-inline-size: 34ch; }
.foot h3 { font-size: var(--fs-label); font-weight: 400; letter-spacing: .08em; color: var(--on-night-muted); margin-block-end: 18px; line-height: 1.4; }
.foot__list { display: grid; gap: 10px; font-size: 1rem; line-height: 1.5; }
.foot__list a { transition: color .3s; }
.foot__list a:hover { color: var(--accent-deep); }
.foot__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-block-start: 24px; font-size: .8125rem; color: var(--on-night-muted); line-height: 1.6; }
@media (max-width: 860px) { .foot__top { grid-template-columns: 1fr 1fr; } .foot__brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .foot__top { grid-template-columns: 1fr; } }

/* ─── Motion preferences ─── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; clip-path: none !important; }
}

/* ─── Switcher: one view, several pictures (stages, hours of the day, colour options) ─── */
.sw__stage { position: relative; }
.sw__stage img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: cover; opacity: 0; transition: opacity 1.1s var(--ease); }
.sw__stage img.on { opacity: 1; }
.sw__tabs { display: flex; margin-block-start: 18px; border-block-start: 1px solid var(--line); }
.is-night .sw__tabs { border-color: var(--line-night); }
.sw__tabs button { flex: 1 1 0; min-inline-size: 0; display: grid; gap: 4px; justify-items: start; text-align: start; padding-block: 14px 6px; padding-inline-end: 10px; position: relative; font-size: var(--fs-small); line-height: 1.4; color: var(--muted); transition: color .4s var(--ease); }
.is-night .sw__tabs button { color: var(--on-night-muted); }
.sw__tabs button::before { content: ''; position: absolute; inset-inline: 0; inset-block-start: -1px; block-size: 1px; background: currentColor; transform: scaleX(0); transition: transform .6s var(--ease); }
[dir="rtl"] .sw__tabs button::before { transform-origin: right center; }
[dir="ltr"] .sw__tabs button::before { transform-origin: left center; }
.sw__tabs button.on { color: var(--ink); }
.is-night .sw__tabs button.on { color: var(--on-night); }
.sw__tabs button.on::before { transform: scaleX(1); }
.sw__tabs i { font-style: normal; font-size: .75rem; letter-spacing: .1em; direction: ltr; opacity: .7; }
.sw__tabs span { overflow-wrap: anywhere; }

/* ─── Contact form ─── */
.form { display: grid; gap: 22px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px var(--gap); }
.field { display: grid; gap: 6px; }
.field > span { font-size: var(--fs-label); letter-spacing: .04em; color: var(--muted); line-height: 1.4; }
.is-night .field > span { color: var(--on-night-muted); }
.field input, .field select, .field textarea {
  inline-size: 100%; background: transparent; border: 0; border-block-end: 1px solid var(--line-strong); border-radius: 0;
  padding-block: 10px; padding-inline: 0; font-size: 1.0625rem; font-weight: 300; line-height: 1.5; min-block-size: 46px;
  transition: border-color .4s var(--ease); appearance: none; -webkit-appearance: none;
}
.field input[dir="ltr"] { text-align: end; }
[dir="ltr"] .field input[dir="ltr"] { text-align: start; }
.field textarea { resize: vertical; min-block-size: 92px; }
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%237d7464'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left 2px center; padding-inline-end: 22px; cursor: pointer; }
[dir="ltr"] .field select { background-position: right 2px center; }
.is-night .field input, .is-night .field select, .is-night .field textarea { border-color: var(--line-night); color: var(--on-night); }
.is-night .field select option { color: var(--ink); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.is-night .field input:focus, .is-night .field select:focus, .is-night .field textarea:focus { border-color: var(--accent-soft); }
.hp { position: absolute; inset-inline-start: -9999px; inline-size: 1px; block-size: 1px; overflow: hidden; }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin-block-start: 8px; }
.form__note { font-size: var(--fs-label); color: var(--muted); line-height: 1.5; }
.is-night .form__note { color: var(--on-night-muted); }
.form__status { min-block-size: 1.6em; font-size: .9375rem; line-height: 1.6; }
.form__status[data-state="ok"] { color: #4f7a54; }
.form__status[data-state="err"] { color: #a8432d; }
.is-night .form__status[data-state="ok"] { color: #a9d0a4; }
.is-night .form__status[data-state="err"] { color: #f0a48f; }
.form.sending { opacity: .6; pointer-events: none; }
@media (max-width: 640px) { .form__row { grid-template-columns: 1fr; } }

/* ─── Compare: one model → render slider, thumbnails switch the view (kr_compare) ─── */
.cmp { max-inline-size: 1180px; margin-inline: auto; }
.cmp__item { display: none; }
.cmp__item.on { display: block; animation: cmpIn .7s var(--ease); }
@keyframes cmpIn { from { opacity: 0; } to { opacity: 1; } }
.cmp__cap { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-block-start: 16px; font-size: var(--fs-small); line-height: 1.5; color: var(--on-night-muted); }
.cmp__cap a { color: var(--on-night); border-block-end: 1px solid var(--line-night); padding-block-end: 2px; transition: border-color .3s; }
.cmp__cap a:hover { border-color: currentColor; }
.cmp__thumbs { display: flex; justify-content: center; gap: clamp(8px, 1.2vw, 12px); margin-block-start: clamp(24px, 3vw, 40px); }
.cmp__thumbs button { flex: 0 1 132px; min-inline-size: 0; aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--radius); opacity: .42; outline: 1px solid transparent; outline-offset: 4px; transition: opacity .4s var(--ease), outline-color .4s var(--ease); }
.cmp__thumbs button:hover { opacity: .8; }
.cmp__thumbs button.on { opacity: 1; outline-color: var(--line-night); }
.cmp__thumbs img { inline-size: 100%; block-size: 100%; object-fit: cover; }
/* The slider of this block moves by itself while it is on screen; this chip stops and starts it */
.cmp__stage { position: relative; }
.cmp__auto { position: absolute; z-index: 3; inset-block-start: 14px; inset-inline-end: 14px; inline-size: 44px; block-size: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(244, 239, 227, .9); color: #2a2520; box-shadow: 0 6px 22px rgba(42, 37, 32, .2); transition: transform .4s var(--ease), background .3s; }
.cmp__auto:hover { transform: scale(1.08); background: #f4efe3; }
.cmp__auto svg { inline-size: 14px; block-size: 14px; }
.cmp__auto .i-play, .cmp__auto.on .i-pause { display: block; }
.cmp__auto .i-pause, .cmp__auto.on .i-play { display: none; }
@media (max-width: 600px) { .cmp__cap span { display: none; } }
.cmp--tall { max-inline-size: 620px; }
.cmp--tall .cmp__thumbs button { aspect-ratio: 3 / 4; flex-basis: 84px; }

/* Switcher with many steps: numbers only, the name of the current step underneath */
.sw--steps .sw__tabs { position: relative; padding-block-end: 30px; }
.sw--steps .sw__tabs button { position: static; justify-items: center; padding-inline: 0; padding-block: 12px 4px; }
.sw--steps .sw__tabs button::before { display: none; }
.sw--steps .sw__tabs button.on i { opacity: 1; color: var(--accent-deep); }
.sw--steps .sw__tabs span { position: absolute; inset-inline: 0; inset-block-end: 0; text-align: center; color: var(--ink); font-size: .9375rem; opacity: 0; transition: opacity .5s var(--ease); pointer-events: none; }
.sw--steps .sw__tabs button.on span { opacity: 1; }
.is-night .sw--steps .sw__tabs span { color: var(--on-night); }
.is-night .sw .sw__tabs button.on i { color: var(--accent-soft); }
/* Phones: every switcher takes that shape, so no label is ever cut or scrolled out of view */
@media (max-width: 640px) {
  .sw .sw__tabs { position: relative; padding-block-end: 32px; }
  .sw .sw__tabs button { position: static; justify-items: center; padding-inline: 0; padding-block: 14px 6px; min-block-size: 44px; }
  .sw .sw__tabs button::before { display: none; }
  .sw .sw__tabs button.on i { opacity: 1; color: var(--accent); }
  .sw .sw__tabs span { position: absolute; inset-inline: 0; inset-block-end: 0; text-align: center; font-size: .9375rem; opacity: 0; transition: opacity .5s var(--ease); pointer-events: none; color: inherit; }
  .sw .sw__tabs button.on span { opacity: 1; }
}
