/* Sedek: a precise lab. Cool greys, one signal colour (the amber of the Kapton tape
   inside every phone), technical labels set condensed. Phone first, 390 px. */

@font-face {
  font-family: 'Noto Sans Hebrew';
  src: url('assets/noto-sans-hebrew.woff2') format('woff2');
  font-weight: 400 800;
  font-stretch: 75% 100%;
  font-display: swap;
}

:root {
  --bg: #eceef1;
  --bg-2: #e2e5e9;
  --paper: #f7f8fa;
  --ink: #111317;
  --ink-2: #4c535c;
  --ink-3: #737a84;
  --line: rgba(17, 19, 23, 0.12);
  --line-strong: rgba(17, 19, 23, 0.22);
  --signal: #f2a33a;
  --signal-deep: #9a5600;
  --graphite: #15181c;
  --graphite-2: #20242a;
  --on-dark: #eef0f3;
  --on-dark-2: #a3aab4;
  --wa: #12833f;
  --wa-press: #0e6b33;
  --gutter: 16px;
  --radius: 14px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  /* The teardown: image height over width, and one gap between levels in image widths. */
  --img-ar: 0.4217;
  --gap: 0.15;
  --fig-ar: 1.0217;   /* --img-ar + 4 * --gap */
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: auto;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Noto Sans Hebrew', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.55;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img { max-width: 100%; }
h1, h2, h3, p { margin: 0; }
button, input { font: inherit; color: inherit; }
a { color: inherit; }

.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; z-index: 50; inset-inline-start: var(--gutter); top: 8px;
  padding: 10px 14px; border-radius: 10px; background: var(--ink); color: #fff;
  text-decoration: none; transform: translateY(-160%);
}
.skip:focus-visible { transform: none; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.icon { width: 20px; height: 20px; flex: none; }

/* ---------- masthead ---------- */

.masthead {
  position: relative; z-index: 20;
  display: flex; align-items: center; gap: 8px;
  padding: 10px var(--gutter);
  min-height: 64px;
}
.brand {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  text-decoration: none; margin-inline-end: auto;
}
.brand-mark { width: 26px; height: 26px; color: var(--ink); }
.brand-name { font-weight: 800; font-size: 22px; letter-spacing: -0.01em; line-height: 1; }
@media (max-width: 699px) { .brand-tag { display: none; } }
.brand-tag {
  font-stretch: 82%; font-weight: 600; font-size: 13px; color: var(--ink-3);
  letter-spacing: 0.01em; padding-inline-start: 8px; border-inline-start: 1px solid var(--line-strong);
  line-height: 1.2;
}

.nav { position: static; }
.menu-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; min-width: 44px;
  padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: transparent;
  font-weight: 600; font-size: 15px; cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 160ms ease;
}
.menu-btn:active { transform: scale(0.97); }
.menu-btn .icon-close { display: none; }
.menu-btn[aria-expanded='true'] .icon-open { display: none; }
.menu-btn[aria-expanded='true'] .icon-close { display: block; }

.menu {
  list-style: none; margin: 0; padding: 8px var(--gutter) 16px;
  position: absolute; inset-inline: 0; top: 100%;
  background: var(--paper); border-block: 1px solid var(--line);
  box-shadow: 0 24px 40px -24px rgba(17, 19, 23, 0.35);
}
.menu[hidden] { display: none; }
.menu a {
  display: flex; align-items: center; min-height: 52px; text-decoration: none;
  font-weight: 650; font-size: 19px; border-bottom: 1px solid var(--line);
}
.menu li:last-child a { border-bottom: 0; }

.lang {
  min-height: 44px; min-width: 44px; padding: 0 10px; border: 0; border-radius: 999px;
  background: transparent; font-weight: 700; font-size: 15px; cursor: pointer;
  transition: transform 160ms var(--ease-out);
}
.lang:active { transform: scale(0.95); }

/* ---------- buttons and the contact kit ---------- */

