/* ===================================================================
   LabxTV 官方網站 — 淺色影視風格樣式
   =================================================================== */

/* ---------- Design Tokens ---------- */
:root {
  --color-bg: #f6eee8;
  --color-bg-soft: #fbf6f1;
  --color-surface: #ffffff;
  --color-surface-2: #fff8f1;
  --color-text: #2b2118;
  --color-text-soft: #6b5a4c;
  --color-text-mute: #9b8b7d;
  --color-border: #ece0d3;
  --color-primary: #ff7a1a;
  --color-primary-dark: #f05e00;
  --color-primary-soft: #ffe4cc;
  --color-accent: #ff5e3a;
  --color-android: #3ddc84;
  --color-ios: #111111;
  --color-navy: #1f2937;
  --color-navy-deep: #161d27;

  --shadow-sm: 0 2px 8px rgba(43, 33, 24, .06);
  --shadow-md: 0 8px 24px rgba(43, 33, 24, .08);
  --shadow-lg: 0 20px 50px rgba(43, 33, 24, .12);
  --shadow-primary: 0 10px 24px rgba(255, 122, 26, .35);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --font-sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, -apple-system, sans-serif;
  --font-display: "Playfair Display", "Noto Sans TC", serif;

  --container: 1180px;
  --header-h: 72px;
  --transition: .25s cubic-bezier(.4, 0, .2, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
p { margin: 0; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 96px 0;
  position: relative;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 238, 232, .85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.site-header.scrolled {
  background: rgba(251, 246, 241, .92);
  border-bottom-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}
.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 32px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  font-size: 22px;
  letter-spacing: -.02em;
  color: var(--color-text);
  flex-shrink: 0;
}
.logo-image {
  width: 36px;
  height: 28px;
}
.logo-text span { color: var(--color-primary); }
.logo-mark { display: inline-flex; }

.main-nav {
  display: flex;
  gap: 8px;
  margin-left: 16px;
}
.nav-link {
  position: relative;
  padding: 8px 16px;
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text-soft);
  border-radius: 999px;
  transition: color var(--transition), background var(--transition);
}
.nav-link:hover { color: var(--color-text); background: var(--color-surface); }
.nav-link.active { color: var(--color-text); background: var(--color-surface); box-shadow: var(--shadow-sm); }

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
.search-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-soft);
  background: var(--color-surface);
  transition: color var(--transition), transform var(--transition);
}
.search-btn:hover { color: var(--color-primary); transform: scale(1.06); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: #fff;
  box-shadow: var(--shadow-primary);
}
.btn-primary:hover { box-shadow: 0 14px 30px rgba(255, 122, 26, .45); }

.btn-text { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.btn-label-small { font-size: 10px; font-weight: 500; opacity: .85; letter-spacing: .02em; }
.btn-label-big { font-size: 15px; font-weight: 700; }

.btn-android {
  background: #0e1116;
  color: #fff;
  box-shadow: 0 10px 24px rgba(14, 17, 22, .28);
}
.btn-android:hover { box-shadow: 0 14px 30px rgba(14, 17, 22, .38); }
.btn-ios {
  background: #0e1116;
  color: #fff;
  box-shadow: 0 10px 24px rgba(14, 17, 22, .28);
}
.btn-ios:hover { box-shadow: 0 14px 30px rgba(14, 17, 22, .38); }
.btn-lg { padding: 16px 26px; }
.btn-lg .btn-label-big { font-size: 17px; }
.btn-lg .btn-label-small { font-size: 11px; }

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--color-surface);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Search panel */
.search-panel {
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
  padding: 16px 0;
  animation: slideDown .3s ease;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.search-form {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 6px 18px;
  color: var(--color-text-mute);
}
.search-form:focus-within { border-color: var(--color-primary); box-shadow: 0 0 0 4px var(--color-primary-soft); }
.search-form input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 15px;
  color: var(--color-text);
  padding: 10px 0;
}
.search-close { color: var(--color-text-mute); padding: 6px; border-radius: 50%; transition: color var(--transition); }
.search-close:hover { color: var(--color-text); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 56px 0 72px;
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .5;
}
.hero-glow-1 {
  width: 520px; height: 520px;
  background: radial-gradient(circle, #ffd9b3 0%, transparent 70%);
  top: -160px; left: -120px;
}
.hero-glow-2 {
  width: 480px; height: 480px;
  background: radial-gradient(circle, #ffc4c4 0%, transparent 70%);
  bottom: -180px; right: -80px;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: 56px;
  position: relative;
}
.hero-copy { max-width: 560px; }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-soft);
  margin-bottom: 24px;
}
.hero-eyebrow .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--color-primary);
  box-shadow: 0 0 0 4px var(--color-primary-soft);
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 5.5vw, 68px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -.02em;
  margin-bottom: 20px;
}
.hero-title .brand-inline {
  color: var(--color-primary);
  font-style: italic;
}
.hero-title .accent { color: var(--color-accent); }
.hero-sub {
  font-size: 17px;
  color: var(--color-text-soft);
  margin-bottom: 32px;
  max-width: 460px;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 32px;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
}
.hero-meta li { font-size: 14px; color: var(--color-text-soft); }
.hero-meta strong {
  display: block;
  font-size: 22px;
  font-weight: 900;
  color: var(--color-text);
}

