/* ==========================================================================
   Capital Management Firm - Under Construction Stylesheet
   Theme: Midnight Obsidian, Imperial Champagne Gold & Royal Sapphire
   Default Language: Traditional Chinese (繁體中文)
   Fully Responsive for All Mobile Devices & Tablets
   ========================================================================== */

:root {
  --bg-main: #060911;
  --bg-surface: rgba(13, 19, 33, 0.75);

  /* Gold & Metallic Palette */
  --gold-primary: #D4AF37;
  --gold-light: #FDE68A;
  --gold-dark: #996515;
  --gold-glow: rgba(212, 175, 55, 0.35);

  /* Royal Navy & Platinum */
  --sapphire-dark: #0a1329;
  --sapphire-light: #38bdf8;
  --border-subtle: rgba(212, 175, 55, 0.16);
  --border-gold: rgba(212, 175, 55, 0.5);

  --text-primary: #ffffff;
  --text-gold: #FDE68A;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --font-serif: 'Cinzel', 'Noto Sans TC', serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans TC', 'PingFang TC', sans-serif;
  --radius-full: 9999px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-sans);
  height: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at 50% 20%, #0d1527 0%, #060911 65%, #04060b 100%);
}

/* --- Dynamic Background Canvas & Ambient Nebulae --- */
#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  pointer-events: none;
  z-index: 1;
}

.aurora-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.aurora-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.35;
  animation: auroraFloat 22s infinite alternate ease-in-out;
  will-change: transform;
}

.blob-gold {
  width: min(580px, 90vw);
  height: min(580px, 90vw);
  background: radial-gradient(circle, rgba(212, 175, 55, 0.4), transparent 70%);
  top: -80px;
  left: 10%;
  animation-duration: 24s;
}

.blob-navy {
  width: min(620px, 95vw);
  height: min(620px, 95vw);
  background: radial-gradient(circle, rgba(30, 58, 138, 0.55), transparent 70%);
  top: 25%;
  right: -80px;
  animation-duration: 28s;
  animation-delay: -6s;
}

.blob-amber {
  width: min(500px, 80vw);
  height: min(500px, 80vw);
  background: radial-gradient(circle, rgba(180, 83, 9, 0.35), transparent 70%);
  bottom: -80px;
  left: 15%;
  animation-duration: 20s;
  animation-delay: -12s;
}

@keyframes auroraFloat {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(35px, 30px) scale(1.06); }
  100% { transform: translate(-25px, 45px) scale(0.96); }
}

.bg-grid-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background-image: 
    linear-gradient(to right, rgba(212, 175, 55, 0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(212, 175, 55, 0.025) 1px, transparent 1px);
  background-size: 52px 52px;
  z-index: 0;
  pointer-events: none;
  mask-image: radial-gradient(circle at 50% 45%, rgba(0,0,0,1) 20%, rgba(0,0,0,0) 80%);
  -webkit-mask-image: radial-gradient(circle at 50% 45%, rgba(0,0,0,1) 20%, rgba(0,0,0,0) 80%);
}

/* --- Layout Wrapper (Mobile Safe Areas) --- */
.site-wrapper {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 1.75rem 1.5rem 2rem;
  padding-top: max(1.5rem, env(safe-area-inset-top));
  padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
  padding-left: max(1.25rem, env(safe-area-inset-left));
  padding-right: max(1.25rem, env(safe-area-inset-right));
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

/* --- Header (Right-Aligned Language Switcher) --- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 1.5rem;
  width: 100%;
}

/* Prestigious Language Toggle Pill */
.lang-switch {
  display: inline-flex;
  align-items: center;
  background: rgba(13, 19, 33, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 3px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 7px 16px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: inherit;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lang-btn:hover {
  color: var(--text-primary);
}

.lang-btn.active {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.32), rgba(180, 83, 9, 0.28));
  color: #FFFBEB;
  border: 1px solid var(--border-gold);
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.35);
}

/* --- Main Content (Centered & Prestigious) --- */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem 0.5rem 2rem;
  width: 100%;
}

/* Centerpiece Insignia */
.vivid-visual {
  position: relative;
  width: 146px;
  height: 146px;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.orb-ring {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.ring-outer {
  width: 144px;
  height: 144px;
  border: 1.5px dashed rgba(212, 175, 55, 0.45);
  animation: ringSpinCW 24s linear infinite;
}

.ring-mid {
  width: 114px;
  height: 114px;
  border: 1.5px solid rgba(56, 189, 248, 0.25);
  border-top-color: var(--gold-primary);
  border-bottom-color: var(--gold-light);
  animation: ringSpinCCW 14s linear infinite;
}

@keyframes ringSpinCW {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes ringSpinCCW {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(-360deg); }
}

.orb-core {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #151d32, #070b14);
  border: 1.5px solid rgba(212, 175, 55, 0.5);
  box-shadow: 0 0 35px rgba(212, 175, 55, 0.35), inset 0 0 20px rgba(212, 175, 55, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: corePulse 3.5s infinite ease-in-out;
}

@keyframes corePulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 28px rgba(212, 175, 55, 0.3); }
  50% { transform: scale(1.05); box-shadow: 0 0 45px rgba(212, 175, 55, 0.5); }
}

.orb-svg {
  width: 42px;
  height: 42px;
  filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.5));
}

