/* Stitch landing — theme "Gradient Bubble" của app: nền trắng, vầng hồng/đào/tím ở mép, chỉ đỏ + đường khâu.
   Màu lấy đúng theme sáng mặc định (Themes.swift · stitchLight). */

@font-face { font-family: "Unbounded"; src: url("../assets/fonts/Unbounded-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Unbounded"; src: url("../assets/fonts/Unbounded-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Unbounded"; src: url("../assets/fonts/Unbounded-ExtraBold.ttf") format("truetype"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("../assets/fonts/Manrope-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("../assets/fonts/Manrope-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("../assets/fonts/Manrope-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("../assets/fonts/Manrope-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("../assets/fonts/Manrope-ExtraBold.ttf") format("truetype"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../assets/fonts/Inter-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --bg: #ffffff;
  --ink: #16141a;
  --ink-2: #5b5866;
  --ink-3: #9a97a3;
  --surface: #f4f4f7;
  --line: #ecebf1;
  --accent: #f0365a;
  --accent-soft: #ffe3ea;
  --rose: #ff8fb0;
  --peach: #ffc29e;
  --lilac: #c9b6ff;
  --solo: #1fa3a3;
  --solo-soft: #ddf4f3;
  --group: #7a5cfa;
  --group-soft: #ece6ff;

  --f-display: "Unbounded", ui-rounded, system-ui, sans-serif;
  --f-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius-card: 28px;
  --gutter: max(20px, env(safe-area-inset-left, 0px));
  --maxw: 1180px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 12px; }

/* Vầng màu nền — giống BloomBackground trong app */
.blooms { position: fixed; inset: 0; pointer-events: none; z-index: -1; overflow: hidden; }
.blooms span { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; }
.blooms .b1 { width: 46vw; height: 46vw; background: var(--rose); top: -18vw; right: -14vw; }
.blooms .b2 { width: 40vw; height: 40vw; background: var(--lilac); top: 40vh; left: -22vw; opacity: .45; }
.blooms .b3 { width: 34vw; height: 34vw; background: var(--peach); bottom: -16vw; right: 10vw; opacity: .4; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding-left: var(--gutter); padding-right: max(20px, env(safe-area-inset-right, 0px)); }

/* ---------- Chữ ---------- */
h1, h2, h3 { font-family: var(--f-display); margin: 0; letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-size: clamp(32px, 8.4vw, 88px); font-weight: 800; line-height: 1.02; }
h2 { font-size: clamp(26px, 6.2vw, 52px); font-weight: 800; line-height: 1.08; }
h3 { font-size: 20px; font-weight: 700; line-height: 1.25; }
p { margin: 0; }
.lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-2); max-width: 36ch; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2);
}
.eyebrow::before { content: ""; width: 28px; border-top: 3px dashed var(--accent); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, .72);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid rgba(236, 235, 241, .7);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 68px; }
.logo { display: inline-flex; flex-direction: column; gap: 3px; text-decoration: none; }
.logo b { font-family: var(--f-display); font-weight: 800; font-size: 24px; letter-spacing: -0.03em; }
.logo i { border-top: 3px dashed var(--accent); width: 100%; }
.nav { display: flex; gap: 22px; margin-left: auto; font-weight: 700; font-size: 15px; }
.nav a { text-decoration: none; color: var(--ink-2); }
.nav a:hover { color: var(--ink); }
.soon-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px; background: var(--ink); color: #fff;
  font-weight: 800; font-size: 13px; white-space: nowrap;
}
.soon-pill .dot, .status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(240, 54, 90, .6); } 70%, 100% { box-shadow: 0 0 0 10px rgba(240, 54, 90, 0); } }
@media (max-width: 760px) { .nav { display: none; } .site-header .soon-pill { margin-left: auto; } }