/* Hero visual */
.hero-visual {
  position: relative;
  aspect-ratio: 4/3;
}
.hero-photo {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background:
    radial-gradient(circle at 70% 30%, #ffd9a8 0%, transparent 45%),
    linear-gradient(135deg, #f5d5b0 0%, #e8b98a 45%, #c88a5a 100%);
}
.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 70%, rgba(255,255,255,.18) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(255,180,120,.3) 0%, transparent 45%);
  pointer-events: none;
  z-index: 1;
}
.hero-photo img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-photo-fallback {
  display: none;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: rgba(255,255,255,.8);
  background: transparent;
  position: relative;
  z-index: 2;
}
.tv-screen {
  position: absolute;
  top: 12%;
  left: 46%;
  width: 46%;
  height: 42%;
  border-radius: 10px;
  background: rgba(0,0,0,.55);
  overflow: hidden;
  box-shadow: inset 0 0 30px rgba(0,0,0,.4);
}
.tv-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 2px;
  width: 100%;
  height: 100%;
  padding: 4px;
}
.tv-grid span {
  background: linear-gradient(135deg, #4a90e2, #9013fe);
  border-radius: 2px;
  opacity: .85;
  animation: tvFlicker 4s ease-in-out infinite;
}
.tv-grid span:nth-child(2n) { animation-delay: .5s; background: linear-gradient(135deg, #ff7a1a, #ff5e3a); }
.tv-grid span:nth-child(3n) { animation-delay: 1s; background: linear-gradient(135deg, #7c3aed, #ec4899); }
@keyframes tvFlicker {
  0%, 100% { opacity: .85; }
  50% { opacity: .5; }
}
.floating-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  font-size: 13px;
  animation: float 4s ease-in-out infinite;
  z-index: 3;
}
.floating-card strong { display: block; font-size: 14px; }
.floating-card small { color: var(--color-text-mute); }
.card-icon { font-size: 22px; }
.card-left { top: 8%; left: -6%; animation-delay: 0s; }
.card-right { bottom: 10%; right: -5%; animation-delay: 1.2s; }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ---------- Section heads ---------- */
.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}
.section-eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 12px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(30px, 3.5vw, 42px);
  font-weight: 900;
  margin-bottom: 14px;
}
.section-sub { color: var(--color-text-soft); font-size: 16px; }

/* ---------- Library / Categories ---------- */
.library { background: var(--color-bg-soft); }
.cat-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}
.cat-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
}
.cat-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.cat-img {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: linear-gradient(135deg, #ff9a3c, #ff5e3a);
}
.cat-card[data-cat="romance"] .cat-img { background: linear-gradient(135deg, #ff6b9d, #c44569, #6c3483); }
.cat-card[data-cat="family"] .cat-img { background: linear-gradient(135deg, #f6d365, #fda085, #c0392b); }
.cat-card[data-cat="city"] .cat-img { background: linear-gradient(135deg, #4a90e2, #7c3aed, #1a1a2e); }
.cat-card[data-cat="suspense"] .cat-img { background: linear-gradient(135deg, #2c3e50, #4a4a4a, #0f0f1e); }
.cat-card[data-cat="featured"] .cat-img { background: linear-gradient(135deg, #f093fb, #f5576c, #7c3aed); }

.cat-img::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,.25) 0%, transparent 50%),
    radial-gradient(circle at 70% 80%, rgba(0,0,0,.2) 0%, transparent 50%);
  z-index: 1;
}
.cat-img img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease, opacity .4s ease;
}
.cat-card:hover .cat-img img { transform: scale(1.06); }
.cat-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.6) 0%, rgba(0,0,0,.1) 55%, transparent 70%);
  z-index: 3;
}
.cat-info {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 16px;
  color: #fff;
  z-index: 4;
}
.cat-emoji { font-size: 24px; }
.cat-info h3 { font-size: 18px; font-weight: 700; margin: 4px 0 2px; }
.cat-info p { font-size: 13px; opacity: .9; }
.cat-cta {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--transition), transform var(--transition);
}
.cat-card:hover .cat-cta { opacity: 1; transform: translateY(0); }

/* ---------- Features ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.feature {
  text-align: center;
  padding: 36px 24px;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.feature:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary-soft);
}
.feature-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  background: linear-gradient(135deg, var(--color-primary-soft), #ffe9d6);
}
.feature h3 { font-size: 19px; font-weight: 700; margin-bottom: 8px; }
.feature p { font-size: 14px; color: var(--color-text-soft); }

/* ---------- Download CTA ---------- */
.download {
  background: linear-gradient(135deg, #2a2030 0%, #1a1420 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.download::before {
  content: "";
  position: absolute;
  top: -120px; right: -80px;
  width: 420px; height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,122,26,.3) 0%, transparent 70%);
  filter: blur(40px);
}
.download-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 64px;
  position: relative;
}
.download-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 900;
  margin-bottom: 14px;
}
.download-title span { color: var(--color-primary); }
.download-sub {
  font-size: 17px;
  color: rgba(255,255,255,.75);
  margin-bottom: 32px;
}
.download-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 20px;
}
.download-hint {
  font-size: 13px;
  color: rgba(255,255,255,.55);
}

