/* In Five - the welcome page: what the app does, shown rather than told, then the plans.
   Everything moves with transforms and opacity only. A scene's words fade in as they come on screen (welcome.js adds
   .in) and its picture plays once, when half of it is in view (.play); the hero loops. With prefers-reduced-motion,
   everything shows its finished state. */

html { scroll-behavior: smooth; }
.wl-top { gap: 16px; }
.wl-top .brand { text-decoration: none; color: inherit; }
.wl-top .account { margin-left: auto; }
.wl-banner { position: fixed; top: auto; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 60; margin: 0; width: max-content; max-width: calc(100% - 32px); box-shadow: var(--shadow); }
.wl { max-width: 1120px; margin: 0 auto; padding: 0 24px 72px; }
.center { text-align: center; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; font-style: normal; }

/* ---- type ---- */
.eyebrow { color: var(--accent-text); font-weight: 800; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; margin: 0 0 14px; }
.hero h1, .scene-copy h2, .plans-section h2 { font-family: "Manrope", -apple-system, sans-serif; font-weight: 800; letter-spacing: -.035em; line-height: 1; margin: 0; }
.hero h1 { font-size: clamp(44px, 7.2vw, 80px); margin-bottom: 22px; }
.hero h1 em { font-style: normal; color: #e8501a; }
.lede { font-size: clamp(17px, 2vw, 21px); color: var(--muted); line-height: 1.45; margin: 0 0 28px; max-width: 36ch; }
.lede.center { margin-left: auto; margin-right: auto; }
.hero .lede { max-width: 40ch; }

/* ---- hero ---- */
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: center; min-height: min(76vh, 700px); padding: 36px 0 24px; }
.hero-copy > * { opacity: 0; transform: translateY(14px); animation: rise .7s cubic-bezier(.2, .8, .2, 1) forwards; }
.hero-copy > :nth-child(2) { animation-delay: .08s; }
.hero-copy > :nth-child(3) { animation-delay: .16s; }
.hero-copy > :nth-child(4) { animation-delay: .24s; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.btn.big { padding: 13px 22px; font-size: 16px; border-radius: 12px; text-decoration: none; display: inline-block; }
.btn.ghost.big:hover { border-color: var(--text); }

.hero-stage { position: relative; aspect-ratio: 1; width: 100%; max-width: 480px; margin: 0 auto; opacity: 0; animation: rise .9s .2s cubic-bezier(.2, .8, .2, 1) forwards; }
.clock { position: absolute; left: 50%; top: 50%; width: 46%; transform: translate(-50%, -50%); filter: drop-shadow(0 26px 40px rgba(232, 80, 26, .28)); animation: breathe 6s ease-in-out infinite; }
.clock img { width: 100%; height: auto; display: block; }
.stage-card { position: absolute; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 22px 50px -22px rgba(40, 16, 12, .4), 0 1px 2px rgba(40, 16, 12, .06); padding: 12px 14px; font-size: 13px; width: 56%; animation: float var(--dur, 7s) var(--delay, 0s) ease-in-out infinite alternate; }
.sc-line { left: -4%; top: 5%; --dur: 7s; }
.sc-ask { right: -6%; top: 38%; width: 50%; --dur: 8.5s; --delay: -3s; }
.sc-ask p { margin: 4px 0 0; font-size: 13px; line-height: 1.4; }
.sc-score { left: 3%; bottom: 3%; width: 54%; --dur: 6.5s; --delay: -5s; display: flex; align-items: center; gap: 12px; }
.sc-score b { display: block; font-family: "Manrope", sans-serif; font-weight: 800; font-size: 28px; letter-spacing: -.03em; line-height: 1; }
.sc-score span { font-size: 12px; color: var(--muted); }
.sc-score div { text-wrap: balance; }
.sc-label { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.sc-who { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 12px; }
.sc-who .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 3px var(--ring); }

/* The hero's line gets struck and replaced every 12 seconds. */
.sc-line s::after { animation: strike 12s infinite; }
.sc-line .pl:not(.ins) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-line .ins { animation: insert 12s infinite; }

/* ---- shared bits: resume lines, waveform, ring ---- */
.pl { font-size: 12.5px; line-height: 1.35; margin: 3px 0; }
.pl.name { font-family: "Manrope", sans-serif; font-weight: 800; font-size: 16px; letter-spacing: -.02em; margin-bottom: 6px; }
.pl.h { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--border); margin: 10px 0 5px; padding-bottom: 2px; }
.pl s { text-decoration: none; position: relative; color: var(--muted); }
.pl s::after { content: ""; position: absolute; left: 0; right: 0; top: 54%; height: 2px; background: #c2410c; transform: scaleX(0); transform-origin: left; }
.pl.ins { color: #166534; background: #ecfdf3; border-left: 3px solid #22c55e; padding: 3px 7px; border-radius: 0 6px 6px 0; opacity: 0; transform: translateY(6px); }
.wave { display: flex; align-items: center; gap: 3px; height: 22px; margin-top: 8px; }
.wave i { width: 4px; height: 25%; border-radius: 2px; background: var(--primary); animation: bounce 1.1s ease-in-out infinite; }
.bubble.a .wave i { background: var(--primary-ink); opacity: .85; }
.wave i:nth-child(2n) { animation-delay: .15s; }
.wave i:nth-child(3n) { animation-delay: .3s; }
.wave i:nth-child(4n) { animation-delay: .45s; }
.wave i:nth-child(5n) { animation-delay: .1s; }
.dial { width: 64px; height: 64px; flex: none; transform: rotate(-90deg); }
.dial .track { fill: none; stroke: #f2ebe6; stroke-width: 8; }
.dial .val { fill: none; stroke: var(--primary); stroke-width: 8; stroke-linecap: round; stroke-dasharray: 213.6; stroke-dashoffset: 213.6; transition: stroke-dashoffset 1.4s cubic-bezier(.2, .8, .2, 1); }
body.loaded .hero .dial .val, .scene.play .dial .val { stroke-dashoffset: calc(213.6 * (1 - var(--p) / 100)); }
.scene.play .scorecard .dial .val { transition-delay: 4.8s; }
body.loaded .hero .dial .val { transition-delay: .8s; }

/* ---- scenes ---- */
.scenes { display: grid; gap: clamp(64px, 11vw, 130px); padding: 48px 0 80px; }
.scene { display: grid; grid-template-columns: 1fr 1.15fr; gap: 40px; align-items: center; }
.scene.flip .scene-copy { order: 2; }
.scene-copy h2 { font-size: clamp(30px, 4.2vw, 46px); margin-bottom: 12px; opacity: 0; transform: translateY(14px); transition: opacity .7s, transform .7s; }
.scene-copy p { font-size: 17px; color: var(--muted); line-height: 1.5; max-width: 40ch; margin: 0; opacity: 0; transform: translateY(14px); transition: opacity .7s .1s, transform .7s .1s; }
.scene.in .scene-copy > *, .scene.play .scene-copy > * { opacity: 1; transform: none; }
/* Which plan each scene needs: the feature's name, then the same badge as the plans (Free, Plus, Pro). */
.scene-tag { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 14px; color: var(--accent-text); font-weight: 800; font-size: 12px; line-height: 1.6; letter-spacing: .18em; text-transform: uppercase; opacity: 0; transform: translateY(14px); transition: opacity .7s, transform .7s; }
.scene-tag b { padding: 1px 9px; border-radius: 999px; font-size: 11px; letter-spacing: .06em; background: var(--chip); color: var(--accent-text); }
.scene-tag b.plan-plus { background: var(--primary); color: var(--primary-ink); }
.scene-tag b.plan-pro { background: var(--accent); color: var(--accent-ink); }
.scene-art { position: relative; min-height: 320px; }
.sheet { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 26px 60px -28px rgba(40, 16, 12, .4); padding: 22px 24px; width: min(100%, 420px); margin: 0 auto; }

/* review: two lines get struck and replaced, then the score climbs */
.art-review .pl s::after { transition: transform .55s cubic-bezier(.2, .8, .2, 1); }
.art-review .pl.ins { transition: opacity .5s, transform .5s; }
.scene.play .art-review .l1 s::after { transform: scaleX(1); transition-delay: .4s; }
.scene.play .art-review .l1 + .ins { opacity: 1; transform: none; transition-delay: .8s; }
.scene.play .art-review .l2 s::after { transform: scaleX(1); transition-delay: 1.4s; }
.scene.play .art-review .l2 + .ins { opacity: 1; transform: none; transition-delay: 1.8s; }
.score-chip { position: absolute; right: 4%; top: -16px; display: flex; align-items: center; gap: 8px; background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 8px 16px; font-family: "Manrope", sans-serif; font-weight: 800; font-size: 18px; letter-spacing: -.02em; box-shadow: var(--shadow); opacity: 0; transform: translateY(10px) scale(.9); transition: opacity .5s 2.4s, transform .5s 2.4s cubic-bezier(.2, .8, .2, 1); }
.score-chip .from { color: #c9b8ae; }
.score-chip .arrow { color: #c9b8ae; font-weight: 400; }
.score-chip .to { color: var(--primary); }
.scene.play .score-chip { opacity: 1; transform: none; }

/* build: scattered notes fly into the page, whose sections fill in */
.art-build { min-height: 400px; }
.art-build .note { position: absolute; background: #fff7ed; border: 1px solid #fed7aa; color: #7c2d12; padding: 7px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; box-shadow: 0 10px 24px -12px rgba(124, 45, 18, .4); transform: rotate(var(--r)); transition: left .9s cubic-bezier(.2, .8, .2, 1), top .9s cubic-bezier(.2, .8, .2, 1), transform .9s cubic-bezier(.2, .8, .2, 1), opacity .45s .4s; transition-delay: var(--d, 0s); z-index: 2; }
.art-build .c1 { left: 2%; top: 4%; --r: -6deg; --d: .05s; }
.art-build .c2 { right: 0; top: 10%; --r: 4deg; --d: .15s; }
.art-build .c3 { left: 0; top: 48%; --r: 5deg; --d: .25s; }
.art-build .c4 { right: 2%; top: 56%; --r: -4deg; --d: .35s; }
.art-build .c5 { left: 18%; bottom: 2%; --r: -3deg; --d: .45s; }
.scene.play .art-build .note { left: 50%; top: 46%; right: auto; bottom: auto; transform: translate(-50%, -50%) scale(.3) rotate(0); opacity: 0; }
.art-build .sheet { opacity: 0; transform: translateY(18px) scale(.96); transition: opacity .7s .55s, transform .7s .55s cubic-bezier(.2, .8, .2, 1); }
.scene.play .art-build .sheet { opacity: 1; transform: none; }
.art-build .out { opacity: 0; transform: translateY(6px); transition: opacity .5s, transform .5s cubic-bezier(.2, .8, .2, 1); transition-delay: var(--d, 0s); }
.scene.play .art-build .out { opacity: 1; transform: none; }

/* interview: a question is typed, an answer is spoken, a follow-up comes, then the scorecard */
.art-interview { display: flex; flex-direction: column; gap: 10px; width: min(100%, 440px); margin: 0 auto; }
.bubble { position: relative; max-width: 88%; padding: 10px 14px; border-radius: 16px; font-size: 14px; line-height: 1.4; opacity: 0; transform: translateY(10px); transition: opacity .5s, transform .5s cubic-bezier(.2, .8, .2, 1); }
.bubble.q { background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 6px; align-self: flex-start; box-shadow: var(--shadow); }
.bubble.a { background: var(--primary); border-bottom-right-radius: 6px; align-self: flex-end; width: 56%; padding: 6px 14px 10px; }
.bubble.a .wave { margin: 0; height: 26px; justify-content: center; }
.typing { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); display: inline-flex; gap: 4px; transition: opacity .2s 1.4s; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; }
.typing i:nth-child(3) { animation-delay: .4s; }
.bubble .text { visibility: hidden; opacity: 0; transition: opacity .3s 1.5s; }
.bubble.second .text { visibility: visible; opacity: 1; transition: none; }
.scene.play .bubble.first { opacity: 1; transform: none; transition-delay: .2s; }
.scene.play .bubble.first .typing { opacity: 0; }
.scene.play .bubble.first .text { visibility: visible; opacity: 1; }
.scene.play .bubble.a { opacity: 1; transform: none; transition-delay: 2.3s; }
.scene.play .bubble.second { opacity: 1; transform: none; transition-delay: 3.7s; }
.scorecard { display: grid; grid-template-columns: auto auto 1fr; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); opacity: 0; transform: translateY(12px); transition: opacity .6s 4.6s, transform .6s 4.6s cubic-bezier(.2, .8, .2, 1); }
.scene.play .scorecard { opacity: 1; transform: none; }
.sc-main b { display: block; font-family: "Manrope", sans-serif; font-weight: 800; font-size: 30px; letter-spacing: -.03em; line-height: 1; }
.sc-main span { font-size: 12px; color: var(--muted); }
.sc-bars { display: grid; gap: 6px; }
.sc-bars > div { display: grid; grid-template-columns: 62px 1fr; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); }
.sc-bars i { display: block; height: 7px; border-radius: 4px; background: #efe6df; position: relative; overflow: hidden; }
.sc-bars i::after { content: ""; position: absolute; inset: 0; width: var(--w); background: var(--primary); border-radius: 4px; transform: scaleX(0); transform-origin: left; transition: transform .7s cubic-bezier(.2, .8, .2, 1); transition-delay: var(--d, 0s); }
.scene.play .sc-bars i::after { transform: scaleX(1); }

/* ---- plans ---- */
.plans-section { padding: 16px 0 0; text-align: center; scroll-margin-top: 90px; }
.plans-section h2 { font-size: clamp(32px, 4.6vw, 50px); margin-bottom: 10px; }
.plans-section .lede { margin-bottom: 8px; }
.plans-inline { display: flex; flex-direction: column; gap: 14px; margin-top: 22px; text-align: left; }
.plans-inline .interval-toggle, .plans-inline .auth-note, .plans-inline .center { align-self: center; }
.plans-inline .plan-card { background: var(--surface); }

/* ---- motion ---- */
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes float { from { transform: translateY(-6px); } to { transform: translateY(8px); } }
@keyframes float-sm { from { transform: translateY(-3px); } to { transform: translateY(4px); } }
@keyframes breathe { 0%, 100% { transform: translate(-50%, -50%) scale(1); } 50% { transform: translate(-50%, -50%) scale(1.04); } }
@keyframes breathe-sm { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
@keyframes bounce { 0%, 100% { height: 25%; } 50% { height: 100%; } }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
@keyframes strike { 0%, 5% { transform: scaleX(0); } 11%, 88% { transform: scaleX(1); } 94%, 100% { transform: scaleX(0); } }
@keyframes insert { 0%, 11% { opacity: 0; transform: translateY(6px); } 18%, 88% { opacity: 1; transform: none; } 94%, 100% { opacity: 0; transform: translateY(6px); } }

@media (prefers-reduced-motion: reduce) {
  .wl *, .wl *::after, .hero-stage, .hero-copy > * { animation: none !important; transition: none !important; }
  .hero-copy > *, .hero-stage { opacity: 1; transform: none; }
  .sc-line s::after, .art-review .pl s::after { transform: scaleX(1); }
  .pl.ins { opacity: 1; transform: none; }
  .clock { transform: translate(-50%, -50%); }
  .wave i { height: 60%; }
}

/* ---- phones and narrow windows ---- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 20px; gap: 28px; }
  .scene, .scene.flip { grid-template-columns: 1fr; gap: 22px; }
  .scene.flip .scene-copy { order: 0; }
  .scene-art { min-height: 0; }
  .art-build { min-height: 360px; }
  .score-chip { right: 0; top: -12px; font-size: 16px; }
  /* the hero's cards: a zig-zag that never overlaps, the clock beside the interviewer's question */
  .hero-stage { aspect-ratio: auto; max-width: 420px; display: grid; grid-template-columns: 36% 1fr; gap: 18px 14px; align-items: center; }
  .stage-card { position: relative; width: auto; animation-name: float-sm; }
  .sc-line { grid-column: 1 / -1; left: auto; top: auto; width: 84%; justify-self: start; }
  .clock { grid-row: 2; grid-column: 1; position: relative; left: auto; top: auto; width: 100%; max-width: 140px; justify-self: center; transform: none; animation-name: breathe-sm; }
  .sc-ask { grid-row: 2; grid-column: 2; right: auto; top: auto; width: auto; }
  .sc-score { grid-row: 3; grid-column: 1 / -1; left: auto; bottom: auto; width: 76%; justify-self: center; }
}
@media (max-width: 700px) {
  .wl { padding: 0 16px 56px; }
  .wl-top .brand-tag { display: none; }
  .eyebrow { font-size: 11px; letter-spacing: .12em; }

  .stage-card { font-size: 12px; padding: 10px 12px; }
  .sc-score b { font-size: 24px; }
  .dial { width: 52px; height: 52px; }
  .scorecard { grid-template-columns: auto 1fr; }
  .scorecard .sc-bars { grid-column: 1 / -1; }
}

/* tailor: a link is pasted, the resume's key terms light up, then the application fills itself in */
.art-tailor { min-height: 420px; }
.linkbox { position: absolute; left: 50%; top: 0; transform: translateX(-50%); display: flex; align-items: center; gap: 2px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 8px 16px; font: 12.5px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--muted); box-shadow: var(--shadow); white-space: nowrap; max-width: 100%; opacity: 0; transition: opacity .4s; }
.linkbox .lk { display: inline-block; overflow: hidden; max-width: 0; white-space: nowrap; transition: max-width 1.1s steps(34) .3s; }
.linkbox .caret { width: 1px; height: 14px; background: var(--primary); animation: blink .9s steps(1) infinite; }
.scene.play .linkbox { opacity: 1; }
.scene.play .linkbox .lk { max-width: 320px; }
.art-tailor .sheet { position: absolute; left: 0; top: 56px; width: min(62%, 330px); margin: 0; padding: 18px 20px; opacity: 0; transform: translateY(14px); transition: opacity .6s 1.3s, transform .6s 1.3s cubic-bezier(.2, .8, .2, 1); }
.scene.play .art-tailor .sheet { opacity: 1; transform: none; }
.art-tailor mark { color: inherit; background: linear-gradient(#ffe2c7, #ffe2c7) no-repeat; background-size: 0 100%; border-radius: 2px; padding: 0 1px; transition: background-size .45s cubic-bezier(.2, .8, .2, 1); }
.art-tailor mark:nth-of-type(1) { transition-delay: 1.8s; }
.art-tailor mark:nth-of-type(2) { transition-delay: 1.95s; }
.art-tailor mark:nth-of-type(3) { transition-delay: 2.1s; }
.art-tailor .pl:nth-of-type(5) mark { transition-delay: 2.2s; }
.art-tailor .pl:nth-of-type(7) mark:nth-of-type(1) { transition-delay: 2.3s; }
.art-tailor .pl:nth-of-type(7) mark:nth-of-type(2) { transition-delay: 2.4s; }
.art-tailor .pl:nth-of-type(7) mark:nth-of-type(3) { transition-delay: 2.5s; }
.scene.play .art-tailor mark { background-size: 100% 100%; }
.appform { position: absolute; right: 0; bottom: 0; width: min(58%, 300px); background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; box-shadow: 0 22px 50px -22px rgba(40, 16, 12, .4), 0 1px 2px rgba(40, 16, 12, .06); opacity: 0; transform: translateY(14px); transition: opacity .5s 2s, transform .5s 2s cubic-bezier(.2, .8, .2, 1); }
.scene.play .appform { opacity: 1; transform: none; }
.af-title { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.af-row { display: grid; grid-template-columns: 54px 1fr; align-items: center; gap: 8px; font-size: 13px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.af-row span { color: var(--muted); font-size: 11.5px; }
.af-row b { font-weight: 600; overflow: hidden; white-space: nowrap; display: inline-block; max-width: 0; }
.af-row .typed { transition: max-width .9s steps(16) var(--d, 2.4s); }
.af-row .file { color: #166534; transition: max-width .01s var(--d, 3.5s); position: relative; padding-left: 16px; }
.af-row .file::before { content: "✓"; position: absolute; left: 0; color: #22c55e; }
.scene.play .af-row b { max-width: 100%; }
.af-go { margin-top: 12px; text-align: center; padding: 9px 12px; border-radius: 9px; background: #f2ebe6; color: var(--muted); font-weight: 700; font-size: 13px; transition: background .4s var(--d, 4.1s), color .4s var(--d, 4.1s), box-shadow .4s var(--d, 4.1s); }
.scene.play .af-go { background: var(--primary); color: var(--primary-ink); box-shadow: 0 10px 24px -10px rgba(255, 106, 31, .6); }

@media (prefers-reduced-motion: reduce) {
  .linkbox { opacity: 1; }
  .linkbox .lk, .af-row b { max-width: 100%; }
  .art-tailor .sheet, .appform { opacity: 1; transform: none; }
  .art-tailor mark { background-size: 100% 100%; }
  .af-go { background: var(--primary); color: var(--primary-ink); }
}
@media (max-width: 860px) {
  .art-tailor { min-height: 0; display: flex; flex-direction: column; gap: 14px; padding-top: 48px; }
  .art-tailor .sheet, .appform { position: static; width: min(100%, 420px); margin: 0 auto; }
  .linkbox { max-width: calc(100% - 8px); }
}
