/* ===== CSS Variables ===== */
:root {
  color-scheme: dark;
  --bg: #0a0a0b;
  --surface: #111114;
  --surface-2: #18181c;
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --line: rgba(255,255,255,0.06);
  --line-strong: rgba(255,255,255,0.12);
  --accent: #FF6B35;
  --accent-strong: #FF8C5A;
  --accent-glow: rgba(255,107,53,0.25);
  --accent-soft: rgba(255,107,53,0.08);
  --purple: #8B5CF6;
  --purple-glow: rgba(139,92,246,0.25);
  --purple-soft: rgba(139,92,246,0.08);
  --gold: #f0c060;
  --warn: rgba(240,192,96,0.1);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.5);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-full: 999px;
  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ===== Keyframes ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 20px var(--accent-glow), 0 0 60px rgba(255,107,53,0.08); }
  50%      { box-shadow: 0 0 35px var(--accent-glow), 0 0 90px rgba(255,107,53,0.14); }
}
@keyframes dotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(1.3); }
}
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* ===== Base ===== */
* { box-sizing: border-box; }

body {
  margin: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% -10%, rgba(139,92,246,0.08), transparent 50%),
    radial-gradient(ellipse 40% 40% at 80% 60%, rgba(255,107,53,0.06), transparent 50%),
    var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-strong); text-decoration: none; transition: all var(--transition); }
a:hover { color: var(--accent); }

.site-header, .site-footer, main {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
}

/* ===== Header ===== */
.site-header {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,10,11,0.82);
  animation: fadeIn 0.6s ease;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  font-size: 19px;
  white-space: nowrap;
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; color: var(--text); }
.brand-icon {
  font-size: 26px;
  animation: float 3s ease-in-out infinite;
}
.brand small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.03em;
}

/* Nav */
nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  font-size: 15px;
}
nav a {
  border-radius: var(--radius-full);
  padding: 10px 22px;
  color: var(--muted);
  font-weight: 500;
  transition: all var(--transition);
  white-space: nowrap;
}
nav a:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text);
  text-decoration: none;
}

.nav-news {
  position: relative;
  color: var(--accent) !important;
  font-weight: 700 !important;
  background: var(--accent-soft);
  border: 1px solid rgba(255,107,53,0.2);
  padding: 10px 22px !important;
  animation: glowPulse 3s ease-in-out infinite;
}
.nav-news:hover {
  background: rgba(255,107,53,0.14) !important;
  border-color: var(--accent) !important;
}
.news-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 6px;
  animation: dotPulse 2s ease-in-out infinite;
  vertical-align: middle;
}

/* ===== Hero ===== */
.hero {
  text-align: center;
  padding: 88px 20px 64px;
  animation: fadeInUp 0.8s ease;
  position: relative;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 40% at 50% 20%, rgba(139,92,246,0.1), transparent 60%),
    radial-gradient(ellipse 30% 30% at 70% 60%, rgba(255,107,53,0.07), transparent 60%);
  pointer-events: none;
}

.hero-title {
  margin: 0 auto;
  max-width: 760px;
  font-size: clamp(44px, 8vw, 76px);
  line-height: 1.06;
  letter-spacing: -0.025em;
  font-weight: 800;
  text-wrap: balance;
  animation: fadeInUp 0.8s ease 0.1s both;
}
.hero-highlight {
  background: linear-gradient(135deg, var(--accent) 0%, var(--purple) 50%, var(--accent-strong) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s ease infinite;
}

.hero-desc {
  max-width: 600px;
  margin: 24px auto 0;
  font-size: 18px;
  color: var(--muted);
  line-height: 1.75;
  text-wrap: balance;
  animation: fadeInUp 0.8s ease 0.2s both;
}
.hero-desc strong { color: var(--text); font-weight: 600; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 36px;
  animation: fadeInUp 0.8s ease 0.3s both;
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  border-radius: var(--radius);
  padding: 16px 32px;
  font-weight: 700;
  font-size: 16px;
  transition: all 0.25s ease;
  cursor: pointer;
}
.btn-primary {
  border: none;
  background: linear-gradient(135deg, var(--accent), #f8572a);
  color: #fff;
  box-shadow: 0 4px 28px var(--accent-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 40px var(--accent-glow);
  text-decoration: none;
  color: #fff;
}
.btn-secondary {
  border: 1px solid var(--line-strong);
  background: rgba(255,255,255,0.04);
  color: var(--text);
}
.btn-secondary:hover {
  border-color: rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.07);
  transform: translateY(-2px);
  text-decoration: none;
  color: var(--text);
}
.btn-ghost {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
}
.btn-ghost:hover {
  color: var(--text);
  background: rgba(255,255,255,0.04);
  text-decoration: none;
}
.btn-icon { font-size: 20px; }

/* ===== Hub Cards ===== */
.hubs { padding: 32px 0 64px; }
.hubs-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.hub-card {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  text-decoration: none;
  color: var(--text);
  transition: all 0.3s ease;
  animation: fadeInUp 0.6s ease both;
  position: relative;
  overflow: hidden;
}
.hub-card::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--purple), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.hub-card:nth-child(1) { animation-delay: 0s; }
.hub-card:nth-child(2) { animation-delay: 0.1s; }
.hub-card:nth-child(3) { animation-delay: 0.2s; }
.hub-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  color: var(--text);
  text-decoration: none;
}
.hub-card:hover::after { opacity: 1; }
.hub-icon {
  font-size: 36px;
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.04);
}
.hub-body h3 {
  margin: 0 0 8px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.hub-body p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}
