/* ========================================
   AI at Your Office — Home page only
   Chrome on black + thin-line legal motifs.
   Loaded by /index.html alone; shared tokens live in /styles.css.
   Motion: transform and opacity only. Every hidden-until-revealed state
   sits under html.js, so the page is fully visible without JavaScript.
   ======================================== */

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

.home { overflow-x: clip; }
.home :focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.home section[id], .home footer[id] { scroll-margin-top: 80px; }

.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; top: -72px; inset-inline-start: 16px; z-index: 100;
  background: #fff; color: #000; font-weight: 700;
  padding: 12px 20px; border-radius: var(--radius-pill);
  transition: top var(--dur-fast) var(--ease-out);
}
.skip-link:focus { top: 12px; }

.wrap { max-width: 1180px; margin-inline: auto; padding-inline: 24px; }
.sec { position: relative; padding-block: var(--section-y); }

/* ===== Buttons and links ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 28px;
  border-radius: var(--radius-pill); font-weight: 700; font-size: 16px; line-height: 1.2;
  text-decoration: none;
}
.btn--lg { min-height: 56px; padding: 14px 36px; font-size: 17px; }
.btn svg { flex-shrink: 0; }
.home .btn-chrome, .home .btn-outline {
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) linear, background-color var(--dur-fast) linear;
}
.home .btn-chrome:active, .home .btn-outline:active { transform: scale(0.98); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  color: var(--accent); font-weight: 600; font-size: 15px;
  border-bottom: 1px solid var(--border-hover);
  transition: color var(--dur-fast) linear, border-color var(--dur-fast) linear;
}
.link-arrow:hover { color: #fff; border-color: #fff; }
.link-arrow svg { transition: transform var(--dur-fast) var(--ease-out); }
.link-arrow:hover svg { transform: translateX(-4px); }

/* ===== Section headers ===== */
.sec-head { margin-bottom: 56px; }
.sec-head--center { text-align: center; }
.sec-head--center .chrome-line { margin-inline: auto; }
.sec-head--center .sec-sub { margin-inline: auto; }
.sec-title {
  font-size: clamp(1.875rem, 2.5vw + 1rem, 2.75rem);
  font-weight: 700; line-height: 1.2; color: #fff; margin-bottom: 20px;
  overflow: hidden; padding-block: 0.06em; /* the mask the title rises from */
}
.t-in { display: inline-block; }
html.js .t-in { transition: transform 800ms var(--ease-out) 120ms; }
html.js [data-reveal]:not(.is-in) .t-in { transform: translateY(105%); }
.sec-sub { color: var(--text-muted); font-size: 18px; line-height: 1.7; max-width: 62ch; margin-top: 20px; }

/* Eyebrow — a numbered clause: "§ 01 · פרויקטים" */
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 14px; font-weight: 600; color: var(--text-muted);
  margin-bottom: 16px;
}
.eyebrow b { font-weight: 800; color: #fff; direction: ltr; unicode-bidi: isolate; }
.eyebrow::after { content: ""; width: 40px; height: 1px; background: rgba(255,255,255,0.28); }

/* Chrome line that draws itself, right to left */
.line-draw { transform-origin: right center; }
html.js [data-reveal]:not(.is-in) .line-draw, html.js .line-draw[data-reveal]:not(.is-in) { transform: scaleX(0); }
html.js .line-draw { transition: transform 700ms var(--ease-out) 150ms; }

/* ===== Scroll reveal ===== */
html.js [data-reveal] {
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
  transition-delay: calc(var(--i, 0) * var(--stagger));
}
html.js [data-reveal]:not(.is-in) { opacity: 0; transform: translateY(var(--reveal-y)); }

/* ===== Nav ===== */
.home-nav { position: fixed; top: 0; inset-inline: 0; z-index: 50; padding-block: 12px; }
.home-nav::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(8,8,8,0.78);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  opacity: 0; transition: opacity 200ms linear;
}
.home-nav::after {
  content: ""; position: absolute; inset: 0 0 -32px 0; z-index: -2; pointer-events: none;
  background: linear-gradient(to bottom, rgba(0,0,0,0.65), transparent);
}
.home-nav.is-scrolled::before, .home-nav.is-menu-open::before { opacity: 1; }
.home-nav .nav-logo { transition: transform 200ms var(--ease-out); transform-origin: right center; }
.home-nav.is-scrolled .nav-logo { transform: scale(0.9); }
.home-nav .group:focus-within > div { opacity: 1; visibility: visible; }

.nav-toggle {
  display: none; width: 44px; height: 44px; align-items: center; justify-content: center;
  border: 1px solid var(--border-hover); border-radius: 50%; color: #fff;
}
.nav-toggle svg { width: 20px; height: 20px; }
.nav-toggle .icon-x { display: none; }
.nav-toggle[aria-expanded="true"] .icon-x { display: block; }
.nav-toggle[aria-expanded="true"] .icon-menu { display: none; }

