/* Harari Partners: phone layer (2026-11-13).
   Loaded last on every page, and only below 700px, so the desktop site is untouched.
   One job: make the phone a composed experience of its own, not a stacked desktop.
   Same tokens, same logical properties, so English and Hebrew share every rule. */

@media (max-width: 700px) {

  /* ---------- Rhythm ---------- */

  :root {
    --header-height: 60px;
    --section: 72px;
    --gutter: 22px;
  }

  /* ---------- Header: brand, accessibility, menu on one quiet line ---------- */

  .nav { gap: 6px; }
  .brand { gap: 10px; }
  .brand img { width: 34px; height: 34px; }
  .brand span,
  .brand-name { font-size: .74rem; letter-spacing: .18em; }
  /* The three lines sit 11px inside their 44px target: pull the target out so the
     lines land on the content edge. */
  .nav-toggle { margin-inline-end: -11px; }

  /* The accessibility button leaves the bottom corner, where it sat on top of the
     text, and joins the header. Always reachable, never in the way. */
  .accessibility-widget {
    z-index: 101;
    inset-block: calc((var(--header-height) - 44px) / 2) auto;
    inset-inline: auto calc(var(--gutter) + 33px);
    transform: none !important;
  }
  .accessibility-toggle {
    justify-content: center;
    inline-size: 44px;
    block-size: 44px;
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: var(--ink);
    transition: color var(--t-base) var(--ease-out);
  }
  .accessibility-toggle svg { width: 24px; height: 24px; stroke-width: 1.3; }
  body:not(.nav-open) .site-header:not(.is-scrolled) ~ .accessibility-widget .accessibility-toggle { color: var(--on-night); }
  /* The 404 page has no header: the button takes the menu's corner, in the light colour */
  body.not-found .accessibility-widget { inset-inline-end: calc(var(--gutter) - 11px); }
  body.not-found .accessibility-toggle { color: var(--on-night); }
  .accessibility-panel {
    position: fixed;
    inset-block: calc(var(--header-height) + 8px) auto;
    inset-inline: 12px;
    width: auto;
    max-block-size: calc(100svh - var(--header-height) - 24px);
    overflow-y: auto;
    padding: 20px;
  }

  /* ---------- Menu: a full page of its own ---------- */

  .nav-links { padding: 12px var(--gutter) calc(32px + env(safe-area-inset-bottom)); background: var(--paper); }
  .nav-links a,
  html[lang="he"] .nav-links a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-block-size: 64px;
    padding-block: 12px;
    font-size: 1.5rem;
  }
  .nav-links a:not(.nav-cta):not(.lang-switch)::before {
    content: "";
    order: 2;
    inline-size: 9px;
    block-size: 9px;
    border-block-start: 1px solid var(--gold);
    border-inline-end: 1px solid var(--gold);
    rotate: 45deg;
  }
  html[dir="rtl"] .nav-links a:not(.nav-cta):not(.lang-switch)::before { rotate: -45deg; }
  .nav-links a[aria-current="page"] { font-weight: 500; }
  .nav-links .lang-switch { min-block-size: 56px; border-block-end: 0; color: var(--ink-soft) !important; }
  .nav-links .nav-cta,
  html[lang="he"] .nav-links .nav-cta {
    justify-content: center;
    margin-block-start: 12px;
    border: 1px solid var(--ink);
    background: var(--ink);
    color: var(--paper);
    font-size: 1rem !important;
    font-weight: 500;
  }

  /* ---------- One floating action, and only once the visit is under way ---------- */

  .qc {
    inset-block-end: calc(16px + env(safe-area-inset-bottom));
    inset-inline-end: 16px;
    transition: opacity var(--t-base) var(--ease-out), transform var(--t-base) var(--ease-out), inset-block-end var(--t-base) var(--ease-out);
  }
  .qc-bubble { width: 52px; height: 52px; }
  .qc-bubble svg { width: 24px; height: 24px; }
  /* The opening screen has its own call to action; the bubble arrives with the first scroll. */
  html.js .site-header:not(.is-scrolled) ~ .qc:not(:focus-within) { opacity: 0; transform: translateY(14px) scale(.92); pointer-events: none; }
  body.nav-open .qc { opacity: 0; pointer-events: none; }
  /* While the visitor reads down the page nothing sits on the text (hp.js sets the class). */
  html.is-reading-down .qc:not(.is-raised):not(:focus-within) { opacity: 0; transform: translateY(18px) scale(.92); pointer-events: none; }

  /* ---------- Buttons and links: comfortable under a thumb ---------- */

  a,
  button,
  summary { -webkit-tap-highlight-color: rgba(166, 142, 95, .16); }
  .button { min-height: 54px; padding: 14px 22px; font-size: .95rem; transition: background-color var(--t-fast), color var(--t-fast), border-color var(--t-fast), transform var(--t-fast); }
  .button:active { transform: scale(.985); }
  .text-link { font-size: .95rem; }

  /* ---------- Home: one continuous photographic opening ---------- */

  .hero.cinematic-hero { padding-block-start: calc(var(--header-height) + 36px); }
  .cinematic-content { padding-block-end: 0; }
  .cinematic-hero p.cinematic-eyebrow,
  html[lang="he"] .cinematic-hero p.cinematic-eyebrow { margin-block-end: 16px; font-size: .8125rem; }
  /* Poppins sets wider than Heebo, so the English title is a step smaller to keep three lines */
  .cinematic-hero .hero-title { font-size: clamp(2rem, 9vw, 2.6rem); line-height: 1.1; }
  html[lang="he"] .cinematic-hero .hero-title { font-size: clamp(2.3rem, 10.6vw, 3rem); line-height: 1.1; }
  .cinematic-hero p.cinematic-intro { margin-block: 16px 24px; max-inline-size: 30ch; font-size: 1.0625rem; line-height: 1.6; color: var(--on-night); }
  /* The main action takes the row; the second link sits beside it when it fits, below it when it does not */
  .cinematic-hero .hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; }
  .cinematic-hero .hero-actions .button { flex: 1 1 auto; min-block-size: 54px; padding-inline: 20px; font-size: .95rem; white-space: nowrap; }
  .cinematic-hero .hero-actions .text-link { font-size: .95rem; }

  /* The photograph rises behind the actions and dissolves into the navy above it,
     so the message and the plant read as one image instead of a text block and a strip. */
  .cinematic-hero .cinematic-scene {
    block-size: clamp(320px, 96vw, 430px);
    margin-block-start: -92px;
    border: 0;
    --r: 78px;
  }
  .hero.cinematic-hero .cinematic-scene.ai-lens::after {
    background:
      linear-gradient(180deg, var(--night) 0%, rgba(11, 31, 44, .92) 14%, rgba(11, 31, 44, .55) 30%, rgba(11, 31, 44, 0) 50%, rgba(11, 31, 44, 0) 80%, rgba(11, 31, 44, .7) 94%, var(--night) 100%);
  }
  .cinematic-content { z-index: 3; }

  .cinematic-footer { padding-block: 6px 34px; }
  .cinematic-hero p.scene-instruction { font-size: .9rem; color: var(--on-night-soft); }
  .scene-controls { gap: 0; margin-block-start: 14px; border: 1px solid var(--line-night); }
  .scene-controls button { min-block-size: 62px; border: 0; border-inline-start: 1px solid var(--line-night); font-size: .9rem; }
  .scene-controls button:first-child { border-inline-start: 0; }
  .scene-controls button span { font-size: .72rem; letter-spacing: .08em; }
  .cinematic-hero p.scene-disclaimer { margin-block-start: 14px; font-size: .78rem; }
  .agent-card.cinematic-briefing { margin-block-start: 24px; padding-block-start: 22px; }
  .agent-head { font-size: .8rem; }
  .hero-case h2 { font-size: 1.35rem; line-height: 1.3; }
  .cinematic-hero .hero-case p { font-size: 1.0625rem; }
  .case-source { font-size: .95rem; min-block-size: 52px; }

  /* Proof: the numbers keep their column, whatever their length */
  .hero-showcase.cinematic-proof { padding-block: 44px 56px; }
  .proof-intro { font-size: 1.0625rem; line-height: 1.7; }
  .cinematic-proof .proof-row > div { grid-template-columns: 7.4rem minmax(0, 1fr); gap: 16px; padding-block: 22px; }
  .cinematic-proof .proof-row dt { font-size: 2.35rem; }
  .cinematic-proof .proof-row dd { font-size: 1rem; line-height: 1.5; }
  .proof-audience { font-size: .875rem; line-height: 1.6; }

  /* ---------- Section rhythm ---------- */

  .section-heading { row-gap: 16px; margin-block-end: 36px; }
  .section-heading.compact { margin-block-end: 28px; }
  h2 { font-size: clamp(1.85rem, 8.2vw, 2.3rem); }

  /* A tinted section runs straight into the closing band, with no paper strip between them */
  .deliverables-section { padding-block-end: 56px; }
  .deliverables-section + .cta-band { margin-block-start: 0; }
  .cta-band { padding-block: 76px 84px; }
  .cta-actions { gap: 14px 26px; }

  /* ---------- Numbered lists: the number sits beside its title, not above it ---------- */

  .case-grid > article,
  .approach-step-grid > article,
  .layer-grid > article,
  .readiness-spokes > article,
  .maturity-ladder > article {
    display: grid;
    grid-template-columns: 2.5rem minmax(0, 1fr);
    column-gap: 10px;
    align-items: baseline;
    padding-block: 22px 26px;
  }
  .case-grid > article > span,
  .approach-step-grid > article > span,
  .layer-grid > article > span,
  .readiness-spokes > article > span,
  .maturity-ladder > article > span { grid-column: 1; grid-row: 1; margin: 0; }
  .case-grid > article > :not(span),
  .approach-step-grid > article > :not(span),
  .layer-grid > article > :not(span),
  .readiness-spokes > article > :not(span),
  .maturity-ladder > article > :not(span) { grid-column: 2; margin-block-start: 0; }
  .case-grid > article > p,
  .approach-step-grid > article > p,
  .layer-grid > article > p,
  .readiness-spokes > article > p,
  .maturity-ladder > article > p { margin-block-start: 8px; font-size: 1rem; line-height: 1.65; }
  .readiness-spokes h3,
  .maturity-ladder h3 { font-size: 1.15rem; }
  .method-grid > *,
  .support-grid > *,
  .deliverable-grid > *,
  .insights-grid > *,
  .anti-grid > *,
  .governance-graphic > * { padding-block: 22px 26px; }
  .governance-graphic > article > span { margin-block-end: 10px; }

  /* The maturity ladder still rises: each rung's rule reaches further than the last */
  .maturity-ladder > article { border-block-start-color: var(--line); }
  .maturity-ladder > article::before {
    content: "";
    position: absolute;
    inset-block-start: -1px;
    inset-inline-start: 0;
    inline-size: var(--rung, 100%);
    block-size: 2px;
    background: var(--gold);
  }
  .maturity-ladder > article:nth-child(1) { --rung: 14%; }
  .maturity-ladder > article:nth-child(2) { --rung: 31%; }
  .maturity-ladder > article:nth-child(3) { --rung: 48%; }
  .maturity-ladder > article:nth-child(4) { --rung: 65%; }
  .maturity-ladder > article:nth-child(5) { --rung: 82%; }
  .maturity-ladder > article:nth-child(6)::before { background: var(--ink); }
  .method-grid p,
  .support-grid p,
  .deliverable-grid p,
  .insights-grid p,
  .case-grid p,
  .approach-step-grid p,
  .layer-grid p,
  .anti-grid p,
  .governance-graphic p { margin-block-start: 8px; font-size: 1rem; line-height: 1.65; }

  /* ---------- Use cases ---------- */

  /* The contents bar is one slim row; a fade at the trailing edge says it scrolls */
  .uc-toc-inner { padding: 6px 0; padding-inline-start: var(--gutter); }
  .uc-toc-links {
    padding-inline-end: var(--gutter);
    scroll-padding-inline: var(--gutter);
    -webkit-mask-image: linear-gradient(to left, transparent, #000 28px);
    mask-image: linear-gradient(to left, transparent, #000 28px);
  }
  html[dir="rtl"] .uc-toc-links {
    -webkit-mask-image: linear-gradient(to right, transparent, #000 28px);
    mask-image: linear-gradient(to right, transparent, #000 28px);
  }
  .uc-toc-links a { min-height: 44px; padding-inline: 14px; font-size: .9rem; }
  /* These blocks sit inside a section that already has the page gutter */
  .section > .rr-list,
  .section > .rr-shared-note,
  .section > .lib-toolbar.is-live { padding-inline: 0; }
  .rr-list { gap: 44px; }
  .rr-item { gap: 22px; padding-block-start: 26px; }
  .rr-copy h3 { margin-block: 6px 14px; font-size: 1.45rem; }
  .hp-screen { font-size: .92rem; }

  /* ---------- Footer: compact, two columns of links ---------- */

  .footer-inner { grid-template-columns: 1fr 1fr; gap: 36px 20px; padding-block: 56px 32px; }
  .footer-inner > :first-child { grid-column: 1 / -1; }
  .footer-brand img { width: 44px; height: 44px; }
  .footer-tagline { margin-block-start: 14px; }
  .footer-col ul { gap: 2px; }
  .footer-col a { display: inline-flex; align-items: center; min-block-size: 44px; font-size: .95rem; }
  .footer-base { padding-block: 20px calc(92px + env(safe-area-inset-bottom)); }
}

@media (max-width: 700px) and (prefers-reduced-motion: reduce) {
  .qc,
  .button,
  .accessibility-toggle { transition: none; }
  .button:active { transform: none; }
}

/* ==========================================================================
   Services page on phones
   The desktop page is a pinned, product-launch scroll. On a phone that meant four
   fixed layers over the content and tall, mostly empty cards. Here the same content
   becomes a short opening, a four-step line, a compact index and an accordion.
   ========================================================================== */

@media (max-width: 600px) {

  .sv { --sv-radius: 18px; }

  /* The floating pill repeated the bottom bar's action and sat on the headings.
     Its anchor stays in place for in-page links. */
  .sv-localnav,
  .sv .sv-localnav {
    position: relative;
    inset: auto;
    block-size: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    visibility: hidden;
  }

  /* Opening */
  .sv .sv-cine .hero-actions { display: flex; }
  .sv-intro { padding-block: 56px 8px; text-align: start; }
  .sv-intro-text { font-size: 1.55rem; line-height: 1.32; font-weight: 500; }

  /* Four steps on one line, read in a glance instead of scrolled through a pinned stage */
  .sv-path,
  html.sv-pin .sv-path { block-size: auto; height: auto; padding-block: 48px 16px; }
  html.sv-pin .sv-path-stage { position: static; display: block; min-height: 0; padding-block-start: 0; }
  html.sv-pin .sv-path-bar { display: none; }
  .sv-path-kicker { margin-block-end: 28px; font-size: 1.9rem; }
  .sv-steps,
  html.sv-pin .sv-steps { display: grid; grid-template-columns: 1fr; gap: 0; counter-reset: sv-step; }
  .sv-steps li,
  html.sv-pin .sv-steps li,
  html.sv-pin .sv-steps li.is-on,
  html.sv-pin .sv-steps li.is-current {
    grid-area: auto;
    position: relative;
    display: block;
    min-height: 0;
    padding: 0 0 30px;
    padding-inline-start: 62px;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    opacity: 1;
    transform: none;
    counter-increment: sv-step;
  }
  .sv-steps li:last-child,
  html.sv-pin .sv-steps li:last-child { padding-block-end: 0; }
  .sv-steps li::before {
    content: counter(sv-step, decimal-leading-zero);
    position: absolute;
    z-index: 1;
    inset-block-start: 0;
    inset-inline-start: 0;
    display: grid;
    place-items: center;
    inline-size: 42px;
    block-size: 42px;
    border: 1px solid var(--gold);
    border-radius: 50%;
    background: var(--sv-bg);
    color: var(--gold-text);
    font-family: var(--font-brand);
    font-size: .8rem;
    font-weight: 500;
    letter-spacing: .04em;
  }
  .sv-steps li::after {
    content: "";
    position: absolute;
    inset-block: 42px 0;
    inset-inline-start: 20.5px;
    inline-size: 1px;
    background: linear-gradient(180deg, var(--gold), var(--line));
  }
  .sv-steps li:last-child::after { display: none; }
  .sv-steps li:last-child::before { border-color: var(--ink); background: var(--ink); color: var(--gold-lum); }
  .sv-steps li > span,
  html.sv-pin .sv-steps span { display: none; }
  .sv-steps h3,
  html.sv-pin .sv-steps h3,
  html.sv-pin .sv-steps li.is-current h3 { margin: 0; padding-block-start: 7px; color: var(--ink); font-size: 1.3rem; line-height: 1.3; }
  .sv-steps p,
  html.sv-pin .sv-steps p,
  html.sv-pin .sv-steps li.is-current p { margin-block-start: 4px; color: var(--muted); font-size: 1.02rem; line-height: 1.5; }

  /* Families: a compact index. The whole card opens that way of working. */
  .sv-family { padding-block: 44px 8px; }
  .sv-family + .sv-family { padding-block-start: 44px; }
  .sv-family-head { margin-block-end: 18px; }
  .sv-family-head h2 { font-size: 2.35rem; }
  .sv-family-head p { margin-block-start: 6px; font-size: 1.05rem; line-height: 1.5; }
  .sv-tiles { gap: 10px; }
  .sv-tile,
  html.sv-motion .sv-tile[data-tilt] {
    --focus-scale: 1;
    --focus-op: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    column-gap: 14px;
    align-items: center;
    min-height: 0;
    padding: 20px;
    border: 1px solid var(--line);
    box-shadow: none;
  }
  html.sv-motion .sv-tile[data-tilt].is-focus { box-shadow: none; }
  .sv-tile h3 { grid-column: 1; font-size: 1.22rem; line-height: 1.28; }
  .sv-tile-tag { grid-column: 1; margin-block-start: 6px; color: var(--muted); font-size: .98rem; line-height: 1.45; }
  .sv-tile > .sv-tile-links { position: static; grid-column: 2; grid-row: 1 / span 3; margin: 0; }
  .sv-tile-links .sv-link { display: none; }
  .sv .sv-tile-links .sv-pill {
    position: static;
    inline-size: 44px;
    min-height: 44px;
    block-size: 44px;
    padding: 0;
    border-color: var(--line-strong);
    font-size: 0;
  }
  .sv-tile-links .sv-pill::before { content: ""; position: absolute; inset: 0; border-radius: inherit; }
  .sv-tile-links .sv-pill::after {
    content: "";
    inline-size: 8px;
    block-size: 8px;
    border-block-end: 1.5px solid currentColor;
    border-inline-end: 1.5px solid currentColor;
    rotate: 45deg;
    translate: 0 -2px;
  }
  html[dir="rtl"] .sv-tile-links .sv-pill::after { rotate: -45deg; }
  .sv-tile-links .sv-pill:hover { background: transparent; color: var(--ink); }
  .sv-tile--flagship { padding-block: 24px; border: 0; }
  .sv-tile--flagship .sv-badge { grid-column: 1; justify-self: start; margin-block-end: 12px; }
  .sv-tile--flagship h3 { font-size: 1.5rem; }
  .sv-tile--flagship .sv-tile-tag { font-size: 1rem; color: var(--on-night-soft); }
  .sv .sv-tile--flagship .sv-tile-links .sv-pill { border-color: rgba(243, 239, 231, .45); color: var(--on-night); }
  .sv-tile--flagship .sv-tile-links .sv-pill:hover { background: transparent; color: var(--on-night); }

  /* Details: one accordion instead of ten separate cards */
  .sv-details { padding-block: 64px 56px; }
  .sv-details .sv-family-head { margin-block-end: 22px; }
  .sv-details-list { gap: 0; border-block-start: 1px solid var(--line-strong); }
  .sv-detail {
    display: block;
    padding: 0;
    border-radius: 0;
    border-block-end: 1px solid var(--line);
    background: transparent;
  }
  .sv-detail header { position: relative; display: block; padding-block: 18px; padding-inline-end: 58px; }
  .sv-detail .sv-eyebrow { margin-block-end: 2px; font-size: .82rem; }
  .sv-detail header h3 { font-size: 1.22rem; line-height: 1.3; }
  .sv .sv-detail .sv-more {
    position: absolute;
    inset: 0;
    justify-content: flex-end;
    inline-size: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    font-size: 0;
  }
  .sv-detail .sv-more::after {
    display: grid;
    place-items: center;
    inline-size: 40px;
    block-size: 40px;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    color: var(--ink);
    font-size: 1.35rem;
    font-weight: 300;
  }
  .sv-detail.is-open .sv-more::after { border-color: var(--ink); background: var(--ink); color: var(--paper); }
  .sv-detail.is-open dl { margin-block-start: 0; padding-block-end: 8px; }
  .sv-detail .sv-row:first-child { border-block-start: 0; padding-block-start: 0; }
  .sv-detail .sv-note { padding-block-end: 20px; }

  /* Closing band */
  .sv-diagnostic { padding-block: 72px 96px; }
  .sv-diagnostic h2 { font-size: 2.5rem; }
  .sv-diag-points { gap: 8px; margin-block-start: 28px; }
  .sv-diag-points li { padding: 12px 18px; border-radius: 14px; text-align: start; }

  /* One bar at the bottom: the main action, with the chat bubble docked inside it */
  .sv-bar { inset-inline: 12px; gap: 8px; padding: 7px; }
  .sv-bar .sv-pill { min-height: 48px; font-size: 1rem; }
  body.sv-bar-on .sv-bar { padding-inline-end: 63px; }
  .qc.is-raised { z-index: 96; inset-block-end: calc(19px + env(safe-area-inset-bottom)); inset-inline-end: 19px; }
  .qc.is-raised .qc-bubble { width: 48px; height: 48px; box-shadow: none; }
}