.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 50px; padding: 0 18px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 650; font-size: 16px; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform 160ms var(--ease-out), background-color 180ms ease, border-color 180ms ease;
}
.btn:active { transform: scale(0.97); }
.btn img { width: 22px; height: 22px; border-radius: 6px; flex: none; }
.btn-wa { background: var(--wa); color: #fff; }
.btn-line { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn-dark { background: var(--graphite-2); color: var(--on-dark); border-color: rgba(255, 255, 255, 0.1); }
@media (hover: hover) and (pointer: fine) {
  .btn-wa:hover { background: var(--wa-press); }
  .btn-line:hover { background: rgba(17, 19, 23, 0.05); }
  .btn-dark:hover { background: #2a2f36; }
  .menu-btn:hover { background: rgba(17, 19, 23, 0.05); }
}

.kit-note {
  margin-top: 12px; padding: 14px 16px; border-radius: 12px;
  background: var(--paper); border: 1px solid var(--line); font-size: 16px; max-width: 34rem;
}
.kit-note p { margin: 0 0 8px; }
.kit-note q { display: block; margin: 0 0 10px; padding-inline-start: 12px; border-inline-start: 2px solid var(--signal); color: var(--ink-2); quotes: none; }
.note-close {
  min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: transparent; font-weight: 650; cursor: pointer;
}
.kit-note-dark { background: var(--graphite-2); border-color: rgba(255, 255, 255, 0.12); color: var(--on-dark); }
.kit-note-dark .note-close { border-color: rgba(255, 255, 255, 0.3); }

/* ---------- the teardown: hero, sticky stage, story ---------- */

.teardown { display: grid; grid-template-columns: minmax(0, 1fr); }

.hero { padding: 12px var(--gutter) 20px; }
.kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-stretch: 82%; font-weight: 650; font-size: 14px; letter-spacing: 0.02em; color: var(--ink-2);
}
.kicker-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 3px rgba(242, 163, 58, 0.22); }
.hero-title {
  margin-top: 12px;
  font-size: clamp(2.6rem, 1.4rem + 5.4vw, 5.6rem);
  font-weight: 800; line-height: 1.02; letter-spacing: -0.022em;
  text-wrap: balance;
}
.hero-title span { display: block; }
.hero-title-2 { color: var(--ink-3); }
.hero-lede { margin-top: 14px; font-size: clamp(1.06rem, 0.98rem + 0.4vw, 1.3rem); color: var(--ink-2); max-width: 32rem; text-wrap: pretty; }
.hero .actions { margin-top: 22px; }
.hero .btn-wa { flex: 1 1 100%; }
.hero .btn-line { flex: 1 1 0; }

.scroll-hint {
  display: none; align-items: center; gap: 12px; margin-top: 32px;
  font-stretch: 82%; font-weight: 600; font-size: 14px; color: var(--ink-3); letter-spacing: 0.02em;
}
.scroll-line { width: 40px; height: 1px; background: var(--line-strong); }

.stage {
  position: sticky; top: 0; z-index: 5;
  height: 56svh; min-height: 330px;
  display: grid; place-items: center;
  padding: 8px var(--gutter) 12px;
  background: var(--bg);
}
/* Content scrolling under the stage fades out instead of meeting a hard edge. */
.stage::after {
  content: ''; position: absolute; inset-inline: 0; top: 100%; height: 28px;
  background: linear-gradient(var(--bg), rgba(236, 238, 241, 0));
  pointer-events: none;
}

.figure {
  position: relative; margin: 0;
  width: min(100%, calc((56svh - 64px) / var(--fig-ar)));
  margin-bottom: 24px;
  container-type: inline-size;
}
.figure::before { content: ''; display: block; aspect-ratio: 1 / var(--fig-ar); }
.rig { position: absolute; inset: 0; will-change: transform; }
.parts { position: absolute; inset: 0; }
.part {
  position: absolute; left: 0; width: 100%; top: 50%;
  margin-top: calc(var(--img-ar) * -50%);
  transform: translate3d(0, calc(var(--lift) * var(--gap) * -100cqw), 0);
  will-change: transform;
}
.part .shift { position: relative; transition: transform 340ms var(--ease-out); }
.part img { display: block; width: 100%; height: auto; }
.part .base { transition: opacity 260ms ease; }
.part .glow {
  position: absolute; inset: 0; opacity: 0; pointer-events: none;
  filter: drop-shadow(0 0 0.3cqw rgba(242, 163, 58, 0.85)) drop-shadow(0 0 2cqw rgba(242, 163, 58, 0.38));
  transition: opacity 280ms var(--ease-out);
}
.figure.has-lit .part:not(.lit) .base { opacity: 0.36; }
.part.lit .glow { opacity: 1; }
.part.lit[data-part='glass'] .glow { opacity: 0.7; }
.part.lit .shift { transform: translateY(-1.8cqw); }

/* The ground shadow travels with the back glass, the lowest part. */
.part[data-part='back']::after {
  content: ''; position: absolute; left: 6%; right: 6%; bottom: -9%; height: 22%;
  background: radial-gradient(closest-side, rgba(17, 19, 23, 0.18), rgba(17, 19, 23, 0));
  z-index: -1;
}

.callouts { position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; pointer-events: none; z-index: 2; }
.callout {
  position: absolute;
  left: calc(var(--ax) * 100%);
  top: calc(50% + (var(--ay) - 0.5) * var(--img-ar) * 100cqw);
  transform: translate3d(0, calc(var(--lift) * var(--gap) * -100cqw), 0);
}
.callout .shift { display: block; position: relative; transition: transform 340ms var(--ease-out); }
.callout.lit .shift { transform: translateY(-1.8cqw); }
.callout .dot {
  position: absolute; left: -4.5px; top: -4.5px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--ink); box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.95);
  transition: background-color 200ms ease, transform 200ms var(--ease-out);
}
.callout .tag {
  position: absolute; top: 0; translate: 0 -50%;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 3px 9px 3px 8px; border-radius: 7px;
  background: rgba(247, 248, 250, 0.94); border: 1px solid var(--line);
  box-shadow: 0 6px 16px -10px rgba(17, 19, 23, 0.5);
  font-stretch: 82%; font-weight: 650; font-size: 13px; line-height: 1.35; color: var(--ink);
  transition: background-color 200ms ease, border-color 200ms ease, color 200ms ease;
}
.callout[data-side='right'] .tag { left: 9px; }
.callout[data-side='left'] .tag { right: 9px; }
.callout .num { font-variant-numeric: tabular-nums; color: var(--ink-3); font-weight: 600; direction: ltr; }
.callout.lit .tag { background: var(--signal); border-color: var(--signal); }
.callout.lit .num { color: rgba(17, 19, 23, 0.6); }
.callout.lit .dot { background: var(--signal); transform: scale(1.25); }
.figure.has-lit .callout:not(.lit) .tag { opacity: 0.55; }

