/* ==========================================================================
   קו | תכנון ועיצוב פנים — Homepage
   Opening screen (header + hero carousel + control strip) fills one viewport;
   "נעים להכיר" follows in normal flow below it.
   ========================================================================== */

/* ---------- Font: Ellinia CLM (Culmus project, GPL-2 with font exception) ---------- */
@font-face {
  font-family: "Ellinia CLM";
  src: url("/assets/fonts/ElliniaCLM-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Ellinia CLM";
  src: url("/assets/fonts/ElliniaCLM-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --c-bg:         #FAF8F1;
  --c-ink:        #282D35;
  --c-ink-soft:   #4A4F57;
  --c-sage:       #98A88C;
  --c-line:       #9DA29E;
  --c-rule:       #D9D8D0;
  --c-panel-blue: #BCC6C7;
  --c-panel-sage: #B8C2AD;
  --c-panel-sand: #E8E1D2;
  --c-hero-text:  #FFFFFF;

  --font: "Ellinia CLM", "Noto Sans Hebrew", "Arial Hebrew", "Segoe UI", Arial, sans-serif;

  /* Header height scales down on short viewports so the photograph keeps room. */
  /* One logo size for every page; the header is the logo plus a little air. */
  --logo-h: clamp(104px, min(11.5vw, 20vh), 168px);
  --header-h: calc(var(--logo-h) + 16px);
  --strip-h: clamp(56px, 7vh, 62px);
  --edge: clamp(24px, 3.4vw, 60px);
  --fade: 800ms;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (max-width: 760px) {
  :root {
    --logo-h: min(104px, calc((100vw - 140px) / 1.83));   /* never wider than the space between the menu button and the edge */
    --edge: 24px;
  }
}

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

html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-ink);
  font-family: var(--font);
  font-weight: 300;
  font-synthesis: none;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
@supports (overflow: clip) { body { overflow-x: clip; } }

h1, h2, p { margin: 0; }
h1, h2 { font-weight: 300; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

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

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

.skip-link {
  position: absolute; inset-inline-start: 16px; top: -100px; z-index: 100;
  background: var(--c-ink); color: var(--c-bg);
  padding: 10px 18px;
}
.skip-link:focus { top: 12px; }

main:focus { outline: none; }

/* ---------- Header ---------- */
.masthead {
  position: relative;
  z-index: 20;
  height: var(--header-h);
  background: var(--c-bg);
  display: grid;
  grid-template-columns: auto 1fr clamp(160px, 17vw, 260px);
  align-items: center;
  padding-inline-start: clamp(24px, 4.2vw, 76px);
  overflow: hidden;
}

.masthead__logo {
  display: block;
  height: var(--logo-h);
}
.masthead__logo img {          /* the logo file is cropped tight, so it fills the height it is given */
  height: 100%;
  width: auto;
}

.nav-list {
  display: flex;
  justify-content: center;
  gap: clamp(28px, 3.8vw, 60px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 4px 6px;
  font-size: clamp(1.125rem, 0.62rem + 1.15vw, 1.6875rem);
  color: var(--c-ink);
  transition: color 200ms var(--ease);
}
.nav-link::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: -4px;
  height: 3px;
  background: var(--c-sage);
  transform: scaleX(0);
  transition: transform 260ms var(--ease);
}
.nav-link:hover::after { transform: scaleX(0.5); }
.nav-link[aria-current="page"]::after { transform: scaleX(1); }

.masthead__deco {
  position: absolute;
  inset-inline-end: 0;          /* far left in RTL */
  top: 0;
  height: 100%;
  width: auto;
  transform: translateX(-3%);   /* cropped by the header's left edge */
  pointer-events: none;
  opacity: 0.95;
}

.menu-toggle { display: none; }

/* ---------- Carousel (hero + strip) ---------- */
.carousel {
  /* Header + this section = one viewport. svh avoids mobile toolbar jumps. */
  height: calc(100vh - var(--header-h));
  height: calc(100svh - var(--header-h));
  min-height: 340px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);   /* the column never grows past the viewport (the controls strip used to widen it, pushing the hero image off-screen) */
  grid-template-rows: minmax(0, 1fr) auto;
}

.hero {
  position: relative;
  overflow: hidden;
  background: #d9cfc1;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.hero__link {
  position: absolute;
  inset: 0;
  display: block;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.hero__link:focus-visible {
  outline: 3px solid #fff;
  outline-offset: -8px;
}

.hero__slides { position: absolute; inset: 0; }

.hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--fade) var(--ease), visibility 0s linear var(--fade);
}
.hero__slide.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity var(--fade) var(--ease), visibility 0s;
}