/* ---------- Nút ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: 12px; min-height: 58px; padding: 0 24px;
  border-radius: 999px; font-weight: 800; font-size: 16px; text-decoration: none; border: 0; cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 22px; height: 22px; flex: none; }
.btn-store { background: var(--ink); color: #fff; box-shadow: 0 14px 30px -16px rgba(22, 20, 26, .7); text-align: left; }
.btn-store small { display: block; font-size: 11px; font-weight: 600; opacity: .7; line-height: 1.1; }
.btn-store span { display: block; line-height: 1.15; }
.btn-store[aria-disabled="true"] { cursor: default; }
.btn-store[aria-disabled="true"]:hover { transform: none; }
.btn-ghost { background: rgba(255, 255, 255, .8); color: var(--ink); border: 1.5px solid var(--line); }
.note { font-size: 14px; color: var(--ink-3); font-weight: 600; }

/* ---------- Khung điện thoại ---------- */
.phone {
  position: relative; width: 100%; max-width: 300px; aspect-ratio: 1179 / 2556;
  border-radius: 48px; padding: 10px; background: #fff;
  box-shadow: 0 0 0 1.5px rgba(22, 20, 26, .08), 0 40px 80px -40px rgba(22, 20, 26, .45), 0 18px 40px -24px rgba(240, 54, 90, .35);
}
.phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 39px; }

/* ---------- Hero ---------- */
.hero { padding: clamp(40px, 7vw, 96px) 0 40px; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.hero-copy { display: grid; gap: 28px; justify-items: start; }
.hero h1 em { font-style: normal; color: var(--accent); position: relative; }
.hero h1 em::after { content: ""; position: absolute; left: 2%; right: 2%; bottom: -.06em; border-top: .08em dashed var(--accent); }
.modes-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 7px 14px; border-radius: 999px; font-weight: 800; font-size: 14px; }
.chip.solo { background: var(--solo-soft); color: var(--solo); }
.chip.couple { background: var(--accent-soft); color: var(--accent); }
.chip.group { background: var(--group-soft); color: var(--group); }

.hero-stage { position: relative; height: clamp(520px, 56vw, 660px); }
.hero-stage .phone { position: absolute; width: 46%; }
.hero-stage .p-center { left: 27%; top: 0; z-index: 3; }
.hero-stage .p-left { left: 0; top: 12%; transform: rotate(-8deg); z-index: 2; }
.hero-stage .p-right { right: 0; top: 14%; transform: rotate(8deg); z-index: 1; }
.thread-svg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 4; pointer-events: none; overflow: visible; }
.thread-svg path { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 10 9; animation: sew 14s linear infinite; }
@keyframes sew { to { stroke-dashoffset: -380; } }

.float { position: absolute; z-index: 5; animation: float 6s ease-in-out infinite; }
.float.sticker img { width: 84px; filter: drop-shadow(0 12px 18px rgba(22, 20, 26, .18)); }
.float.s1 { left: -4%; top: 4%; }
.float.s2 { right: -2%; top: -2%; animation-delay: -2s; }
.float.s3 { left: 8%; bottom: 0; animation-delay: -4s; }
@keyframes float { 50% { transform: translateY(-12px) rotate(2deg); } }

.toast {
  position: absolute; z-index: 6; display: flex; align-items: center; gap: 10px;
  padding: 10px 14px 10px 10px; border-radius: 20px; background: rgba(255, 255, 255, .94);
  box-shadow: 0 16px 40px -18px rgba(22, 20, 26, .4); font-size: 13.5px; font-weight: 800; max-width: 250px; line-height: 1.3;
}
.toast img { width: 36px; height: 36px; border-radius: 10px; object-fit: cover; flex: none; }
.toast small { display: block; color: var(--ink-3); font-weight: 600; font-size: 12px; }
.toast.t1 { right: -3%; bottom: 16%; animation-delay: -1s; }
.toast.t2 { left: -6%; bottom: 36%; animation-delay: -3s; }

