/* Page frame: type, header, hero. Everything under the hero is in pages.css. */

/* Heebo 3.100, SIL Open Font License 1.1 (https://scripts.sil.org/OFL). Hebrew only, Latin stays in DM Sans. */
@font-face{font-family:"Heebo";src:url("Heebo-wght.ttf") format("truetype");font-weight:100 900;font-display:swap;unicode-range:U+0590-05FF,U+20AA,U+FB1D-FB4F}
@font-face{font-family:"CCI Sans";src:url("DMSans-Regular.ttf") format("truetype");font-weight:400;font-display:swap}
@font-face{font-family:"CCI Sans";src:url("DMSans-Medium.ttf") format("truetype");font-weight:500;font-display:swap}
@font-face{font-family:"CCI Sans";src:url("DMSans-Bold.ttf") format("truetype");font-weight:700;font-display:swap}

@view-transition { navigation: auto; }

:root {
  --ink: #12392C;
  --deep: #0D2B21;
  --paper: #F4F1EA;
  --soft: #C3D3C6;
  --leaf: #8DBB98;
  --earth: #D08A5E;
  --line: rgb(244 241 234 / 0.3);
  --gutter: clamp(20px, 4.5vw, 80px);
  /* one width for everything: header, hero, sections, footer */
  --max: 1760px;
  --head: 102px;
  --art-ratio: 0.881;
  --art-h: max(340px, min(calc(100vh - var(--head) - 26px), 56vw, 985px));
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
  scrollbar-color: #55896A var(--ink);
}

@supports (height: 100svh) {
  :root { --art-h: max(340px, min(calc(100svh - var(--head) - 26px), 56vw, 985px)); }
}

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

/* the scrollbar keeps its place on short pages, so the header never moves from one page to the next */
html {
  background: var(--deep);
  scrollbar-gutter: stable;
  scroll-padding-top: 84px;
}
html.menu-open { overflow: hidden; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--ink);
  color: var(--paper);
  font: 400 18px/1.55 "CCI Sans", "Heebo", "Arial Hebrew", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

main { flex: 1 0 auto; display: flex; flex-direction: column; }
main > * { flex: none; }
main > section:last-of-type { flex: 1 0 auto; }
main:focus { outline: none; }

::selection { background: var(--earth); color: var(--ink); }
a { color: inherit; text-decoration: none; text-underline-offset: 0.35em; }
:focus-visible { outline: 2px solid var(--earth); outline-offset: 5px; }

.skip {
  position: fixed;
  z-index: 30;
  top: 8px;
  inset-inline-start: 8px;
  padding: 10px 14px;
  background: var(--paper);
  color: var(--ink);
  clip-path: inset(50%);
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip:focus { clip-path: none; width: auto; height: auto; }

/* ---------- Header: open at the top, a floating capsule once the page moves ---------- */
.top {
  position: fixed;
  z-index: 20;
  inset-inline: 0;
  top: 0;
  pointer-events: none;
  view-transition-name: top;
}

.bar {
  position: relative;
  max-width: var(--max);
  height: var(--head);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  transition: height 0.5s var(--ease);
}
.bar > * { pointer-events: auto; }

.bar::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset-block: 7px;
  inset-inline: calc(var(--gutter) - 18px);
  border: 1px solid rgb(244 241 234 / 0.12);
  border-radius: 999px;
  background: var(--deep);
  box-shadow: 0 10px 28px -12px rgb(0 0 0 / 0.45);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.35s var(--ease), transform 0.5s var(--ease);
}
.scrolled .bar { height: 78px; }
.scrolled .bar::before { opacity: 1; transform: none; pointer-events: auto; }

.brand { position: relative; display: flex; align-items: center; gap: 14px; flex: none; }
.brand img { display: block; width: auto; height: 50px; transition: height 0.5s var(--ease); }
.scrolled .top .brand img { height: 40px; }

.brand span {
  padding-inline-start: 14px;
  border-inline-start: 1px solid var(--line);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.09em;
  white-space: nowrap;
}
:lang(he) .brand span { font-size: 14px; letter-spacing: 0; }

/* the pill that slides under the pointer */
.nav {
  position: relative;
  isolation: isolate;
  display: flex;
  padding: 5px;
  border-radius: 999px;
  background: rgb(244 241 234 / 0.07);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
}

.nav .glide {
  position: absolute;
  z-index: -1;
  left: 0;
  top: 5px;
  bottom: 5px;
  width: var(--w, 0);
  border-radius: 999px;
  background: var(--paper);
  opacity: 0;
  translate: var(--x, 0) 0;
  transition: translate 0.45s var(--ease), width 0.45s var(--ease), opacity 0.2s linear;
}
.nav .glide.shown { opacity: 1; }
/* it opens in place, then it slides */
.nav .glide.placing { transition: opacity 0.2s linear; }

