/* 期海雷達金融科技設計系統 - 純CSS版本 */

/* CSS 變數定義 */
:root {
  /* 主要背景色系 - 深藍黑專業風格 */
  --background: hsl(233, 71%, 9%);
  --foreground: hsl(0, 0%, 100%);

  /* 卡片設計 */
  --card: hsl(0, 0%, 0%);
  --card-foreground: hsl(0, 0%, 100%);
  --card-overlay: hsla(0, 0%, 100%, 0.05);
  --card-border: hsla(0, 0%, 100%, 0.1);

  /* 品牌主色 - 科技藍 */
  --primary: hsl(210, 100%, 50%);
  --primary-foreground: hsl(0, 0%, 100%);
  --primary-glow: hsl(210, 100%, 65%);

  /* 次要色系 */
  --secondary: hsla(0, 0%, 0%, 0.8);
  --secondary-foreground: hsl(0, 0%, 100%);

  /* 靜音色系 */
  --muted: hsla(0, 0%, 100%, 0.05);
  --muted-foreground: hsl(0, 0%, 80%);

  /* 強調色 - 金橙色 CTA */
  --accent: hsl(36, 100%, 50%);
  --accent-foreground: hsl(0, 0%, 0%);

  /* 邊框和輸入 */
  --border: hsla(0, 0%, 100%, 0.1);

  /* 社群媒體品牌色 */
  --instagram: hsl(315, 100%, 50%);
  --line: hsl(120, 100%, 40%);

  /* 漸層設計 */
  --gradient-hero: linear-gradient(135deg, hsl(233, 71%, 9%), hsl(0, 0%, 0%));
  --gradient-card: linear-gradient(145deg, var(--card-overlay), transparent);
  --gradient-glow: radial-gradient(circle at center, hsla(210, 100%, 65%, 0.3), transparent);

  /* 陰影系統 */
  --shadow-card: 0 4px 20px hsla(0, 0%, 0%, 0.3);
  --shadow-glow: 0 0 30px hsla(210, 100%, 50%, 0.3);
  --shadow-hover: 0 8px 40px hsla(0, 0%, 0%, 0.4);

  /* 動畫過渡 */
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);

  --radius: 15px;
}

/* 基本重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  background: var(--gradient-hero);
  color: var(--foreground);
  line-height: 1.6;
  min-height: 100vh;
}

/* 容器 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .container {
    padding: 0 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 2rem;
  }
}

/* 導航欄 */
.navbar-glass {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--secondary);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 4rem;
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 2rem;
}

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

.nav-link {
  color: var(--foreground);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition-smooth);
  position: relative;
}

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

.nav-link::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  bottom: -4px;
  left: 0;
  background: var(--primary);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.nav-link:hover::after {
  transform: scaleX(1);
}

.nav-mobile {
  display: flex;
}

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

.menu-toggle {
  background: none;
  border: none;
  color: var(--foreground);
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.menu-toggle:hover {
  color: var(--primary);
}

.close-icon {
  display: none;
}

.menu-toggle.active .menu-icon {
  display: none;
}

.menu-toggle.active .close-icon {
  display: inline;
}

/* 手機選單 */
.mobile-menu {
  display: none;
  background: var(--secondary);
  backdrop-filter: blur(16px);
}

.mobile-menu.active {
  display: block;
}

.mobile-menu-content {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mobile-nav-link {
  color: var(--foreground);
  text-decoration: none;
  padding: 0.75rem;
  font-weight: 500;
  transition: var(--transition-smooth);
  border-radius: 0.5rem;
}

.mobile-nav-link:hover {
  color: var(--primary);
  background: var(--muted);
}

.mobile-login {
  padding: 0.75rem;
}

/* 按鈕樣式 */
.btn-hero {
  background: var(--primary);
  color: var(--primary-foreground);
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-glow);
}

.btn-hero:hover {
  transform: scale(1.05);
  box-shadow: 0 0 40px hsla(210, 100%, 50%, 0.5);
}

.btn-cta {
  background: var(--accent);
  color: var(--accent-foreground);
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 1.125rem;
  cursor: pointer;
  transition: var(--transition-bounce);
}

.btn-cta:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 20px hsla(36, 100%, 50%, 0.3);
}

