/* ========================================
   Global Styles v4.0 - Warm Professional
   Life Windows Site
   ======================================== */

/* === KEYFRAMES === */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse-dot {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(0.8);
  }
}

@keyframes hero-float {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(30px, -40px); }
  66% { transform: translate(-20px, 20px); }
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 0 0 var(--accent-glow);
  }

  50% {
    box-shadow: 0 0 20px 4px var(--accent-glow);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% center;
  }

  100% {
    background-position: 200% center;
  }
}

@keyframes badge-pulse {
  0%, 100% {
    opacity: 1;
  }

  50% {
    opacity: 0.7;
  }
}

/* === RESET === */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 微妙背景纹理 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  opacity: 0.015;
  pointer-events: none;
  z-index: -1;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

a:hover {
  color: var(--accent-hover);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

img {
  max-width: 100%;
  height: auto;
}

/* === LAYOUT === */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.section {
  padding: var(--space-16) 0;
}

.section-sm {
  padding: var(--space-10) 0;
}

.layout-main {
  min-height: 100vh;
}

/* === ACCESSIBILITY === */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--accent);
  color: var(--text-inverse);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  z-index: 9999;
  transition: top var(--duration-fast) var(--ease-out);
}

.skip-link:focus {
  top: 16px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: var(--radius-full);
  transition: background var(--duration-fast);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-3);
}

/* === TYPOGRAPHY === */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-4);
}

.section-label .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-dot 2s ease-in-out infinite;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(var(--text-2xl), 3vw, var(--text-4xl));
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
  margin-bottom: var(--space-3);
  letter-spacing: -0.01em;
}

.section-desc {
  font-size: var(--text-lg);
  color: var(--text-2);
  line-height: 1.7;
  margin-bottom: var(--space-8);
  max-width: 640px;
}

/* === GRID === */
.grid {
  display: grid;
  gap: var(--space-6);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  font-size: var(--text-base);
  font-weight: 500;
  line-height: 1;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  transition: all var(--duration-fast) var(--ease-out);
  white-space: nowrap;
  cursor: pointer;
}

.btn-p {
  background: var(--accent);
  color: var(--text-inverse);
  border-color: var(--accent);
}

.btn-p:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-s {
  background: var(--bg-card);
  color: var(--text);
  border-color: var(--border);
}

.btn-s:hover {
  background: var(--bg-hover);
  border-color: var(--border-strong);
}

/* === CARDS === */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: all var(--duration-base) var(--ease-out);
}

.card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

/* Card hover lift */
.card-hover-lift {
  transition:
    transform var(--duration-fast) var(--ease-out),
    box-shadow var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out);
}

.card-hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}

/* === FADE ANIMATIONS === */
.fade-up {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity var(--duration-base) var(--ease-out),
    transform var(--duration-base) var(--ease-out);
}

.fade-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-up:nth-child(1) { transition-delay: 0ms; }
.fade-up:nth-child(2) { transition-delay: 60ms; }
.fade-up:nth-child(3) { transition-delay: 120ms; }
.fade-up:nth-child(4) { transition-delay: 180ms; }
.fade-up:nth-child(5) { transition-delay: 240ms; }
.fade-up:nth-child(6) { transition-delay: 300ms; }

/* === NAVIGATION === */
#nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-subtle);
}

#nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  list-style: none;
}

.nav-links a {
  display: block;
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-2);
  border-radius: var(--radius-sm);
  transition: all var(--duration-fast);
}

.nav-links a:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-inverse);
  background: var(--accent);
  border-radius: var(--radius-md);
  transition: all var(--duration-fast);
}

.nav-cta:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--text-2);
  border-radius: var(--radius-md);
  transition: all var(--duration-fast);
}

.theme-toggle:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

/* === HERO SECTION === */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 100px 0 80px;
  overflow: hidden;
}

.hero-container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.hero-simple {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.hero-center {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-bg);
  border: 1px solid var(--accent);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-5);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
  margin-bottom: var(--space-5);
  letter-spacing: -0.02em;
}

.hero-sub {
  font-size: var(--text-xl);
  color: var(--text-2);
  line-height: 1.7;
  margin-bottom: var(--space-8);
  max-width: 560px;
}

.hero-input-group {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
  justify-content: center;
}

.hero-year-input {
  width: 220px;
  padding: var(--space-4) var(--space-5);
  font-size: var(--text-lg);
  font-family: var(--font-num);
  color: var(--text);
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--duration-fast) var(--ease-out);
  text-align: center;
}

.hero-year-input::placeholder {
  color: var(--text-3);
  font-family: var(--font-main);
}

.hero-year-input:hover {
  border-color: var(--border-strong);
}

.hero-year-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-6);
  font-size: var(--text-base);
  font-weight: 600;
  font-family: inherit;
  border-radius: var(--radius-lg);
  border: none;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  white-space: nowrap;
}

.btn-cta.primary {
  background: var(--accent);
  color: var(--text-inverse);
}

.btn-cta.primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-cta.primary:active {
  transform: translateY(0);
  box-shadow: var(--shadow-md);
}