.nav a {
  display: flex;
  align-items: center;
  height: 42px;
  padding-inline: 16px;
  border-radius: 999px;
  transition: color 0.25s linear, background-color 0.25s linear;
}
.nav a[aria-current] { background: rgb(244 241 234 / 0.14); }
.nav a.under { color: var(--ink); }

.side { display: flex; align-items: center; gap: 18px; }

.contact,
.button {
  --fill: transparent;
  --fill-text: var(--paper);
  --wash: var(--paper);
  --wash-text: var(--ink);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid var(--paper);
  border-radius: 999px;
  background: linear-gradient(var(--wash), var(--wash)) center bottom / 100% 0 no-repeat var(--fill);
  color: var(--fill-text);
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: background-size 0.4s var(--ease), color 0.25s linear, border-color 0.25s linear;
}
.contact:hover,
.button:hover { background-size: 100% 100%; color: var(--wash-text); }
/* a press never moves the hit area */
.contact:active,
.button:active { --wash: var(--leaf); --wash-text: var(--ink); }

.button { min-height: 54px; padding-inline: 28px; }
.contact,
.button.primary { --fill: var(--paper); --fill-text: var(--ink); --wash: var(--earth); }
.contact:hover,
.button.primary:hover { border-color: var(--earth); }
.contact { min-height: 46px; padding-inline: 20px 16px; font-size: 15px; }
.contact[aria-current] { --fill: var(--earth); border-color: var(--earth); }

.arrow {
  flex: none;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  transition: translate 0.4s var(--ease);
  will-change: translate;
}
[dir="rtl"] .arrow:not(.out) { transform: scaleX(-1); }
a:hover > .arrow:not(.out),
button:hover > .arrow:not(.out),
a:hover .round .arrow:not(.out) { translate: 3px 0; }
[dir="rtl"] a:hover > .arrow:not(.out),
[dir="rtl"] button:hover > .arrow:not(.out),
[dir="rtl"] a:hover .round .arrow:not(.out) { translate: -3px 0; }
a:hover .arrow.out { translate: 2px -2px; }

/* flush with the margin, like the block under it */
.language {
  padding-block: 10px;
  font-size: 15px;
  font-weight: 500;
  text-align: end;
  text-decoration: underline 1px transparent;
  transition: color 0.25s linear, text-decoration-color 0.25s linear;
}
.language:hover { color: var(--leaf); text-decoration-color: currentColor; }

.menu { display: none; }

@media (min-width: 1080px) and (max-width: 1379.98px) {
  .brand span { display: none; }
}

@media (min-width: 1080px) and (max-width: 1239.98px) {
  .nav { font-size: 14px; }
  .nav a { padding-inline: 11px; }
  .bar,
  .side { gap: 12px; }
  .contact { padding-inline: 16px 13px; font-size: 14px; gap: 8px; }
  .language { font-size: 14px; }
}

@media (max-width: 1079.98px) {
  :root { --head: 88px; }
  .top .nav,
  .side > .contact { display: none; }
  .side { gap: 10px; }

  .menu { display: block; }
  .menu summary {
    position: relative;
    display: block;
    width: 44px;
    height: 44px;
    list-style: none;
    cursor: pointer;
  }
  .menu summary::-webkit-details-marker { display: none; }
  .menu summary i {
    position: absolute;
    inset-inline-end: 0;
    top: 21px;
    width: 24px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: translate 0.4s var(--ease), rotate 0.4s var(--ease);
  }
  .menu summary i:first-child { translate: 0 -4px; }
  .menu summary i:last-child { translate: 0 4px; }
  .menu[open]:not(.closing) summary i:first-child { translate: 0; rotate: 45deg; }
  .menu[open]:not(.closing) summary i:last-child { translate: 0; rotate: -45deg; }

  /* a whole sheet under the bar */
  .menu nav {
    position: fixed;
    z-index: -1;
    inset: 0;
    display: flex;
    flex-direction: column;
    padding: calc(var(--head) + 12px) var(--gutter) 28px;
    background: var(--ink);
    overflow: auto;
  }
  .menu nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-block: 17px;
    border-bottom: 1px solid rgb(244 241 234 / 0.13);
    font-size: 26px;
    font-weight: 500;
    line-height: 1.2;
  }
  .menu nav a[aria-current] { color: var(--leaf); }
  .menu nav .contact {
    flex: none;
    justify-content: center;
    min-height: 60px;
    margin-top: auto;
    border: 0;
    color: var(--ink);
    font-size: 19px;
    font-weight: 700;
  }
  .menu-open .bar::before { opacity: 0; }
  .menu.closing nav { pointer-events: none; }
}

