/* Homepage "How it works" timeline and price builder. */
.how.ds { padding: var(--section-y) 0; background: var(--surface); }
.price-builder.ds { padding: var(--section-y) 0; background: var(--bg); }

/* TIMELINE */
.hw-steps { position: relative; display: grid; gap: var(--space-6); max-width: 52rem; margin: 0; padding: 0; list-style: none; }
.hw-line { position: absolute; top: 1.5rem; bottom: 1.5rem; left: calc(1.5rem - 2px); width: 4px; background: var(--line); border-radius: 4px; }
.hw-line span { display: block; width: 100%; height: 100%; background: linear-gradient(var(--accent-hover), var(--accent)); border-radius: 4px; transform-origin: top; }
.hw-step { position: relative; display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: var(--space-4); align-items: start; }
.hw-dot { position: relative; z-index: 1; display: grid; place-items: center; width: 3rem; height: 3rem; background: var(--surface); border: 2px solid var(--line-strong); border-radius: 50%; color: var(--text-muted); font-family: var(--font-display); font-weight: 700; transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease); }
.is-lit .hw-dot { background: var(--accent); border-color: var(--accent); color: var(--on-accent); box-shadow: 0 0 0 6px var(--accent-soft); }
.hw-card { gap: var(--space-3); transition: border-color var(--dur-reveal) var(--ease), transform var(--dur-reveal) var(--ease); }
.hw-step:not(.is-lit) .hw-card { transform: translate3d(0.75rem, 0, 0); }
.hw-step.is-lit .hw-card { border-color: rgba(255, 160, 46, 0.45); }

/* Step icons: lines draw in, then one small movement */
.hw-icon { width: 4rem; height: 4rem; overflow: visible; fill: none; stroke: var(--text-muted); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.is-lit .hw-icon { stroke: var(--accent); }
.hw-icon .glass { fill: var(--surface-raised); }
.hw-icon .pulse { stroke-width: 2; opacity: 0; transform-origin: center; }
.is-drawing .hw-icon .draw { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 900ms var(--ease); }
.is-drawing .is-lit .hw-icon .draw { stroke-dashoffset: 0; }
.is-drawing .is-lit .hw-icon .tick { transition-delay: 600ms; }
.is-drawing .is-lit .lens { animation: look 1600ms var(--ease) 500ms 2; }
.is-drawing .is-lit .pencil { animation: write 700ms ease-in-out 500ms 4; }
.is-drawing .is-lit .pulse { animation: pulse 1200ms ease-out 900ms 2; }
@keyframes look { 33% { transform: translate(-14px, -8px); } 66% { transform: translate(-4px, -12px); } }
@keyframes write { 50% { transform: translate(-6px, 3px); } }
@keyframes pulse { from { opacity: 0.8; transform: scale(0.8); } to { opacity: 0; transform: scale(1.35); } }

/* PRICE BUILDER */
.pb-grid { display: grid; gap: var(--space-4); align-items: start; }
.pb-items { display: grid; gap: var(--space-4); }
.pb-item { gap: var(--space-2); }
.ds .pb-item h3, .pb-name { margin: 0; font-family: var(--font-display); font-size: var(--text-xl); font-weight: 600; line-height: 1.15; }
.pb-flag { justify-self: start; padding: 2px 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-pill); color: var(--text-muted); font-size: var(--text-xs); font-weight: 700; }
.pb-price { display: block; font-family: var(--font-display); font-size: var(--text-2xl); font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ds .card p.pb-price { color: var(--text); }
.pb-price small, .pb-total dd small { font-family: var(--font-body); font-size: var(--text-sm); font-weight: 500; color: var(--text-muted); }
.pb-option { cursor: pointer; transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.pb-option:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--lift-md); }
.pb-switch { position: relative; display: flex; align-items: center; gap: var(--space-3); min-height: 3rem; font-weight: 700; font-size: var(--text-sm); }
.pb-switch input { position: absolute; left: 0; width: 3.5rem; height: 2rem; margin: 0; opacity: 0; cursor: pointer; }
.pb-track { position: relative; flex: 0 0 3.5rem; height: 2rem; background: var(--ink-700); border: 1px solid var(--line-strong); border-radius: var(--radius-pill); transition: background-color var(--dur) var(--ease); pointer-events: none; }
.pb-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 1.5rem; height: 1.5rem; background: var(--paper); border-radius: 50%; transition: transform var(--dur) var(--ease); }
.pb-switch input:checked + .pb-track { background: var(--accent); }
.pb-switch input:checked + .pb-track::after { transform: translateX(1.5rem); }
.pb-switch input:focus-visible + .pb-track { outline: 3px solid var(--accent); outline-offset: 3px; }

.pb-total { gap: var(--space-4); border-color: rgba(255, 160, 46, 0.45); }
.pb-total dl { display: grid; margin: 0; }
.pb-total dl > div { padding: var(--space-4) 0; border-bottom: 1px solid var(--line); }
.pb-total dt { color: var(--accent); font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.pb-total dd { margin: 0; font-family: var(--font-display); font-size: var(--text-display); font-weight: 700; line-height: 1.05; font-variant-numeric: tabular-nums; }
.pb-total dd.pb-sub { font-family: var(--font-body); font-size: var(--text-sm); font-weight: 400; line-height: 1.5; color: var(--text-muted); }
.pb-total .pb-nolock { color: var(--text); font-weight: 700; }

@media (min-width: 56.25rem) {
  .pb-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: var(--space-5); }
  .pb-total { position: sticky; top: 6rem; }
}

/* FAQ */
.pb-faq { max-width: 52rem; margin-top: var(--space-8); }
.pb-faq h3 { margin-bottom: var(--space-4); }
.pb-faq details { border-top: 1px solid var(--line-strong); }
.pb-faq details:last-of-type { border-bottom: 1px solid var(--line-strong); }
.pb-faq summary { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: 3.5rem; padding: var(--space-3) 0; font-weight: 700; list-style: none; cursor: pointer; }
.pb-faq summary::-webkit-details-marker { display: none; }
.pb-faq summary::after { content: "+"; flex-shrink: 0; color: var(--accent); font-family: var(--font-display); font-size: var(--text-xl); line-height: 1; transition: transform var(--dur) var(--ease); }
.pb-faq details[open] summary::after { transform: rotate(45deg); }
.pb-faq details p { padding-bottom: var(--space-4); color: var(--text-muted); }

.pb-end { display: grid; justify-items: start; margin-top: var(--space-7); }
.pb-end .button { min-height: 3.5rem; padding-inline: var(--space-7); font-size: var(--text-base); }
@media (max-width: 30rem) { .pb-end .button { justify-self: stretch; } }
