/* ==========================================================================
   TinyScapes - Shared Common Stylesheet (Global Design System, Header, Footer & Modals)
   Path: css/common.css
   ========================================================================== */

:root {
  --brand-blue: #3186f0;
  --brand-blue-hover: #4594f8;
  --brand-blue-glow: rgba(49, 134, 240, 0.4);
  --brand-blue-bg: rgba(49, 134, 240, 0.12);
  
  --bg-dark: #080b11;
  --bg-surface: #101522;
  --bg-card: rgba(16, 23, 36, 0.7);
  --bg-glass-nav: rgba(8, 11, 17, 0.85);
  
  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --border-light: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(49, 134, 240, 0.35);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: 'Instrument Serif', Georgia, serif;

  --container-width: 1400px;
  --header-height: 84px;

  /* Apple-Style Continuous Corner Radius System (Squircle Curvature) */
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --radius-xl: 32px;
  --radius-pill: 9999px;

  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  font-family: var(--font-sans);
  background-color: var(--bg-dark);
  color: var(--text-primary);
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 20px);
  -webkit-font-smoothing: antialiased;
}

section {
  scroll-margin-top: calc(var(--header-height) + 20px);
}

body {
  min-height: 100vh;
  line-height: 1.6;
  background: var(--bg-dark);
  color: var(--text-primary);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

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

/* Scroll Lazy Loading */
img.lazy-load {
  opacity: 0;
  filter: blur(10px);
  transform: scale(0.98);
  transition: opacity 0.4s ease, filter 0.4s ease, transform 0.4s ease;
  will-change: opacity, filter, transform;
}

img.lazy-loaded {
  opacity: 1;
  filter: blur(0);
  transform: scale(1);
}

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

/* Accessibility & Pure Semantic SEO Utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* --------------------------------------------------------------------------
   1. Shared Header Navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  display: flex;
  align-items: center;
  transition: background-color var(--transition-normal), backdrop-filter var(--transition-normal);
}

.site-header.scrolled {
  background-color: var(--bg-glass-nav);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.header-logo-img {
  height: 36px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(49, 134, 240, 0.6));
  transition: transform var(--transition-fast);
}

.brand-logo:hover .header-logo-img {
  transform: scale(1.05);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 16px;
  list-style: none;
}

.nav-link {
  font-size: 0.88rem;
  color: var(--text-secondary);
  font-weight: 400;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  transition: all var(--transition-fast);
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link.nav-pill-active {
  color: var(--text-primary);
  background: var(--brand-blue-bg);
  border: 1px solid rgba(49, 134, 240, 0.4);
  box-shadow: 0 0 14px rgba(49, 134, 240, 0.25);
  padding: 6px 18px;
  font-weight: 500;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.btn-contact {
  padding: 8px 24px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(49, 134, 240, 0.4);
  background: rgba(49, 134, 240, 0.08);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.btn-contact:hover {
  background: var(--brand-blue);
  color: #ffffff;
  border-color: var(--brand-blue);
  box-shadow: 0 0 16px var(--brand-blue-glow);
}

.lang-switch {
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.lang-switch span.active {
  color: var(--text-primary);
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   2. Shared Footer (Clean & Minimal Personal Studio)
   -------------------------------------------------------------------------- */
.site-footer {
  padding: 48px 0 28px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #05070c;
}

.footer-minimal-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  padding-bottom: 26px;
}

.footer-minimal-brand {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 320px;
}

.footer-minimal-desc {
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.5;
  font-weight: 300;
}

.footer-minimal-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.footer-minimal-nav a {
  font-size: 0.86rem;
  color: #94a3b8;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-minimal-nav a:hover {
  color: #ffffff;
}

.footer-minimal-social {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-social-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  font-size: 0.8rem;
  font-family: inherit;
  text-decoration: none;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.footer-social-link:hover {
  background: rgba(49, 134, 240, 0.12);
  border-color: rgba(49, 134, 240, 0.4);
  color: #ffffff;
  transform: translateY(-2px);
}

.footer-social-link.footer-link-copied {
  background: rgba(34, 197, 94, 0.2) !important;
  border-color: rgba(34, 197, 94, 0.6) !important;
  color: #4ade80 !important;
  box-shadow: 0 0 14px rgba(34, 197, 94, 0.4);
}

.footer-minimal-bottom {
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.78rem;
  color: #64748b;
}

@media (max-width: 860px) {
  .footer-minimal-wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  
  .footer-minimal-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* --------------------------------------------------------------------------
   3. Shared Global Modals
   -------------------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-xl);
  padding: 36px;
  max-width: 420px;
  width: 90%;
  position: relative;
  text-align: center;
  transform: scale(0.95);
  transition: transform var(--transition-normal);
}