/* 英雄區域 */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 4rem;
  position: relative;
  overflow: hidden;
}

.hero-content {
  text-align: center;
  position: relative;
  z-index: 10;
}

.hero-logo {
  margin-bottom: 2rem;
}

.logo-display {
  position: relative;
  display: inline-block;
}

.main-title {
  font-size: 3.75rem;
  font-weight: 700;
  color: var(--primary);
  text-shadow: 0 0 20px hsla(210, 100%, 50%, 0.5);
  transition: var(--transition-smooth);
  cursor: pointer;
}

.main-title:hover {
  transform: scale(1.05);
}

@media (min-width: 768px) {
  .main-title {
    font-size: 5rem;
  }
}

.glow-effect {
  position: absolute;
  inset: -1rem;
  background: var(--gradient-glow);
  opacity: 0.3;
  border-radius: 50%;
  filter: blur(3rem);
  z-index: -1;
}

.hero-text {
  margin-bottom: 2rem;
}

.subtitle {
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--foreground);
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

@media (min-width: 768px) {
  .subtitle {
    font-size: 2.5rem;
  }
}

@media (min-width: 1024px) {
  .subtitle {
    font-size: 3rem;
  }
}

.tagline {
  font-size: 1.25rem;
  color: var(--muted-foreground);
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .tagline {
    font-size: 1.5rem;
  }
}

/* 打字機效果 */
.typewriter {
  overflow: hidden;
  border-right: 2px solid var(--primary);
  white-space: nowrap;
  margin: 0 auto;
  animation: typing 2s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blink-caret {
  from, to { border-color: transparent; }
  50% { border-color: var(--primary); }
}

/* 裝飾元素 */
.decorative-elements {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.glow-1 {
  position: absolute;
  top: 25%;
  left: 25%;
  width: 8rem;
  height: 8rem;
  background: hsla(210, 100%, 50%, 0.1);
  border-radius: 50%;
  filter: blur(3rem);
  animation: pulse 2s infinite;
}

.glow-2 {
  position: absolute;
  bottom: 25%;
  right: 25%;
  width: 6rem;
  height: 6rem;
  background: hsla(36, 100%, 50%, 0.1);
  border-radius: 50%;
  filter: blur(3rem);
  animation: pulse 2s infinite 1s;
}

@keyframes pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.7; }
}

/* 功能展示區域 */
.features-section {
  padding: 5rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--foreground);
  text-shadow: 0 0 20px hsla(210, 100%, 50%, 0.5);
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .section-title {
    font-size: 3rem;
  }
}

.section-description {
  font-size: 1.25rem;
  color: var(--muted-foreground);
  max-width: 48rem;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 4rem;
}

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

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

.feature-card {
  background: var(--gradient-card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-card);
}

.feature-card:hover {
  transform: translateY(-0.5rem);
  box-shadow: var(--shadow-hover);
  border-color: hsla(210, 100%, 50%, 0.3);
}

.feature-content {
  text-align: center;
}

.feature-icon {
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: center;
}

.icon-wrapper {
  padding: 0.75rem;
  background: hsla(210, 100%, 50%, 0.1);
  border-radius: 0.75rem;
  font-size: 2.5rem;
}

.feature-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 1rem;
}

.feature-description {
  color: var(--muted-foreground);
  line-height: 1.6;
}

.features-cta {
  text-align: center;
}

/* 使命宣言區域 */
.mission-section {
  padding: 5rem 0;
}

.mission-content {
  max-width: 64rem;
  margin: 0 auto;
}

.mission-block {
  background: hsla(210, 100%, 50%, 0.1);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 2rem;
  backdrop-filter: blur(10px);
}

.mission-title {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 1.5rem;
  text-align: center;
}

@media (min-width: 768px) {
  .mission-title {
    font-size: 2.5rem;
  }
}

.mission-quote {
  font-size: 1.25rem;
  color: var(--muted-foreground);
  font-style: italic;
  line-height: 1.6;
  margin-bottom: 2rem;
  text-align: center;
}

@media (min-width: 768px) {
  .mission-quote {
    font-size: 1.5rem;
  }
}

.mission-values {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

.value-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary);
  font-weight: 600;
}

.value-dot {
  width: 0.5rem;
  height: 0.5rem;
  background: var(--primary);
  border-radius: 50%;
}

