/* Wingman AI — one stylesheet for the landing page, support and the legal pages.
   Brand from the app (lib/core/theme/app_colors.dart): black, rose, purple, lavender, blush. */
@font-face { font-family: "CrossBoxed"; src: url("/fonts/CrossBoxed.ttf") format("truetype"); font-weight: 900; font-display: swap; }
@font-face { font-family: "BRCobane"; src: url("/fonts/BRCobane-Regular.otf") format("opentype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "BRCobane"; src: url("/fonts/BRCobane-SemiBold.otf") format("opentype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "BRCobane"; src: url("/fonts/BRCobane-Bold.otf") format("opentype"); font-weight: 700; font-display: swap; }

:root {
  --black: #000000;
  --surface: #161118;
  --bubble-them: #2d2d2d;
  --bubble-me: #5e3ca8;
  --rose: #ff87be;
  --purple: #b455ff;
  --lavender: #b4affc;
  --blush: #ffd1e6;
  --text: #f4eef6;
  --muted: #b9b0bd;
  --line: #3a3140;
  --hot: linear-gradient(100deg, var(--rose), var(--purple));
  --soft: linear-gradient(100deg, var(--blush), var(--lavender));
  --body: "BRCobane", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "CrossBoxed", "BRCobane", system-ui, sans-serif;
}
/* CrossBoxed has no Vietnamese diacritics: Vietnamese pages set headings in the body family. */
:root:lang(vi), :root:lang(tr) { --display: "BRCobane", system-ui, sans-serif; }
/* Japanese / Korean: no brand font covers them — the system CJK font, bold. */
:root:lang(ja), :root:lang(ko) { --display: system-ui, -apple-system, "Hiragino Sans", "Apple SD Gothic Neo", "Noto Sans CJK JP", sans-serif; --body: system-ui, -apple-system, "Hiragino Sans", "Apple SD Gothic Neo", "Noto Sans CJK JP", sans-serif; }
:lang(vi) .hero h1, :lang(vi) .doc h1, :lang(vi) .flow h2, :lang(vi) .end h2,
:lang(tr) .hero h1, :lang(tr) .flow h2, :lang(tr) .end h2, :lang(ja) .hero h1, :lang(ja) .flow h2, :lang(ja) .end h2,
:lang(ko) .hero h1, :lang(ko) .flow h2, :lang(ko) .end h2 { font-weight: 700; letter-spacing: -.02em; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--black);
  color: var(--text);
  font: 400 17px/1.6 var(--body);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blush); text-underline-offset: 3px; }
a:hover { color: var(--rose); }
:focus-visible { outline: 3px solid var(--lavender); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }

/* Top bar */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 0; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.brand img { width: 40px; height: 40px; border-radius: 10px; }
.brand span { white-space: nowrap; font: 900 22px/1 "CrossBoxed", var(--body); letter-spacing: .01em; background: var(--soft); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bar nav { display: flex; gap: 22px; }
.bar nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px; }
.bar nav a:hover, .bar nav a[aria-current="page"] { color: var(--text); }
.bar .lang { white-space: nowrap; margin-left: 6px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-size: 14px; font-weight: 600; text-decoration: none; }
.bar .lang:hover { border-color: var(--lavender); color: var(--text); }

/* Store buttons */
.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.store {
  display: inline-flex; flex-direction: column; justify-content: center;
  min-width: 176px; padding: 10px 20px; border-radius: 14px;
  background: var(--text); color: var(--black); text-decoration: none; line-height: 1.15;
}
.store small { font-size: 12px; font-weight: 600; opacity: .7; }
.store strong { font-size: 19px; font-weight: 700; }
.store:hover { color: var(--black); background: var(--blush); }
.store.alt { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line); }
.store.alt:hover { box-shadow: inset 0 0 0 1.5px var(--rose); color: var(--text); background: transparent; }

