/* Tailora homepage — playful, app-first layout */
:root {
  --ink: #17151c;
  --muted: #6d6878;
  --line: #ece9f1;
  --bg: #ffffff;
  --soft: #f6f4f9;
  --purple: #a24df4;
  --violet: #8b6cf6;
  --blue: #4f6bf5;
  --green: #45c486;
  --coral: #f0644a;
  --yellow: #f8c23f;
  --teal: #33c2c9;
  --pink: #f2668b;
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --hand: "Caveat", "Comic Sans MS", cursive;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 99px; text-decoration: none; }
.skip:focus { top: 16px; }

/* ── Buttons ─────────────────────────────── */
.pill {
  display: inline-flex; align-items: center; gap: .55em;
  padding: .95em 1.7em;
  border-radius: 999px;
  background: var(--purple);
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  box-shadow: 0 10px 24px -10px rgba(162, 77, 244, .7);
  transition: transform .4s var(--spring), box-shadow .3s, background .2s;
}
.pill:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 16px 30px -12px rgba(162, 77, 244, .8); }
.pill:active { transform: scale(.97); }
.pill:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.pill i { font-size: 1.1em; }
.pill--sm { padding: .62em 1.15em; font-size: .92rem; }

/* ── Top bar ─────────────────────────────── */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px max(16px, 3vw);
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 1.35rem; letter-spacing: -.03em; text-decoration: none; }
.logo img { width: 32px; height: 32px; border-radius: 9px; }
.topbar-right { display: flex; align-items: center; gap: 6px; }
.topbar-link { padding: .5em .9em; font-weight: 600; font-size: .95rem; text-decoration: none; color: var(--muted); border-radius: 99px; transition: color .2s, background .2s; }
.topbar-link:hover { color: var(--ink); background: var(--soft); }
.topbar .pill { opacity: 0; translate: 0 -12px; scale: .9; pointer-events: none; transition: opacity .35s var(--ease), translate .5s var(--spring), scale .5s var(--spring); }
body.scrolled .topbar .pill { opacity: 1; translate: 0 0; scale: 1; pointer-events: auto; }
body.scrolled .topbar .logo { opacity: 0; pointer-events: none; }
.topbar .logo { transition: opacity .3s; }