.hub-link {
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  transition: all var(--transition);
}
.hub-card:hover .hub-link {
  transform: translateX(4px);
  display: inline-block;
}

/* ===== Section Headers ===== */
.section { padding: 64px 0; }
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 28px;
}
.section-header h2 {
  margin: 0;
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 700;
  letter-spacing: -0.015em;
}
.section-more {
  color: var(--accent);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}
.section-more:hover { text-decoration: underline; }

/* ===== Cards ===== */
.grid { display: grid; gap: 18px; }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.01));
  transition: all 0.3s ease;
  animation: fadeInUp 0.5s ease both;
}
.card:nth-child(1) { animation-delay: 0s; }
.card:nth-child(2) { animation-delay: 0.08s; }
.card:nth-child(3) { animation-delay: 0.16s; }
.card:nth-child(4) { animation-delay: 0.24s; }
.card:nth-child(5) { animation-delay: 0.32s; }
.card:nth-child(6) { animation-delay: 0.40s; }
.card:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.card .eyebrow { margin-bottom: 6px; }
.card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.35;
}
.card h3 a { color: var(--text); }
.card h3 a:hover { color: var(--accent); text-decoration: none; }
.card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }

/* Entire card clickable */
.card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}
.card-link:hover { color: inherit; text-decoration: none; }
.card-link h3 {
  color: var(--text);
  transition: color var(--transition);
}
.card-link:hover h3 { color: var(--accent); }
.card-cta {
  display: inline-block;
  margin-top: 12px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  transition: all var(--transition);
}
.card-link:hover .card-cta { transform: translateX(4px); }

/* Download cards on templates page */
.download-card .download-links {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

/* ===== Page Title ===== */
.page-title {
  padding: 48px 0 24px;
  animation: fadeInUp 0.6s ease;
}
.page-title h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 52px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.lead {
  max-width: 680px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

/* Eyebrow */
.eyebrow {
  display: inline-block;
  margin: 0;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ===== Notice ===== */
.notice {
  border: 1px solid rgba(240,192,96,0.35);
  border-radius: var(--radius-sm);
  background: var(--warn);
  padding: 16px 18px;
  color: var(--gold);
  font-size: 14px;
  line-height: 1.6;
}

/* ===== Tools Page ===== */
.tool-category { margin-bottom: 52px; }
.tool-cat-title {
  font-size: 22px;
  margin: 0 0 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
}
.tool-cat-en {
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
  margin-left: 8px;
}
.tool-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.tool-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.tool-header h3 {
  margin: 0;
  font-size: 17px;
  color: var(--text);
}
.tool-stars {
  color: var(--gold);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.tool-desc {
  margin: 10px 0 14px !important;
  color: var(--muted) !important;
  font-size: 14px;
  line-height: 1.55;
  flex: 1;
}
.tool-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.tool-price {
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}
.tool-cta {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  transition: all var(--transition);
}
.card-link:hover .tool-cta {
  color: var(--accent);
  transform: translateX(3px);
}
.tools-updated { color: var(--muted); font-size: 13px; }
.tools-disclaimer { color: var(--muted); font-size: 13px; }
.tools-disclaimer a { color: var(--accent); }

/* ===== Spotlight Cards ===== */
.tools-spotlight { padding: 16px 0 64px; }
.spotlight-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.spotlight-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  text-decoration: none;
  color: var(--text);
  background: linear-gradient(180deg, rgba(255,255,255,0.03), transparent);
  transition: all 0.3s ease;
  animation: fadeInUp 0.5s ease both;
}
.spotlight-card:nth-child(1) { animation-delay: 0s; }
.spotlight-card:nth-child(2) { animation-delay: 0.08s; }
.spotlight-card:nth-child(3) { animation-delay: 0.16s; }
.spotlight-card:nth-child(4) { animation-delay: 0.24s; }
.spotlight-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  color: var(--text);
  text-decoration: none;
}
.spotlight-stars {
  color: var(--gold);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}
.spotlight-card h4 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
}
.spotlight-card p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  flex: 1;
}
.spotlight-tag {
  display: inline-block;
  align-self: flex-start;
  border-radius: var(--radius-full);
  padding: 3px 12px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
}

/* ===== News Page ===== */
.news-meta { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.news-summary { margin: 4px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }

.article-body ol {
  padding-left: 0;
  list-style: none;
}
.article-body ol li {
  margin: 14px 0;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: all var(--transition);
  animation: fadeInUp 0.4s ease both;
}
.article-body ol li:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
}

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 44px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  line-height: 1.8;
}
.site-footer p { margin: 4px 0; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .site-header {
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 0;
  }
  .brand { font-size: 16px; }
  .brand small { display: none; }
  nav {
    order: 3;
    width: 100%;
    justify-content: center;
    gap: 4px;
    margin-left: 0;
    font-size: 14px;
  }
  nav a { padding: 8px 16px; }

  .hero { padding: 52px 16px 40px; }
  .hero-title { font-size: clamp(34px, 10vw, 52px); }
  .hero-desc { font-size: 16px; }

  .hubs-grid,
  .spotlight-grid,
  .grid.three,
  .grid.two { grid-template-columns: 1fr; }

  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions a { justify-content: center; }

  .section-header { flex-direction: column; gap: 8px; align-items: flex-start; }
}