@media (max-width: 920px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); }
  .hero-stage { height: 118vw; max-height: 640px; }
  .toast.t2 { left: 0; } .toast.t1 { right: 0; }
  .float.sticker img { width: 64px; }
}

/* ---------- Các phần ---------- */
section { padding: clamp(64px, 9vw, 120px) 0; }
.section-head { display: grid; gap: 16px; max-width: 780px; margin-bottom: 48px; }
.section-head p { color: var(--ink-2); font-size: 18px; }

/* Ba chế độ */
.modes-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.mode-card {
  position: relative; overflow: hidden; border-radius: var(--radius-card); padding: 28px 24px 0;
  border: 1px solid var(--line); display: grid; gap: 12px; align-content: start; height: 640px;
}
.mode-card .thread { width: 72px; border-top: 3px dashed var(--c); }
.mode-card .icon { width: 64px; height: 64px; }
.mode-card p { color: var(--ink-2); font-size: 16px; }
.mode-card .phone { max-width: 230px; margin: 10px auto 0; border-radius: 40px; }
.mode-card .phone img { border-radius: 31px; }
.mode-card.solo { --c: var(--solo); background: linear-gradient(180deg, var(--solo-soft), rgba(255, 255, 255, .75) 60%); }
.mode-card.couple { --c: var(--accent); background: linear-gradient(180deg, var(--accent-soft), rgba(255, 255, 255, .75) 60%); }
.mode-card.group { --c: var(--group); background: linear-gradient(180deg, var(--group-soft), rgba(255, 255, 255, .75) 60%); }
.mode-card h3 { color: var(--c); font-size: 26px; }
@media (max-width: 860px) { .modes-grid { grid-template-columns: minmax(0, 1fr); } .mode-card { height: 600px; } }

