/* ============================================================
   Buzz Wing — buzzwing.lol
   Weifang Maying Information Technology Co., Ltd.
   Design System v1.0 — Tech-Forward / Geometric / High Contrast
   ============================================================ */

/* --- RESET & BASE ------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #08090b;
  --surface:   #111318;
  --border:    #252830;
  --text:      #f0f0f3;
  --text-dim:  #9498a3;
  --accent:    #00e5a0;
  --accent2:   #5b8def;
  --warn:      #ffb347;
  --mono:      "SF Mono", "Fira Code", "Cascadia Code", "JetBrains Mono", "Consolas", monospace;
  --sans:      "Inter", "SF Pro Display", system-ui, -apple-system, sans-serif;
  --radius:    2px;
  --gap:       clamp(1rem, 3vw, 2.5rem);
  --page-mx:   max(1.5rem, 5vw);
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* --- TYPOGRAPHY ------------------------------------------- */
h1, h2, h3, h4 { font-weight: 600; line-height: 1.15; }
h1 { font-size: clamp(2.5rem, 7vw, 5rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); letter-spacing: -0.02em; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }

p, li { font-size: 1rem; color: var(--text-dim); max-width: 68ch; }
strong { color: var(--text); font-weight: 600; }
a { color: var(--accent); text-decoration: none; transition: color 0.15s; }
a:hover, a:focus-visible { color: var(--accent2); outline: none; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

code, .mono { font-family: var(--mono); font-size: 0.875em; }
::selection { background: var(--accent); color: var(--bg); }

/* --- LAYOUT UTILITIES ------------------------------------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--page-mx);
}

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

/* --- HEADER / NAV ----------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
  letter-spacing: -0.01em;
}
.logo svg { flex-shrink: 0; }

.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  color: var(--text-dim);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: color 0.15s;
  position: relative;
}
.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.2s;
}
.nav-links a:hover, .nav-links a:focus-visible { color: var(--text); }
.nav-links a:hover::after { width: 100%; }

.mobile-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 1.2rem;
  align-items: center;
  justify-content: center;
}

/* --- HERO — ASYMMETRIC SPLIT ------------------------------ */
.hero {
  padding: clamp(3rem, 10vh, 8rem) 0;
  position: relative;
  overflow: hidden;
}
.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  align-items: center;
}
.hero-text { max-width: 560px; }
.hero-eyebrow {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.25em 0.75em;
  margin-bottom: 1.5rem;
  border-radius: var(--radius);
}
.hero h1 { margin-bottom: 1.25rem; }
.hero h1 span { color: var(--accent); }
.hero p { font-size: 1.1rem; margin-bottom: 2rem; }

.btn-group { display: flex; gap: 1rem; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--sans);
  border: 2px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
  text-decoration: none;
  line-height: 1;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.btn-primary:hover, .btn-primary:focus-visible { background: #00cc8c; border-color: #00cc8c; color: var(--bg); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover, .btn-ghost:focus-visible { border-color: var(--accent); color: var(--accent); }

/* Hero visual — geometric stack */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  height: 400px;
}
.geo-stack {
  position: relative;
  width: 300px;
  height: 300px;
}
.geo-stack .layer {
  position: absolute;
  border: 2px solid var(--border);
  border-radius: var(--radius);
}
.geo-stack .layer-1 {
  width: 280px; height: 280px;
  top: 10px; left: 10px;
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.1em;
}
.geo-stack .layer-2 {
  width: 260px; height: 260px;
  top: 0; left: 0;
  border-color: var(--accent2);
  border-style: dashed;
  background: transparent;
}
.geo-stack .layer-3 {
  width: 240px; height: 240px;
  top: 40px; left: 40px;
  border-color: var(--accent);
  background: transparent;
}
.geo-stack .layer-dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  position: absolute;
}
.geo-stack .dot-tl { top: -3px; left: -3px; }
.geo-stack .dot-tr { top: -3px; right: -3px; }
.geo-stack .dot-bl { bottom: -3px; left: -3px; }
.geo-stack .dot-br { bottom: -3px; right: -3px; }

/* animated ring */
.ring {
  position: absolute;
  width: 320px; height: 320px;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid var(--border);
  border-radius: 50%;
  animation: spin 30s linear infinite;
}
.ring::after {
  content: "";
  position: absolute;
  width: 8px; height: 8px;
  background: var(--accent2);
  border-radius: 50%;
  top: -4px; left: 50%;
  transform: translateX(-50%);
}
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }

/* --- COUNTER STRIP ---------------------------------------- */
.counter-strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 2.5rem 0;
  background: var(--surface);
}
.counter-strip .container {
  display: flex;
  justify-content: space-around;
  gap: 2rem;
  flex-wrap: wrap;
}
.stat-item {
  text-align: center;
}
.stat-number {
  display: block;
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--accent);
  font-family: var(--mono);
  letter-spacing: -0.02em;
  line-height: 1;
}
.stat-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.5rem;
}

/* --- WHAT WE DO — NUMBERED LIST LAYOUT -------------------- */
.section { padding: clamp(3rem, 8vh, 6rem) 0; }
.section-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  display: block;
  margin-bottom: 0.75rem;
}
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}
.section-header h2 { max-width: 600px; }

.numbered-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.numbered-list li {
  background: var(--bg);
  padding: 2.5rem;
  counter-increment: services;
  position: relative;
  transition: background 0.2s;
}
.numbered-list li:hover { background: var(--surface); }
.numbered-list li::before {
  content: "0" counter(services);
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.15em;
  display: block;
  margin-bottom: 1rem;
}
.numbered-list h3 { margin-bottom: 0.5rem; }
.numbered-list p { font-size: 0.95rem; }

/* --- APPROACH — TIMELINE STYLE ---------------------------- */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding-left: 2.5rem;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 0.75rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}
.timeline-item {
  position: relative;
  padding-bottom: 3rem;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -2.125rem;
  top: 0.4rem;
  width: 12px;
  height: 12px;
  border: 2px solid var(--accent);
  background: var(--bg);
  border-radius: 50%;
}
.timeline-item h3 { margin-bottom: 0.4rem; }
.timeline-item .step-num {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.12em;
  display: block;
  margin-bottom: 0.3rem;
}

/* --- TECH STACK — TAG CLOUD ------------------------------- */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.tag {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  transition: border-color 0.15s, color 0.15s;
  cursor: default;
}
.tag:hover { border-color: var(--accent); color: var(--accent); }

/* --- CONTACT FORM — BRUTALIST BOX ------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--gap);
  align-items: start;
}
.contact-info { padding-top: 0.5rem; }
.contact-info address {
  font-style: normal;
  margin-top: 1.5rem;
}
.contact-info address p {
  color: var(--text-dim);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}
.contact-info address strong { display: block; margin-bottom: 0.15rem; }

.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
}
.form-group { margin-bottom: 1.5rem; }
.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.95rem;
  transition: border-color 0.15s;
  resize: vertical;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form-group textarea { min-height: 120px; }
.form-feedback { margin-top: 0.75rem; font-size: 0.9rem; min-height: 1.4em; }
.form-feedback.success { color: var(--accent); }
.form-feedback.error { color: var(--warn); }

/* --- FOOTER ----------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: var(--gap);
  margin-bottom: 2rem;
}
.footer-col h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 1rem;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col ul a { font-size: 0.9rem; color: var(--text-dim); }
.footer-col ul a:hover { color: var(--accent); }
.footer-col address { font-style: normal; }
.footer-col address p { font-size: 0.9rem; margin-bottom: 0.3rem; }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--text-dim);
}
.footer-legal { display: flex; gap: 1.5rem; }
.footer-legal a { font-size: 0.8rem; }

/* --- LEGAL PAGES ------------------------------------------ */
.legal-page {
  padding: clamp(2rem, 6vh, 5rem) 0;
  max-width: 780px;
  margin-inline: auto;
  padding-inline: var(--page-mx);
}
.legal-page h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin-bottom: 0.5rem;
}
.legal-page .last-updated {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
  display: block;
  margin-bottom: 2.5rem;
}
.legal-page h2 {
  font-size: 1.3rem;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.legal-page p, .legal-page li {
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 1rem;
  color: var(--text-dim);
}
.legal-page ul, .legal-page ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}
.legal-page li { margin-bottom: 0.5rem; }
.legal-page strong { color: var(--text); }

/* --- SCROLL ANIMATIONS ------------------------------------ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

.reveal-left {
  opacity: 0;
  transform: translateX(-24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.reveal-left.visible { opacity: 1; transform: translateX(0); }

.reveal-right {
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.reveal-right.visible { opacity: 1; transform: translateX(0); }

/* --- RESPONSIVE ------------------------------------------- */
@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-visual { height: 280px; order: -1; }
  .geo-stack { transform: scale(0.7); }
  .ring { width: 260px; height: 260px; }

  .numbered-list { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .section-header { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem var(--page-mx);
    gap: 1rem;
  }
  .mobile-toggle { display: flex; }

  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
  .geo-stack { transform: scale(0.55); }
  .ring { width: 220px; height: 220px; }
  .counter-strip .container { flex-direction: column; align-items: center; }
}