.hero__img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: var(--pos-desktop, 50% 50%);
  -webkit-user-drag: none;
}
@media (max-width: 760px) {
  .hero__img { object-position: var(--pos-mobile, var(--pos-desktop, 50% 50%)); }
}

/* No published projects yet: a calm dark background keeps the white title readable. */
.hero--empty { background: linear-gradient(135deg, #46524b 0%, #6a7966 100%); }
.hero--empty .hero__link { cursor: default; pointer-events: none; }
.carousel:has(.hero--empty) .strip { display: none; }

/* Soft dark wash behind the upper-right text only */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 62% 78% at 100% 0%,
      rgba(22, 24, 28, 0.58) 0%,
      rgba(22, 24, 28, 0.38) 38%,
      rgba(22, 24, 28, 0.12) 64%,
      rgba(22, 24, 28, 0) 82%);
}

.hero__overlay {
  position: absolute;
  z-index: 2;
  top: clamp(24px, 6vh, 64px);
  inset-inline-start: var(--edge);
  max-width: min(600px, calc(100% - 2 * var(--edge)));
  color: var(--c-hero-text);
  text-align: right;
  pointer-events: none;   /* clicks fall through to the project link */
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.18);
}

.hero__title {
  font-size: clamp(2.25rem, 0.9rem + 3.6vw, 3.875rem);
  line-height: 1.12;
  letter-spacing: -0.005em;
}

.hero__subtitle {
  margin-top: clamp(10px, 1.6vh, 18px);
  font-size: clamp(1rem, 0.62rem + 0.95vw, 1.5625rem);
  line-height: 1.4;
}

/* ---------- Control strip ---------- */
.strip {
  position: relative;
  min-height: var(--strip-h);
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-rule);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding-inline: clamp(24px, 3vw, 44px);
}

.strip__cue {
  justify-self: start;      /* right edge in RTL */
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  font-size: clamp(1rem, 0.8rem + 0.5vw, 1.3125rem);
  color: var(--c-ink);
}
.strip__cue:hover .strip__cue-long,
.strip__cue:hover .strip__cue-short { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.strip__cue-arrow { flex: none; transition: transform 200ms var(--ease); }
.strip__cue:hover .strip__cue-arrow { transform: translateX(-4px); }
.strip__cue-short { display: none; }

.strip__controls {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.5vw, 28px);
}

.ctrl {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--c-ink);
  cursor: pointer;
  border-radius: 0;
}
.ctrl:hover { color: var(--c-sage); }

.dots { display: flex; }

.dot {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.dot::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid #858A86;   /* linework tone, darkened to keep 3:1 contrast */
  background: transparent;
  transition: background-color 300ms var(--ease), border-color 300ms var(--ease);
}
.dot:hover::before { border-color: var(--c-sage); }
.dot[aria-current="true"]::before {
  background: var(--c-sage);
  border-color: var(--c-sage);
}

.ctrl--pause {
  justify-self: end;        /* left edge in RTL */
  color: #7D827E;
}
.ctrl--pause:hover { color: var(--c-ink); }
.ctrl--pause .icon-play { display: none; }
.ctrl--pause[aria-pressed="true"] .icon-pause { display: none; }
.ctrl--pause[aria-pressed="true"] .icon-play { display: block; }

/* ---------- About ---------- */
/* Home page only: after the hero, "נעים להכיר" gently settles at the top of the screen.
   The viewport is the scroller, so snapping is set on <html>. The header scrolls away with the page
   (it is not fixed), hence no scroll-padding. "proximity" only helps when a scroll ends near the edge. */