/* Status Pill */
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.35);
  padding: 7px 18px;
  border-radius: var(--radius-full);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--gold-light);
  margin-bottom: 1.4rem;
  box-shadow: 0 0 25px rgba(212, 175, 55, 0.18);
  max-width: 96%;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--gold-primary);
  box-shadow: 0 0 12px var(--gold-primary);
  animation: dotBlink 2s infinite ease-in-out;
  flex-shrink: 0;
}

@keyframes dotBlink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.8); }
}

/* Typography */
.main-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 6.2vw, 3.8rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #FFFFFF 15%, #FDE68A 50%, #D4AF37 80%, #AA771C 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 40px rgba(212, 175, 55, 0.25);
  word-break: break-word;
}

.main-subtitle {
  font-size: clamp(0.95rem, 3.2vw, 1.15rem);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-primary);
  margin-bottom: 1.5rem;
  word-break: break-word;
}

.main-desc {
  font-size: clamp(0.95rem, 2.5vw, 1.18rem);
  line-height: 1.9;
  color: var(--text-secondary);
  max-width: 620px;
  margin: 0 auto;
  font-weight: 400;
  padding: 0 0.5rem;
}

/* --- Footer --- */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  width: 100%;
}

/* ==========================================================================
   Mobile-Specific Optimizations
   ========================================================================== */

/* Standard Phone Breakpoint (<= 640px) */
@media (max-width: 640px) {
  .site-wrapper {
    padding: 1.25rem 1rem 1.5rem;
    padding-top: max(1.2rem, env(safe-area-inset-top));
    padding-bottom: max(1.2rem, env(safe-area-inset-bottom));
  }

  .site-header {
    padding-bottom: 1rem;
  }

  .vivid-visual {
    width: 118px;
    height: 118px;
    margin-bottom: 1.4rem;
  }

  .ring-outer {
    width: 116px;
    height: 116px;
  }

  .ring-mid {
    width: 92px;
    height: 92px;
  }

  .orb-core {
    width: 64px;
    height: 64px;
  }

  .orb-svg {
    width: 34px;
    height: 34px;
  }

  .status-pill {
    font-size: 0.78rem;
    padding: 6px 14px;
    margin-bottom: 1.1rem;
  }

  .main-title {
    font-size: clamp(1.85rem, 8vw, 2.5rem);
    margin-bottom: 0.4rem;
  }

  .main-subtitle {
    font-size: clamp(0.86rem, 3.8vw, 1.02rem);
    letter-spacing: 0.12em;
    margin-bottom: 1.2rem;
  }

  .main-desc {
    font-size: clamp(0.92rem, 3.8vw, 1.05rem);
    line-height: 1.8;
    padding: 0 0.25rem;
  }

  .site-footer {
    padding-top: 1.2rem;
    font-size: 0.78rem;
  }
}

/* Small Phone Breakpoint (<= 380px, e.g. iPhone SE / mini) */
@media (max-width: 380px) {
  .vivid-visual {
    width: 100px;
    height: 100px;
    margin-bottom: 1.1rem;
  }

  .ring-outer {
    width: 98px;
    height: 98px;
  }

  .ring-mid {
    width: 78px;
    height: 78px;
  }

  .orb-core {
    width: 54px;
    height: 54px;
  }

  .orb-svg {
    width: 28px;
    height: 28px;
  }

  .status-pill {
    font-size: 0.72rem;
    padding: 5px 12px;
    margin-bottom: 0.9rem;
  }

  .main-title {
    font-size: 1.7rem;
  }

  .main-subtitle {
    font-size: 0.82rem;
    margin-bottom: 0.9rem;
  }

  .main-desc {
    font-size: 0.88rem;
    line-height: 1.75;
  }

  .lang-btn {
    padding: 5px 12px;
    font-size: 0.76rem;
    min-height: 32px;
  }
}

/* Landscape Phone Support */
@media (max-height: 520px) and (orientation: landscape) {
  .site-wrapper {
    min-height: auto;
    padding: 1rem 1.5rem;
  }

  .vivid-visual {
    width: 80px;
    height: 80px;
    margin-bottom: 0.8rem;
  }

  .ring-outer { width: 78px; height: 78px; }
  .ring-mid { width: 62px; height: 62px; }
  .orb-core { width: 44px; height: 44px; }
  .orb-svg { width: 22px; height: 22px; }

  .main-title { font-size: 1.6rem; }
  .main-subtitle { margin-bottom: 0.6rem; }
  .main-desc { font-size: 0.88rem; line-height: 1.6; }
}
