/* Search, accordion sketch (2026-10-03). .ss-track is tall; .ss-pin sticks inside it so the
   list and the phone stay still while the page scrolls, and the open step follows the scroll
   position (js/scroll-search.js). Pinned only when the window is wide and tall enough. */

.scroll-search { padding: clamp(24px, 3vw, 40px) 0 0; }
.hero:has(+ .scroll-search) { padding-bottom: clamp(32px, 4vw, 56px); }

.ss-grid {
  display: grid; align-items: center;
  grid-template-columns: minmax(0, 620px) auto;
  justify-content: space-around;
  column-gap: clamp(40px, 6vw, 96px);
}
.ss-list h2 { margin: 0 0 clamp(20px, 3vh, 36px); }

.ss-steps { list-style: none; margin: 0; padding: 0; }
.ss-step { border-top: 1px solid var(--line); }
.ss-step:last-child { border-bottom: 1px solid var(--line); }
.ss-step.is-active { border-top-color: var(--blue); }

.ss-step h3 { margin: 0; font-size: inherit; }
.ss-title {
  display: flex; align-items: baseline; gap: 16px;
  width: 100%;
  padding: clamp(14px, 2.2vh, 20px) 0;
  background: none; border: 0; cursor: pointer; text-align: left;
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.6rem, 2.5vw, 2.1rem); letter-spacing: -0.03em; line-height: 1.1;
  color: var(--ink-3);
  transition: color .3s ease;
}
.ss-title:hover { color: var(--ink-2); }
.ss-step.is-active .ss-title { color: var(--ink); }
.ss-num {
  font-size: .875rem; letter-spacing: .04em;
  color: var(--ink-3);
  transition: color .3s ease;
}
.ss-step.is-active .ss-num { color: var(--blue-deep); }

/* Collapsing body: grid rows 0fr -> 1fr animates the height */
.ss-body {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows .45s cubic-bezier(.2, .7, .2, 1);
}
.ss-body > div { overflow: hidden; min-height: 0; padding-left: calc(.875rem * 1.5 + 16px); }
.ss-step.is-active .ss-body { grid-template-rows: 1fr; }
.ss-body > div > :last-child { margin-bottom: clamp(18px, 2.6vh, 26px); }
.ss-body p { color: var(--ink-2); margin: 0; max-width: 470px; }

.ss-query {
  display: inline-flex; align-items: center; gap: 14px;
  max-width: 100%;
  margin-top: 18px;
  padding: 15px 26px 15px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem); font-weight: 500; line-height: 1.3;
  color: var(--ink);
  min-height: calc(1.3em + 32px);
}
.ss-query svg { flex: none; color: var(--ink-2); }
.ss-query .at { color: var(--blue); }

.ss-step.is-typing .ss-typed::after {
  content: ""; display: inline-block; vertical-align: -0.15em;
  width: 2px; height: 1.15em; margin-left: 2px;
  background: var(--blue);
  animation: ss-blink .9s steps(1) infinite;
}
@keyframes ss-blink { 50% { opacity: 0; } }

.ss-count {
  margin: 12px 0 0 22px !important;
  font-size: .9375rem;
  transition: opacity .35s ease;
}
.ss-count b { color: var(--ink); font-weight: 600; }
.ss-step.is-typing .ss-count { opacity: 0; }

/* Phone on a tinted rounded panel: screens crossfade in place, no movement */
.ss-stage { position: relative; display: flex; justify-content: center; padding: 0 clamp(28px, 4vw, 56px); }
.ss-panel {
  position: absolute; left: 0; right: 0; top: 12%; bottom: 12%;
  background: var(--tint);
  border-radius: 40px;
}
.ss-phone {
  position: relative;
  height: min(calc(100vh - var(--nav-h) - 72px), 700px);
  aspect-ratio: 583 / 1200;
}
.ss-phone img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  opacity: 0;
  transition: opacity .45s ease;
}
.ss-phone img.is-active { opacity: 1; }

.ss-inline { display: none; }

/* Pinned mode */
@media (min-width: 861px) and (min-height: 480px) {
  .ss-track { height: calc(100vh - var(--nav-h) + 4 * 38vh); }
  .ss-pin {
    position: sticky; top: var(--nav-h);
    height: calc(100vh - var(--nav-h));
    display: flex; align-items: center;
  }
}

/* Short windows (laptops with display scaling): smaller heading and pill */
@media (min-width: 861px) and (max-height: 760px) {
  .ss-list .eyebrow { display: none; }
  .ss-list h2 { font-size: clamp(1.8rem, 3.2vw, 2.4rem); margin-bottom: 14px; }
  .ss-title { font-size: clamp(1.3rem, 2vw, 1.6rem); padding: 10px 0; }
  .ss-query { margin-top: 12px; padding: 11px 22px 11px 18px; font-size: 1.0625rem; min-height: 0; }
  .ss-count { margin-top: 8px !important; }
  .ss-body > div > :last-child { margin-bottom: 14px; }
  .ss-phone { height: calc(100vh - var(--nav-h) - 40px); }
}

/* Narrow or short windows: everything open, a screen under each step */
@media (max-width: 860px), (max-height: 479px) {
  .scroll-search { padding-bottom: var(--section-y); }
  .ss-grid { grid-template-columns: minmax(0, 620px); justify-content: center; }
  .ss-stage { display: none; }
  .ss-body { grid-template-rows: 1fr; transition: none; }
  .ss-body > div { padding-left: 0; }
  .ss-count { margin-left: 22px !important; }
  .ss-title { color: var(--ink); cursor: default; }
  .ss-num { color: var(--blue-deep); }
  .ss-step.is-active { border-top-color: var(--line); }
  .ss-inline { display: block; width: min(300px, 76vw); height: auto; margin: 28px auto 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .ss-body, .ss-phone img, .ss-title, .ss-count { transition: none; }
}