html:has(> body.home) { scroll-snap-type: y proximity; scroll-padding-top: 0; }
.home .about {
  scroll-snap-align: start;
  min-height: 100vh;
  min-height: 100svh;                 /* fills the screen it settles on; grows when the content needs more room */
  align-content: center;
  box-sizing: border-box;
  background: var(--c-bg);            /* solid: nothing of the hero shows through */
  max-width: none;                    /* the background spans the full width; the content keeps its 1320px measure */
  padding-inline: max(clamp(24px, 6vw, 96px), calc((100% - 1320px) / 2 + clamp(24px, 6vw, 96px)));
}
@media (prefers-reduced-motion: reduce) { html:has(> body.home) { scroll-snap-type: none; } }
html.a11y-nomotion:has(> body.home) { scroll-snap-type: none; }

.about {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(32px, 5vw, 96px);
  max-width: 1320px;
  margin: 0 auto;
  padding: clamp(64px, 6.2vw, 88px) clamp(24px, 6vw, 96px);
}

.about__text {
  justify-self: start;
  text-align: right;
}

.about__title {
  display: inline-block;
  font-size: clamp(2.375rem, 1.6rem + 2vw, 3.375rem);
  line-height: 1.15;
  padding-bottom: 18px;
  margin-bottom: clamp(20px, 2.4vw, 32px);
  background: linear-gradient(var(--c-sage), var(--c-sage)) bottom right / 100% 3px no-repeat;
}

/* Home page: the title is a link to /about, with a round arrow button on its right (start) side */
.about__title--link { display: block; padding-bottom: 0; background: none; }
.about__link {
  display: inline-flex;
  align-items: center;
  gap: clamp(12px, 1.4vw, 18px);
  color: inherit;
  text-decoration: none;
}
.about__link-text {
  display: inline-block;
  padding-bottom: 18px;
  background: linear-gradient(var(--c-sage), var(--c-sage)) bottom right / 100% 3px no-repeat;
}
.about__go {
  flex: none;
  display: grid;
  place-items: center;
  width: clamp(44px, 4vw, 52px);
  height: clamp(44px, 4vw, 52px);
  margin-bottom: 18px;                /* centred on the words, not on the rule beneath them */
  border-radius: 50%;
  border: 1.5px solid var(--c-sage);
  background: rgba(152, 168, 140, 0.16);
  color: var(--c-ink);
  transition: background-color 220ms var(--ease), border-color 220ms var(--ease);
}
.about__go svg { transition: transform 220ms var(--ease); }
.about__link:hover .about__go,
.about__link:focus-visible .about__go { background: rgba(152, 168, 140, 0.34); border-color: var(--c-ink); }
.about__link:hover .about__go svg,
.about__link:focus-visible .about__go svg { transform: translateX(-4px); }
.about__link:focus-visible { outline: 2px solid var(--c-ink); outline-offset: 6px; }
/* The title text keeps the same right edge as the paragraphs below it.
   Wide screens: the button hangs in the margin just right of the title.
   Narrower screens have no spare margin, so the button sits on the title's left instead. */
@media (min-width: 1100px) {
  .about__link { position: relative; }
  .about__go {
    position: absolute;
    inset-inline-end: calc(100% + clamp(12px, 1.4vw, 18px));   /* RTL: just beyond the right edge of the text */
    top: calc((100% - 18px) / 2);
    margin-bottom: 0;
    transform: translateY(-50%);
  }
}
@media (max-width: 1099px) {
  .about__link { flex-direction: row-reverse; }
}
@media (prefers-reduced-motion: reduce) { .about__go svg { transition: none; } }

.about__intro {
  font-size: clamp(1.375rem, 1.05rem + 0.9vw, 1.8125rem);
  line-height: 1.45;
  margin-bottom: clamp(14px, 1.6vw, 22px);
}

/* "המשך קריאה": a plain underlined text link to the About page, no border */
.about__continue {
  display: block;
  width: fit-content;
  margin-top: clamp(14px, 1.8vw, 20px);
  padding-block: 8px;                    /* comfortable tap target */
  color: var(--c-ink);
  font-size: 1.0625rem;
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
}
.about__continue:hover { text-decoration-thickness: 2px; }
.about__continue:focus-visible { outline: 2px solid var(--c-ink); outline-offset: 3px; }

.about__body {
  font-size: clamp(1.125rem, 0.95rem + 0.5vw, 1.4375rem);
  line-height: 1.6;
  color: var(--c-ink-soft);
}

.about__art {
  position: relative;
}

