/*
 * "Wat past bij jou" on /plans: pick what you do, see the real screen and the
 * plan that fits, with its price copied from the plan cards. Driven by
 * js/plans-wow.js. Everything is prefixed `pw-` and colours come from the
 * --landing-* tokens, so light and dark follow automatically.
 */
.pw-section {
  background: var(--landing-bg-section-alt);
  --pw-desk: var(--landing-accent-2);
  --pw-office: var(--landing-accent);
  --pw-ease: cubic-bezier(0.2, 0.75, 0.2, 1);
  --pw-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}
.pw-header {
  margin-bottom: 48px;
}
.pw {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  grid-template-areas:
    "side stage"
    "verdict verdict";
  gap: 24px 40px;
  align-items: start;
}
.pw-side {
  grid-area: side;
}
.pw-stage {
  grid-area: stage;
}
.pw-verdict {
  grid-area: verdict;
}
.pw *,
.pw *::before,
.pw *::after {
  box-sizing: border-box;
}

/* ---- picker ---- */
.pw-picker-label {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--landing-text-muted);
}
.pw-needs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}
.pw-needs > li {
  display: flex;
}
.pw-need {
  --pw-tone: var(--pw-desk);
  position: relative;
  flex: 1;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  column-gap: 12px;
  row-gap: 4px;
  align-items: center;
  min-height: 52px;
  padding: 10px 14px;
  border: 1px solid var(--landing-border-hover);
  border-radius: 14px;
  background: var(--landing-bg-card);
  color: var(--landing-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    border-color 0.2s var(--pw-ease),
    background-color 0.2s var(--pw-ease),
    box-shadow 0.25s var(--pw-ease),
    transform 0.25s var(--pw-ease);
}
.pw-need[data-tier="pro"] {
  --pw-tone: var(--pw-office);
}
.pw-need:hover {
  border-color: color-mix(in srgb, var(--pw-tone) 45%, var(--landing-border-hover));
  transform: translateY(-1px);
}
.pw-need:focus-visible {
  outline: 2px solid var(--landing-accent);
  outline-offset: 2px;
}
.pw-need[aria-pressed="true"] {
  border-color: var(--pw-tone);
  background: color-mix(in srgb, var(--pw-tone) 9%, var(--landing-bg-card));
  box-shadow: 0 6px 18px -8px color-mix(in srgb, var(--pw-tone) 55%, transparent);
}
.pw-need-box {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1.5px solid var(--landing-border-hover);
  display: grid;
  place-items: center;
  color: #fff;
  background: transparent;
  transition:
    background-color 0.2s var(--pw-ease),
    border-color 0.2s var(--pw-ease);
}
.pw-need-box svg {
  transform: scale(0);
  transition: transform 0.3s var(--pw-spring);
}
.pw-need[aria-pressed="true"] .pw-need-box {
  background: var(--pw-tone);
  border-color: var(--pw-tone);
}
.pw-need[aria-pressed="true"] .pw-need-box svg {
  transform: scale(1);
}
.pw-need-icon {
  color: var(--landing-text-muted);
  flex: none;
}
.pw-need[aria-pressed="true"] .pw-need-icon {
  color: var(--pw-tone);
}
.pw-need-label {
  grid-column: 3;
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  /* German compounds ("Umsatzsteuererklärung") are wider than a phone chip. */
  overflow-wrap: break-word;
  hyphens: auto;
}
.pw-need-tier {
  grid-column: 4;
  justify-self: end;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--pw-tone);
  background: color-mix(in srgb, var(--pw-tone) 13%, transparent);
}

