/* 花英语教育 · 互联网风 · Mobile-first */
:root {
  --bg: #0c0a14;
  --bg-card: rgba(18, 16, 31, 0.82);
  --border: rgba(244, 114, 182, 0.14);
  --border-hover: rgba(244, 114, 182, 0.42);
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #f472b6;
  --accent-2: #a78bfa;
  --accent-3: #38bdf8;
  --gold: #fbbf24;
  --radius: 14px;
  --max: 1080px;
  --section: clamp(3rem, 9vw, 5rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

/* Cursor glow (desktop) */
.cursor-glow {
  position: fixed;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(circle, rgba(244, 114, 182, 0.08) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.4s;
}

@media (hover: hover) and (pointer: fine) {
  .cursor-glow.is-active {
    opacity: 1;
  }
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(12, 10, 20, 0.72);
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.site-header.is-scrolled {
  background: rgba(12, 10, 20, 0.92);
  border-bottom-color: var(--border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.brand:hover {
  color: var(--accent);
  text-decoration: none;
}

.brand img {
  width: 36px;
  height: 36px;
}

.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(244, 114, 182, 0.08);
  color: var(--text);
  cursor: pointer;
}

@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }
}

.nav {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  flex-direction: column;
  padding: 0.5rem 1.25rem 1rem;
  background: rgba(12, 10, 20, 0.97);
  border-bottom: 1px solid var(--border);
}

.nav.is-open {
  display: flex;
}

.nav a {
  padding: 0.8rem 0.75rem;
  color: var(--muted);
  font-weight: 500;
  border-radius: 8px;
  text-decoration: none;
  transition: color 0.25s, background 0.25s;
}

.nav a:hover {
  color: var(--accent);
  background: rgba(244, 114, 182, 0.1);
}

@media (min-width: 768px) {
  .nav {
    display: flex;
    position: static;
    flex-direction: row;
    gap: 0.25rem;
    padding: 0;
    background: transparent;
    border: 0;
  }

  .nav a {
    padding: 0.5rem 0.85rem;
  }
}

/* Hero */
.hero {
  position: relative;
  min-height: min(88vh, 760px);
  display: flex;
  align-items: center;
  padding: 2.5rem 0 3rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: hero-drift 20s ease-in-out infinite alternate;
}

@keyframes hero-drift {
  from { transform: scale(1) translateY(0); }
  to { transform: scale(1.04) translateY(-1%); }
}

.hero-particles {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  animation: float-up linear infinite;
}

@keyframes float-up {
  0% {
    opacity: 0;
    transform: translateY(0) scale(0.5);
  }
  10% {
    opacity: 0.7;
  }
  90% {
    opacity: 0.3;
  }
  100% {
    opacity: 0;
    transform: translateY(-100vh) scale(1);
  }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(180deg, rgba(12, 10, 20, 0.3) 0%, rgba(12, 10, 20, 0.9) 85%);
}

.hero-content {
  position: relative;
  z-index: 3;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.2); }
}

.hero h1 {
  margin: 0 0 1rem;
  max-width: 12em;
  font-size: clamp(1.85rem, 5vw, 2.85rem);
  line-height: 1.22;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: linear-gradient(105deg, var(--accent) 0%, var(--accent-2) 45%, var(--accent-3) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradient-shift 4s ease infinite;
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}

.hero-sub {
  margin: 0 0 1.75rem;
  max-width: 36em;
  color: var(--muted);
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.78rem 1.45rem;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.25s var(--ease), box-shadow 0.25s, border-color 0.25s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #1a0a14;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(244, 114, 182, 0.38);
  text-decoration: none;
}

.btn-outline {
  background: rgba(244, 114, 182, 0.08);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--border-hover);
  color: var(--accent);
  text-decoration: none;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  max-width: 480px;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.hero-stat strong {
  display: block;
  font-size: 1.5rem;
  line-height: 1.2;
}

.hero-stat span {
  font-size: 0.75rem;
  color: var(--muted);
}

/* Sections */
.section {
  position: relative;
  z-index: 1;
  padding: var(--section) 0;
}

.section-alt {
  background: linear-gradient(180deg, transparent 0%, rgba(167, 139, 250, 0.05) 50%, transparent 100%);
}

.section-head {
  margin-bottom: 2rem;
  max-width: 40em;
}

.section-kicker {
  margin: 0 0 0.45rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--accent-2);
}

.section-head h2 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.45rem, 3vw, 2rem);
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