/* Widget */
.spotlight .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.spotlight .copy { display: grid; gap: 20px; justify-items: start; }
.homescreen {
  position: relative; border-radius: 44px; padding: 30px 26px; max-width: 440px; justify-self: center; width: 100%;
  background: linear-gradient(160deg, #ffd6e2, #ffe9dc 45%, #e4daff); box-shadow: 0 40px 80px -40px rgba(22, 20, 26, .45);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px;
}
.app-dot { aspect-ratio: 1; border-radius: 24%; background: rgba(255, 255, 255, .6); }
.app-dot.on { background: #fff url("../assets/app-icon.png") center / cover; }
.widget-photo, .widget-count { grid-column: span 2; aspect-ratio: 1; border-radius: 24px; overflow: hidden; position: relative; }
.widget-photo { box-shadow: 0 18px 30px -16px rgba(22, 20, 26, .5); }
.widget-photo img { width: 100%; height: 100%; object-fit: cover; }
.widget-photo .from { position: absolute; left: 8px; bottom: 8px; right: 8px; display: flex; align-items: center; gap: 6px;
  padding: 6px 8px; border-radius: 14px; background: rgba(22, 20, 26, .45); color: #fff; font-size: 11.5px; font-weight: 800;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.widget-photo .from i { width: 18px; height: 18px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; font-style: normal; font-size: 10px; }
.widget-count { background: #fff; padding: 14px; display: grid; align-content: space-between; box-shadow: 0 18px 30px -16px rgba(22, 20, 26, .35); }
.widget-count b { font-family: var(--f-display); font-weight: 800; font-size: clamp(30px, 4vw, 40px); color: var(--accent); line-height: 1; }
.widget-count span { font-weight: 800; font-size: 12px; color: var(--ink-2); }
.widget-count hr { border: 0; border-top: 2px dashed var(--accent); opacity: .5; margin: 0; }
@media (max-width: 860px) { .spotlight .wrap { grid-template-columns: minmax(0, 1fr); } }

/* Mùa */
.season { position: relative; border-radius: 40px; padding: clamp(24px, 4vw, 56px); margin-bottom: 28px; overflow: hidden;
  background: rgba(255, 255, 255, .78); border: 1px solid var(--line); }
.season-top { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 28px; margin-bottom: 32px; }
.season-label { font-family: var(--f-display); font-weight: 800; font-size: clamp(64px, 10vw, 128px); line-height: .85;
  color: transparent; -webkit-text-stroke: 2px var(--c); letter-spacing: -0.04em; }
.season-title { display: grid; gap: 10px; flex: 1 1 320px; }
.season-title h2 { font-size: clamp(24px, 3.6vw, 44px); }
.season-title p { color: var(--ink-2); max-width: 54ch; }
.status { display: inline-flex; align-items: center; gap: 8px; width: max-content; padding: 8px 14px; border-radius: 999px;
  font-weight: 800; font-size: 13px; background: var(--ink); color: #fff; }
.status .dot { background: var(--c); }
.status.idea { background: transparent; color: var(--ink-2); border: 1.5px dashed var(--ink-3); }
.status.idea .dot { animation: none; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 30px; }
.feature { display: grid; gap: 8px; align-content: start; padding: 20px; border-radius: 24px; background: #fff; border: 1px solid var(--line); }
.feature img { width: 52px; height: 52px; }
.feature p { color: var(--ink-2); font-size: 15px; }

.phones-row { display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 12px 6px 26px; scrollbar-width: none; }
.phones-row::-webkit-scrollbar { display: none; }
.shot { flex: 0 0 auto; width: min(230px, 62vw); scroll-snap-align: center; display: grid; gap: 14px; justify-items: center; margin: 0; }
.shot .phone { border-radius: 40px; }
.shot .phone img { border-radius: 31px; }
.shot figcaption { font-weight: 800; font-size: 14px; color: var(--ink-2); text-align: center; }

.season.s1 { --c: var(--accent); }
.season.s2 { --c: var(--group); }
.season.s3 { --c: var(--solo); background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .85) 0 14px, rgba(244, 244, 247, .85) 14px 28px); }
.teasers { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.teaser { padding: 24px 20px; border-radius: 24px; border: 2px dashed rgba(154, 151, 163, .55); background: rgba(255, 255, 255, .9); display: grid; gap: 8px; align-content: start; }
.teaser .q { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-family: var(--f-display); font-weight: 800; font-size: 22px; color: var(--solo); background: var(--solo-soft); }
.teaser p { color: var(--ink-2); font-size: 15px; }
.fine { margin-top: 18px; font-size: 13px; color: var(--ink-3); font-weight: 600; }

/* Bộ sưu tập chạy ngang */
.gallery { padding: 30px 0 clamp(64px, 9vw, 120px); overflow: hidden; }
.marquee { display: flex; gap: 22px; width: max-content; animation: marquee 70s linear infinite; padding: 10px 0 34px; }
.marquee .phone { width: 210px; flex: 0 0 auto; border-radius: 40px; }
.marquee .phone img { border-radius: 31px; }
.gallery:hover .marquee { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Lời mời cuối */
.final { padding-top: 0; }
.final-card { position: relative; overflow: hidden; border-radius: 48px; padding: clamp(36px, 6vw, 80px) clamp(20px, 5vw, 80px); text-align: center;
  background: linear-gradient(160deg, #fff 0%, #ffe3ea 55%, #ece6ff 100%); border: 1px solid var(--line); display: grid; gap: 22px; justify-items: center; }
.final-card img.bubbles { width: min(420px, 86%); margin: -24px auto -16px; }
.final-card p { color: var(--ink-2); max-width: 46ch; font-size: 18px; }
.social { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.social a { padding: 10px 18px; border-radius: 999px; background: #fff; border: 1.5px solid var(--line); font-weight: 800; font-size: 14px; text-decoration: none; }

footer { padding: 36px 0 48px; color: var(--ink-3); font-size: 14px; font-weight: 600; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center; }

/* Hiện dần khi cuộn — chỉ khi có JS (tắt JS trang vẫn hiện đủ) */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}