/* ── Hero ────────────────────────────────── */
.hero {
  position: relative;
  min-height: max(100svh, 680px);
  display: grid; place-items: center;
  padding: 120px 16px 90px;
  text-align: center;
  isolation: isolate;
}
.hero-copy { position: relative; z-index: 3; max-width: 1000px; }
.hero h1 {
  margin: 0;
  font-size: clamp(2.35rem, 5.1vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -.045em;
  font-weight: 800;
}
.hero-sub { max-width: 560px; margin: 22px auto 34px; color: var(--muted); font-size: clamp(1.02rem, 1.6vw, 1.2rem); }
.hero-meta { margin-top: 16px; color: var(--muted); font-size: .9rem; font-weight: 500; }
.hero-copy > * { opacity: 0; translate: 0 26px; animation: rise .9s var(--ease) forwards; }
.hero-copy > :nth-child(2) { animation-delay: .1s; }
.hero-copy > :nth-child(3) { animation-delay: .2s; }
.hero-copy > :nth-child(4) { animation-delay: .3s; }
@keyframes rise { to { opacity: 1; translate: 0 0; } }

.scatter { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.bit {
  position: absolute;
  left: var(--x); top: var(--y);
  width: var(--w);
  translate: calc(var(--mx, 0) * var(--z, 1) * 1px) calc(var(--my, 0) * var(--z, 1) * 1px - var(--hs, 0) * var(--z, 1) * 1.6px);
  will-change: translate;
}
.bit > * {
  rotate: var(--r, 0deg);
  opacity: 0; scale: .2;
  animation: pop .9s var(--spring) forwards, bob var(--bob, 6s) ease-in-out infinite;
  animation-delay: var(--d, 0s), calc(var(--d, 0s) + .9s);
}
@keyframes pop { to { opacity: 1; scale: 1; } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.bit svg { width: 100%; height: auto; fill: var(--c); }
.bit .spin { animation: pop .9s var(--spring) forwards, spin var(--spin, 40s) linear infinite; animation-delay: var(--d, 0s), 0s; }
@keyframes spin { to { transform: rotate(360deg); } }
.sticker img { width: 100%; height: auto; filter: drop-shadow(0 12px 18px rgba(40, 20, 60, .14)); }

/* notification bubble */
.bubble {
  display: flex; align-items: center; gap: 11px;
  width: max-content; max-width: 340px;
  padding: 11px 16px 11px 11px;
  background: rgba(244, 242, 247, .92);
  backdrop-filter: blur(10px);
  border-radius: 22px;
  text-align: left;
  box-shadow: 0 10px 30px -14px rgba(40, 20, 60, .3);
}
.bubble .av { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: .9rem; background: var(--c, var(--purple)); position: relative; }
.bubble .av::after { content: ""; position: absolute; right: -2px; bottom: -2px; width: 15px; height: 15px; border-radius: 50%; background: #25d366 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='white'%3E%3Cpath d='M8 3a5 5 0 0 0-4.3 7.5L3 13l2.6-.7A5 5 0 1 0 8 3z'/%3E%3C/svg%3E") center/9px no-repeat; border: 2px solid #f4f2f7; }
.bubble b { display: flex; justify-content: space-between; gap: 18px; font-size: .9rem; }
.bubble b small { color: var(--muted); font-weight: 500; font-size: .75rem; }
.bubble span { display: block; font-size: .9rem; color: #3a3644; line-height: 1.35; }

/* ── Feature sections ────────────────────── */
.feat {
  position: relative;
  padding: clamp(80px, 12vw, 150px) 16px 40px;
  text-align: center;
}
.feat h2, .section-title {
  margin: 0 auto;
  max-width: 760px;
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  line-height: 1.06;
  letter-spacing: -.04em;
  font-weight: 800;
}
.feat-sub { max-width: 520px; margin: 18px auto 0; color: var(--muted); font-size: 1.08rem; }
.hand { font-family: var(--hand); font-size: 1.45rem; color: var(--muted); margin-top: 14px; display: inline-block; rotate: -2deg; }
.hand::after { content: "↓"; display: block; font-family: var(--font); font-size: 1.1rem; margin-top: 2px; }

.reveal { opacity: 0; translate: 0 34px; transition: opacity .9s var(--ease), translate 1s var(--ease); transition-delay: var(--rd, 0s); }
.reveal.in { opacity: 1; translate: 0 0; }

.stage {
  --p: 0; --pa: 0;
  position: relative;
  width: min(100%, 760px);
  margin: clamp(36px, 6vw, 64px) auto 0;
  display: grid; place-items: center;
  padding: 40px 0;
}
.stage .blob {
  position: absolute;
  width: min(118vw, 600px);
  aspect-ratio: 1;
  left: 50%; top: 50%;
  translate: -50% -50%;
  fill: var(--c);
  rotate: calc(var(--p) * 50deg);
  scale: calc(.35 + var(--in, 0) * (.65 - var(--pa) * .12));
  transition: scale 1.2s var(--spring);
  z-index: 0;
}
.stage.in { --in: 1; }

.phone {
  position: relative; z-index: 2;
  width: var(--pw, clamp(232px, 27vw, 300px));
  aspect-ratio: 1206 / 2622;
  padding: 9px;
  border-radius: 50px;
  background: #0a0a0c;
  box-shadow:
    0 0 0 1.5px #3a3840 inset,
    0 0 0 2.5px #d7d4dc,
    0 50px 80px -30px rgba(35, 15, 60, .45),
    0 20px 40px -20px rgba(35, 15, 60, .3);
  translate: 0 calc(var(--p) * -36px);
  opacity: 0; scale: .9;
  transition: opacity .8s var(--ease), scale 1.1s var(--spring);
  transition-delay: .1s;
}
.stage.in .phone { opacity: 1; scale: 1; }
.phone::before, .phone::after { content: ""; position: absolute; width: 3px; background: #2b2930; border-radius: 2px; }
.phone::before { left: -4px; top: 22%; height: 9%; }
.phone::after { right: -4px; top: 27%; height: 14%; }
.phone > img, .phone > video {
  width: 100%; height: 100%;
  object-fit: cover; object-position: top;
  border-radius: 41px;
  background: #0b0b0b;
}

/* floating chips around the phone */
.chip {
  position: absolute; z-index: 3;
  left: var(--x); top: var(--y);
  display: flex; align-items: center; gap: 10px;
  padding: 10px 15px 10px 10px;
  background: #fff;
  border-radius: 18px;
  font-size: .9rem; font-weight: 600;
  text-align: left; line-height: 1.25;
  white-space: nowrap;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .04), 0 18px 40px -16px rgba(35, 15, 60, .35);
  translate: 0 calc(var(--p) * var(--z, -70) * 1px);
  opacity: 0; scale: .6; rotate: var(--r, 0deg);
  transition: opacity .6s var(--ease), scale .8s var(--spring);
  transition-delay: calc(.35s + var(--d, 0s));
}
.stage.in .chip { opacity: 1; scale: 1; }
.chip i { flex: none; width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--c, var(--purple)); color: #fff; font-size: 1rem; font-style: normal; }
.chip small { display: block; color: var(--muted); font-weight: 500; font-size: .76rem; }

/* ── Chat wall ───────────────────────────── */
.chat-wall { display: flex; flex-direction: column; gap: 14px; width: min(100%, 460px); margin: 44px auto 0; }
.chat-wall .bubble { max-width: none; width: auto; padding: 13px 18px 13px 13px; opacity: 0; translate: var(--from, -40px) 10px; scale: .96; transition: opacity .6s var(--ease), translate .8s var(--spring), scale .8s var(--spring); }
.chat-wall .bubble:nth-child(even) { --from: 40px; }
.chat-wall .bubble.in { opacity: 1; translate: 0 0; scale: 1; }
.chat-wall .bubble:nth-child(odd) { margin-right: 36px; }
.chat-wall .bubble:nth-child(even) { margin-left: 36px; }
.chat-wall .bubble.reply { background: var(--purple); color: #fff; margin-left: 70px; margin-right: 0; }
.chat-wall .bubble.reply span, .chat-wall .bubble.reply b small { color: rgba(255, 255, 255, .85); }
.chat-wall .bubble.reply .av { background: #fff; }
.chat-wall .bubble.reply .av::after { display: none; }
.chat-wall .bubble.reply .av img { width: 26px; height: 26px; border-radius: 7px; }

/* ── Fan of phones ───────────────────────── */
.fan { --pw: clamp(180px, 22vw, 250px); height: calc(var(--pw) * 2.35); padding: 0; }
.fan .phone { position: absolute; left: 50%; top: 50%; margin: calc(var(--pw) * -1.087) 0 0 calc(var(--pw) * -.5); }
.fan .phone:nth-of-type(1) { rotate: calc(var(--in, 0) * -10deg); translate: calc(var(--in, 0) * -78%) calc(var(--in, 0) * 6% + var(--p) * -20px); z-index: 1; }
.fan .phone:nth-of-type(3) { rotate: calc(var(--in, 0) * 10deg); translate: calc(var(--in, 0) * 78%) calc(var(--in, 0) * 6% + var(--p) * -20px); z-index: 1; }
.fan .phone:nth-of-type(2) { translate: 0 calc(var(--p) * -50px); z-index: 2; }
.fan .phone { transition: opacity .8s var(--ease), scale 1.1s var(--spring), rotate 1.3s var(--spring), translate 1.3s var(--spring); }
.fan.in .phone { transition-delay: .15s; }

/* ── Cards ───────────────────────────────── */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; width: min(100%, 860px); margin: 48px auto 0; text-align: left; }
.card { background: var(--soft); border-radius: 26px; padding: 26px 26px 28px; }
.card svg { width: 34px; height: 34px; fill: var(--c); margin-bottom: 18px; }
.card h3 { margin: 0 0 6px; font-size: 1.2rem; letter-spacing: -.02em; }
.card p { margin: 0; color: var(--muted); font-size: .98rem; }
.cards .card { opacity: 0; translate: 0 30px; transition: opacity .7s var(--ease), translate .9s var(--spring); }
.cards.in .card { opacity: 1; translate: 0 0; }
.cards.in .card:nth-child(2) { transition-delay: .08s; }
.cards.in .card:nth-child(3) { transition-delay: .16s; }
.cards.in .card:nth-child(4) { transition-delay: .24s; }

/* ── FAQ ─────────────────────────────────── */
.faq { width: min(100%, 760px); margin: 0 auto; padding: clamp(90px, 12vw, 150px) 16px 40px; }
.faq .section-title { margin: 0 0 28px; text-align: left; }
.faq details { border-bottom: 1px solid var(--line); interpolate-size: allow-keywords; }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 2px; font-weight: 600; font-size: 1.06rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); rotate: 45deg; translate: 0 -3px; transition: rotate .35s var(--ease), translate .35s var(--ease); }
.faq details[open] summary::after { rotate: 225deg; translate: 0 3px; }
.faq details::details-content { block-size: 0; overflow: clip; transition: block-size .45s var(--ease), content-visibility .45s allow-discrete; }
.faq details[open]::details-content { block-size: auto; }
.faq details p { margin: 0 0 22px; color: var(--muted); padding-right: 30px; }
.faq details a { color: var(--purple); font-weight: 600; }

/* ── Final CTA ───────────────────────────── */
.final { position: relative; min-height: 86svh; display: grid; place-items: center; text-align: center; padding: 120px 16px; isolation: isolate; }
.final .section-title { font-size: clamp(2.4rem, 6vw, 4.6rem); line-height: 1.02; letter-spacing: -.045em; }
.final .feat-sub { margin-bottom: 32px; }
.stores { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 18px; }
.store { display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px 10px 14px; border-radius: 14px; background: var(--ink); color: #fff; text-decoration: none; text-align: left; line-height: 1.1; transition: transform .35s var(--spring); }
.store:hover { transform: translateY(-2px); }
.store i { font-size: 1.6rem; }
.store small { display: block; font-size: .68rem; opacity: .8; }
.store b { font-size: 1.02rem; }

footer { padding: 30px 16px 40px; text-align: center; color: var(--muted); font-size: .9rem; }
footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; margin-bottom: 14px; }
footer a { text-decoration: none; }
footer a:hover { color: var(--ink); }

/* ── Responsive ──────────────────────────── */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .hero { padding-top: 150px; padding-bottom: 170px; align-items: start; }
  .bit.hide-sm { display: none; }
  .hero h1 br { display: none; }
  .bit { left: var(--xs, var(--x)); top: var(--ys, var(--y)); width: var(--ws, var(--w)); }
  .topbar-link { display: none; }
  .cards { grid-template-columns: 1fr; }
  .chip { font-size: .8rem; padding: 8px 12px 8px 8px; }
  .chip i { width: 28px; height: 28px; border-radius: 9px; font-size: .85rem; }
  .chip.far-left { left: 2%; }
  .chip.far-right { left: auto; right: 2%; }
  .chat-wall .bubble:nth-child(odd) { margin-right: 18px; }
  .chat-wall .bubble:nth-child(even) { margin-left: 18px; }
  .chat-wall .bubble.reply { margin-left: 36px; }
  .fan .phone:nth-of-type(1) { translate: calc(var(--in, 0) * -58%) calc(var(--in, 0) * 8%); }
  .fan .phone:nth-of-type(3) { translate: calc(var(--in, 0) * 58%) calc(var(--in, 0) * 8%); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .bit, .phone, .chip, .stage .blob { translate: none !important; }
}

/* Keep oversized blobs and stickers from widening the page on phones */
.hero, .feat, .final { overflow-x: clip; }