/* 聯繫區域 */
.contact-section {
  padding: 5rem 0;
}

.contact-content {
  text-align: center;
  max-width: 48rem;
  margin: 0 auto;
}

.contact-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .contact-title {
    font-size: 3rem;
  }
}

.contact-description {
  font-size: 1.25rem;
  color: var(--muted-foreground);
  margin-bottom: 2rem;
}

.social-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-instagram {
  border: 2px solid #e91e63;
  color: #e91e63;
  background: transparent;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  transition: var(--transition-smooth);
}

.btn-instagram:hover {
  background: #e91e63;
  color: white;
}

.btn-line {
  border: 2px solid #00c300;
  color: #00c300;
  background: transparent;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  transition: var(--transition-smooth);
}

.btn-line:hover {
  background: #00c300;
  color: white;
}

/* 頁腳 */
.footer {
  background: hsla(0, 0%, 0%, 0.5);
  border-top: 1px solid var(--border);
  padding: 3rem 0;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .footer-content {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.footer-brand-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1rem;
}

.footer-brand-description {
  color: var(--muted-foreground);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.footer-decorative {
  display: flex;
  gap: 1rem;
}

.decorative-dot {
  width: 0.75rem;
  height: 0.75rem;
  background: var(--primary);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.delay-150 {
  animation-delay: 0.15s;
}

.delay-300 {
  animation-delay: 0.3s;
}

.footer-section-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 1rem;
}

.footer-link-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-link {
  color: var(--muted-foreground);
  text-decoration: none;
  transition: var(--transition-smooth);
}

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

.footer-text {
  color: var(--muted-foreground);
}

.footer-copyright {
  border-top: 1px solid var(--border);
  margin-top: 2rem;
  padding-top: 2rem;
  text-align: center;
}

.copyright-text {
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

/* 動畫類別 */
.fade-in-down {
  animation: fadeInDown 0.7s ease-out forwards;
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
}

.delay-100 {
  animation-delay: 0.1s;
}

.delay-300 {
  animation-delay: 0.3s;
}

.delay-500 {
  animation-delay: 0.5s;
}

.delay-700 {
  animation-delay: 0.7s;
}

/* 動畫關鍵幀 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 響應式設計 */
@media (max-width: 767px) {
  .main-title {
    font-size: 2.5rem;
  }

  .subtitle {
    font-size: 1.25rem;
  }

  .tagline {
    font-size: 1rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .mission-title {
    font-size: 1.5rem;
  }

  .mission-quote {
    font-size: 1rem;
  }

  .contact-title {
    font-size: 2rem;
  }
}

/* 滾動條美化 */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--background);
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-glow);
}

/* 動態背景粒子 */
.bg-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.1;
}

.particle {
  position: absolute;
  background: var(--primary);
  border-radius: 50%;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(180deg); }
}

.images {
            margin: 40px 0;
        }

        .images img {
            width: 200px;
            height: auto;
            margin: 0 15px;
            transition: all 0.5s ease;
            filter: drop-shadow(0 0 20px rgba(0, 123, 255, 0.3));
        }

        .images img:hover {
            transform: scale(1.1) rotate(2deg);
            filter: drop-shadow(0 0 30px rgba(0, 123, 255, 0.6));
        }

        .images {
            animation: logoFloat 3s ease-in-out infinite;
        }

        @keyframes logoFloat {
            0%, 100% { transform: translateY(0px); }
            50% { transform: translateY(-10px); }
        }

/* 手機版導航布局修正 */
.nav-mobile-login {
  display: none;
}

@media (max-width: 767px) {
  .nav-content {
    position: relative;
  }

  .nav-mobile {
    order: 1;
    position: absolute;
    left: 0;
  }

  .logo {
    order: 2;
    flex: 1;
    text-align: left;
    margin-left: 60px; /* 為漢堡選單留空間 */
  }

  .nav-mobile-login {
    order: 3;
    display: flex;
    position: absolute;
    right: 0;
    color: var(--foreground);
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition-smooth);
    cursor: pointer;
  }

  .nav-mobile-login:hover {
    background-color: rgba(0, 123, 255, 0.2);
    color: var(--primary);
  }

  .nav-desktop {
    display: none !important;
  }
}