/*
 * The home page (index.html). Shared tokens and chrome are in site.css.
 *
 * Motion rule: every animated piece's DEFAULT style is its finished state. Motion is switched on only by
 * html.motion, which js/home.js adds when the visitor hasn't asked for Reduce Motion. So without JavaScript,
 * or with Reduce Motion, the page shows the end of every animation and nothing is ever stuck half-hidden.
 * Durations and easings mirror apps/linkup/constants/motion.ts: entrance 380 ms on "out" (0.22, 1, 0.36, 1),
 * no overshoot except a Linkie's.
 */

/* ── hero: copy + the step rail on one side, the phone playing the flow on the other ── */
.hero { position: relative; background: var(--band); border-radius: 0 0 50% 50% / 0 0 34px 34px; overflow: hidden; padding-bottom: 40px; }
.hero .tex { position: absolute; inset: 0; width: 100%; height: 100%;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0 40%, #000 62%); mask-image: linear-gradient(to bottom, transparent 0 40%, #000 62%); }
.hgrid { position: relative; z-index: 1; display: grid; gap: 26px; grid-template-columns: minmax(0, 1fr); grid-template-areas: "copy" "phone" "rail"; padding-top: 14px; }
/* The smallest phones (320 pt): the drawn phone is 316 wide, so it shrinks to fit rather than stretching the column. */
@media (max-width: 359px) { .dphone { zoom: .86; } }
.hcopy { grid-area: copy; } .hrail { grid-area: rail; } .hphone { grid-area: phone; justify-self: center; }
@media (min-width: 860px) {
  .hero { padding-bottom: 56px; }
  .hero .tex { -webkit-mask-image: linear-gradient(to right, transparent 0 48%, #000 70%); mask-image: linear-gradient(to right, transparent 0 48%, #000 70%); }
  .hgrid { grid-template-columns: 1fr 316px; grid-template-areas: "copy phone" "rail phone"; column-gap: 72px; row-gap: 30px; padding: 28px 16px 8px; }
  .hcopy { align-self: end; } .hrail { align-self: start; }
}
.eyebrow { display: inline-flex; align-items: center; gap: 6px; background: var(--ground); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 700; }
.eyebrow b { color: var(--coral); }
.hero h1 { font-weight: 900; font-size: 40px; margin: 14px 0 10px; letter-spacing: -.02em; line-height: 1.12; }
.hero .lede { font-size: 18px; margin: 0 0 22px; max-width: 32ch; }
@media (min-width: 860px) { .hero h1 { font-size: 58px; } .hero .lede { font-size: 20px; } }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.motion .hcopy > * { animation: rise .38s cubic-bezier(.22,1,.36,1) both; }
.motion .hcopy > :nth-child(2) { animation-delay: .07s; } .motion .hcopy > :nth-child(3) { animation-delay: .14s; }
.motion .hcopy > .cta-row { animation: none; } /* the primary action never moves */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ── the chapter toggle above the steps (From a post · From a list). The chosen one is ink: a choice, not an action. ── */
.chapters { display: inline-flex; gap: 2px; padding: 3px; margin: 0 0 8px 14px; background: var(--ground); border: 1px solid var(--line); border-radius: 999px; }
.chap { all: unset; cursor: pointer; padding: 6px 13px; border-radius: 999px; font: 800 13px Nunito, sans-serif; color: var(--subtle); transition: background .25s, color .25s; }
.chap.on { background: var(--ink); color: var(--ground); }
.chap:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; }
.rail[hidden] { display: none !important; }
@media (max-width: 859px) { .chapters { display: flex; width: max-content; margin: 0 auto 8px; } }

/* ── the step rail: three numbered steps that fill as the demo plays; tapping one jumps there ── */
.rail { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-width: 420px; }
.rail li { margin: 0; max-width: none; }
.rail button { all: unset; box-sizing: border-box; cursor: pointer; width: 100%; display: grid; grid-template-columns: 30px 1fr; column-gap: 12px; row-gap: 4px; padding: 12px 14px; border-radius: 16px; border: 1px solid transparent; transition: background .25s, border-color .25s; }
.rail button.on { background: var(--ground); border-color: var(--line); }
.rail button:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; }
.rail .n { grid-row: 1 / span 3; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 900 14px Nunito, sans-serif; background: var(--ground); color: var(--ink); border: 1px solid var(--line); transition: background .25s, color .25s; }
.rail .on .n, .rail .done .n { background: var(--coral); color: #FFFFFF; border-color: transparent; }
.rail b { font: 800 16px/1.3 Nunito, sans-serif; color: var(--ink); }
.rail .d { color: var(--subtle); font-size: 14px; line-height: 1.45; }
.rail .bar { height: 3px; border-radius: 2px; background: var(--line); overflow: hidden; margin-top: 4px; }
.rail .bar i { display: block; height: 100%; width: 0; background: var(--coral); }
.rail .done .bar i { width: 100%; }
@keyframes fill { from { width: 0; } to { width: 100%; } }
@media (max-width: 859px) {
  .rail { grid-template-columns: repeat(3, 1fr); max-width: none; gap: 4px; }
  .rail button { grid-template-columns: 1fr; text-align: center; padding: 10px 6px; justify-items: center; }
  .rail .n { grid-row: auto; } .rail .d { display: none; } .rail b { font-size: 13px; } .rail .bar { width: 100%; }
}

/* ── sections ── */
.sec { padding: 64px 0 8px; }
.sec > h2 { font-weight: 900; font-size: 30px; margin: 0 0 6px; letter-spacing: -.01em; }
.sec .intro { color: var(--subtle); font-size: 17px; margin: 0 0 28px; max-width: 56ch; }
@media (min-width: 760px) { .sec > h2 { font-size: 40px; } }

/* ── feature stories: words on one side, a living piece of the app on the other ── */
.stories { display: grid; gap: 64px; margin-top: 8px; }
.story { display: grid; gap: 24px; align-items: center; }
@media (min-width: 860px) { .story { grid-template-columns: 1fr 1.08fr; gap: 72px; } .story.flip .vig { order: -1; } }
.story .over { font: 800 13px Nunito, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--coral); margin: 0; }
.story h3 { font-weight: 900; font-size: 28px; margin: 6px 0 10px; letter-spacing: -.01em; line-height: 1.15; }
@media (min-width: 860px) { .story h3 { font-size: 36px; } }
.story p { color: var(--subtle); font-size: 17px; margin: 0; max-width: 42ch; }
.vig { border-radius: 30px; padding: 40px 22px; display: grid; place-items: center; min-height: 320px; position: relative; overflow: hidden; }
.vig.v-band { background: var(--band); } .vig.v-coral { background: var(--coral-soft); } .vig.v-sun { background: var(--sun-soft); }
.ui { position: relative; background: #FFFFFF; color: #231A33; border: 1px solid #E4EEE8; border-radius: 22px; box-shadow: 0 22px 44px -22px rgba(35,26,51,.4); width: 100%; max-width: 330px; font: 13px/1.4 -apple-system, BlinkMacSystemFont, sans-serif; }
.ui p { margin: 0; max-width: none; color: inherit; font-size: inherit; }

/* story 1: a circle card where a new spot lands */
.cc .cover { height: 118px; border-radius: 21px 21px 0 0; overflow: hidden; position: relative; background: #CFEFDC; }
.cc .cover svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.cc .vis { position: absolute; top: 10px; left: 10px; background: #FFFFFF; border-radius: 999px; padding: 2px 9px; font-size: 11px; font-weight: 700; }
.cc .ccb { padding: 12px 14px 14px; }
.cc .nm { display: flex; align-items: center; gap: 7px; font: 900 17px Nunito, sans-serif; }
.cc .nm i { width: 10px; height: 10px; border-radius: 50%; background: #8B5CF6; }
.cc .nm i.blue { background: #60A5FA; }
.cc .mt { color: #8E8499; margin: 3px 0 10px; }
.cc .mt b { color: #231A33; }
.cnt { display: inline-grid; } .cnt b { grid-area: 1 / 1; transition: opacity .25s; }
.c11 { opacity: 0; }
.cc .r2 { display: flex; align-items: center; gap: 8px; }
.stack { display: flex; }
.stack span { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #FFFFFF; margin-left: -8px; overflow: hidden; display: grid; place-items: center; }
.stack span:first-child { margin-left: 0; }
.stack svg { width: 18px; height: 21px; margin-top: 4px; }
.act { margin-left: auto; background: #FFF0C7; border-radius: 999px; padding: 3px 9px; font-size: 11.5px; font-weight: 700; transition: opacity .3s, transform .35s cubic-bezier(.22,1,.36,1); }
.cc.back { position: absolute; width: 78%; max-width: 280px; transform: translate(-46px, -46px) rotate(-7deg); opacity: .85; }
.cc.back .cover { height: 96px; background: #E6F3FF; }
.motion .vig:not(.in) .np { opacity: 0; }
.motion .vig.in .np { animation: drop .55s cubic-bezier(.22,1,.36,1) .5s both; }
.motion .vig:not(.in) .c12 { opacity: 0; } .motion .vig:not(.in) .c11 { opacity: 1; }
.motion .vig.in .cnt b { transition-delay: .85s; }
.motion .vig:not(.in) .act { opacity: 0; transform: scale(.9); }
.motion .vig.in .act { transition-delay: 1.05s; }

/* story 2: a Vibe Check filling up to "Ready to go" (a circle of 4: a majority is 3, packages/types/vibe.ts) */
.vibe { padding: 16px; }
.vibe .vh { display: flex; align-items: center; gap: 6px; font: 800 11px Nunito, sans-serif; letter-spacing: .07em; color: #C2410C; }
.vibe .vh svg { width: 14px; height: 14px; fill: #FF5A3C; }
.vt { position: relative; height: 46px; margin: 8px 0 12px; }
.vt > div { position: absolute; inset: 0; transition: opacity .3s; }
.vt b { display: flex; align-items: center; gap: 6px; font: 900 17px Nunito, sans-serif; }
.vt span { color: #8E8499; font-size: 12.5px; }
.vt .ok { width: 20px; height: 20px; border-radius: 50%; background: #22C55E; display: grid; place-items: center; }
.vt .ok svg { width: 11px; height: 11px; stroke: #FFFFFF; stroke-width: 3.4; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.va, .vb { opacity: 0; }
.motion .vig:not(.in) .va { opacity: 1; } .motion .vig:not(.in) .vc { opacity: 0; }
.motion .vig.in .va { transition-delay: .6s; }
.motion .vig.in .vb { animation: vibeMid 1.3s .6s both; }
@keyframes vibeMid { 0% { opacity: 0; } 20% { opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; } }
.motion .vig.in .vc { transition-delay: 1.9s; }
.vfaces { display: flex; gap: 14px; margin-bottom: 14px; }
.vf { text-align: center; font-size: 11px; color: #8E8499; }
.vf .av { position: relative; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 4px; }
.vf .av svg { width: 30px; height: 35px; margin-top: 6px; }
.vf .bd { position: absolute; right: -3px; bottom: -3px; width: 19px; height: 19px; border-radius: 50%; border: 2px solid #FFFFFF; display: grid; place-items: center; transition: transform .3s cubic-bezier(.22,1,.36,1); }
.vf .bd svg { width: 9px; height: 9px; margin: 0; stroke: #FFFFFF; stroke-width: 3.6; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.bd.y { background: #22C55E; } .bd.n { background: #E5484D; }
.motion .vig:not(.in) .vf:not(.f0) .bd { transform: scale(0); }
.motion .vig.in .vf.f1 .bd { transition-delay: .6s; }
.motion .vig.in .vf.f2 .bd { transition-delay: 1.1s; }
.motion .vig.in .vf.f3 .bd { transition-delay: 1.6s; }
.vchips { display: flex; gap: 8px; }
.vchips span { flex: 1; height: 40px; border-radius: 14px; display: grid; place-items: center; font: 800 13.5px Nunito, sans-serif; border: 1.5px solid #E4EEE8; transition: background .25s, color .25s, border-color .25s; }
.vchips .yes { background: #FF5A3C; border-color: #FF5A3C; color: #FFFFFF; }
.motion .vig:not(.in) .vchips .yes { background: transparent; border-color: #E4EEE8; color: #231A33; }
.motion .vig.in .vchips .yes { transition-delay: 1.6s; }

/* story 3: rate it with a face (RATING_COLORS, words from utils/ratingScale.ts) */
.rate { padding: 16px; }
.rate .rh { font: 900 17px Nunito, sans-serif; margin-bottom: 12px; }
.faces5 { display: flex; justify-content: space-between; padding: 0 2px; }
.faces5 .f { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; transition: opacity .3s, transform .35s cubic-bezier(.22,1,.36,1); }
.faces5 .f svg { width: 30px; height: 36px; margin-top: 6px; }
.faces5 .f:nth-child(-n+4) { opacity: .4; }
.faces5 .f5 { transform: scale(1.18); box-shadow: 0 0 0 3px #FFFFFF, 0 0 0 5.5px #5ED38A; }
.r1 { background: #FFE3E3; } .r2 { background: #FFEBD6; } .r3 { background: #FFF0C7; } .r4 { background: #EEF9D9; } .r5 { background: #DDF7E6; }
.motion .vig:not(.in) .faces5 .f { opacity: 0; transform: translateY(10px); box-shadow: none; }
.motion .vig.in .faces5 .f { opacity: 1; transform: none; box-shadow: none; }
.motion .vig.in .faces5 .f:nth-child(2) { transition-delay: .09s; } .motion .vig.in .faces5 .f:nth-child(3) { transition-delay: .18s; }
.motion .vig.in .faces5 .f:nth-child(4) { transition-delay: .27s; } .motion .vig.in .faces5 .f:nth-child(5) { transition-delay: .36s; }
.motion .vig.in .faces5 .f:nth-child(-n+4) { animation: dim .3s .95s forwards; }
@keyframes dim { to { opacity: .4; } }
/* the one Linkie overshoot (spring.character's feel) */
.motion .vig.in .faces5 .f5 { animation: pick .45s cubic-bezier(.34,1.56,.64,1) .95s forwards; }
@keyframes pick { to { transform: scale(1.18); box-shadow: 0 0 0 3px #FFFFFF, 0 0 0 5.5px #5ED38A; } }
.rlabel { position: relative; height: 22px; margin: 12px 0; text-align: center; font: 800 14px Nunito, sans-serif; }
.rlabel span { position: absolute; inset: 0; transition: opacity .25s; }
.rlabel .l0 { color: #8E8499; font: 700 13px -apple-system, sans-serif; opacity: 0; }
.rlabel .l5 { color: #15803D; }
.motion .vig:not(.in) .rlabel .l0 { opacity: 1; } .motion .vig:not(.in) .rlabel .l5 { opacity: 0; }
.motion .vig.in .rlabel span { transition-delay: .95s; }
.review { display: flex; gap: 10px; align-items: flex-start; background: #F1F7F3; border-radius: 16px; padding: 10px 12px; transition: opacity .3s, transform .38s cubic-bezier(.22,1,.36,1); }
.motion .vig:not(.in) .review { opacity: 0; transform: translateY(10px); }
.motion .vig.in .review { transition-delay: 1.35s; }
.review .av { width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center; overflow: hidden; }
.review .av svg { width: 20px; height: 23px; margin-top: 5px; }
.review b { font-size: 12.5px; }
.review .tg { display: inline-block; margin-top: 5px; font-size: 10.5px; font-weight: 700; color: #6D28D9; background: #F3EAFD; border-radius: 999px; padding: 1px 7px; }

/* "Also in LinkUp": plain type, no icon chips */
.also { display: grid; gap: 18px; margin-top: 64px; padding-top: 26px; border-top: 1px solid var(--line); }
@media (min-width: 760px) { .also { grid-template-columns: repeat(3, 1fr); gap: 32px; } }
.also h3 { font: 900 17px Nunito, sans-serif; margin: 0 0 4px; display: flex; align-items: center; gap: 8px; }
.also h3 svg { width: 18px; height: 18px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.also p { margin: 0; color: var(--subtle); font-size: 15px; }

/* ── privacy promise ── */
.promise { background: var(--mist); border-radius: 28px; padding: 26px 20px; display: grid; gap: 18px; align-items: center; }
@media (min-width: 760px) { .promise { grid-template-columns: auto 1fr; padding: 36px 40px; gap: 36px; } }
.promise h2 { margin: 0; font-size: 30px; }
.promise ul { list-style: none; padding: 0; margin: 12px 0 14px; display: grid; gap: 10px; }
.promise li { display: flex; gap: 10px; align-items: flex-start; margin: 0; }
.tick { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--green-soft); display: grid; place-items: center; margin-top: 2px; }
.tick svg { width: 12px; height: 12px; stroke: #15803D; stroke-width: 3; fill: none; stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tick svg { stroke: #5ED38A; } }

/* ── pricing ── */
.grid2 { display: grid; gap: 14px; }
@media (min-width: 760px) { .grid2 { grid-template-columns: repeat(2, 1fr); gap: 18px; } }
.price { border: 1px solid var(--line); border-radius: 24px; padding: 22px; }
.price.plus { border: 2px solid var(--coral); }
.price .tier { margin: 0; font: 900 22px Nunito, sans-serif; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.price .amt { font: 900 34px Nunito, sans-serif; margin: 8px 0 0; }
.price .amt small { font: 500 15px -apple-system, sans-serif; color: var(--subtle); }
.price .alt { color: var(--subtle); font-size: 14px; margin: 2px 0 14px; min-height: 1.4em; }
.price ul { padding-left: 20px; margin: 0; }
.price li { margin: 5px 0; }
.badge-sun { background: var(--sun-soft); color: var(--ink); border-radius: 999px; font: 800 12px -apple-system, sans-serif; padding: 3px 9px; }
.fine { color: var(--subtle); font-size: 13px; margin-top: 12px; }

/* ── closing band ── */
.closing { margin: 72px 0 0; background: var(--band); border-radius: 34px 34px 0 0; padding: 44px 16px 40px; text-align: center; }
.closing h2 { font-weight: 900; font-size: 30px; margin: 8px 0 18px; }
@media (min-width: 760px) { .closing h2 { font-size: 40px; } }
.closing .cta-row { justify-content: center; }
.closing + footer.site { background: var(--band); border-top-color: rgba(35,26,51,.08); margin-top: 0; }

/* The smallest phones (320 pt): the app pieces in the stories keep to their panel. */
@media (max-width: 359px) {
  .vig { padding: 28px 12px; }
  .faces5 .f { width: 42px; height: 42px; }
  .faces5 .f svg { width: 26px; height: 31px; }
  .vfaces { gap: 8px; }
}
/* A title that wraps to two lines must not run into its subtitle. */
@media (max-width: 400px) { .vt { height: 68px; } }