/* About */
.about-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .about-grid {
    grid-template-columns: 1.4fr 1fr;
    align-items: start;
  }
}

.about-card {
  padding: 1.65rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.about-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 8px 32px rgba(244, 114, 182, 0.08);
}

.about-card p {
  margin: 0;
  color: var(--muted);
}

.about-card p + p {
  margin-top: 0.85rem;
}

.about-highlight {
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(145deg, rgba(244, 114, 182, 0.12), rgba(167, 139, 250, 0.08));
  transition: transform 0.3s var(--ease);
}

.about-highlight:hover {
  transform: translateY(-2px);
}

.about-highlight p {
  margin: 0;
  font-weight: 500;
  color: var(--text);
}

.about-highlight small {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  color: var(--muted);
}

/* Services */
.service-grid {
  display: grid;
  gap: 1.15rem;
}

@media (min-width: 640px) {
  .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .service-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .service-card-wide {
    grid-column: span 3;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0 1.25rem;
    align-items: start;
  }

  .service-card-wide .service-icon {
    grid-row: span 3;
    margin-bottom: 0;
  }
}

.service-card {
  position: relative;
  padding: 1.45rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
  overflow: hidden;
}

.service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(244, 114, 182, 0.06), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}

.service-card:hover::before {
  opacity: 1;
}

.service-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 0.85rem;
  position: relative;
  z-index: 1;
  transition: transform 0.3s var(--ease);
}

.service-card:hover .service-icon {
  transform: scale(1.08) rotate(-3deg);
}

.service-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  position: relative;
  z-index: 1;
}

.service-card .subtitle {
  display: block;
  margin-bottom: 0.55rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent-2);
  position: relative;
  z-index: 1;
}

.service-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

/* Why */
.why-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 768px) {
  .why-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.why-card {
  text-align: center;
  padding: 1.65rem 1.1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.3s var(--ease), border-color 0.3s;
}

.why-card:hover {
  transform: translateY(-3px);
  border-color: rgba(167, 139, 250, 0.35);
}

.why-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-bottom: 0.75rem;
  border-radius: 10px;
  background: rgba(244, 114, 182, 0.15);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.875rem;
}

.why-card h3 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
}

.why-card p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
}

/* CTA */
.cta {
  margin: 0 0 var(--section);
}

.cta-box {
  padding: 2.25rem 1.5rem;
  text-align: center;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(18, 16, 31, 0.85);
  position: relative;
  overflow: hidden;
}

.cta-box::before {
  content: "";
  position: absolute;
  inset: -50%;
  background: conic-gradient(from 0deg, transparent, rgba(244, 114, 182, 0.08), transparent 30%);
  animation: cta-spin 8s linear infinite;
}

@keyframes cta-spin {
  to { transform: rotate(360deg); }
}

.cta-box > * {
  position: relative;
  z-index: 1;
}

.cta-box h2 {
  margin: 0 0 0.55rem;
  font-size: clamp(1.2rem, 2.5vw, 1.55rem);
}

.cta-box p {
  margin: 0 auto 1.25rem;
  max-width: 34em;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Footer */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 2.25rem 0 2rem;
  background: #080612;
  text-align: center;
}

.footer-brand {
  margin: 0 0 0.35rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.footer-contact {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.footer-icp {
  margin: 0 0 0.85rem;
}

.footer-icp a {
  font-size: 0.8125rem;
  color: var(--muted);
  text-decoration: none;
}

.footer-icp a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.footer-copy {
  margin: 0;
  font-size: 0.75rem;
  color: #64748b;
}

/* Reveal */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

[data-reveal-delay="1"] { transition-delay: 0.08s; }
[data-reveal-delay="2"] { transition-delay: 0.14s; }
[data-reveal-delay="3"] { transition-delay: 0.2s; }
[data-reveal-delay="4"] { transition-delay: 0.26s; }
[data-reveal-delay="5"] { transition-delay: 0.32s; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}