/* ============================================================
   VibePet — section + component CSS
   ============================================================ */

/* ---------- NAV ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: color-mix(in oklch, var(--bg-canvas) 78%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease, background 200ms ease;
}
.nav.scrolled {
  border-bottom-color: var(--border-subtle);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}
.brand-logo {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  display: inline-grid;
  place-items: center;
  position: relative;
}
.brand-pixel {
  width: 12px;
  height: 12px;
  background:
    linear-gradient(var(--accent-mint), var(--accent-mint)) 0 0/4px 4px no-repeat,
    linear-gradient(var(--accent-blue), var(--accent-blue)) 4px 0/4px 4px no-repeat,
    linear-gradient(var(--accent-amber), var(--accent-amber)) 8px 0/4px 4px no-repeat,
    linear-gradient(var(--accent-coral), var(--accent-coral)) 0 4px/4px 4px no-repeat,
    linear-gradient(var(--text-primary), var(--text-primary)) 4px 4px/4px 4px no-repeat,
    linear-gradient(var(--accent-purple), var(--accent-purple)) 8px 4px/4px 4px no-repeat,
    linear-gradient(var(--accent-blue), var(--accent-blue)) 0 8px/4px 4px no-repeat,
    linear-gradient(var(--accent-mint), var(--accent-mint)) 4px 8px/4px 4px no-repeat,
    linear-gradient(var(--accent-coral), var(--accent-coral)) 8px 8px/4px 4px no-repeat;
}
.brand-logo-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 9px;
  display: block;
  flex: 0 0 auto;
  mix-blend-mode: screen;
}
[data-theme="light"] .brand-logo-img {
  mix-blend-mode: multiply;
}
.foot-brand .brand-logo-img {
  width: 44px;
  height: 44px;
}
.brand-word { letter-spacing: -0.01em; }
.brand-ver {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 14px;
  color: var(--text-secondary);
}
.nav-links a:not(.btn):not(.social-link):hover { color: var(--text-primary); }
.nav-links a:not(.btn) { transition: color 150ms ease; }
.nav-icon-btn, .nav-links a[aria-label] {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  color: var(--text-secondary);
  transition: var(--t-fast);
}
.nav-icon-btn:hover, .nav-links a[aria-label]:hover {
  background: var(--bg-surface);
  color: var(--text-primary);
}
.nav-sep {
  width: 1px;
  height: 16px;
  background: var(--border-subtle);
  margin: 0 2px;
}
.lang-toggle {
  display: inline-flex;
  align-items: center;
  padding: 2px;
  border-radius: 999px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  gap: 0;
}
.lang-btn {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--text-muted);
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: var(--t-fast);
  line-height: 1;
  min-width: 30px;
}
.lang-btn:hover { color: var(--text-primary); }
.lang-btn.active {
  background: var(--bg-elevated);
  color: var(--text-primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.18);
}
[data-theme="light"] .lang-btn.active {
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.nav-cta { padding: 8px 16px; font-size: 13px; }
@media (max-width: 720px) {
  .nav-links a:not([aria-label]):not(.btn) { display: none; }
  .nav-links .nav-sep { display: none; }
  .nav-links { gap: 10px; }
  .nav-links .social-links { display: none; }
  .lang-btn { padding: 4px 8px; font-size: 11px; min-width: 26px; }
  .nav-cta { padding: 7px 12px; font-size: 12px; }
  .brand-logo-img { width: 32px; height: 32px; }
  .nav-inner { height: 56px; }
}
@media (max-width: 380px) {
  .lang-toggle { display: none; }
  .nav-icon-btn { display: none; }
}

/* ---------- SOCIAL ---------- */
.social-links {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.social-link {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  color: var(--text-secondary);
  transition: var(--t-fast);
}
.social-link:hover {
  background: var(--bg-surface);
  color: var(--text-primary);
}
.social-links.variant-labeled {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.social-links.variant-labeled .social-link {
  width: auto;
  height: auto;
  padding: 6px 10px 6px 8px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
  background: transparent;
}
.social-links.variant-labeled .social-link:hover {
  color: var(--text-primary);
  background: var(--bg-surface);
}

/* QR popover */
.social-link.has-qr { position: relative; }
.social-link.has-qr .social-qr-pop {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  width: 168px;
  transform: translateX(-50%) translateY(4px);
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 18px 40px -16px rgba(0,0,0,.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.variant-labeled .social-link.has-qr .social-qr-pop {
  bottom: auto;
  top: 50%;
  left: calc(100% + 10px);
  transform: translateY(-50%) translateX(-4px);
}
.social-link.has-qr .social-qr-pop img {
  width: 144px;
  height: 144px;
  max-width: none;
  display: block;
  border-radius: 4px;
  background: #fff;
  padding: 0;
  border: 6px solid #fff;
  box-sizing: border-box;
  image-rendering: pixelated;
}
.social-qr-cap {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.social-link.has-qr:hover .social-qr-pop,
.social-link.has-qr:focus-visible .social-qr-pop {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.variant-labeled .social-link.has-qr:hover .social-qr-pop,
.variant-labeled .social-link.has-qr:focus-visible .social-qr-pop {
  transform: translateY(-50%) translateX(0);
}

/* On small screens, flip footer-side QR popover above the link so it stays in viewport */
@media (max-width: 720px) {
  .variant-labeled .social-link.has-qr .social-qr-pop {
    top: auto;
    bottom: calc(100% + 10px);
    left: 0;
    transform: translateX(0) translateY(4px);
  }
  .variant-labeled .social-link.has-qr:hover .social-qr-pop,
  .variant-labeled .social-link.has-qr:focus-visible .social-qr-pop {
    transform: translateX(0) translateY(0);
  }
}

/* ---------- HERO ---------- */
.hero {
  padding-top: 88px;
  padding-bottom: var(--section-py);
  overflow: hidden;
  position: relative;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -10% -20% auto;
  height: 600px;
  background:
    radial-gradient(60% 50% at 50% 0, color-mix(in oklch, var(--accent-blue) 12%, transparent), transparent 70%),
    radial-gradient(40% 35% at 80% 20%, color-mix(in oklch, var(--accent-mint) 8%, transparent), transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.hero .container { position: relative; z-index: 1; }
.hero-eyebrow { margin-bottom: 28px; }
.hero-h1 { max-width: 14ch; }
.hero-accent {
  color: var(--accent-blue);
  font-style: italic;
  font-weight: 700;
}
[data-accent="mint"] .hero-accent { color: var(--accent-mint); }
[data-accent="coral"] .hero-accent { color: var(--accent-coral); }
.hero-sub {
  margin-top: 28px;
  max-width: 60ch;
  font-size: clamp(17px, 1.6vw, 20px);
  color: var(--text-secondary);
}
.hero-cta { margin-top: 40px; }
.hero-meta {
  margin-top: 28px;
  font-size: 13px;
  color: var(--text-secondary);
  flex-wrap: wrap;
}
.hero-stage {
  margin-top: 64px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.hero-stage-caption {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  background: var(--bg-surface);
}

/* ---------- MENUBAR + NOTCH ---------- */
.notch-capsule-wrap { display: contents; }
.menubar {
  width: min(880px, 100%);
  height: 28px;
  background: var(--bg-deeper);
  border: 1px solid var(--border-subtle);
  border-radius: 12px 12px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0 auto;
  position: relative;
}
[data-theme="light"] .menubar { background: #2a2a2a; color: #d4d4d4; border-color: rgba(255,255,255,.06); }
.menubar-left, .menubar-right { display: flex; align-items: center; gap: 14px; }
.menubar-right { font-size: 11px; }
.menubar-item { color: inherit; }
.apple-glyph { width: 14px; height: 14px; display: inline-grid; place-items: center; color: currentColor; opacity: 0.8; }

.notch-stage {
  width: min(880px, 100%);
  margin: 0 auto;
  background: var(--bg-deeper);
  border: 1px solid var(--border-subtle);
  border-top: none;
  border-radius: 0 0 18px 18px;
  position: relative;
  padding: 8px 0 32px;
  display: flex;
  justify-content: center;
  min-height: 120px;
  transition: min-height 350ms var(--ease);
}
[data-theme="light"] .notch-stage { background: #2a2a2a; }
.notch-collapsed { min-height: 60px; }
.notch-hover { min-height: 90px; }
.notch-expanded { min-height: 480px; padding-bottom: 24px; }

.notch-pill {
  position: relative;
  background: #0a0a0a;
  color: #f5f5f5;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: var(--shadow-capsule);
  transition: all 300ms var(--ease);
  overflow: hidden;
  margin-top: -1px;
}

/* states */
.notch-collapsed .notch-pill {
  width: 180px;
  height: 32px;
  border-top-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
}
.notch-hover .notch-pill {
  width: 360px;
  height: 56px;
  border-top-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
  border-bottom-left-radius: 18px !important;
  border-bottom-right-radius: 18px !important;
}
.notch-expanded .notch-pill {
  width: min(640px, 92%);
  height: auto;
  min-height: 440px;
  border-top-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
  border-bottom-left-radius: 24px !important;
  border-bottom-right-radius: 24px !important;
}
.notch-stage[data-shape="rect"] .notch-pill { border-radius: 12px !important; }

/* capsule innards */
.cap-collapsed {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
}
.cap-status { font-size: 11px; color: rgba(245,245,245,.7); }

.cap-hover {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
}
.cap-hover-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cap-hover-title { font-size: 13px; font-weight: 500; color: #f5f5f5; }
.cap-hover-sub { font-size: 11px; color: rgba(245,245,245,.55); }

.cap-expanded {
  padding: 14px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: #f5f5f5;
}
.cap-exp-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 6px; }
.cap-tool { font-weight: 600; font-size: 13px; }
.icon-btn { color: rgba(245,245,245,.55); display: inline-grid; place-items: center; padding: 4px; border-radius: 6px; }
.icon-btn:hover { color: #f5f5f5; background: rgba(255,255,255,.06); }

.cap-tabs { display: flex; gap: 6px; padding-bottom: 4px; border-bottom: 1px solid rgba(255,255,255,.06); }
.cap-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: transparent;
  border: 1px solid transparent;
  color: rgba(245,245,245,.7);
}
.cap-tab.active {
  background: rgba(255,122,89,.12);
  border-color: rgba(255,122,89,.3);
  color: #f5f5f5;
}
.tool-mark {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  display: inline-grid;
  place-items: center;
  letter-spacing: -0.02em;
  color: #fff;
  overflow: hidden;
  flex: 0 0 auto;
}
.tool-mark img {
  width: 78%;
  height: 78%;
  object-fit: contain;
  display: block;
}
.tool-mark.lg { width: 28px; height: 28px; font-size: 11px; border-radius: 7px; }
.tool-mark.lg img { width: 82%; height: 82%; }

.cap-quota { display: flex; flex-direction: column; gap: 10px; padding: 8px 2px; }
.quota-row {
  display: grid;
  grid-template-columns: 1fr 2fr 80px 56px;
  align-items: center;
  gap: 12px;
  font-size: 12px;
}
.quota-label { color: rgba(245,245,245,.85); font-weight: 500; }
.quota-bar { width: 100%; }
.quota-value { font-size: 11px; font-weight: 600; text-align: right; }
.quota-tail { font-size: 10px; text-align: right; }

.cap-divider { height: 1px; background: rgba(255,255,255,.06); margin: 4px 0 2px; }
.cap-msg-header { display: flex; align-items: center; justify-content: space-between; padding: 0 2px; }
.msg-icon-btn {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  border: 1px solid rgba(255,255,255,.08);
  display: inline-grid;
  place-items: center;
  color: rgba(245,245,245,.65);
}
.msg-icon-btn:hover { color: #f5f5f5; background: rgba(255,255,255,.05); }
.msg-icon-btn.danger { border-color: rgba(255,122,89,.3); color: #FF7A59; }
.msg-icon-btn.danger:hover { background: rgba(255,122,89,.1); }

.cap-msgs { display: flex; flex-direction: column; gap: 2px; }
.cap-msg-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 4px;
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.cap-msg-row:last-child { border-bottom: none; }
.cap-msg-left { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cap-msg-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; min-width: 130px; }
.cap-msg-tool { font-size: 11px; font-weight: 600; }
.cap-msg-tag {
  font-size: 9px;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(0,214,163,.12);
  color: var(--accent-mint);
  letter-spacing: 0.02em;
}
.cap-msg-title { font-size: 12px; color: #f5f5f5; }
.cap-msg-body { font-size: 11px; color: rgba(245,245,245,.55); line-height: 1.4; }

.msg-mini {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 500;
  border: 1px solid rgba(255,255,255,.1);
  background: transparent;
  color: rgba(245,245,245,.75);
}
.msg-mini[data-color="mint"] { border-color: rgba(0,214,163,.35); color: var(--accent-mint); }
.msg-mini[data-color="coral"] { border-color: rgba(255,122,89,.35); color: var(--accent-coral); }
.msg-mini[data-color="amber"] { border-color: rgba(255,181,71,.35); color: var(--accent-amber); }
.msg-mini.primary {
  border-color: rgba(0,107,255,.45);
  color: var(--accent-blue);
  background: rgba(0,107,255,.08);
}
.msg-mini:hover { background: rgba(255,255,255,.04); }
.msg-mini.primary:hover { background: rgba(0,107,255,.16); }

.cap-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,.05);
}

/* ---------- SECTION HEADING ---------- */
.section-heading {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 720px;
  margin-bottom: 56px;
}
.section-heading.align-center { margin-left: auto; margin-right: auto; align-items: center; text-align: center; }
.muted-strike {
  color: var(--text-muted);
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--accent-coral);
}