.btn-glow {
  box-shadow: 0 0 20px var(--accent-glow);
}

.btn-glow:hover {
  box-shadow: 0 0 30px var(--accent-glow), var(--shadow-lg);
}

.hero-hint {
  font-size: var(--text-sm);
  color: var(--text-3);
  margin-top: var(--space-2);
}

/* Hero background */
.hero-bg-pattern {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 1px 1px, var(--border-subtle) 1px, transparent 0);
  background-size: 48px 48px;
  opacity: 0.3;
}

.hero-blob-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.blob-3 {
  position: absolute;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 60%);
  top: -250px;
  right: -200px;
  animation: hero-float 25s ease-in-out infinite;
}

/* Hero animations */
.hero-title-animated {
  animation: fade-up 0.8s var(--ease-out) both;
}

.hero-sub-animated {
  animation: fade-up 0.8s var(--ease-out) 0.15s backwards;
}

/* === RESEARCH SECTION === */
.research-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.research-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: all var(--duration-base) var(--ease-out);
}

.research-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.research-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--accent-bg);
  color: var(--accent);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
}

.research-card h3 {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}

.research-card p {
  font-size: var(--text-sm);
  color: var(--text-2);
  line-height: 1.6;
  margin-bottom: var(--space-3);
}

.research-card .src {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--text-3);
}

/* === ACTION SECTION === */
.action-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.action-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}

.action-card-badge {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: 600;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-4);
}

.action-card.urg .action-card-badge {
  background: var(--status-closed-bg);
  color: var(--status-closed);
}

.action-card.med .action-card-badge {
  background: var(--status-closing-bg);
  color: var(--status-closing);
}

.action-card.low .action-card-badge {
  background: var(--status-open-bg);
  color: var(--status-open);
}

.action-card h3 {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-4);
}

.action-list {
  list-style: none;
}

.action-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--border-subtle);
}

.action-list li:last-child {
  border-bottom: none;
}

.act-name {
  font-size: var(--text-sm);
  color: var(--text);
}

.act-deadline {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--accent);
  padding: var(--space-1) var(--space-2);
  background: var(--accent-bg);
  border-radius: var(--radius-sm);
}

/* === INSIGHT BOX === */
.insight-box {
  background: var(--accent-bg);
  border: 1px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  text-align: center;
}

.insight-box p:first-child {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-4);
}

.insight-box ul {
  list-style: none;
  text-align: left;
  max-width: 600px;
  margin: 0 auto;
}

.insight-box li {
  font-size: var(--text-sm);
  color: var(--text-2);
  line-height: 1.8;
  padding: var(--space-2) 0;
}

/* === FOOTER === */
footer {
  padding: var(--space-10) 0;
  text-align: center;
  border-top: 1px solid var(--border);
}

.quote {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}

footer p {
  font-size: var(--text-sm);
  color: var(--text-3);
  margin-bottom: var(--space-2);
}

.copy {
  font-size: var(--text-xs);
  color: var(--text-3);
  margin-top: var(--space-4);
}

/* === DIVIDER === */
.mod-sep {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* === RESPONSIVE === */
@media (width <= 1024px) {
  .research-grid,
  .action-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (width <= 768px) {
  .container {
    padding: 0 var(--space-4);
  }

  .section {
    padding: var(--space-10) 0;
  }

  .nav-links {
    display: none;
  }

  #hero {
    padding: 80px 0 60px;
    min-height: auto;
  }

  .hero-title {
    font-size: clamp(2rem, 7vw, 2.5rem);
  }

  .hero-sub {
    font-size: var(--text-lg);
    margin-bottom: var(--space-6);
  }

  .hero-input-group {
    flex-direction: column;
    width: 100%;
    gap: var(--space-4);
  }

  .hero-year-input,
  .btn-cta {
    width: 100%;
    max-width: 280px;
  }

  .blob-3 {
    width: 400px;
    height: 400px;
    top: -100px;
    right: -100px;
  }
}

@media (width <= 640px) {
  .research-grid,
  .action-grid {
    grid-template-columns: 1fr;
  }

  .section-title {
    font-size: var(--text-xl);
  }
}

/* === SHARE BAR === */
.share-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  flex-wrap: wrap;
}

.share-bar-info {
  flex: 1;
  min-width: 200px;
}

.share-bar-title {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.share-bar-sub {
  font-size: var(--text-sm);
  color: var(--text-3);
}

.share-bar-actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.share-bar-actions .btn-cta {
  font-size: var(--text-sm);
  padding: 10px 20px;
}

.share-bar-actions .btn-cta.secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.share-link-box {
  display: flex;
  gap: var(--space-3);
  align-items: center;
}

.share-link-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: var(--text-sm);
  font-family: inherit;
  min-width: 0;
}

.share-link-hint {
  font-size: var(--text-xs);
  color: var(--text-3);
  margin-top: var(--space-2);
}

@media (width <= 640px) {
  .share-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .share-bar-actions {
    width: 100%;
  }

  .share-bar-actions .btn-cta {
    flex: 1;
  }

  .share-link-box {
    flex-direction: column;
  }

  .share-link-input {
    width: 100%;
  }
}