/* ==========================================================================
   Homepage sections
   ========================================================================== */

/* Tag sticker ------------------------------------------------------------- */
.tag {
  display: inline-block; margin-bottom: 24px;
  padding: 6px 12px; background: var(--accent); color: #fff;
  border: var(--bw) solid var(--ink); box-shadow: var(--shadow-sm);
  font-family: var(--font-mono); font-size: var(--fs-micro); font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
}

/* 1. Hero ---------------------------------------------------------------- */
.hero { padding-block: var(--page-top) clamp(56px, 9vw, 112px); }
.hero__grid {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: clamp(36px, 5vw, 72px); align-items: center;
}
.hero__title { font-size: var(--fs-display); line-height: .95; }
.hero__block {
  display: inline-block; margin-top: .12em; padding: .04em .2em .08em;
  background: var(--ink); color: #fff; box-shadow: 8px 8px 0 var(--accent);
}
.hero__line { display: block; }
.hero__lead { max-width: 32rem; margin-top: 28px; font-size: var(--fs-lead); color: var(--slate); }
.hero__lead strong { color: var(--ink); font-weight: 600; }
.hero__text { max-width: 32rem; margin-top: 14px; font-size: var(--fs-body); color: var(--slate); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }

/* Signature visual: untangle */
.untangle { margin: 0; padding: 0; box-shadow: 10px 10px 0 var(--ink); }
.untangle__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px; border-bottom: var(--bw) solid var(--ink);
  font-family: var(--font-mono); font-size: var(--fs-label); font-weight: 700; letter-spacing: .1em;
}
.untangle__state { display: inline-flex; align-items: center; gap: 8px; }
.untangle__state::before {
  content: ""; width: 10px; height: 10px; border: 2px solid var(--ink); background: #F97316;
  transition: background .3s;
}
.untangle.is-simple .untangle__state::before { background: var(--accent); }
.untangle__btn {
  padding: 6px 12px; border: 2px solid var(--ink); background: var(--surface); color: var(--ink);
  font-family: var(--font-mono); font-size: var(--fs-micro); font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  box-shadow: 3px 3px 0 var(--ink); cursor: pointer; transition: transform .12s, box-shadow .12s;
}
.untangle__btn:hover { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.untangle__svg { display: block; overflow: hidden; width: 100%; height: auto; background:
  linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 20px 20px,
  linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 20px 20px; }
.untangle__svg path { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
.untangle__svg path.is-accent { stroke: var(--accent); stroke-width: 4; }
.untangle__svg circle { fill: var(--surface); stroke: var(--ink); stroke-width: 3; }
.untangle__svg rect { fill: var(--ink); }
.untangle__caption {
  padding: 10px 14px; border-top: var(--bw) solid var(--ink);
  font-family: var(--font-mono); font-size: var(--fs-label); color: var(--slate);
}

/* 2. Pains ---------------------------------------------------------------- */
.pains { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.pain.panel { border: 0; }   /* diagnosis boxes: no black outline */
.pain h3 { font-size: var(--fs-h4); margin: 14px 0 12px; }
.pain p { color: var(--slate); }
.pain__num { font-family: var(--font-mono); font-weight: 700; font-size: var(--fs-mono); color: var(--accent); }

/* 3. Questions ------------------------------------------------------------ */
.questions {
  display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr);
  gap: clamp(36px, 6vw, 80px); align-items: start;
}
.questions__photo { position: relative; max-width: 360px; }
.questions__offset { position: absolute; inset: 16px -16px -16px 16px; background: var(--accent); border: var(--bw) solid var(--ink); }
.questions__photo img {
  position: relative; width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
  border: var(--bw) solid var(--ink); filter: grayscale(1) contrast(1.05);
}
.questions__title { font-size: var(--fs-h3); line-height: 1.12; }
.qlist { counter-reset: q; margin-top: 32px; border-top: var(--bw) solid var(--ink); }
.qlist li {
  counter-increment: q; display: grid; grid-template-columns: 48px 1fr; gap: 12px;
  padding: 18px 0; border-bottom: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  font-size: var(--fs-body-lg); line-height: 1.5;
}
.qlist li::before {
  content: "Q" counter(q); font-family: var(--font-mono); font-weight: 700; font-size: var(--fs-mono);
  color: var(--accent); padding-top: 3px;
}

/* 4. Steps ---------------------------------------------------------------- */
/* Timeline: numbered nodes joined by a dashed line that draws in on reveal */
.timeline { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 48px); }
.js .timeline[data-reveal] { opacity: 1; transform: none; }   /* the list itself doesn't move; only its line draws */
.timeline::before {
  content: ""; position: absolute; top: 36px; left: 38px; right: 8%; height: 4px;
  background: repeating-linear-gradient(90deg, var(--accent) 0 14px, transparent 14px 24px);
  transform: scaleX(0); transform-origin: left; transition: transform 1.4s cubic-bezier(.22,1,.36,1) .2s;
}
.timeline.is-in::before, html:not(.js) .timeline::before { transform: scaleX(1); }
.timeline li { position: relative; }
.timeline__node {
  position: relative; z-index: 1; width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: #fff; font-family: var(--font-display); font-weight: 800; font-size: 1.9rem;
  box-shadow: 0 0 0 10px var(--surface);
}
.timeline li:last-child .timeline__node { background: var(--ink); }
.timeline h3 { font-size: var(--fs-h4); margin: 26px 0 10px; }
.timeline p { color: var(--slate); }
.process__goal {
  max-width: 48rem; margin-top: clamp(36px, 5vw, 56px);
  font-family: var(--font-display); font-weight: 600; font-size: var(--fs-quote); line-height: 1.35;
}

/* 5. Cards ---------------------------------------------------------------- */
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.cards > li { display: flex; }
.card {
  display: flex; flex-direction: column; width: 100%;
  background: var(--surface); border: var(--bw) solid var(--ink); box-shadow: var(--shadow);
  text-decoration: none; transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translate(-3px, -3px); box-shadow: 9px 9px 0 var(--accent); }
.card__img { aspect-ratio: 1 / 1; overflow: hidden; border-bottom: var(--bw) solid var(--ink); background: var(--grid); }
.card__img img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(0);
  /* parallax inside the frame: oversized so the drift never shows an edge */
  transform: translate3d(0, var(--py, 0px), 0) scale(var(--zoom, 1.16));
  transition: filter .3s, transform .5s cubic-bezier(.22,1,.36,1); }
