/* Walter homepage: "Smarter than a paraphraser" feature section.
   Values are read from Figma file DOMmUOpj9Fbv0qDiQWKFvr, section 5091:63782.
   Motion values come from transitions.dev: Success check appear (incoming front window,
   without its rotation and overshoot), Page side-by-side exit (outgoing front window,
   ported to Y) and Accordion expand (list items).
   Every selector is scoped under .wh-section so theme styles for h2, ul, li, p
   and button cannot leak in. */

.wh-section {
  --wh-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --wh-switch: 250ms;
  --wh-appear-dur: 500ms;
  --wh-appear-blur: 10px;
  --wh-appear-y: 40px;
  --wh-cycle: 5000ms;
  --wh-accent: #715BFF;
  --wh-track: #CCCCCC;
  --wh-rest: #EBEBEB;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  background: #FFFFFF;
  color: #000000;
  font-family: InterVariable, "Inter Variable", "Inter", system-ui, sans-serif;
  font-optical-sizing: auto;
  text-align: left;
  overflow: hidden;
}
.wh-section *,
.wh-section *::before,
.wh-section *::after { box-sizing: border-box; }

/* Image paths: the five layers used by the desktop stage and the mobile previews.
   If the CSS is not served next to the assets folder, change these URLs only. */
.wh-section .wh-l--bg { background-image: url("assets/bg.webp"); }
.wh-section .wh-l--w1,
.wh-section .wh-l--w5 { background-image: url("assets/win1.webp"); }
.wh-section .wh-l--w2 { background-image: url("assets/win2.webp"); }
.wh-section .wh-l--w3 { background-image: url("assets/win3.webp"); }
.wh-section .wh-l--w4 { background-image: url("assets/win4.webp"); }

/* Desktop canvas: 1440 wide, scaled down below 1440 by features.js */
.wh-section .wh-canvas {
  position: relative;
  width: 1440px;
  max-width: none;
  margin: 0 auto;
  padding: 96px 130px 96px 0;
}

.wh-section .wh-title {
  width: 485px;
  max-width: none;
  margin: 0 0 48px 130px;
  padding: 0;
  color: #000000;
  font-family: inherit;
  font-size: 40px;
  line-height: 48px;
  font-weight: 500;
  font-style: normal;
  letter-spacing: -0.4px;
  text-transform: none;
}

.wh-section .wh-body {
  display: flex;
  align-items: flex-start;
  gap: 127px;
}

/* Left column: one static background, one front window per state.
   Layers are placed in % of the 791x556 stage, so the mobile preview
   reuses the same layers as a scaled-down copy of the desktop stage. */
.wh-section .wh-stage {
  position: relative;
  flex: 0 0 791px;
  height: 556px;
}
.wh-section .wh-l {
  position: absolute;
  display: block;
  margin: 0;
  padding: 0;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  pointer-events: none;
}
.wh-section .wh-l--bg { left: 0.1264%;  top: 0.5396%; width: 87.2314%; height: 96.2230%; }
.wh-section .wh-l--w1,
.wh-section .wh-l--w5 { left: 19.2162%; top: 2.1583%; width: 81.2895%; height: 85.9712%; }
.wh-section .wh-l--w2 { left: 29.9621%; top: 1.7986%; width: 73.3249%; height: 85.7914%; }
.wh-section .wh-l--w3 { left: 10.9987%; top: 2.3381%; width: 95.0695%; height: 82.9137%; }
.wh-section .wh-l--w4 { left: 29.9621%; top: 5.3957%; width: 73.3249%; height: 91.0072%; }

.wh-section .wh-win {
  opacity: 0;
  transform: translateY(var(--wh-from, 8px));
  filter: blur(3px);
  transition:
    opacity   var(--wh-switch) var(--wh-ease),
    transform var(--wh-switch) var(--wh-ease),
    filter    var(--wh-switch) var(--wh-ease);
}
/* Resting state uses none, not blur(0) or translateY(0), so nothing is left
   on an intermediate layer that could soften the screenshot */
.wh-section .wh-win.is-on {
  opacity: 1;
  transform: none;
  filter: none;
}
.wh-section .wh-win.is-snap { transition: none; }

/* Incoming window: rises 40px, fades in and sharpens from a 10px blur, then stops
   at its place. The outgoing window uses the transitions above. */
.wh-section .wh-win.is-appear {
  animation:
    wh-appear-fade var(--wh-appear-dur) var(--wh-ease) forwards,
    wh-appear-blur var(--wh-appear-dur) var(--wh-ease) forwards,
    wh-appear-rise var(--wh-appear-dur) var(--wh-ease) forwards;
}
@keyframes wh-appear-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes wh-appear-blur { from { filter: blur(var(--wh-appear-blur)); } to { filter: blur(0); } }
@keyframes wh-appear-rise { from { translate: 0 var(--wh-appear-y); } to { translate: 0 0; } }