.caption {
  position: absolute; inset-inline: 0; top: calc(100% + 10px); text-align: center;
  font-stretch: 82%; font-size: 12.5px; font-weight: 550; color: var(--ink-3); letter-spacing: 0.01em;
}

/* With motion allowed the page starts from the closed phone; app.mjs takes over from there.
   Without the class (reduced motion, or no script) the figure is the finished teardown. */
.motion .part, .motion .callout { transform: translate3d(0, 0, 0); }
.motion .part[data-part='board'], .motion .part[data-part='battery'],
.motion .part[data-part='camera'], .motion .part[data-part='port'] { opacity: 0; }
.motion .callout { opacity: 0; }
@media (max-width: 1023px) {
  .motion .rig { transform: translate3d(0, calc(-1.3 * var(--gap) * 100cqw), 0); }
}

.story { padding: 28px var(--gutter) 40px; position: relative; z-index: 1; }
.beat { padding-block: 8px 28vh; max-width: 34rem; }
.beat-2 { padding-bottom: 22vh; }
.beat-title { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.9rem); font-weight: 780; line-height: 1.08; letter-spacing: -0.018em; text-wrap: balance; }
.beat-text { margin-top: 12px; font-size: 17px; color: var(--ink-2); text-wrap: pretty; }
.beat-strong { margin-top: 0; font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.7rem); font-weight: 650; line-height: 1.35; color: var(--ink); letter-spacing: -0.01em; }