/* Hero: the product's own moment — their message, then the reply Wingman writes */
.hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; padding: 56px 0 88px; }
.hero h1 {
  margin: 0 0 22px;
  font: 900 clamp(46px, 7vw, 92px)/.95 var(--display);
  letter-spacing: -.005em;
  background: var(--soft); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lead { margin: 0 0 32px; max-width: 34ch; font-size: 20px; color: var(--muted); }

.thread { display: flex; flex-direction: column; gap: 14px; padding: 28px; border-radius: 28px; background: var(--surface); border: 1px solid var(--line); }
.who { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; color: var(--muted); font-weight: 600; font-size: 15px; }
.who i { width: 30px; height: 30px; border-radius: 50%; background: var(--bubble-them); }
.bubble { max-width: 82%; padding: 13px 17px; border-radius: 20px; font-size: 17px; line-height: 1.4; }
.bubble.them { align-self: flex-start; background: var(--bubble-them); border-bottom-left-radius: 6px; }
.bubble.me { align-self: flex-end; background: var(--bubble-me); border: 1.5px solid var(--rose); border-bottom-right-radius: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.chips span { padding: 6px 13px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-size: 14px; font-weight: 600; }
.chips span.on { border-color: var(--rose); color: var(--blush); }

/* The single orchestrated moment: the reply types itself in once */
.typing .reply { visibility: hidden; }
.typing.run .reply { visibility: visible; animation: rise .45s cubic-bezier(.2,.8,.2,1) both; animation-delay: .9s; }
.dots { align-self: flex-end; display: flex; gap: 5px; padding: 14px 16px; border-radius: 18px; background: var(--bubble-me); }
.dots b { width: 7px; height: 7px; border-radius: 50%; background: var(--blush); opacity: .5; animation: blink 1s infinite; }
.dots b:nth-child(2) { animation-delay: .15s; } .dots b:nth-child(3) { animation-delay: .3s; }
.typing.run .dots { animation: gone .25s ease .85s forwards; }
@keyframes rise { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes blink { 50% { opacity: 1; } }
@keyframes gone { to { opacity: 0; height: 0; padding: 0; margin: -7px 0; } }
@media (prefers-reduced-motion: reduce) {
  .typing .reply { visibility: visible; }
  .typing .dots { display: none; }
  .typing.run .reply { animation: none; }
}

/* What it does: a stepped flow (it really is a sequence) beside real screenshots */
.flow { padding: 24px 0 96px; }
.flow h2, .section-title { margin: 0 0 40px; font: 900 clamp(32px, 4.4vw, 52px)/1 var(--display); color: var(--text); }
.flow-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.flow figure { margin: 0; }
.flow figure img { width: 100%; border-radius: 22px; border: 1px solid var(--line); aspect-ratio: 9 / 16; object-fit: cover; background: var(--surface); }
.flow figcaption { margin-top: 18px; }
.flow figcaption strong { display: block; font-size: 19px; margin-bottom: 4px; }
.flow figcaption span { color: var(--muted); font-size: 15px; }

/* Plain promises */
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 96px; }
.facts div { padding: 34px 28px 34px 0; }
.facts div + div { padding-left: 28px; border-left: 1px solid var(--line); }
.facts h3 { margin: 0 0 8px; font-size: 19px; }
.facts p { margin: 0; color: var(--muted); font-size: 15px; }

.end { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px; padding: 0 0 96px; }
.end h2 { margin: 0; font: 900 clamp(30px, 4vw, 48px)/1 var(--display); background: var(--hot); -webkit-background-clip: text; background-clip: text; color: transparent; }

footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; justify-content: space-between; }
footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
footer a { color: var(--muted); }

/* Long-form pages (support, terms, privacy) */
.doc { width: min(720px, 100% - 40px); margin: 24px auto 96px; }
.doc h1 { margin: 24px 0 8px; font: 900 clamp(38px, 6vw, 60px)/1 var(--display); background: var(--soft); -webkit-background-clip: text; background-clip: text; color: transparent; }
.doc .updated { color: var(--muted); margin: 0 0 36px; }
.doc h2 { margin: 44px 0 12px; font-size: 22px; line-height: 1.3; }
.doc h3 { margin: 28px 0 8px; font-size: 18px; }
.doc p, .doc li { color: #e2dae6; }
.doc ul { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 15px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
.doc th { color: var(--text); font-weight: 600; }
.doc td { color: #d6cdda; }
.doc .toc { margin: 28px 0; }
.doc .toc ol { margin: 8px 0 0; padding-left: 22px; columns: 2; column-gap: 32px; }
.doc .toc li { margin: 3px 0; break-inside: avoid; }
.doc .tbl { overflow-x: auto; }
.doc .box { padding: 20px 22px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.doc details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.doc summary { cursor: pointer; font-weight: 600; font-size: 18px; color: var(--text); }
.doc details p { margin: 10px 0 0; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 24px; }
  .flow-grid { grid-template-columns: repeat(2, 1fr); }
  .facts { grid-template-columns: 1fr; }
  .facts div, .facts div + div { padding: 24px 0; border-left: 0; }
  .facts div + div { border-top: 1px solid var(--line); }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .bar nav { gap: 14px; align-items: center; }
  .brand img { width: 32px; height: 32px; }
  .brand span { font-size: 18px; }
  .bar nav a.hide-sm { display: none; }
  .thread { padding: 20px; }
  .store { flex: 1 1 100%; }
  .doc .toc ol { columns: 1; }
  .doc table, .doc thead, .doc tbody, .doc tr, .doc th, .doc td { display: block; }
  .doc thead { display: none; }
  .doc tr { border-bottom: 1px solid var(--line); padding: 10px 0; }
  .doc td { border: 0; padding: 2px 0; }
}

/* Language menu (header): 11 landing languages, legal pages en + vi */
.langs { position: relative; margin-left: 6px; }
.langs summary { list-style: none; cursor: pointer; white-space: nowrap; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-size: 14px; font-weight: 600; }
.langs summary::-webkit-details-marker { display: none; }
.langs summary::after { content: " ▾"; font-size: 11px; }
.langs[open] summary, .langs summary:hover { border-color: var(--lavender); color: var(--text); }
.langs > div { position: absolute; right: 0; top: calc(100% + 8px); z-index: 10; display: grid; min-width: 180px; padding: 6px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 12px 40px rgba(0,0,0,.5); }
.bar .langs a { padding: 8px 12px; border-radius: 10px; color: var(--muted); font-size: 15px; font-weight: 600; text-decoration: none; }
.bar .langs a:hover, .bar .langs a[aria-current] { background: var(--black); color: var(--text); }