.about__art img {
  width: 100%;
  height: auto;
}

.about__art {
  margin-bottom: clamp(16px, 2vw, 28px);
}

/* About page: Claudia's own photo instead of the line drawing and the round portrait.
   It sits in the picture column, on the side next to the text, in the same square-cornered sage frame the site uses for projects. */
.about--page .about__art--photo { justify-self: start; width: 100%; max-width: 460px; margin-bottom: 0; }
.about--page .about__art--photo picture { display: block; border: clamp(3px, 0.4vw, 5px) solid var(--c-panel-sage); background: var(--c-panel-sand); }
.about--page .about__art--photo img { display: block; width: 100%; height: auto; aspect-ratio: 1086 / 1310; object-fit: cover; }
@media (max-width: 900px) { .about--page .about__art--photo { justify-self: center; max-width: 420px; } }

/* The round portrait hangs just below the drawing (only its top edge touches the floor line),
   so the bookshelf, the plant and the colour panes stay fully visible. */
.about--home-art > img:first-child { object-fit: contain; }   /* the artwork is shown whole, exactly as supplied: no crop, no filter, no mask */
/* Wide screens: the picture is centred on the text and then lifted a little, the portrait hangs in the free space below.
   Stacked layouts: the picture moves closer to the text above it and reserves room for the portrait. */
.about--home-art { margin-bottom: 0; position: relative; top: calc(-1 * clamp(20px, 4.5vw, 64px)); }   /* offset, not a transform: a transform can resample the picture and soften the lines */
@media (max-width: 900px) {
  .about--home-art {
    top: 0;
    margin-top: calc(-1 * clamp(16px, 4vw, 28px));
    margin-bottom: calc(clamp(104px, 11vw, 148px) * 0.4 + 4px);
  }
}
.about__art img.about__portrait {
  position: absolute;
  height: auto;
  inset-inline-start: 0;
  bottom: 0;
  transform: translateY(40%);
  width: clamp(104px, 11vw, 148px);
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--c-bg);
  box-shadow: 0 0 0 2px var(--c-sage), 0 8px 24px rgba(40, 45, 53, 0.12);
}

/* ---------- Footer ---------- */
.site-foot {
  margin: clamp(25px, 5vw, 25px) clamp(24px, 4.4vw, 25px) 0;
  padding: clamp(28px, 4vw, 25px) 0 clamp(32px, 4.4vw, 25px);
  border-top: 1px solid var(--c-line);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(14px, 2vw, 22px);
  text-align: center;
}
.site-foot__a11y {
  font-size: 1rem;
  color: var(--c-ink-soft);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  padding: 10px 8px;                 /* comfortable tap target */
}
.site-foot__a11y:hover { color: var(--c-ink); }
.site-foot__note {
  font-size: 0.8rem;
  color: var(--c-ink-soft);
}

/* Phone call-to-action: icon in a sage ring, small label above a large number */
.site-foot__call {
  display: inline-flex;
  align-items: center;
  gap: clamp(14px, 2vw, 22px);
  min-height: 56px;
  padding: 6px 10px;
  color: var(--c-ink);
  text-align: start;
}
.site-foot__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: clamp(52px, 5vw, 68px);
  height: clamp(52px, 5vw, 68px);
  border-radius: 50%;
  border: 1.5px solid var(--c-sage);
  background: rgba(152, 168, 140, 0.16);
  color: var(--c-ink);
  transition: background-color 220ms var(--ease), border-color 220ms var(--ease);
}
.site-foot__icon svg { width: 46%; height: 46%; }
.site-foot__text { display: grid; gap: 1px; }
.site-foot__label {
  font-size: clamp(1rem, 0.1rem + 0.4vw,1rem);
  color: var(--c-ink-soft);
}
.site-foot__phone {
  font-size: clamp(1.5rem, 1.0rem + 2.4vw, 1rem);   /* 30px phones -> 48px desktop */
  line-height: 1.1;
  letter-spacing: 0.02em;
  text-align: right;
  background: linear-gradient(var(--c-sage), var(--c-sage)) bottom right / 0 2px no-repeat;
  transition: background-size 300ms var(--ease);
  padding-bottom: 4px;
}
.site-foot__call:hover .site-foot__phone,
.site-foot__call:focus-visible .site-foot__phone { background-size: 100% 2px; }
.site-foot__call:hover .site-foot__icon { background: rgba(152, 168, 140, 0.34); border-color: var(--c-ink); }
.site-foot__call:focus-visible { outline-offset: 6px; }