/* ---------- the fault picker ---------- */

.picker { max-width: 36rem; padding-bottom: 12px; }
.picker-title { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.9rem); font-weight: 780; line-height: 1.08; letter-spacing: -0.018em; }
.picker-lede { margin-top: 10px; color: var(--ink-2); text-wrap: pretty; }
.pick-form { margin-top: 18px; display: grid; gap: 18px; }
.chips { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.chips legend {
  padding: 0; margin-bottom: 10px; width: 100%;
  font-stretch: 82%; font-weight: 700; font-size: 14px; letter-spacing: 0.02em; color: var(--ink-2);
}
.chip { position: relative; display: inline-flex; }
.chip input {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer;
}
.chip span {
  display: inline-flex; align-items: center; min-height: 46px; padding: 0 16px;
  border-radius: 12px; border: 1px solid var(--line-strong); background: var(--paper);
  font-weight: 600; font-size: 16px;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 140ms var(--ease-out);
}
.chip:active span { transform: scale(0.97); }
.chip input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.chips-fault .chip input:checked + span { background: var(--signal); border-color: var(--signal); color: var(--ink); }
.chip input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) {
  .chip:hover input:not(:checked) + span { border-color: var(--ink-3); }
}

.lit-line {
  min-height: 1.55em; margin-top: 14px;
  font-stretch: 82%; font-weight: 650; font-size: 14px; letter-spacing: 0.01em; color: var(--signal-deep);
}

.compose {
  margin-top: 10px; padding: 14px; border-radius: 18px;
  background: #e4e7e2; border: 1px solid rgba(17, 19, 23, 0.08);
}
.compose-head {
  display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px;
  font-stretch: 82%; font-weight: 650; font-size: 13px; color: var(--ink-3); letter-spacing: 0.02em;
}
.bubble {
  position: relative; min-height: 4.6em; padding: 12px 14px; border-radius: 16px;
  border-start-end-radius: 6px;
  background: #d9fdd3; color: #111b21; font-size: 16.5px; line-height: 1.5;
  box-shadow: 0 1px 1px rgba(17, 27, 33, 0.12);
  margin-inline-start: 18%;
}
.bubble.is-empty { background: var(--paper); color: var(--ink-3); margin-inline-start: 0; }
.caret {
  display: inline-block; width: 2px; height: 1.1em; margin-inline-start: 2px; vertical-align: -0.18em;
  background: var(--wa); opacity: 0;
}
.bubble.is-typing .caret { opacity: 1; }
.btn-send { width: 100%; margin-top: 12px; }

/* ---------- how it works: a spec sheet ---------- */

.how { padding: 72px var(--gutter) 64px; background: var(--paper); border-top: 1px solid var(--line); }
.how-title { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.9rem); font-weight: 780; line-height: 1.08; letter-spacing: -0.018em; max-width: 20ch; }
.steps { list-style: none; margin: 28px 0 0; padding: 0; border-top: 1px solid var(--ink); }
.step {
  display: grid; grid-template-columns: 52px minmax(0, 1fr); column-gap: 12px; row-gap: 4px;
  padding: 18px 0; border-bottom: 1px solid var(--line-strong);
}
.step-num {
  grid-row: 1 / span 2; font-stretch: 75%; font-weight: 700; font-size: 26px; line-height: 1.1;
  font-variant-numeric: tabular-nums; color: var(--ink-3); direction: ltr; text-align: start;
}
.step h3 { font-size: 20px; font-weight: 720; line-height: 1.3; }
.step p { color: var(--ink-2); }
.step:last-child .step-num { color: var(--signal-deep); }

/* ---------- contact ---------- */