.modal-overlay.active .modal-box {
  transform: scale(1);
}

.wechat-modal-box {
  max-width: 380px;
  padding: 36px 30px 30px 30px;
  background: linear-gradient(160deg, #0d131f 0%, #060910 100%);
  border: 1px solid rgba(49, 134, 240, 0.4);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9), 0 0 35px rgba(49, 134, 240, 0.2);
}

.wechat-modal-header {
  margin-bottom: 18px;
}

.wechat-modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 6px;
}

.wechat-modal-sub {
  font-size: 0.82rem;
  color: #94a3b8;
  line-height: 1.4;
}

.qr-code-wrapper {
  margin: 16px auto;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #ffffff;
  padding: 12px;
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  max-width: 220px;
}

.wechat-qr-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}

.wechat-id-display {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.86rem;
  margin-top: 6px;
}

.wechat-id-label {
  color: #94a3b8;
}

.wechat-id-val {
  color: #38bdf8;
  font-weight: 600;
  font-family: monospace;
  letter-spacing: 0.04em;
}

.btn-wechat-copy-modal {
  background: rgba(34, 197, 94, 0.2);
  border: 1px solid rgba(34, 197, 94, 0.5);
  color: #4ade80;
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.25);
  transition: all var(--transition-fast);
}

.btn-wechat-copy-modal:hover {
  background: rgba(34, 197, 94, 0.35);
  border-color: #4ade80;
  transform: translateY(-1px);
}

.process-modal-box {
  max-width: 580px;
  padding: 36px;
  background: #0f1420;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(49, 134, 240, 0.35);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.95), 0 0 35px rgba(49, 134, 240, 0.2);
  text-align: left;
}

.process-modal-header {
  margin-bottom: 20px;
}

.step-counter-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  background: rgba(49, 134, 240, 0.12);
  border: 1px solid rgba(49, 134, 240, 0.4);
  box-shadow: 0 0 16px rgba(49, 134, 240, 0.25);
  padding: 6px 18px;
  border-radius: var(--radius-pill);
  margin-bottom: 12px;
}

.step-counter-pill .step-current {
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1;
  text-shadow: 0 0 12px rgba(49, 134, 240, 0.6);
}

.step-counter-pill .step-slash {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.35);
  font-weight: 400;
  margin: 0 1px;
}

.step-counter-pill .step-total {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.process-modal-title {
  font-size: 1.55rem;
  font-weight: 500;
  color: #ffffff;
  margin: 4px 0 2px 0;
}

.process-modal-sub {
  font-size: 0.85rem;
  color: var(--brand-blue);
  font-weight: 500;
}

.process-modal-img-container {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-light);
  margin-bottom: 20px;
  background: #000000;
}

.process-modal-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease;
}

.process-modal-desc {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--text-secondary);
  margin-bottom: 26px;
}

.process-modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-light);
  padding-top: 20px;
}

.btn-step-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-hover);
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.85rem;
  transition: all var(--transition-fast);
}

.btn-step-nav:hover {
  background: var(--brand-blue-bg);
  border-color: var(--brand-blue);
  color: var(--brand-blue);
}

.btn-step-next {
  background: var(--brand-blue-bg);
  border-color: rgba(49, 134, 240, 0.5);
  color: #ffffff;
}

.btn-step-next:hover {
  background: var(--brand-blue);
  color: #ffffff;
  box-shadow: 0 0 14px var(--brand-blue-glow);
}

.modal-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 1.2rem;
  color: var(--text-secondary);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.qr-code-wrapper {
  background: #ffffff;
  padding: 16px;
  border-radius: var(--radius-md);
  margin: 20px auto;
  display: inline-block;
}

/* --------------------------------------------------------------------------
   5. CTA Section (Shared across pages)
   -------------------------------------------------------------------------- */
.cta-section {
  padding: 60px 0;
  text-align: center;
  border-top: 1px solid var(--border-light);
}

.cta-title {
  font-size: 2.6rem;
  font-weight: 400;
  margin-bottom: 14px;
}