/* ---- verdict ---- */
.pw-verdict {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.25fr) minmax(0, 0.7fr);
  gap: 8px 36px;
  align-items: center;
  padding: 24px 28px;
  min-height: 168px;
  border-radius: 20px;
  border: 1px solid var(--landing-border-hover);
  background: var(--landing-bg-section);
  overflow: hidden;
  isolation: isolate;
  transition:
    border-color 0.4s var(--pw-ease),
    box-shadow 0.4s var(--pw-ease);
}
.pw-verdict::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--pw-office) 16%, transparent), transparent 60%),
    radial-gradient(90% 70% at 0% 100%, color-mix(in srgb, #0ea5e9 9%, transparent), transparent 60%);
  opacity: 0;
  transition: opacity 0.5s var(--pw-ease);
}
.pw-verdict[data-plan="pro"] {
  border-color: color-mix(in srgb, var(--pw-office) 55%, transparent);
  box-shadow: 0 18px 40px -18px color-mix(in srgb, var(--pw-office) 55%, transparent);
}
.pw-verdict[data-plan="pro"]::before {
  opacity: 1;
}
.pw-verdict[data-plan="free"] {
  border-color: color-mix(in srgb, var(--pw-desk) 45%, transparent);
}
.pw-verdict-kicker {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--landing-text-muted);
}
.pw-verdict-main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
}
.pw-verdict-name {
  margin: 0;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.pw-verdict[data-plan="pro"] .pw-verdict-name {
  background: linear-gradient(135deg, var(--pw-office), #0ea5e9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.pw-verdict-price {
  margin: 0;
  white-space: nowrap;
}
.pw-verdict-value {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.pw-verdict-period {
  color: var(--landing-text-muted);
  font-weight: 600;
}
.pw-verdict-was {
  margin-left: 8px;
  font-size: 17px;
  font-weight: 600;
  color: var(--landing-text-muted);
}
.pw-verdict-was:empty {
  display: none;
}
.pw-verdict-terms {
  margin: 6px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--landing-text-secondary);
  text-wrap: pretty;
}
.pw-verdict-body {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: 32px;
  border-left: 1px solid var(--landing-border-hover);
}
.pw-verdict-actions {
  display: flex;
}
.pw-verdict-why p {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--landing-text);
}
.pw-verdict-why-free,
.pw-verdict-why-pro,
.pw-verdict-why-none {
  display: none;
}
.pw-verdict[data-plan="free"] .pw-verdict-why-free,
.pw-verdict[data-plan="pro"] .pw-verdict-why-pro,
.pw-verdict[data-plan="none"] .pw-verdict-why-none {
  display: block;
}
.pw-verdict-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pw-verdict-list:empty {
  display: none;
}
.pw-verdict-list li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  animation: pw-pop 0.35s var(--pw-spring) both;
}
.pw-verdict[data-plan="pro"] .pw-verdict-list li {
  color: var(--pw-office);
  background: color-mix(in srgb, var(--pw-office) 12%, transparent);
}
.pw-verdict[data-plan="free"] .pw-verdict-list li {
  color: var(--landing-text-secondary);
  background: var(--landing-bg-subtle-hover);
  border-radius: 8px;
}
.pw-verdict-list li strong {
  color: var(--landing-text);
}
@keyframes pw-pop {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.pw-verdict-trial {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--landing-text-muted);
}
.pw-verdict-cta {
  width: 100%;
  justify-content: center;
}
.pw-verdict-cta--pro,
.pw-verdict[data-plan="pro"] .pw-verdict-cta--free {
  display: none;
}
.pw-verdict[data-plan="pro"] .pw-verdict-cta--pro {
  display: inline-flex;
}
/* The flip: name and price arrive from below when the plan changes. */
.pw-verdict.pw-flip .pw-verdict-name,
.pw-verdict.pw-flip .pw-verdict-price,
.pw-verdict.pw-flip .pw-verdict-terms {
  animation: pw-rise 0.5s var(--pw-ease) both;
}
.pw-verdict.pw-flip .pw-verdict-price {
  animation-delay: 0.05s;
}
.pw-verdict.pw-flip .pw-verdict-terms {
  animation-delay: 0.1s;
}
@keyframes pw-rise {
  from { transform: translateY(10px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

/* ---- stage: the real screen ---- */
.pw-stage {
  margin: 0;
}
.pw-frame {
  border-radius: 16px;
  border: 1px solid var(--landing-border-hover);
  background: var(--landing-bg-section);
  box-shadow: var(--landing-shadow-hero-img);
  overflow: hidden;
}
.pw-frame-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 40px;
  padding: 0 12px 0 14px;
  border-bottom: 1px solid var(--landing-border);
}
.pw-frame-dots {
  display: inline-flex;
  gap: 6px;
}
.pw-frame-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--landing-border-hover);
}
.pw-frame-tier {
  display: grid;
  font-size: 12px;
  font-weight: 700;
}
.pw-frame-tier > span {
  grid-area: 1 / 1;
  justify-self: end;
  padding: 3px 10px;
  border-radius: 999px;
  transition: opacity 0.3s var(--pw-ease), transform 0.3s var(--pw-ease);
}
.pw-frame-tier-free {
  color: var(--pw-desk);
  background: color-mix(in srgb, var(--pw-desk) 13%, transparent);
}
.pw-frame-tier-pro {
  color: var(--pw-office);
  background: color-mix(in srgb, var(--pw-office) 13%, transparent);
  opacity: 0;
  transform: translateY(4px);
}
.pw-frame[data-tier="pro"] .pw-frame-tier-free {
  opacity: 0;
  transform: translateY(-4px);
}
.pw-frame[data-tier="pro"] .pw-frame-tier-pro {
  opacity: 1;
  transform: none;
}
.pw-screen {
  position: relative;
  aspect-ratio: 1728 / 1080;
  overflow: hidden;
  background: var(--landing-bg-section);
}
.pw-shot {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.45s var(--pw-ease),
    visibility 0s linear 0.45s;
}
.pw-shot.is-active {
  opacity: 1;
  visibility: visible;
  transition:
    opacity 0.45s var(--pw-ease),
    visibility 0s;
  z-index: 1;
}
.pw-shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--fx, 50%) var(--fy, 0%);
  transform-origin: var(--fx, 50%) var(--fy, 0%);
  transform: scale(calc(var(--z, 1) * 1.04));
  transition: transform 0.9s var(--pw-ease);
}
.pw-shot.is-active img {
  transform: scale(var(--z, 1));
}