/* WhatsApp and e-mail: icon-only links in the same sage ring as the phone icon */
.site-foot__wa,
.site-foot__mail {
  flex: none;
  display: grid;
  place-items: center;
  width: clamp(52px, 5vw, 68px);
  height: clamp(52px, 5vw, 68px);
  border-radius: 50%;
  border: 1.5px solid var(--c-sage);
  background: rgba(152, 168, 140, 0.16);
  color: var(--c-ink);
  transition: background-color 220ms var(--ease), border-color 220ms var(--ease);
}
.site-foot__wa svg,
.site-foot__mail svg { width: 46%; height: 46%; }
.site-foot__wa:hover,
.site-foot__mail:hover { background: rgba(152, 168, 140, 0.34); border-color: var(--c-ink); }
.site-foot__wa:focus-visible,
.site-foot__mail:focus-visible { outline: 2px solid var(--c-ink); outline-offset: 4px; }
.site-foot__mail[hidden] { display: none; }
.site-foot__row { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: clamp(14px, 2vw, 22px); }

/* Phones: the three icons share one line; the phone number sits centred under them (still part of the call link) */
@media (max-width: 560px) {
  .site-foot__row {
    display: grid;
    grid-template-columns: repeat(3, auto);
    justify-content: center;
    justify-items: center;
    column-gap: 18px;
    row-gap: 10px;
  }
  .site-foot__call { display: contents; }
  .site-foot__call .site-foot__icon { grid-row: 1; width: 56px; height: 56px; }
  .site-foot__wa, .site-foot__mail { width: 56px; height: 56px; grid-row: 1; }
  .site-foot__wa { grid-column: 1; }
  .site-foot__mail { grid-column: 2; }
  .site-foot__call .site-foot__icon { grid-column: 3; }
  .site-foot__call .site-foot__text { grid-row: 2; grid-column: 1 / -1; justify-items: center; text-align: center; }
  .site-foot__call .site-foot__phone { text-align: center; font-size: 1.375rem; }
  .site-foot__call:hover .site-foot__icon { background: rgba(152, 168, 140, 0.34); border-color: var(--c-ink); }
  .site-foot__call:focus-visible .site-foot__icon,
  .site-foot__call:focus-visible .site-foot__text { outline: 2px solid var(--c-ink); outline-offset: 4px; }
}
@media (max-width: 380px) {
  .site-foot__call { flex-direction: column; text-align: center; }
  .site-foot__text { justify-items: center; }
}

/* Privacy policy link under the contact icons, on every page */
.site-foot__legal { margin: 0; }
.site-foot__legal a {
  display: inline-block;
  padding: 10px 8px;                     /* comfortable tap target */
  color: var(--c-ink-soft);
  font-size: 1rem;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}
.site-foot__legal a:hover { color: var(--c-ink); }
.site-foot__legal a:focus-visible { outline: 2px solid var(--c-ink); outline-offset: 3px; }

/* ---------- Tablet ---------- */
@media (max-width: 1100px) {
  .masthead { grid-template-columns: auto 1fr 120px; }
  .masthead__deco { transform: translateX(-30%); }
}

@media (max-width: 960px) {
  .strip__cue-long { display: none; }
  .strip__cue-short { display: inline; }
}