.card:hover .card__img img, .card:focus-visible .card__img img { filter: grayscale(1); --zoom: 1.21; }
.card__body { display: flex; flex-direction: column; flex: 1; padding: 20px; }
.card__kicker { font-family: var(--font-mono); font-size: var(--fs-micro); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.card h3 { font-size: var(--fs-h4); margin: 10px 0; }
.card p { color: var(--slate); font-size: var(--fs-small); }
.card__more { margin-top: auto; padding-top: 18px; font-family: var(--font-mono); font-size: var(--fs-label); font-weight: 700; }

/* 6. Quotes --------------------------------------------------------------- */
.tslider { position: relative; max-width: 1000px; padding: clamp(48px, 6vw, 72px) clamp(24px, 5vw, 64px) 0; box-shadow: 10px 10px 0 var(--accent); overflow: hidden; touch-action: pan-y; }
.quote__mark {
  position: absolute; top: -.2em; left: .18em; pointer-events: none;
  font-family: var(--font-display); font-weight: 800; font-size: clamp(6rem, 11vw, 9rem); line-height: 1; color: var(--accent);
}
/* all slides share one grid cell, so the box is as tall as the longest quote and never jumps */
.tslider__track { display: grid; }
.tslide { grid-area: 1 / 1; margin: 0; opacity: 0; visibility: hidden; transform: translateX(40px);
  transition: opacity .5s ease, transform .6s cubic-bezier(.22,1,.36,1), visibility 0s linear .6s; }
.tslide.is-prev { transform: translateX(-40px); }
.tslide.is-active { opacity: 1; visibility: visible; transform: none; transition: opacity .5s ease .1s, transform .6s cubic-bezier(.22,1,.36,1) .1s, visibility 0s; }
.tslide blockquote { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: var(--fs-quote); line-height: 1.4; }
.tslide figcaption { display: flex; align-items: center; gap: 14px; margin-top: 28px; font-family: var(--font-mono); font-size: var(--fs-mono); color: var(--slate); }
.tslide figcaption strong { display: block; color: var(--ink); font-size: .875rem; }
.tslide__avatar {
  flex: none; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%;
  background: var(--accent); color: #fff; font-family: var(--font-display); font-weight: 800; font-size: 1rem;
}
.tslider__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 32px; padding: 22px 0 26px; border-top: var(--bw) solid var(--ink); }
.tslider__dots { display: flex; gap: 10px; }
.tslider__dot { width: 12px; height: 12px; padding: 0; border: var(--bw) solid var(--ink); background: var(--surface); cursor: pointer; transition: width .3s ease, background .3s ease; }
.tslider__dot[aria-current="true"] { width: 34px; background: var(--accent); }
.tslider__btns { display: flex; gap: 12px; }
.tslider__progress { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: color-mix(in srgb, var(--accent) 15%, transparent); }
.tslider__progress span { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.tslider.is-running .tslider__progress span { animation: tprogress var(--tdur, 7s) linear forwards; }
@keyframes tprogress { to { transform: scaleX(1); } }

/* 7. Clients -------------------------------------------------------------- */
.clients { background: var(--surface); border-bottom: var(--bw) solid var(--ink); }
.clients__inner {
  max-width: var(--max); margin: 0 auto; padding: 22px var(--gutter);
  display: flex; align-items: center; gap: clamp(16px, 3vw, 36px);
}
.clients__label { flex: none; font-family: var(--font-mono); font-size: var(--fs-micro); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--slate); }
.marquee {
  flex: 1; min-width: 0; overflow: hidden;
  -webkit-mask: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.marquee__track { display: flex; align-items: center; gap: clamp(40px, 6vw, 72px); width: max-content; }
.marquee.is-running .marquee__track { animation: marquee var(--marquee-dur, 40s) linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__track img { height: 48px; width: auto; max-width: 150px; object-fit: contain; filter: grayscale(1) contrast(1.1); opacity: .75; transition: filter .2s, opacity .2s; }
.marquee__track img:hover { filter: none; opacity: 1; }
@keyframes marquee { to { transform: translateX(calc(-50% - var(--marquee-gap, 0px) / 2)); } }

/* Responsive ------------------------------------------------------------- */
@media (max-width: 1024px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .hero__grid, .questions { grid-template-columns: 1fr; }
  .pains { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 1fr; gap: 36px; }
  .timeline::before { top: 0; bottom: 0; left: 35px; right: auto; width: 4px; height: auto; transform: scaleY(0); transform-origin: top;
    background: repeating-linear-gradient(180deg, var(--accent) 0 14px, transparent 14px 24px); }
  .timeline.is-in::before { transform: scaleY(1); }
  .timeline li { padding-left: 100px; min-height: 74px; }
  .timeline__node { position: absolute; left: 0; top: 0; }
  .timeline h3 { margin-top: 4px; }
  .questions__photo { max-width: 280px; }
  /* stacked hero: keep copy and visual from drifting into each other */
  .hero [data-parallax] { transform: none; }
}
@media (max-width: 560px) {
  .cards { grid-template-columns: 1fr; }
  .clients__inner { flex-direction: column; align-items: stretch; }
  .clients__label { text-align: center; }
  .hero__actions .btn, .contact__actions .btn { flex: 1 1 100%; justify-content: center; }
}

/* Logo optical sizing (source files have different padding) */
.marquee__track img.logo--rafael { height: 64px; }
.marquee__track img.logo--elbit  { height: 120px; max-width: 120px; margin-block: -36px; }
.marquee__track img.logo--navy   { height: 56px; }
.marquee__track img.logo--orca   { height: 150px; max-width: 150px; margin-block: -50px; }
.marquee__track img[alt="Aman"]  { height: 26px; }
.marquee__track img[alt="ED&U"]  { height: 30px; }

/* Depth between sections: big numerals live in base.css (.ghost) */

/* The logo strip slides over the drifting hero layers */
.clients { position: relative; z-index: 2; }
.hero { position: relative; z-index: 1; }

/* Portfolio teaser ------------------------------------------------------- */
.work-more { margin-top: 12px; display: flex; justify-content: center; }

/* Closing call to action under the questions */
.questions__cta { margin-top: 36px; padding: clamp(22px, 3vw, 30px); background: var(--bg); border: var(--bw) solid var(--ink); box-shadow: 8px 8px 0 var(--accent); }
.questions__cta-title { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-h3); line-height: 1.1; }
.questions__cta .contact__actions { justify-content: flex-start; margin-top: 20px; }