/* Built btw-aangifte view: there is no screenshot of it, so it is drawn in
   the app's own shapes, with example figures. */
.pw-shot--vat {
  display: grid;
  place-items: center;
  padding: 6%;
  background:
    radial-gradient(80% 70% at 85% 10%, color-mix(in srgb, var(--pw-office) 10%, transparent), transparent 70%),
    var(--landing-bg-section-alt);
}
.pw-vat {
  width: min(100%, 420px);
  padding: 20px 22px;
  border-radius: 14px;
  border: 1px solid var(--landing-border-hover);
  background: var(--landing-bg-section);
  box-shadow: var(--landing-shadow-card-hover);
  color: var(--landing-text);
  font-size: 14px;
}
.pw-vat-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
}
.pw-vat-title {
  font-weight: 700;
  font-size: 15px;
}
.pw-vat-period {
  color: var(--landing-text-muted);
  font-size: 13px;
}
.pw-vat-hero {
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--landing-bg-subtle-hover);
}
.pw-vat-eyebrow {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--landing-text-muted);
}
.pw-vat-amount {
  margin: 2px 0 6px;
  font-size: 28px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.pw-vat-ready {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--pw-desk);
  background: color-mix(in srgb, var(--pw-desk) 13%, transparent);
}
.pw-vat-rows {
  margin: 12px 0 0;
}
.pw-vat-rows > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--landing-border);
}
.pw-vat-rows dt {
  color: var(--landing-text-secondary);
}
.pw-vat-rows dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
}
.pw-vat-rows .pw-vat-total {
  border-bottom: 0;
  font-weight: 700;
}
.pw-vat-total dt {
  color: var(--landing-text);
}
.pw-shot--vat.is-active .pw-vat-rows > div {
  animation: pw-rise 0.45s var(--pw-ease) both;
}
.pw-shot--vat.is-active .pw-vat-rows > div:nth-child(2) { animation-delay: 0.08s; }
.pw-shot--vat.is-active .pw-vat-rows > div:nth-child(3) { animation-delay: 0.16s; }