.contact { background: var(--graphite); color: var(--on-dark); padding: 72px var(--gutter) 64px; }
.contact-inner { max-width: 1180px; margin: 0 auto; }
.contact-title { font-size: clamp(2.2rem, 1.4rem + 3.6vw, 4.2rem); font-weight: 800; line-height: 1.04; letter-spacing: -0.022em; }
.contact-lede { margin-top: 12px; color: var(--on-dark-2); font-size: 18px; }
.contact-grid { margin-top: 28px; display: grid; gap: 22px; }
.contact-grid .actions .btn { flex: 1 1 0; }
.group-label { font-stretch: 82%; font-weight: 650; font-size: 14px; letter-spacing: 0.02em; color: var(--on-dark-2); margin-bottom: 10px; }
.marks { display: flex; flex-wrap: wrap; gap: 8px; }
.contact-hours { margin-top: 26px; color: var(--on-dark-2); font-size: 16px; }

.footer {
  display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; justify-content: space-between;
  padding: 26px var(--gutter) calc(26px + env(safe-area-inset-bottom));
  background: var(--graphite); color: var(--on-dark-2); border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 16px;
}
.footer p { max-width: 46rem; }
.foot-top { display: inline-flex; align-items: center; min-height: 44px; color: var(--on-dark); font-weight: 650; }

/* ---------- tablet ---------- */

@media (min-width: 700px) {
  :root { --gutter: 32px; }
  .hero .btn-wa, .hero .btn-line { flex: 0 0 auto; }
  .steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; }
  .contact-grid { grid-template-columns: auto auto auto; align-items: end; justify-content: start; column-gap: 40px; }
  .contact-grid .actions .btn { flex: 0 0 auto; }
}

/* ---------- desktop: the stage beside the story ---------- */

@media (min-width: 1024px) {
  :root { --gutter: 48px; --gap: 0.17; --fig-ar: 1.1017; }
  body { font-size: 18px; }
  .masthead { max-width: 1440px; margin: 0 auto; padding-block: 14px; }
  .nav { order: 0; margin-inline-end: 8px; }
  .menu-btn { display: none; }
  .menu, .menu[hidden] {
    display: flex; gap: 4px; position: static; padding: 0; background: none; border: 0; box-shadow: none;
  }
  .menu a { min-height: 44px; padding: 0 12px; border: 0; font-size: 15px; font-weight: 600; color: var(--ink-2); border-radius: 999px; }
  .menu a:hover { color: var(--ink); background: rgba(17, 19, 23, 0.05); }

  .teardown {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    max-width: 1440px; margin: 0 auto;
  }
  .hero { grid-column: 1; grid-row: 1; min-height: calc(100svh - 72px); display: flex; flex-direction: column; justify-content: center; padding-block: 24px 64px; }
  .scroll-hint { display: inline-flex; }
  .hero-title { font-size: clamp(3rem, 0.9rem + 3.5vw, 4.9rem); }
  .story { grid-column: 1; grid-row: 2; padding-top: 0; }
  .stage {
    grid-column: 2; grid-row: 1 / span 2; align-self: start;
    height: 100svh; padding: 24px var(--gutter) 28px 8px;
    background: transparent;
  }
  .stage::after { display: none; }
  .figure { width: min(100%, calc((100svh - 104px) / var(--fig-ar))); }
  .callout .tag { font-size: 14px; padding: 4px 10px 4px 9px; }
  .beat { min-height: 50svh; padding-bottom: 12vh; }
  .beat-2 { min-height: 40svh; }
  .picker { padding-bottom: 18vh; }
  .chips legend { font-size: 15px; }

  .how { padding: 112px var(--gutter) 104px; }
  .how > * { max-width: 1344px; margin-inline: auto; }
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 28px; border-top: 0; }
  .step { grid-template-columns: 1fr; border-bottom: 0; border-top: 1px solid var(--ink); padding-top: 20px; }
  .step-num { grid-row: auto; font-size: 34px; margin-bottom: 18px; }
  .contact { padding: 112px var(--gutter) 104px; }
  .footer { padding-inline: max(var(--gutter), calc((100vw - 1344px) / 2)); }
}

@media (prefers-reduced-motion: reduce) {
  .btn, .chip span, .menu-btn, .lang, .part .shift, .callout .shift, .part .glow, .part .base { transition: none; }
  .btn:active, .chip:active span, .menu-btn:active, .lang:active { transform: none; }
}