@keyframes sheet { from { opacity: 0; } }
@keyframes entry { from { opacity: 0; translate: 0 14px; } }

@media (max-width: 899.98px) {
  :root { --head: 72px; }
  body { font-size: 16px; line-height: 1.48; }
  .bar { gap: 10px; }
  .bar::before { inset-inline: 7px; inset-block: 6px; }
  .scrolled .bar { height: 68px; }
  .brand { gap: 10px; }
  .brand img { height: 38px; }
  .scrolled .top .brand img { height: 34px; }
  .brand span { padding-inline-start: 10px; font-size: 10px; }
  :lang(he) .brand span { font-size: 12px; }
  .language { font-size: 14px; }
}

/* on the narrowest phones the logo stands alone */
@media (max-width: 359.98px) {
  .brand span { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100svh;
  padding-top: var(--head);
  display: flex;
  flex-direction: column;
}

/* Text and block share one grid, so they share one vertical centre at every height. */
.intro {
  position: relative;
  z-index: 1;
  flex: 1;
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: 1fr auto auto auto 1fr;
  padding: 0 var(--gutter) 26px;
  pointer-events: none;
}
.intro a { pointer-events: auto; }

.intro h1 {
  grid-area: 2 / 1;
  margin: 0;
  font-size: clamp(48px, min(6.15vw, 11.2vh), 96px);
  font-weight: 700;
  line-height: 0.99;
  letter-spacing: -0.022em;
}
:lang(he) .intro h1 { line-height: 1.12; letter-spacing: 0; }
.intro h1 span { display: block; }
/* side bearing of the capitals, so the headline sits on the logo's edge */
:lang(en) .intro h1 span { margin-inline-start: -0.035em; }
.intro h1 .second { color: var(--leaf); }

.lede {
  grid-area: 3 / 1;
  max-width: min(31em, 40vw);
  margin: 30px 0 0;
  color: var(--soft);
  text-wrap: pretty;
}
:lang(he) .lede { font-size: 20px; max-width: min(27em, 40vw); }

.actions { grid-area: 4 / 1; display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.art {
  grid-area: 1 / 2 / -1 / 3;
  align-self: center;
  position: relative;
  height: var(--art-h);
  aspect-ratio: var(--art-ratio);
  margin: 0;
  /* the box has air around the block: pull the block itself onto the margin and the centre */
  margin-inline-end: calc(var(--art-h) * var(--art-ratio) * -0.0223);
  translate: 0 -1.16%;
  /* the block takes the finger: sideways moves the lens, up and down still scrolls */
  pointer-events: auto;
  touch-action: pan-y pinch-zoom;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
.art img { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; transition: opacity 0.25s linear; }

.stage {
  position: absolute;
  z-index: -1;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s linear;
}
.is-live .stage { opacity: 1; }
.is-live .art img { opacity: 0; }

@media (max-width: 899.98px), (max-aspect-ratio: 4/5) {
  .intro {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(150px, 1fr) auto auto;
    padding: 12px var(--gutter) 20px;
  }
  .intro h1 { grid-area: 1 / 1; font-size: clamp(34px, min(11.4vw, 6vh), 88px); }
  .art {
    grid-area: 2 / 1;
    align-self: stretch;
    height: auto;
    min-height: 150px;
    width: 100%;
    aspect-ratio: auto;
    margin: 0;
    translate: none;
  }
  .art img { position: absolute; inset: 0; }
  .lede,
  :lang(he) .lede { grid-area: 3 / 1; max-width: 38em; margin-top: 12px; font-size: clamp(14px, 2.1vh, 18px); }
  .actions { grid-area: 4 / 1; flex-wrap: nowrap; gap: 8px; margin-top: 16px; }
  .actions .button { min-height: 50px; padding-inline: 14px; font-size: 14px; }
  .actions .button.primary { flex: 1; max-width: 340px; padding-inline: 10px; }
}

/* stacked on a wide, tall window: full-size text and buttons */
@media (min-width: 900px) and (max-aspect-ratio: 4/5) {
  .lede { font-size: 18px; }
  .actions { gap: 12px; margin-top: 24px; }
  .actions .button,
  .actions .button.primary { flex: none; min-height: 54px; padding-inline: 28px; font-size: 16px; }
  .intro { padding-bottom: var(--gutter); }
}

/* tablet held upright: everything on the block's axis */
@media (min-width: 600px) and (max-aspect-ratio: 4/5) {
  .intro { text-align: center; }
  :lang(en) .intro h1 span { margin-inline-start: 0; }
  .lede,
  :lang(he) .lede { justify-self: center; text-wrap: balance; }
  .actions { justify-content: center; }
  .actions .button.primary { flex: none; padding-inline: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  *,
  *::before,
  *::after { transition: none !important; animation: none !important; }
}