@media (max-width: 900px) {
  .about {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .about__text { justify-self: stretch; }
  .about__art { max-width: 620px; justify-self: center; width: 100%; }
}

/* ---------- Phones ---------- */
@media (max-width: 760px) {
  .masthead {
    /* menu button on the right (start side in RTL), logo centred, an equal empty column on the left */
    grid-template-columns: 48px 1fr 48px;
    padding-inline: 12px;
  }
  .masthead__logo { grid-column: 2; grid-row: 1; justify-self: center; height: var(--logo-h); }
  .masthead__deco { display: none; }

  .menu-toggle {
    display: inline-grid;
    place-items: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
  }
  .menu-toggle__bars,
  .menu-toggle__bars::before,
  .menu-toggle__bars::after {
    display: block;
    width: 24px;
    height: 1.5px;
    background: var(--c-ink);
    transition: transform 240ms var(--ease), opacity 200ms;
  }
  .menu-toggle__bars { position: relative; }
  .menu-toggle__bars::before,
  .menu-toggle__bars::after { content: ""; position: absolute; inset-inline: 0; }
  .menu-toggle__bars::before { top: -7px; }
  .menu-toggle__bars::after { top: 7px; }
  .menu-toggle[aria-expanded="true"] .menu-toggle__bars { background: transparent; }
  .menu-toggle[aria-expanded="true"] .menu-toggle__bars::before { transform: translateY(7px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .menu-toggle__bars::after { transform: translateY(-7px) rotate(-45deg); }

  .masthead { overflow: visible; }
  .masthead__nav {
    position: absolute;
    top: 100%;
    inset-inline: 0;
    background: var(--c-bg);
    border-top: 1px solid var(--c-rule);
    border-bottom: 1px solid var(--c-rule);
    padding: 8px 24px 20px;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 220ms var(--ease), transform 220ms var(--ease), visibility 0s linear 220ms;
  }
  .masthead__nav.is-open {
    visibility: visible;
    opacity: 1;
    top: 0;
    transition: opacity 220ms var(--ease), transform 220ms var(--ease), visibility 0s;
  }
  .nav-list {
    flex-direction: column;
    align-items: flex-start;   /* right edge in RTL */
    gap: 0;
  }
  .nav-list li { width: 100%; border-bottom: 1px solid var(--c-rule); }
  .nav-list li:last-child { border-bottom: 0; }
  .nav-link {
    width: 100%;
    min-height: 56px;
    font-size: 1.375rem;
  }
  .nav-link::after { inset-inline-end: auto; width: 2.6em; bottom: 10px; }

  .hero__overlay {
    top: 22px;
    max-width: calc(100% - 48px);
  }
  .hero__title { font-size: clamp(2rem, 1.1rem + 4.2vw, 2.625rem); line-height: 1.15; }
  .hero__subtitle { font-size: clamp(1rem, 0.85rem + 0.6vw, 1.125rem); }
  .hero::after {
    background:
      linear-gradient(180deg,
        rgba(22, 24, 28, 0.55) 0%,
        rgba(22, 24, 28, 0.32) 26%,
        rgba(22, 24, 28, 0) 50%);
  }

  .strip {
    /* Controls get a full-width row of their own (they were squeezed beside the pause button and overflowed
       the screen once there were more than six slides); the pause button shares the row of the link below. */
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    grid-template-areas:
      "controls controls controls"
      ".        cue      pause";
    padding: 2px 12px 6px;
    row-gap: 0;
  }
  .strip__controls { grid-area: controls; gap: 4px; justify-self: center; min-width: 0; max-width: 100%; }
  .dots { min-width: 0; }
  .ctrl--pause { grid-area: pause; }
  .strip__cue { grid-area: cue; justify-self: center; font-size: 1rem; }
  .strip__cue-long { display: none; }
  .strip__cue-short { display: inline; }

  .about { padding: 64px 24px 56px; }
}

@media (max-width: 760px), (pointer: coarse) {
  .dot { width: 44px; }
}
/* Phones: six 44px dots + arrows + pause are wider than the screen. That overflow widened the whole carousel
   grid (and the hero image with it) past the viewport, so the dots shrink to fit. */
@media (max-width: 480px) {
  .dot { width: 32px; flex: 0 1 auto; min-width: 22px; }
}

/* Very narrow screens (320px, WCAG reflow): keep the carousel controls inside the viewport */
@media (max-width: 359px) {
  .dot { width: 28px; flex: 0 1 auto; min-width: 22px; }
  .strip { padding-inline: 8px; }
  .strip__controls { gap: 0; }
}

/* Short desktop/tablet viewports: tighten the header further */
@media (min-width: 761px) and (max-height: 640px) {
  :root { --logo-h: clamp(84px, 18vh, 104px); }
  .hero__title { font-size: clamp(2rem, 0.6rem + 3.4vw, 3.25rem); }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  :root { --fade: 1ms; }
  *, *::before, *::after {
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
  }
}