.cta-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.cta-buttons-group {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.btn-social {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 24px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(49, 134, 240, 0.4);
  background: var(--brand-blue-bg);
  font-size: 0.88rem;
  transition: all var(--transition-fast);
}

.btn-social svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.btn-social:hover {
  background: var(--brand-blue);
  color: #ffffff;
  box-shadow: 0 0 16px var(--brand-blue-glow);
}

/* --------------------------------------------------------------------------
   6. Shared Workshop Tech & Direct Fabrication Capabilities Section (维度 3)
   -------------------------------------------------------------------------- */
.works-atelier-section {
  padding: 100px 0 110px 0;
  background: radial-gradient(circle at 50% 0%, rgba(49, 134, 240, 0.12) 0%, rgba(6, 9, 15, 0.98) 70%), #06090f;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}

.works-atelier-section::before {
  content: '';
  position: absolute;
  top: -150px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 300px;
  background: radial-gradient(ellipse, rgba(49, 134, 240, 0.2) 0%, transparent 70%);
  filter: blur(50px);
  pointer-events: none;
}

.atelier-header-block {
  text-align: left;
  max-width: 840px;
  margin-bottom: 52px;
  position: relative;
  z-index: 1;
}

.atelier-title {
  font-size: 3.2rem;
  font-weight: 400;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 16px;
}

.atelier-desc {
  font-size: 1.02rem;
  color: #94a3b8;
  line-height: 1.7;
  font-weight: 300;
}

.atelier-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 48px;
  position: relative;
  z-index: 1;
}

.atelier-card {
  background: linear-gradient(160deg, rgba(18, 26, 42, 0.85) 0%, rgba(9, 13, 21, 0.96) 100%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-xl);
  padding: 34px 26px;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
  backdrop-filter: blur(20px);
  position: relative;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.atelier-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--brand-blue), transparent);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.atelier-card:hover {
  transform: translateY(-8px);
  border-color: rgba(49, 134, 240, 0.5);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(49, 134, 240, 0.2);
}

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

.atelier-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.atelier-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(49, 134, 240, 0.12);
  border: 1px solid rgba(49, 134, 240, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #38bdf8;
  box-shadow: 0 0 16px rgba(49, 134, 240, 0.2);
  transition: all var(--transition-fast);
}

.atelier-card:hover .atelier-icon-box {
  background: var(--brand-blue);
  color: #ffffff;
  box-shadow: 0 0 24px var(--brand-blue-glow);
  transform: scale(1.08);
}

.atelier-step-tag {
  font-size: 0.85rem;
  font-weight: 800;
  color: #475569;
  letter-spacing: 0.12em;
}

.atelier-card:hover .atelier-step-tag {
  color: #38bdf8;
}

.atelier-badge-pill {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: rgba(49, 134, 240, 0.1);
  color: #38bdf8;
  border: 1px solid rgba(49, 134, 240, 0.25);
  margin-bottom: 14px;
  width: fit-content;
}

.atelier-card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 14px;
  line-height: 1.35;
}

.atelier-card-desc {
  font-size: 0.88rem;
  line-height: 1.65;
  color: #94a3b8;
  font-weight: 300;
  margin-bottom: 22px;
  flex-grow: 1;
}

/* Technical Metric Pills */
.atelier-meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.atelier-meta-pill {
  font-size: 0.74rem;
  font-weight: 500;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

/* Workshop Strip Action Bar */
.atelier-footer-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 36px;
  background: linear-gradient(90deg, rgba(49, 134, 240, 0.12) 0%, rgba(15, 23, 42, 0.6) 100%);
  border: 1px solid rgba(49, 134, 240, 0.35);
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.6), 0 0 25px rgba(49, 134, 240, 0.15);
  position: relative;
  z-index: 1;
}

.atelier-strip-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.atelier-strip-text {
  font-size: 1.1rem;
  color: #ffffff;
  font-weight: 500;
}

.atelier-strip-sub {
  font-size: 0.84rem;
  color: #94a3b8;
}

.atelier-strip-action {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 30px;
  background: var(--brand-blue);
  color: #ffffff;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 0 20px var(--brand-blue-glow);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.atelier-strip-action:hover {
  background: var(--brand-blue-hover);
  box-shadow: 0 0 30px rgba(49, 134, 240, 0.6);
  transform: translateY(-2px);
}

@media (max-width: 1200px) {
  .atelier-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .atelier-title {
    font-size: 2.3rem;
  }
  .atelier-grid {
    grid-template-columns: 1fr;
  }
  .atelier-footer-strip {
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
    padding: 24px;
  }
  .atelier-strip-action {
    width: 100%;
    justify-content: center;
  }
}