.mobile-menu {
  position: fixed; top: 68px; inset-inline: 0; z-index: 49;
  max-height: calc(100vh - 68px); max-height: calc(100dvh - 68px); overflow-y: auto;
  background: rgba(8,8,8,0.97); border-bottom: 1px solid var(--border);
  padding: 8px 24px 24px;
  opacity: 0; transform: translateY(-8px); visibility: hidden;
  transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out), visibility 0s linear 200ms;
}
.mobile-menu.is-open { opacity: 1; transform: none; visibility: visible; transition-delay: 0s; }
.mobile-menu a {
  display: flex; align-items: center; min-height: 48px;
  color: #d4d4d4; font-size: 16px; font-weight: 600;
  border-bottom: 1px solid var(--hairline);
}
.mobile-menu a.is-sub { padding-inline-start: 16px; font-weight: 400; color: var(--text-muted); }
.mobile-menu a:hover { color: #fff; }
.mobile-menu .btn { margin-top: 20px; width: 100%; border-bottom: 0; color: #0a0a0a; }

/* The full menu needs ~1000px; below that the menu button takes over */
@media (max-width: 1023px) {
  .nav-toggle { display: inline-flex; }
  .home-nav .nav-logo { white-space: nowrap; }
}
@media (min-width: 1024px) {
  .mobile-menu { display: none; }
}

/* ===== Hero ===== */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center; overflow: hidden;
  padding: 112px 0 96px;
}
.hero-media {
  position: absolute; inset: 0;
  background: #000 url('/hero-poster.jpg') center / cover no-repeat;
  opacity: 0.9;
}
.hero-media .hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.85; }
.hero .hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, rgba(0,0,0,0.25) 0%, transparent 22%, transparent 70%, rgba(0,0,0,0.97) 100%),
    linear-gradient(to left, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.7) 42%, rgba(0,0,0,0.18) 66%, transparent 82%);
}
.hero-inner {
  position: relative; z-index: 1; width: 100%;
  display: grid; grid-template-columns: minmax(0, 1fr); align-items: center;
}
.hero-copy { position: relative; max-width: 720px; }
/* A soft shade behind the copy only: the text keeps its contrast while the video stays clear on the open side */
.hero-copy::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  inset-block: -56px; inset-inline-start: -48px; inset-inline-end: -200px;
  background: linear-gradient(to left, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.8) 82%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 56px, #000 calc(100% - 56px), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 56px, #000 calc(100% - 56px), transparent 100%);
}
@media (min-width: 768px) {
  .hero-copy { padding-inline-start: 26px; }
  .hero-copy::before {
    content: ""; position: absolute; top: 6px; bottom: 6px; inset-inline-start: 0; width: 5px;
    border-inline: 1px solid rgba(255,255,255,0.16);
  }
}
.hero-title {
  font-size: clamp(2.5rem, 6vw + 0.5rem, 4.5rem);
  font-weight: 800; line-height: 1.1; color: #fff; margin-bottom: 28px;
}
.hero-title span { display: block; }
.hero-lead { font-size: 20px; line-height: 1.7; color: #d4d4d4; max-width: 34em; margin-bottom: 12px; }
.hero-note { font-size: 16px; line-height: 1.7; color: var(--text-muted); margin-bottom: 36px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; }
/* The law office's day in four words: a quiet list, deliberately not button-shaped */
.hero-areas { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 32px; }
.hero-areas li { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: #d4d4d4; }
.hero-areas svg { width: 16px; height: 16px; flex-shrink: 0; color: #fff; }

@keyframes heroIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes heroTitleIn { from { transform: translateY(20px); } to { transform: none; } }
.hero-in { animation: heroIn 700ms var(--ease-out) both; animation-delay: var(--d, 0ms); }
.hero-title { animation: heroTitleIn 600ms var(--ease-out) both; }

/* While the travelling ball is out, the track ball in the quote steps aside */
html.ball-on .quote-ball { opacity: 0; }

.home .video-toggle {
  position: absolute; z-index: 2; bottom: 24px; inset-inline-start: 24px;
  width: 44px; height: 44px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #d4d4d4; background: rgba(0,0,0,0.5); border: 1px solid var(--border-hover);
  transition: color var(--dur-fast) linear, border-color var(--dur-fast) linear;
}
.video-toggle:hover { color: #fff; border-color: #fff; }
.video-toggle svg { width: 16px; height: 16px; }
.video-toggle .icon-play { display: none; }
.video-toggle[aria-pressed="true"] .icon-play { display: block; }
.video-toggle[aria-pressed="true"] .icon-pause { display: none; }

@media (max-width: 767px) {
  /* Phone: the motion shows above the headline; the text sits on a dark base */
  .hero { padding: 84px 0 96px; align-items: flex-end; }
  .hero-media { background-image: url('/hero-poster-mobile.jpg'); }
  .hero .hero-overlay {
    background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.25) 22%, rgba(0,0,0,0.78) 44%, rgba(0,0,0,0.92) 62%, rgba(0,0,0,0.97) 100%);
  }
  .hero-title { margin-bottom: 16px; }
  .hero-lead { font-size: 18px; }
  .hero-note { margin-bottom: 24px; }
  .hero-actions .btn { width: 100%; }
  .hero-areas { margin-top: 24px; padding-inline-end: 72px; }
  .hero-copy::after {
    inset: -40px -24px; background: rgba(0,0,0,0.78);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 40px, #000 100%);
    mask-image: linear-gradient(to bottom, transparent 0, #000 40px, #000 100%);
  }
}

/* ===== A strip of legal vocabulary under the hero's seam, moving with the scroll ===== */
.legal-ticker {
  position: absolute; top: 30px; left: 0; right: 0; max-width: 1180px; margin-inline: auto; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.legal-ticker-track {
  display: flex; align-items: center; gap: 26px; width: max-content; white-space: nowrap;
  font-size: 20px; font-weight: 600; color: var(--text-meta); will-change: transform;
}
.legal-ticker-track i { font-style: normal; font-weight: 800; color: #d4d4d4; }
@media (max-width: 767px) {
  .legal-ticker { top: 22px; }
  .legal-ticker-track { font-size: 16px; gap: 18px; }
}

/* ===== Projects ===== */
/* Seams: the floor the ball rolls along between sections */
.projects, .process, .quote-section { border-top: 1px solid rgba(255,255,255,0.10); }
.projects { background: var(--bg); }
/* Column flutes: a hint of a courthouse column, fading downward */
.flutes {
  position: absolute; top: 0; inset-inline: 0; height: 160px; pointer-events: none;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 28px);
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent);
  mask-image: linear-gradient(to bottom, #000, transparent);
}
.project-list { display: grid; gap: 32px; }
.project {
  display: grid; grid-template-columns: 5fr 7fr; align-items: center; gap: 56px;
  padding: 48px; border-radius: var(--radius-card);
  background: var(--surface); border: 1px solid var(--border);
  transition: border-color var(--dur-base) linear;
}
.project-tag {
  display: inline-block; font-size: 13px; font-weight: 600; color: var(--accent);
  border: 1px solid rgba(220,220,220,0.3); border-radius: var(--radius-pill);
  padding: 4px 14px; margin-bottom: 20px;
}
.project-name { font-size: 40px; font-weight: 800; line-height: 1.15; margin-bottom: 12px; }
.project-desc { font-size: 18px; line-height: 1.7; color: #d4d4d4; max-width: 34ch; margin-bottom: 24px; }
.project-points { display: grid; gap: 12px; margin-bottom: 24px; }
.project-points li {
  position: relative; padding-inline-start: 22px;
  font-size: 15px; line-height: 1.65; color: var(--text-muted);
}
.project-points li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 0.72em;
  width: 10px; height: 1px; background: #d4d4d4;
}
.project-boundary {
  font-size: 14px; line-height: 1.6; color: var(--text-meta);
  padding-top: 16px; border-top: 1px solid var(--hairline); margin-bottom: 28px;
}
.project-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.project-media { position: relative; display: block; perspective: 1200px; }
.window-tilt { transform-origin: 50% 100%; will-change: transform; }
.window {
  border-radius: var(--radius-tile); overflow: hidden;
  border: 1px solid rgba(220,220,220,0.22); background: #111;
  box-shadow: var(--shadow-2);
  transition: transform var(--dur-base) var(--ease-out);
}
.window-bar {
  display: flex; align-items: center; gap: 6px; height: 32px; padding-inline: 14px;
  background: #111; border-bottom: 1px solid var(--hairline);
  direction: ltr;
}
.window-bar i { width: 6px; height: 6px; border-radius: 50%; background: #3a3a3a; }
.window-bar span { margin-inline-start: 10px; font-size: 12px; color: var(--text-muted); }
.window-shot { aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-elevated); }
.window-shot img { display: block; width: 100%; height: auto; }
.seal {
  position: absolute; bottom: -22px; inset-inline-start: -22px;
  width: 72px; height: 72px;
  transition: transform var(--dur-base) var(--ease-out);
}
/* The seal is stamped on once the card has arrived */
html.js .project[data-reveal]:not(.is-in) .seal { opacity: 0; }
html.js .project.is-in .seal { animation: sealStamp 360ms cubic-bezier(0.34,1.56,0.64,1) 700ms backwards; }
@keyframes sealStamp { from { opacity: 0; transform: scale(1.6) rotate(-18deg); } to { opacity: 1; transform: none; } }
@media (hover: hover) {
  .project:hover { border-color: var(--border-hover); }
  .project-media:hover .window { transform: translateY(-6px) scale(1.015); }
  .project-media:hover .seal { transform: rotate(12deg); }
}
.project-media:active .window { transform: scale(0.99); transition-duration: 120ms; }
/* Every second project is mirrored on wide screens, so the screenshots alternate sides */
@media (min-width: 1024px) {
  .project-list > li:nth-child(even) .project { grid-template-columns: 7fr 5fr; }
  .project-list > li:nth-child(even) .project-media { order: -1; }
  .project-list > li:nth-child(even) .seal { inset-inline-start: auto; inset-inline-end: -22px; }
}

@media (max-width: 1023px) {
  .project { grid-template-columns: minmax(0, 1fr); gap: 32px; padding: 32px; }
  .project-media { order: -1; }
  .project-desc { max-width: none; }
}
@media (max-width: 767px) {
  .project { padding: 20px; gap: 24px; }
  .project-name { font-size: 32px; }
  .project-actions .btn { width: 100%; }
  .seal { width: 56px; height: 56px; bottom: 10px; inset-inline-start: 10px; }
}

/* ===== Services ===== */
.services { background: var(--bg-soft); }
.services-head { display: grid; grid-template-columns: 5fr 7fr; gap: 56px; align-items: center; }
.services-intro .link-arrow { margin-top: 28px; }

/* A legal page being read: skeleton lines only, so no legal wording is written here */
.doc-scene { position: relative; margin: 0; display: grid; grid-template-columns: minmax(0, 420px); justify-content: start; }
.doc {
  position: relative; overflow: hidden; display: grid; gap: 26px; padding: 30px 30px 46px;
  background: var(--bg-elevated); border: 1px solid rgba(220,220,220,0.18); border-radius: 6px;
  -webkit-mask-image: linear-gradient(to bottom, #000 74%, transparent);
  mask-image: linear-gradient(to bottom, #000 74%, transparent);
}
.doc-beam {
  position: absolute; top: -1px; inset-inline: 0; height: 2px; z-index: 2; opacity: 0;
  background: linear-gradient(90deg, transparent, #fff 14%, #fff 86%, transparent);
  box-shadow: 0 0 14px 2px rgba(255,255,255,0.35); will-change: transform;
}
.doc-clause { position: relative; display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 0 10px; align-items: start; }
.doc-num { font-size: 13px; font-weight: 700; line-height: 1; color: #d4d4d4; }
.doc-lines { display: grid; gap: 10px; padding-top: 3px; transition: opacity 400ms linear; }
.doc-lines i { position: relative; display: block; height: 6px; width: var(--w, 100%); border-radius: 3px; background: rgba(255,255,255,0.3); }
html.js .doc-clause:not(.is-read) .doc-lines { opacity: 0.4; }
/* Clause 2 is flagged: a chrome bracket draws down its side */
.doc-clause--flag .doc-lines i { background: rgba(255,255,255,0.72); }
.doc-clause--flag::after {
  content: ""; position: absolute; inset-block: -9px; right: -14px; width: 8px;
  border: 2px solid #fff; border-left: 0; border-radius: 0 2px 2px 0;
  transform-origin: 50% 0; transition: transform 400ms var(--ease-out);
}
html.js .doc-clause--flag:not(.is-read)::after { transform: scaleY(0); }
/* Clause 3 changed between versions: one line struck, one added */
.doc-lines .doc-old::after { content: ""; position: absolute; inset-inline: -5px; top: 50%; height: 1px; background: #fff; }
.doc-lines .doc-new { background: rgba(255,255,255,0.82); }
.doc-lines .doc-new::before { content: "+"; position: absolute; right: -15px; top: -8px; font-size: 14px; font-weight: 800; line-height: 1.4; color: #fff; }

.doc-notes { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 16px; }
.doc-note {
  position: relative; display: inline-flex; align-items: center; min-height: 32px; padding: 4px 14px; white-space: nowrap;
  font-size: 13px; font-weight: 600; color: #f0f0f0;
  border: 1px solid rgba(220,220,220,0.4); border-radius: var(--radius-pill); background: rgba(0,0,0,0.6);
  transition: opacity 400ms var(--ease-out), transform 400ms var(--ease-out);
}
/* Each note arrives when the scan line has read its clause */
html.js .doc[data-read="0"] ~ .doc-notes .doc-note,
html.js .doc[data-read="1"] ~ .doc-notes .doc-note:nth-child(n+2),
html.js .doc[data-read="2"] ~ .doc-notes .doc-note:nth-child(n+3) { opacity: 0; transform: translateX(-16px); }
.doc-caption { margin-top: 12px; font-size: 12px; color: var(--text-meta); }

@media (min-width: 1240px) {
  /* Room for margin notes beside the page, each level with its clause */
  .doc-scene { grid-template-columns: minmax(0, 420px) minmax(0, 1fr); column-gap: 32px; }
  .doc-notes { display: grid; align-content: start; justify-items: start; gap: 32px; padding-top: 33px; }
  .doc-note::before { content: ""; position: absolute; left: 100%; top: 50%; width: 32px; height: 1px; background: rgba(255,255,255,0.4); }
  .doc-caption { grid-column: 1; }
}
@media (max-width: 1023px) {
  .services-head { grid-template-columns: minmax(0, 1fr); gap: 36px; }
}

.service-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.home .service-card {
  display: block; padding: 24px; border-radius: var(--radius-card);
  transition: transform var(--dur-base) var(--ease-out), border-color var(--dur-base) linear, box-shadow var(--dur-base) linear;
}
.service-img { height: 192px; border-radius: var(--radius-tile); overflow: hidden; margin-bottom: 24px; }
.service-img img { width: 100%; height: 100%; object-fit: cover; }
.service-card h3 { font-size: 20px; font-weight: 700; line-height: 1.3; color: #fff; margin-bottom: 10px; }
.service-card p { font-size: 15px; line-height: 1.65; color: var(--text-muted); }
@media (max-width: 1023px) {
  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 639px) {
  .service-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .service-img { height: 128px; margin-bottom: 16px; }
  .home .service-card { padding: 16px; }
}

/* ===== Process: sticky film + a rail that fills as you read ===== */
.process { background: var(--bg); }
.process-grid { display: grid; grid-template-columns: 7fr 5fr; gap: 72px; align-items: start; }
.process-sticky { position: sticky; top: 104px; }
.process-sticky .sec-head { margin-bottom: 32px; }
.process-film {
  position: relative; border-radius: var(--radius-tile); overflow: hidden;
  border: 1px solid var(--border); aspect-ratio: 1670 / 720;
  background: #000 url('/process-poster.jpg') center / cover no-repeat;
}
.process-film video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.process-film .video-toggle { bottom: 12px; inset-inline-start: 12px; }

.steps-wrap { position: relative; padding-inline-start: 72px; padding-top: 8px; }
.rail {
  position: absolute; top: 30px; bottom: 30px; inset-inline-start: 21px; width: 2px;
  background: rgba(180,180,180,0.18); border-radius: 1px; overflow: hidden;
}
.rail-fill {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, #ffffff, #b8b8b8);
  transform-origin: top center;
}
.step { position: relative; min-height: 30vh; padding-bottom: 32px; }
.step:last-child { min-height: 0; padding-bottom: 0; }
.step-node {
  position: absolute; top: 0; inset-inline-start: -72px;
  width: 44px; height: 44px; border-radius: 50%; background: var(--bg);
}
.step-node .step-number {
  margin: 0; font-size: 14px; letter-spacing: 0; direction: ltr;
  transition: opacity 300ms linear, transform 300ms var(--ease-out);
}
/* A ring pulses once when the ball lands on a step */
.step-node::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1px solid #fff; opacity: 0; pointer-events: none; }
html.js .step.is-active .step-node::after { animation: stepRing 450ms var(--ease-out) 1; }
@keyframes stepRing { from { transform: scale(1); opacity: 0.5; } to { transform: scale(1.3); opacity: 0; } }
.step h3 {
  font-size: 22px; font-weight: 700; line-height: 1.3; color: #fff;
  padding-top: 7px; margin-bottom: 8px;
  transition: opacity 300ms linear;
}
.step p { font-size: 16px; line-height: 1.7; color: var(--text-muted); max-width: 40ch; }
html.js .rail-fill { transform: scaleY(0); }
html.js .step:not(.is-active) .step-number { opacity: 0.35; transform: scale(0.85); }
html.js .step:not(.is-active) h3 { opacity: 0.6; }

@media (max-width: 1023px) {
  .process-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .process-sticky { position: static; }
  .step { min-height: 0; padding-bottom: 36px; }
}
@media (max-width: 767px) {
  .process-film { aspect-ratio: 4 / 5; max-height: 70vh; width: 100%; background-image: url('/process-poster-mobile.jpg'); }
  .step h3 { font-size: 20px; }
}

/* ===== Founder quote ===== */
.quote-section { background: #000; overflow: hidden; }
.quote-inner { position: relative; max-width: 900px; margin-inline: auto; padding-inline: 24px; }
/* § as a watermark — the only one on the page */
.quote-watermark {
  position: absolute; top: 50%; left: 4%; transform: translateY(-50%);
  font-size: 480px; font-weight: 800; line-height: 1; color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,0.10);
  pointer-events: none; user-select: none;
}
/* A chrome sphere in a studio: bright sky above, a dark horizon band curving across the lower half, a floor
   bounce under it, darker edges, and a sharp highlight. Shared by the travelling ball and the one in the quote. */
:root {
  --chrome-ball:
    radial-gradient(circle at 33% 23%, #ffffff 0, #ffffff 3%, rgba(255,255,255,0.85) 6.5%, rgba(255,255,255,0) 17%),
    radial-gradient(ellipse 58% 20% at 50% 90%, rgba(255,255,255,0.5), rgba(255,255,255,0) 72%),
    radial-gradient(circle at 50% 50%, rgba(0,0,0,0) 46%, rgba(0,0,0,0.38) 62%, rgba(0,0,0,0.8) 70.7%),
    radial-gradient(ellipse 140% 150% at 50% -60%, #fbfbfb 0%, #e6e6e6 45%, #b8b8b8 70%, #8a8a8a 83%, #2a2a2a 87%, #0d0d0d 91%, #141414 95%, #3d3d3d 100%);
  --chrome-ball-shadow: 0 10px 18px -5px rgba(0,0,0,0.75), 0 2px 4px rgba(0,0,0,0.5), 0 0 22px rgba(255,255,255,0.08),
    0 0 0 1px rgba(0,0,0,0.6), inset 0 0 0 1px rgba(255,255,255,0.07), inset 0 -4px 7px rgba(255,255,255,0.14);
}
.quote-track { position: relative; height: 46px; margin-bottom: 28px; }
.quote-track::before {
  content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6) 20%, rgba(255,255,255,0.6) 80%, transparent);
  opacity: 0.5; transition: opacity 300ms linear;
}
.quote-track.is-lit::before { opacity: 1; }
.quote-ball {
  position: absolute; top: 0; right: 0; width: 46px; height: 46px; border-radius: 50%;
  background: var(--chrome-ball); box-shadow: var(--chrome-ball-shadow);
}
.quote-text { font-size: 28px; line-height: 1.6; font-weight: 600; color: #fff; margin-bottom: 32px; }
.quote-mark {
  font-size: 80px; line-height: 0; color: #6a6a6a; font-family: Georgia, serif;
  vertical-align: -20px; margin-inline-end: 4px; display: inline-block;
}
.quote-mark-end { color: var(--text-meta); }
.qw { transition: opacity 250ms linear; }
/* 0.5 keeps an unlit word at 5.3:1 on black, so the quote is readable at any scroll position */
html.js .qw:not(.on) { opacity: 0.5; }
.attribution { display: flex; align-items: center; gap: 14px; margin-top: 24px; }
.attribution-line { height: 1px; width: 40px; background: #666; }
.attribution-name { font-size: 18px; font-weight: 600; color: #fff; }
.attribution-title { font-size: 14px; color: var(--text-muted); }
@media (max-width: 767px) {
  .quote-text { font-size: 22px; line-height: 1.7; }
  .quote-watermark { font-size: 300px; left: -6%; }
  .quote-track { height: 36px; }
  .quote-ball { width: 36px; height: 36px; }
}

/* ===== Implementers: the founder forward in the centre, the others a step behind ===== */
.imp-section { background: #000; }
.imp-stage { display: grid; grid-template-columns: 240px 300px 240px; justify-content: center; align-items: center; }
/* Composition lives on the slot, the reveal on .flip-card, the flip on .flip-inner: three transforms that never meet */
.imp-slot { position: relative; transition: transform var(--dur-base) var(--ease-out); }
.imp-slot--lead { order: 2; z-index: 3; }
.imp-slot--right { order: 1; z-index: 1; transform: translate(-28px, 20px); } /* RTL: the first column is the right one */
.imp-slot--left { order: 3; z-index: 1; transform: translate(28px, 20px); }
/* The slot's hover area covers both its resting and its forward position, so the card never slides out from under the pointer */
.imp-slot--side::after { content: ""; position: absolute; inset: 0 -28px -20px -28px; z-index: -1; }
.imp-slot--side:focus-within, .imp-slot--side.is-flipped { transform: none; z-index: 4; }
@media (hover: hover) {
  .imp-slot--side:hover { transform: none; z-index: 4; }
}

.flip-card { perspective: 1000px; height: 350px; }
.imp-slot--lead .flip-card { height: 420px; }
.flip-inner {
  position: relative; width: 100%; height: 100%;
  transition: transform 700ms var(--ease-inout); transform-style: preserve-3d;
}
.flip-card.flipped .flip-inner { transform: rotateY(180deg); }
.flip-front, .flip-back {
  position: absolute; inset: 0; border-radius: var(--radius-tile); overflow: hidden;
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
}
.flip-front {
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-1);
  padding: 24px 18px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  transition: border-color var(--dur-base) linear, background-color var(--dur-base) linear;
}
.imp-slot--lead .flip-front {
  border-color: rgba(220,220,220,0.45); background: rgba(25,25,25,0.9); box-shadow: var(--shadow-2);
  padding-top: 34px; gap: 12px;
}
.imp-slot--lead .flip-front::before {
  content: ""; position: absolute; top: 0; inset-inline: 16%; height: 1px;
  background: linear-gradient(90deg, transparent, #fff, transparent);
}
@media (hover: hover) {
  .flip-card:hover .flip-front { border-color: var(--border-hover); background: var(--surface-hover); }
}
.imp-photo-wrap {
  position: relative; width: 104px; height: 104px; border-radius: 50%; padding: 2px; margin-top: 6px;
  background: linear-gradient(135deg, #f0f0f0, #888 50%, #2a2a2a);
  box-shadow: 0 4px 16px rgba(255,255,255,0.08), inset 0 1px 0 rgba(255,255,255,0.4);
}
/* Photo: drop a file in /team/ and point the <img> at it; initials show if the image is missing */
.imp-photo {
  position: relative; width: 100px; height: 100px; border-radius: 50%; overflow: hidden;
  background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 700; color: var(--text-muted); border: 2px solid #000; direction: ltr;
}
.imp-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.imp-slot--lead .imp-photo-wrap { width: 152px; height: 152px; margin-bottom: 6px; }
.imp-slot--lead .imp-photo { width: 148px; height: 148px; }
/* No portrait yet: a deliberate monogram seal instead of an empty frame */
.imp-photo-wrap--mono::after { content: ""; position: absolute; inset: -9px; border-radius: 50%; border: 1px dashed rgba(220,220,220,0.45); }
.imp-photo-wrap--mono .imp-photo { background: radial-gradient(circle at 50% 35%, #1c1c1c, #050505); font-size: 52px; font-weight: 800; }
/* "Behind" is carried by size, offset and shadow; only the photo is dimmed, never the text */
.imp-slot--side .imp-photo::after { content: ""; position: absolute; inset: 0; background: #000; opacity: 0.25; transition: opacity var(--dur-base) linear; }
.imp-slot--side:focus-within .imp-photo::after, .imp-slot--side.is-flipped .imp-photo::after { opacity: 0; }
@media (hover: hover) {
  .imp-slot--side:hover .imp-photo::after { opacity: 0; }
}
.imp-name { font-size: 17px; font-weight: 700; color: #fff; margin-top: 6px; }
.imp-role { font-size: 13px; color: #d4d4d4; font-weight: 600; }
.imp-spec { font-size: 12px; color: var(--text-muted); line-height: 1.5; }
.imp-slot--lead .imp-name { font-size: 22px; }
.imp-slot--lead .imp-role { font-size: 14px; }
.flip-cue {
  margin-top: auto; min-height: 44px; padding: 8px 16px;
  font-size: 13px; color: var(--text-muted);
  border: 1px solid rgba(180,180,180,0.28); border-radius: var(--radius-pill);
}
/* The whole front face is the hit area of the cue button */
.flip-cue::after { content: ""; position: absolute; inset: 0; cursor: pointer; }
.flip-back {
  background: #0a0a0a; border: 1px solid rgba(220,220,220,0.3);
  transform: rotateY(180deg); display: flex; flex-direction: column; cursor: pointer;
}
.flip-bio {
  flex: 1; margin: 0; padding: 22px 20px; display: flex; align-items: center; overflow-y: auto;
  font-size: 14px; line-height: 1.75; color: #d4d4d4; text-align: right;
  background: radial-gradient(circle at 50% 30%, #161616 0%, #000 75%);
}
.flip-bio--quote { font-size: 16px; font-weight: 600; color: #f0f0f0; padding: 26px 24px; }
.flip-meta {
  padding: 8px 12px 8px 16px; border-top: 1px solid rgba(180,180,180,0.12);
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(20,20,20,0.9);
}
.flip-meta-name { font-size: 13px; font-weight: 700; color: #fff; }
.flip-back-btn {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(180,180,180,0.3); color: var(--text-muted); font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: color var(--dur-fast) linear, border-color var(--dur-fast) linear;
}
.flip-back-btn:hover { color: #fff; border-color: #fff; }
/* Entrance: the founder rises, then the other two step out from behind him */
html.js .imp-slot--lead .flip-card[data-reveal]:not(.is-in) { transform: translateY(32px); }
html.js .imp-slot--right .flip-card[data-reveal]:not(.is-in) { transform: translateX(-60px); }
html.js .imp-slot--left .flip-card[data-reveal]:not(.is-in) { transform: translateX(60px); }
html.js .imp-slot--side .flip-card[data-reveal] { transition-delay: 160ms; }
@media (max-width: 1023px) {
  .imp-stage { grid-template-columns: minmax(0, 210px) minmax(0, 270px) minmax(0, 210px); }
}
@media (max-width: 767px) {
  /* Phone: the founder across the top, the two others below and tucked under his card */
  .imp-stage { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 13px; align-items: start; }
  .imp-slot--lead { order: 0; grid-column: 1 / -1; }
  .imp-slot--side { order: 1; transform: none; margin-top: -16px; }
  .imp-slot--side::after { display: none; }
  .imp-slot--lead .flip-card { height: 364px; }
  .flip-card { height: 376px; }
  .flip-bio { font-size: 13px; padding: 14px 12px; line-height: 1.6; align-items: flex-start; }
  .flip-bio--quote { font-size: 16px; padding: 22px 20px; align-items: center; }
  .imp-photo-wrap { width: 84px; height: 84px; margin-top: 16px; }
  .imp-photo { width: 80px; height: 80px; font-size: 22px; }
  .imp-slot--lead .imp-photo-wrap { width: 124px; height: 124px; margin-top: 0; }
  .imp-slot--lead .imp-photo { width: 120px; height: 120px; }
  .imp-photo-wrap--mono .imp-photo { font-size: 42px; }
  .flip-front { padding: 18px 10px; }
  html.js .imp-slot--right .flip-card[data-reveal]:not(.is-in),
  html.js .imp-slot--left .flip-card[data-reveal]:not(.is-in) { transform: translateY(-40px); }
}
@media (max-width: 359px) {
  /* Too narrow for two readable cards side by side: one column, full width */
  .imp-stage { grid-template-columns: minmax(0, 1fr); }
  .imp-slot--side { margin-top: 12px; }
  .flip-card { height: 300px; }
}

/* ===== AI tools: each with its own mark and the part it looks after ===== */
.tools-section { background: var(--bg-soft); }
.tool-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.tool-card {
  position: relative; display: flex; flex-direction: column; gap: 16px; padding: 20px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-tile);
  transition: transform var(--dur-base) var(--ease-out), border-color var(--dur-base) linear;
}
.tool-card--wide { grid-column: span 2; flex-direction: row; align-items: center; gap: 22px; }
.tool-tile {
  position: relative; overflow: hidden; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  width: 56px; height: 56px; border-radius: 14px;
  background: #000; border: 1px solid rgba(220,220,220,0.16);
  transition: transform 500ms var(--ease-out) 120ms;
}
/* A glow in the brand's own colour rises from the foot of the tile (only where color-mix exists; otherwise the plain tile above) */
@supports (background: color-mix(in srgb, red 50%, blue)) {
  .tool-tile {
    background: radial-gradient(130% 100% at 50% 122%, color-mix(in srgb, var(--glow, #ffffff) 42%, transparent), transparent 72%), #000;
    border-color: color-mix(in srgb, var(--glow, #dcdcdc) 34%, rgba(220,220,220,0.16));
  }
}
.tool-tile--pair { width: 104px; }
.tool-card--wide .tool-tile { width: 92px; height: 92px; border-radius: 22px; }
/* Drawn through a mask in the brand's own colour; brands that are black-and-white by design stay white on the dark tile */
.tool-logo {
  display: block; width: 30px; height: 30px; background: var(--brand, #ffffff);
  -webkit-mask: var(--logo) center / contain no-repeat; mask: var(--logo) center / contain no-repeat;
  transition: transform var(--dur-base) var(--ease-out);
}
.tool-tile--pair .tool-logo { width: 24px; height: 24px; }
.tool-card--wide .tool-logo { width: 46px; height: 46px; }
/* A single band of light crosses the tile on hover */
.tool-tile::after {
  content: ""; position: absolute; top: -20%; bottom: -20%; left: -70%; width: 45%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
  transform: skewX(-18deg); transition: transform 600ms var(--ease-out);
}
.tool-body { min-width: 0; flex: 1; }
.tool-name {
  font-size: 17px; font-weight: 700; line-height: 1.3; color: #fff;
  padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid var(--hairline);
}
.tool-role { font-size: 14px; line-height: 1.55; color: #d4d4d4; }
.tool-card--wide .tool-name { font-size: 22px; }
.tool-card--wide .tool-role { font-size: 16px; }
html.js .tool-card[data-reveal]:not(.is-in) .tool-tile { transform: scale(0.8); }
@media (hover: hover) {
  .tool-card:hover { transform: translateY(-4px); border-color: var(--border-hover); }
  .tool-card:hover .tool-logo { transform: scale(1.06); }
  .tool-card:hover .tool-tile::after { transform: translateX(420%) skewX(-18deg); }
}
@media (max-width: 1023px) {
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 639px) {
  .tool-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .tool-card, .tool-card--wide { grid-column: auto; flex-direction: row; align-items: center; gap: 16px; padding: 16px; }
  .tool-tile, .tool-card--wide .tool-tile { width: 48px; height: 48px; border-radius: 12px; }
  .tool-tile--pair { width: 88px; }
  .tool-logo, .tool-card--wide .tool-logo { width: 24px; height: 24px; }
  .tool-tile--pair .tool-logo { width: 22px; height: 22px; }
  .tool-name, .tool-card--wide .tool-name { font-size: 16px; padding-bottom: 6px; margin-bottom: 6px; }
  .tool-role, .tool-card--wide .tool-role { font-size: 14px; }
}

/* ===== The travelling ball =====
   One fixed element; /home.js places it from the scroll position alone. Hidden until the script has a valid path,
   hidden with reduced motion (the track ball in the quote stays), and hidden while the phone menu is open. */
.ball {
  position: fixed; top: 0; left: 0; z-index: 40; width: 84px; height: 84px;
  display: none; opacity: 0; pointer-events: none; will-change: transform, opacity;
}
html.ball-on .ball { display: block; }
.home-nav.is-menu-open ~ .ball { visibility: hidden; }
/* The shell and its highlight never rotate (a sphere's highlight stays put); only the label turns */
.ball-shell {
  position: absolute; inset: 0; border-radius: 50%; transform-origin: 50% 100%;
  background: var(--chrome-ball); box-shadow: var(--chrome-ball-shadow);
}
.ball-shell.is-landing { animation: ballLand 320ms cubic-bezier(0.34,1.56,0.64,1) both; }
@keyframes ballLand { from { transform: scale(1.12, 0.88); } to { transform: scale(1); } }
.ball-label {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: 800; letter-spacing: -0.02em; color: #1c1c1c; opacity: 0.82; direction: ltr;
  padding-bottom: 6px; /* sits on the bright upper half, above the horizon band */
  text-shadow: 0 1px 0 rgba(255,255,255,0.55), 0 -1px 0 rgba(0,0,0,0.25); /* engraved into the chrome */
  transition: opacity 200ms linear;
}
.ball.is-small .ball-label { opacity: 0; }

/* ===== Closing call ===== */
.site-footer { position: relative; padding-block: calc(var(--section-y) + 40px) 48px; text-align: center; border-top: 1px solid var(--border); background: var(--bg-soft); }
.footer-title { font-size: clamp(1.5rem, 2vw + 1rem, 2.25rem); font-weight: 800; color: #fff; margin-bottom: 20px; }
.footer-phone { color: var(--text-muted); margin: 28px 0 24px; }
.footer-phone bdi { color: #d4d4d4; font-weight: 600; }
.footer-links { margin-top: 56px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; }
.footer-links a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding-inline: 6px; font-size: 14px; color: var(--text-muted); transition: color var(--dur-fast) linear; }
.footer-links a:hover { color: #fff; }
.footer-legal { margin-top: 20px; font-size: 12px; letter-spacing: 0.2em; color: var(--text-meta); direction: ltr; }

/* ===== Chat widget: style only, behaviour unchanged ===== */
#chat-window { width: min(340px, calc(100vw - 48px)) !important; }
#chat-input:focus-visible { outline: 2px solid var(--focus) !important; outline-offset: 2px; }

/* ===== Reduced motion: everything visible, nothing moves ===== */
@media (prefers-reduced-motion: reduce) {
  .home *, .home *::before, .home *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
  html.js [data-reveal]:not(.is-in) { opacity: 1; transform: none; }
  html.js [data-reveal]:not(.is-in) .line-draw, html.js .line-draw[data-reveal]:not(.is-in) { transform: none; }
  html.js [data-reveal]:not(.is-in) .t-in { transform: none; }
  html.js .flip-card[data-reveal]:not(.is-in) { transform: none; }
  html.js .tool-card[data-reveal]:not(.is-in) .tool-tile { transform: none; }
  html.js .project[data-reveal]:not(.is-in) .seal { opacity: 1; }
  html.js .doc-clause:not(.is-read) .doc-lines { opacity: 1; }
  html.js .doc-clause--flag:not(.is-read)::after { transform: none; }
  html.js .rail-fill { transform: none; }
  html.js .step:not(.is-active) .step-number { opacity: 1; transform: none; }
  html.js .step:not(.is-active) h3 { opacity: 1; }
  html.js .qw:not(.on) { opacity: 1; }
}

/* ===== Print: nothing stays hidden waiting for a scroll ===== */
@media print {
  html.js [data-reveal]:not(.is-in) { opacity: 1; transform: none; }
  html.js .qw:not(.on) { opacity: 1; }
  html.js [data-reveal]:not(.is-in) .t-in, html.js .flip-card[data-reveal]:not(.is-in) { transform: none; }
  html.js .doc-clause:not(.is-read) .doc-lines { opacity: 1; }
  html.js .doc-notes .doc-note { opacity: 1 !important; transform: none !important; }
  .ball, #chat-widget, .video-toggle { display: none !important; }
}