.pw-caption {
  margin-top: 14px;
  display: grid;
  font-size: 15px;
  line-height: 1.5;
  color: var(--landing-text-secondary);
}
.pw-caption-line {
  grid-area: 1 / 1;
  opacity: 0;
  transition: opacity 0.3s var(--pw-ease);
}
.pw-caption-line.is-active {
  opacity: 1;
}
.pw-caption-note {
  margin-top: 4px;
  font-size: 13px;
  color: var(--landing-text-muted);
}

/* ---- tablet / phone ---- */
@media (max-width: 1024px) {
  .pw {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "side"
      "verdict"
      "stage";
    gap: 20px;
  }
  .pw-needs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pw-verdict {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .pw-verdict-actions {
    grid-column: 1 / -1;
  }
}
@media (max-width: 768px) {
  .pw-header {
    margin-bottom: 32px;
  }
  .pw-needs {
    gap: 8px;
  }
  .pw-need {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 9px;
    min-height: 62px;
    padding: 10px 11px;
  }
  .pw-need-box {
    grid-row: 1 / span 2;
  }
  .pw-need-icon {
    display: none;
  }
  .pw-need-label {
    grid-column: 2;
    font-size: 14px;
  }
  .pw-need-tier {
    grid-column: 2;
    justify-self: start;
  }
  .pw-verdict {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding: 18px 18px 20px;
    min-height: 0;
  }
  .pw-verdict-body {
    margin-top: 14px;
    padding: 14px 0 0;
    border-left: 0;
    border-top: 1px solid var(--landing-border-hover);
  }
  .pw-verdict-actions {
    margin-top: 16px;
  }
  .pw-verdict-name {
    font-size: 26px;
  }
  .pw-verdict-value {
    font-size: 28px;
  }
  /* Below 769px landing-i18n.js swaps in the phone screenshots (1082x2202).
     Show the top of the phone screen in a phone-shaped frame. */
  .pw-frame {
    width: min(100%, 320px);
    margin: 0 auto;
    border-radius: 28px;
    border-width: 6px;
    border-color: var(--landing-border-hover);
  }
  .pw-frame-bar {
    height: 34px;
    border-bottom: 0;
  }
  .pw-frame-dots i {
    width: 8px;
    height: 8px;
  }
  .pw-screen {
    aspect-ratio: 1082 / 1560;
  }
  .pw-shot img {
    object-position: 50% 0%;
    transform-origin: 50% 0%;
    transform: scale(1.03);
  }
  .pw-shot.is-active img {
    transform: none;
  }
  .pw-shot--vat {
    padding: 14px;
  }
  .pw-vat {
    padding: 16px;
  }
  .pw-caption {
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pw-need,
  .pw-need-box svg,
  .pw-shot img,
  .pw-frame-tier > span {
    transition: none;
  }
  .pw-shot img,
  .pw-shot.is-active img {
    transform: scale(var(--z, 1));
  }
  .pw-need:hover {
    transform: none;
  }
  .pw-verdict.pw-flip .pw-verdict-name,
  .pw-verdict.pw-flip .pw-verdict-price,
  .pw-verdict.pw-flip .pw-verdict-terms,
  .pw-verdict-list li,
  .pw-shot--vat.is-active .pw-vat-rows > div {
    animation: none;
  }
}
@media (prefers-reduced-motion: reduce) and (max-width: 768px) {
  .pw-shot img,
  .pw-shot.is-active img {
    transform: none;
  }
}

/* Nothing ticked: no plan to show, so the prompt takes the plan's place. */
.pw-verdict[data-plan="none"] .pw-verdict-plan {
  display: none;
}
.pw-verdict[data-plan="none"] .pw-verdict-body {
  grid-column: 1 / span 2;
  padding-left: 0;
  border-left: 0;
}
@media (max-width: 768px) {
  .pw-verdict[data-plan="none"] .pw-verdict-body {
    grid-column: auto;
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
  }
}
.pw-frame {
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}
.pw-frame[data-tier="pro"] {
  border-color: color-mix(in srgb, var(--pw-office) 40%, var(--landing-border-hover));
  box-shadow:
    var(--landing-shadow-hero-img),
    0 24px 60px -30px color-mix(in srgb, var(--pw-office) 70%, transparent);
}