/* Feature list */
.wh-section .wh-list {
  flex: 0 0 392px;
  margin: 0;
  padding: 50px 0 0;
  list-style: none;
}
.wh-section .wh-item {
  position: relative;
  margin: 0;
  padding: 0 0 20px;
  list-style: none;
}
.wh-section .wh-item::marker { content: none; }
.wh-section .wh-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--wh-rest);
}
.wh-section .wh-item.is-active::before { background: var(--wh-track); }

.wh-section .wh-fill {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 100%;
  background: var(--wh-accent);
  transform: scaleY(0);
  transform-origin: 50% 0;
  pointer-events: none;
}
.wh-section .wh-item.is-active .wh-fill {
  animation: wh-fill var(--wh-cycle) linear forwards;
  animation-play-state: paused;
}
.wh-section.is-playing .wh-item.is-active .wh-fill { animation-play-state: running; }
.wh-section.is-static .wh-item.is-active .wh-fill {
  animation: none;
  transform: scaleY(1);
}
@keyframes wh-fill {
  from { transform: scaleY(0); }
  to   { transform: scaleY(1); }
}

.wh-section .wh-tab,
.wh-section .wh-tab:hover,
.wh-section .wh-tab:focus,
.wh-section .wh-tab:active {
  display: block;
  width: 100%;
  min-height: 0;
  height: auto;
  margin: 0;
  padding: 20px 0 0 16px;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: inherit;
  font: inherit;
  letter-spacing: normal;
  text-align: left;
  text-transform: none;
  text-decoration: none;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
/* The whole row is the hit area, so the row height never needs a hover box */
.wh-section .wh-tab::after {
  content: "";
  position: absolute;
  inset: 0;
}
.wh-section .wh-tab:focus { outline: none; }
.wh-section .wh-tab:focus-visible::after {
  outline: 2px solid var(--wh-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

.wh-section .wh-label {
  display: block;
  color: #000000;
  font-size: 18px;
  line-height: 27px;
  font-weight: 500;
  letter-spacing: -0.18px;
  opacity: 0.4;
  transition: opacity 150ms var(--wh-ease);
}
.wh-section .wh-item.is-active .wh-label { opacity: 1; }
@media (hover: hover) {
  .wh-section .wh-item:not(.is-active):hover .wh-label { opacity: 1; }
}

/* Accordion: grid rows 0fr to 1fr, both items move together so the list height holds */
.wh-section .wh-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--wh-switch) var(--wh-ease);
}
.wh-section .wh-item.is-active .wh-panel { grid-template-rows: 1fr; }
.wh-section .wh-panel-in {
  min-height: 0;
  overflow: hidden;
  padding-left: 16px;
  opacity: 0;
  filter: blur(2px);
  transition:
    opacity var(--wh-switch) var(--wh-ease),
    filter  var(--wh-switch) var(--wh-ease);
}
.wh-section .wh-item.is-active .wh-panel-in {
  opacity: 1;
  filter: none;
}
.wh-section .wh-desc {
  margin: 0;
  padding: 6px 0 0;
  color: rgba(0, 0, 0, 0.8);
  font-size: 14px;
  line-height: 21px;
  font-weight: 400;
  letter-spacing: -0.14px;
}
.wh-section .wh-shot { display: none; }

/* Mobile: accordion with the preview inside the open item, frame 5091:84990 */
@media (max-width: 1023px) {
  .wh-section .wh-canvas {
    width: auto;
    max-width: 560px;
    padding: 20px;
  }
  .wh-section .wh-title {
    width: auto;
    margin: 0 0 48px;
    font-size: 32px;
    line-height: 40px;
    letter-spacing: -0.32px;
  }
  .wh-section .wh-body { display: block; }
  .wh-section .wh-stage { display: none; }
  .wh-section .wh-list { padding-top: 0; }
  /* Mobile preview: the desktop stage scaled to the 346x218 box */
  .wh-section .wh-shot {
    display: block;
    position: relative;
    width: 100%;
    aspect-ratio: 346 / 218;
    margin: 24px 0 0;
    overflow: hidden;
  }
  .wh-section .wh-shot-in {
    position: absolute;
    left: 10.2890%;
    top: 0;
    width: 89.6290%;
    aspect-ratio: 791 / 556;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wh-section .wh-win,
  .wh-section .wh-panel,
  .wh-section .wh-panel-in,
  .wh-section .wh-label { transition: none !important; }
  .wh-section .wh-win.is-appear { animation: none !important; }
}
