/* Shared look for the content pages (blog index + posts), matching the chat homepage
   in index.html: transparent nav over drifting brand blobs, the homepage's logo lockup, and the running brand gradient on buttons. */

@font-face {
  font-family: 'Codec Pro Bold';
  src: url('/CodecPro-Bold-wordmark.woff2') format('woff2'), url('/CodecPro-Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #FFFFFF;
  --panel: #FFFFFF;
  --line: #E9EAF0;
  --line-soft: #F1F2F6;
  --text: #191A1F;
  --text-dim: #5F636D;
  --text-dimmer: #9A9DA7;
  --soft: #F7F8FA;
  --chip-bg: rgba(22, 24, 34, 0.02);
  --hover-bg: rgba(22, 24, 34, 0.035);
  --hover-border: #D8DAE3;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

body { background: var(--bg); color: var(--text); font-family: 'Inter', system-ui, -apple-system, sans-serif; -webkit-font-smoothing: antialiased; }
.text-dim { color: var(--text-dim); }
.text-dimmer { color: var(--text-dimmer); }
.border-softer { border-color: var(--line-soft); }

/* ---------- Background: drifting brand blobs ---------- */
.bg-aura { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.bg-aura { overflow: hidden; }
.blob { position: absolute; width: 46vmax; height: 46vmax; border-radius: 50%; filter: blur(70px); will-change: transform; }
.blob-1 { background: #CA8BFA; opacity: .16; top: -20vmax; right: -14vmax; animation: drift1 26s ease-in-out infinite alternate; }
.blob-2 { background: #FFA67B; opacity: .13; bottom: -24vmax; left: -16vmax; animation: drift2 30s ease-in-out infinite alternate; }
.blob-3 { background: #77CEF7; opacity: .13; bottom: -22vmax; right: -18vmax; animation: drift3 34s ease-in-out infinite alternate; }
@media (max-width: 1023px) { .blob { animation: none; will-change: auto; } } /* still blobs on phones: smoother scrolling */
@keyframes drift1 { to { transform: translate(-12vmax, 9vmax) scale(1.12); } }
@keyframes drift2 { to { transform: translate(14vmax, -7vmax) scale(1.15); } }
@keyframes drift3 { to { transform: translate(-9vmax, -11vmax) scale(.94); } }

/* ---------- Running brand gradient (headings, buttons, tags) ---------- */
@keyframes shimmer { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }
.heading-gradient {
  background-image: linear-gradient(90deg, #FFA67B 0%, #FF97BF 25%, #CA8BFA 50%, #77CEF7 75%, #FF97BF 100%);
  background-size: 200% 100%; animation: shimmer 7s ease-in-out infinite alternate;
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.heading-solid { color: var(--text); }

.btn-primary {
  color: #fff; transition: filter .2s ease, box-shadow .2s ease;
  background-image: linear-gradient(90deg, #FFA67B 0%, #FF97BF 25%, #CA8BFA 50%, #77CEF7 75%, #FF97BF 100%);
  background-size: 200% 100%; animation: shimmer 7s ease-in-out infinite alternate;
  box-shadow: 0 1px 2px rgba(20, 15, 15, 0.08); text-shadow: 0 1px 1px rgba(0, 0, 0, 0.10);
}
.btn-primary:hover { filter: brightness(.93); box-shadow: 0 1px 2px rgba(20, 15, 15, 0.1); }
.btn-ghost { border: 1px solid rgba(46, 40, 54, 0.3); color: var(--text); background: rgba(255, 255, 255, .6); transition: all .2s ease; }
.btn-ghost:hover { background: var(--hover-bg); border-color: var(--hover-border); }

/* ---------- Nav (same as the chat homepage) ---------- */
/* EN | VI: plain text, the current language in brand violet */
.lang-toggle span { color: var(--text-dimmer); transition: color .15s ease; }
.lang-toggle:hover span:not(.on):not(.sep) { color: var(--text); }
.lang-toggle .on { color: #CA8BFA; font-weight: 600; } /* the violet stop of the brand gradient */
.lang-toggle .sep { color: #D6D8E0; }
/* Not sticky: it scrolls away with the page, so it never needs a backdrop of its own. */
.site-nav { position: relative; z-index: 50; view-transition-name: site-header; }
.nav-link { color: var(--text-dim); transition: color .15s ease; }
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--text); }

.brand { display: inline-flex; align-items: center; gap: 7.9px; }
.brand-symbol {
  height: 18.333px; width: 18.333px; display: block;
  transform: scale(2.8364152075); margin-left: 1px; margin-right: 3px; position: relative; top: -1.2px;
}
.brand-wordmark {
  font-family: 'Codec Pro Bold', sans-serif; font-size: 22px; letter-spacing: -0.05em; line-height: 1;
  color: var(--text); display: block; position: relative; top: 3px; margin-left: -1.2px;
}
@media (max-width: 339px) { .site-nav .brand-wordmark { display: none; } }
/* Desktop: the lockup scales with the 32px CTA (x1.143 of the homepage), centred on it. */
@media (min-width: 1024px) {
  .site-nav .brand { gap: 9.03px; position: relative; top: 2.5px; }
  .site-nav .brand-symbol { height: 20.95px; width: 20.95px; margin-left: 1.14px; margin-right: 3.43px; top: -1.37px; }
  .site-nav .brand-wordmark { font-size: 25.14px; top: 3.43px; margin-left: -1.37px; }
}

/* Round menu button (mobile): two lines that cross into an X when the menu is open. */
.hamburger {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 32px; height: 32px; border-radius: 999px; color: var(--text);
  background: rgba(255, 255, 255, .85); border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(30, 34, 54, .06), 0 6px 16px -10px rgba(30, 34, 54, .3);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: border-color .2s ease, box-shadow .2s ease, transform .15s ease;
}
.hamburger:hover { border-color: #D8DAE3; box-shadow: 0 1px 2px rgba(30, 34, 54, .06), 0 8px 18px -10px rgba(30, 34, 54, .36); }
.hamburger:active { transform: scale(.94); }
@media (min-width: 1024px) { .hamburger { display: none; } }
.hb-lines { position: relative; width: 13px; height: 8px; }
.hb-lines i { position: absolute; left: 0; width: 100%; height: 1.6px; border-radius: 2px; background: currentColor; transition: top .3s var(--ease), transform .3s var(--ease); }
.hb-lines i:first-child { top: 0; }
.hb-lines i:last-child { top: 6.4px; }
.hamburger.open .hb-lines i:first-child { top: 3.2px; transform: rotate(45deg); }
.hamburger.open .hb-lines i:last-child { top: 3.2px; transform: rotate(-45deg); }
#mobile-menu {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 60; display: none; padding: 8px;
  background: #fff; border-bottom: 1px solid var(--line);
  box-shadow: 0 30px 64px -30px rgba(30, 34, 54, 0.16), 0 0 0 1px rgba(18, 20, 32, 0.03) inset;
}
#mobile-menu.open { display: block; }
@media (min-width: 1024px) { #mobile-menu { display: none !important; } }
.mobile-link { display: flex; align-items: center; gap: 8px; padding: 13px 14px; border-radius: 9px; color: var(--text); font-size: 15px; transition: background .15s ease; }
.mobile-link:hover { background: var(--hover-bg); }

/* ---------- Page pieces ---------- */
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--text-dimmer); }
.tone-lavender { background: none; }
.section-glow { display: none; }
.divider { height: 1px; max-width: 48rem; margin-inline: auto; background: linear-gradient(90deg, transparent, var(--line) 15%, var(--line) 85%, transparent); }
.card { background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 1px 2px rgba(20, 15, 15, .04), 0 18px 38px -22px rgba(30, 34, 54, .22); }

.faq-item { border-bottom: 1px solid var(--line); }
.faq-q { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0; background: none; border: 0; cursor: pointer; text-align: left; font-size: 15px; font-weight: 500; color: var(--text); }
.faq-q .faq-icon { flex: 0 0 auto; transition: transform .2s ease; color: #CA8BFA; }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-a { overflow: hidden; max-height: 0; transition: max-height .25s ease; }
.faq-a-inner { padding-bottom: 18px; color: var(--text-dim); font-size: 14px; line-height: 1.6; }


/* ---------- Footer (same as the chat homepage) ---------- */
.site-footer { border-top: 1px solid var(--line); }
.foot-h { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-dimmer); margin-bottom: 14px; }
.foot-link { display: block; width: fit-content; margin-top: 10px; font-size: 14.5px; color: var(--text-dim); transition: color .15s ease; }
.foot-h + .foot-link { margin-top: 0; }
.foot-link:hover { color: var(--text); }
.foot-social { width: 36px; height: 36px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; background: #fff; border: 1px solid #D9DBE4; color: var(--text-dim); box-shadow: 0 1px 2px rgba(30, 34, 54, .06), 0 10px 28px -14px rgba(30, 34, 54, .22); transition: color .15s ease; }
.foot-social:hover { color: var(--text); }

/* Staggered entrance */
.rise { opacity: 0; animation: rise .7s var(--ease) forwards; animation-delay: var(--d, 0s); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Smooth page-to-page navigation between the chat homepage and the blog: the header stays put
   while the content cross-fades and rises in. Browsers without cross-document view transitions
   simply navigate as usual. */
@view-transition { navigation: auto; }
/* Old page fades out, then the whole new page eases in (fade + slight rise). While this runs the
   per-element .rise is skipped (.vt-in, set on pagereveal), so there is one calm motion, not two. */
::view-transition-old(root) { animation: vt-out .15s ease-in both; }
::view-transition-new(root) { animation: vt-in .4s cubic-bezier(.22, 1, .36, 1) .08s both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(16px); } }
.vt-in .rise { opacity: 1; animation: none; }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