/* Phone mockup */
.download-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 420px;
}
.phone {
  position: relative;
  width: 230px;
  height: 460px;
  background: #0e1116;
  border-radius: 36px;
  padding: 12px;
  box-shadow: 0 40px 80px rgba(0,0,0,.5);
  transform: rotate(-6deg);
  animation: phoneFloat 5s ease-in-out infinite;
}
@keyframes phoneFloat {
  0%, 100% { transform: rotate(-6deg) translateY(0); }
  50% { transform: rotate(-6deg) translateY(-12px); }
}
.phone-notch {
  position: absolute;
  top: 12px; left: 50%;
  transform: translateX(-50%);
  width: 80px; height: 22px;
  background: #0e1116;
  border-radius: 0 0 14px 14px;
  z-index: 2;
}
.phone-screen {
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #f6eee8, #fff8f1);
  border-radius: 26px;
  overflow: hidden;
  padding: 36px 14px 14px;
}
.phone-header { text-align: center; }
.phone-logo {
  font-weight: 900;
  font-size: 18px;
  color: var(--color-primary);
}
.phone-tabs {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 10px;
  flex-wrap: wrap;
}
.phone-tabs span {
  padding: 4px 10px;
  font-size: 10px;
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-text-soft);
}
.phone-tabs .active {
  background: var(--color-primary);
  color: #fff;
}
.phone-posters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}
.phone-posters span {
  aspect-ratio: 3/4;
  border-radius: 8px;
  background: linear-gradient(135deg, #ff9a3c, #ff5e3a);
}
.phone-posters span:nth-child(2) { background: linear-gradient(135deg, #7c3aed, #ec4899); }
.phone-posters span:nth-child(3) { background: linear-gradient(135deg, #4a90e2, #50e3c2); }
.phone-posters span:nth-child(4) { background: linear-gradient(135deg, #f093fb, #f5576c); }

.film-reel {
  position: absolute;
  width: 90px; height: 90px;
  border-radius: 50%;
  background:
    radial-gradient(circle, transparent 18px, #1f1620 18px, #1f1620 22px, transparent 22px),
    repeating-conic-gradient(#1f1620 0 8deg, transparent 8deg 18deg);
  border: 6px solid #2a2030;
  opacity: .4;
}
.reel-1 { top: 20px; left: 30px; animation: spin 14s linear infinite; }
.reel-2 { bottom: 30px; right: 30px; animation: spin 18s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- FAQ ---------- */
.faq { background: var(--color-bg-soft); }
.faq-list {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.faq-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.faq-item[open] { border-color: var(--color-primary-soft); box-shadow: var(--shadow-sm); }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-icon {
  position: relative;
  width: 18px; height: 18px;
  flex-shrink: 0;
}
.faq-icon::before, .faq-icon::after {
  content: "";
  position: absolute;
  background: var(--color-primary);
  border-radius: 2px;
  transition: transform var(--transition);
}
.faq-icon::before { top: 50%; left: 0; right: 0; height: 2px; transform: translateY(-50%); }
.faq-icon::after { left: 50%; top: 0; bottom: 0; width: 2px; transform: translateX(-50%); }
.faq-item[open] .faq-icon::after { transform: translateX(-50%) scaleY(0); }
.faq-body {
  padding: 0 24px 20px;
  color: var(--color-text-soft);
  font-size: 15px;
  animation: fadeIn .3s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-navy-deep);
  color: rgba(255,255,255,.7);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 48px 24px;
  flex-wrap: wrap;
}
.logo-light { color: #fff; }
.footer-brand { display: flex; flex-direction: column; gap: 8px; }
.footer-tag { font-size: 14px; color: rgba(255,255,255,.5); }
.footer-links {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}
.footer-links a {
  font-size: 14px;
  color: rgba(255,255,255,.7);
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--color-primary); }
.footer-social {
  display: flex;
  gap: 10px;
}
.footer-social a {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.8);
  transition: background var(--transition), color var(--transition), transform var(--transition);
}
.footer-social a:hover {
  background: var(--color-primary);
  color: #fff;
  transform: translateY(-2px);
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 20px 0;
  text-align: center;
  font-size: 13px;
  color: rgba(255,255,255,.4);
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--color-text);
  color: #fff;
  padding: 14px 24px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: opacity .3s, transform .3s;
  z-index: 200;
  max-width: 90vw;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { max-width: 520px; margin: 0 auto; }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .download-inner { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 720px) {
  :root { --header-h: 64px; }
  .section { padding: 64px 0; }
  .hero { padding: 32px 0 48px; }
  .main-nav { display: none; }
  .main-nav.open {
    display: flex;
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    flex-direction: column;
    background: var(--color-surface);
    padding: 16px;
    gap: 4px;
    box-shadow: var(--shadow-md);
    border-bottom: 1px solid var(--color-border);
  }
  .main-nav.open .nav-link { padding: 12px 16px; border-radius: 12px; }
  .menu-toggle { display: flex; }
  .btn-download-header { display: none; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .features-grid { grid-template-columns: 1fr; gap: 16px; }
  .hero-meta { gap: 20px; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
}

@media (max-width: 420px) {
  .cat-grid { grid-template-columns: 1fr; }
  .hero-cta .btn { flex: 1; justify-content: center; }
  .download-buttons .btn { flex: 1; justify-content: center; }
}

/* ---------- Accessibility ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ===== Language Switcher ===== */
.lang-switcher {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text-soft);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition), background var(--transition), box-shadow var(--transition);
}

.lang-btn:hover,
.lang-btn[aria-expanded="true"] {
  color: var(--color-primary);
  border-color: var(--color-primary);
  background: var(--color-surface-2);
}

.lang-btn svg {
  flex: none;
}

.lang-code {
  min-width: 18px;
  text-align: center;
}

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 150px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  z-index: 300;
}

.lang-menu[hidden] {
  display: none;
}

.lang-item {
  display: block;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text-soft);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.lang-item:hover {
  background: var(--color-bg-soft);
  color: var(--color-text);
}

.lang-item.active {
  background: var(--color-primary-soft);
  color: var(--color-primary-dark);
  font-weight: 700;
}

@media (max-width: 720px) {
  .lang-btn {
    padding: 7px 10px;
    font-size: 12px;
  }
}
