/* ==========================================
   Orbit2 Series Website Design System
   ========================================== */

/* 1. CSS Variables & Tokens */
:root {
  /* HSL Color Palette */
  --primary-hue: 174;
  --primary-sat: 84%;
  --primary-lightness: 31%;

  --primary: hsl(var(--primary-hue), var(--primary-sat), var(--primary-lightness));          /* #0d9488 */
  --primary-hover: hsl(var(--primary-hue), var(--primary-sat), 25%);
  --primary-light: hsl(var(--primary-hue), var(--primary-sat), 96%);
  --primary-light-hover: hsl(var(--primary-hue), var(--primary-sat), 92%);
  --primary-muted: hsl(var(--primary-hue), 30%, 45%);
  
  --secondary: hsl(142, 76%, 45%); /* Soft mint accent */
  --secondary-light: hsl(142, 76%, 95%);
  
  --bg-gradient: linear-gradient(135deg, hsl(210, 20%, 98%) 0%, hsl(174, 30%, 97%) 100%);
  --bg-white: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.85);
  --border-color: hsl(210, 14%, 89%);
  
  /* Text Colors */
  --text-main: hsl(215, 25%, 15%);
  --text-muted: hsl(215, 16%, 47%);
  --text-white: #ffffff;

  /* Font Families */
  --font-zh: "Noto Sans TC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-en: "Outfit", sans-serif;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 16px 40px rgba(13, 148, 136, 0.08);
  --shadow-card-hover: 0 20px 40px rgba(0, 0, 0, 0.1);
  --shadow-line: 0 4px 20px rgba(0, 0, 0, 0.08);

  /* Borders & Radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  --border-radius-line: 18px;

  /* Layout */
  --max-width: 1200px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 2. Base Rules & Resets */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-zh);
  background: var(--bg-gradient);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

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

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

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

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

.text-center { text-align: center; }
.badge {
  display: inline-block;
  padding: 6px 16px;
  background-color: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: 0.5px;
  border: 1px solid hsl(var(--primary-hue), var(--primary-sat), 88%);
}

/* 4. Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  transition: var(--transition);
  gap: 8px;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--text-white);
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.3);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(13, 148, 136, 0.4);
}

.btn-secondary {
  background-color: var(--primary-light);
  color: var(--primary);
  border: 1px solid hsl(var(--primary-hue), var(--primary-sat), 88%);
}

.btn-secondary:hover {
  background-color: var(--primary-light-hover);
  transform: translateY(-2px);
}

/* 5. Header & Navigation */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  display: flex;
  align-items: center;
  transition: var(--transition);
}

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

.logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-img {
  height: 50px;
  width: auto;
  object-fit: contain;
}

.logo-text {
  font-family: var(--font-en);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
}

.logo-badge {
  font-size: 0.7rem;
  padding: 2px 8px;
  background-color: var(--text-main);
  color: var(--text-white);
  border-radius: 4px;
  font-weight: 600;
  margin-left: 4px;
  vertical-align: middle;
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
}

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

/* 6. Hero Section */
.hero {
  padding-top: 140px;
  padding-bottom: 80px;
  display: flex;
  align-items: center;
  min-height: 80vh;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}

.hero-content h1 {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 24px;
  color: var(--text-main);
}

.hero-content h1 span {
  color: var(--primary);
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.hero-pain-points {
  margin-bottom: 40px;
  list-style: none;
}

.hero-pain-points li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 16px;
  color: var(--text-main);
}

.hero-pain-points li::before {
  content: "×";
  position: absolute;
  left: 4px;
  top: -2px;
  color: #ef4444;
  font-size: 1.5rem;
  font-weight: 700;
}

.hero-ctas {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* 7. Features Section */
.features {
  padding: 100px 0;
  background-color: var(--bg-white);
}

.section-title {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--text-main);
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 60px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}



.feature-card {
  padding: 40px;
  background: var(--bg-gradient);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
  border-color: hsl(var(--primary-hue), var(--primary-sat), 80%);
}

.feature-icon-wrapper {
  width: 56px;
  height: 56px;
  background-color: var(--primary);
  color: var(--text-white);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 24px;
  box-shadow: 0 4px 10px rgba(13, 148, 136, 0.2);
}

.feature-card h3 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-main);
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* 8. LINE Simulator UI */
.simulator-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.phone-mockup {
  width: 370px;
  height: 680px;
  background-color: #000;
  border-radius: 40px;
  padding: 12px;
  box-shadow: var(--shadow-lg);
  position: relative;
  border: 4px solid #1f2937;
}

.phone-screen {
  width: 100%;
  height: 100%;
  background-color: #8c9eb5; /* Classic LINE Chat BG */
  border-radius: 30px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* LINE Header */
.line-header {
  height: 52px;
  background-color: #212b36;
  color: #ffffff;
  display: flex;
  align-items: center;
  padding: 0 16px;
  font-size: 0.9rem;
  font-weight: 600;
  gap: 10px;
}

.line-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background-color: var(--primary-light);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.line-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* LINE Chat Area */
.line-chat-area {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Message Bubbles */
.chat-time {
  align-self: center;
  background-color: rgba(0, 0, 0, 0.15);
  color: #ffffff;
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  margin-bottom: 8px;
}

.message-user {
  align-self: flex-end;
  background-color: #7ee284;
  color: #0f172a;
  padding: 8px 12px;
  border-radius: var(--border-radius-line) 4px var(--border-radius-line) var(--border-radius-line);
  max-width: 80%;
  font-size: 0.85rem;
  box-shadow: var(--shadow-sm);
  word-break: break-all;
  position: relative;
}

.message-bot-flex {
  align-self: flex-start;
  max-width: 85%;
  width: 100%;
  background-color: #ffffff;
  border-radius: var(--border-radius-line);
  box-shadow: var(--shadow-line);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Flex Card Sections */
.flex-header {
  background-color: var(--primary);
  color: #ffffff;
  padding: 10px 14px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.flex-body {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.flex-block {
  border-radius: 8px;
  padding: 6px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.flex-block-chinese {
  background-color: #f8fafc;
}

.flex-block-indo {
  background-color: #f0fdf4;
}

.flex-block-check {
  background-color: #fffbeb;
  border: 1px dashed #f59e0b;
}

.flex-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
}

.flex-label-indo { color: #15803d; }
.flex-label-check { color: #b45309; }

.flex-text {
  font-size: 0.8rem;
  font-weight: 700;
  color: #0f172a;
}

.flex-text-large {
  font-size: 0.95rem;
}

.flex-buttons {
  border-top: 1px solid var(--border-color);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}

.flex-btn {
  padding: 8px 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-align: center;
  color: var(--primary);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

.flex-btn:nth-child(odd) {
  border-right: 1px solid var(--border-color);
}

.flex-btn-action {
  grid-column: span 2;
  background-color: var(--primary-light);
  color: var(--primary);
  font-weight: 800;
  font-size: 0.8rem;
  border-bottom: none;
  cursor: pointer;
}

.flex-btn-action:hover {
  background-color: var(--primary);
  color: #ffffff;
}

/* Simulation Success Toast */
.sim-success-toast {
  position: absolute;
  top: 60px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background-color: #10b981;
  color: #ffffff;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sim-success-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Simulated LINE Share Sheet */
.line-share-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 15;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease-in-out;
  border-radius: 30px;
}

.line-share-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.line-share-sheet {
  position: absolute;
  bottom: -100%;
  left: 0;
  width: 100%;
  height: 52%;
  background-color: #8c9eb5; /* Classic LINE Chat BG */
  border-radius: 24px 24px 0 0;
  z-index: 20;
  transition: bottom 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: var(--font-zh);
  box-shadow: 0 -8px 35px rgba(0, 0, 0, 0.3);
}

.line-share-sheet.show {
  bottom: 0;
}

.share-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 8px;
  border-bottom: none;
}

.share-sheet-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b; /* Dark text */
  text-align: center;
  flex: 1;
}

.share-sheet-close-icon, .share-sheet-search-icon {
  background: none;
  border: none;
  font-size: 1.1rem;
  color: #1e293b; /* Dark text */
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.share-sheet-search {
  padding: 0 20px 8px;
}

.share-sheet-search .search-box {
  height: 34px;
  background-color: #ffffff; /* White search box */
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: default;
}

.share-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px 10px;
  padding: 12px 20px 24px;
  justify-items: center;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
}

.share-grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  text-align: center;
  width: 66px;
  transition: transform 0.15s;
}

.share-grid-item:active {
  transform: scale(0.95);
}

.share-avatar-circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.pattern-coral {
  background-color: #e76f51;
  background-image: radial-gradient(circle, #f4a261 10%, transparent 11%), radial-gradient(circle, #f4a261 10%, transparent 11%);
  background-size: 8px 8px;
  background-position: 0 0, 4px 4px;
}

.more-circle {
  background-color: #ffffff; /* White more circle */
  color: #1e293b; /* Dark dots */
  font-size: 0.75rem;
  letter-spacing: -1px;
}

.share-avatar-name {
  font-size: 0.72rem;
  color: #1e293b; /* Dark text for high contrast */
  font-weight: 700; /* Bold */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

/* Static Mockup Button Style (Disables clicks/hovers) */
.static-btn {
  cursor: default !important;
  pointer-events: none !important;
  user-select: none !important;
}

/* Simulated LINE Input Bar Styles */
.line-input-bar {
  height: 52px;
  background-color: #f7f7f7;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  padding: 0 10px;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
  flex-shrink: 0;
}

.input-bar-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #7c8695;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: default;
  padding: 0;
  outline: none;
}

.input-bar-field {
  flex: 1;
  height: 36px;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
}

.input-placeholder {
  display: block;
  color: #a0aec0;
  font-size: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
  transition: color 0.15s;
}

.input-placeholder.typing-active {
  color: #000000;
  font-weight: 500;
}

.input-bar-emoji {
  font-size: 1rem;
  color: #7c8695;
  cursor: default;
  margin-left: 4px;
}

/* Simulator Controls Panel */
.simulator-controls {
  width: 100%;
  max-width: 450px;
  margin-top: 24px;
  background: var(--bg-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.sim-chips-title {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-muted);
}

.sim-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.sim-chip {
  padding: 6px 14px;
  background-color: var(--primary-light);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  transition: var(--transition);
}

.sim-chip:hover, .sim-chip.active {
  background-color: var(--primary);
  color: var(--text-white);
}

.sim-input-wrapper {
  display: flex;
  gap: 10px;
}

.sim-input {
  flex: 1;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 10px 18px;
  font-size: 0.9rem;
  outline: none;
  font-family: inherit;
  transition: var(--transition);
}

.sim-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

.sim-send-btn {
  width: 42px;
  height: 42px;
  background-color: var(--primary);
  color: var(--text-white);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.sim-send-btn:hover {
  background-color: var(--primary-hover);
  transform: scale(1.05);
}

/* 9. FAQ Section */
.faq {
  padding: 100px 0;
}

.faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: var(--transition);
}

.faq-question {
  width: 100%;
  padding: 20px 24px;
  text-align: left;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: none;
  outline: none;
}

.faq-icon {
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--primary);
  transition: var(--transition);
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0, 1, 0, 1);
}

.faq-answer-inner {
  padding: 0 24px 20px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.faq-item.active .faq-answer {
  max-height: 500px; /* Big enough value */
  transition: max-height 0.3s cubic-bezier(1, 0, 1, 0);
}

/* 10. Footer */
.footer {
  background-color: hsl(215, 25%, 12%);
  color: hsl(210, 14%, 80%);
  padding: 60px 0 30px;
  border-top: 1px solid hsl(215, 25%, 20%);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-info h4 {
  color: var(--text-white);
  font-size: 1.2rem;
  margin-bottom: 12px;
  font-weight: 700;
}

.footer-info p {
  color: hsl(210, 14%, 60%);
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 450px;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-end;
}

.footer-link {
  color: hsl(210, 14%, 65%);
  font-size: 0.9rem;
  transition: var(--transition);
}

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

.footer-divider {
  border-top: 1px solid hsl(215, 25%, 20%);
  padding-top: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-copyright {
  font-size: 0.8rem;
  color: hsl(210, 14%, 50%);
}

.footer-disclaimer {
  font-size: 0.8rem;
  color: hsl(210, 14%, 50%);
  max-width: 700px;
  line-height: 1.5;
}

/* 11. Keyframe Animations */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 12. Responsive Media Queries */
@media (max-width: 1024px) {
  .hero h1 {
    font-size: 2.3rem;
  }
  .hero-grid {
    gap: 40px;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 15px;
  }
  
  .header {
    height: 70px;
  }
  
  .nav {
    display: none; /* Mobile menu can be added later, keeping it simple for now */
  }
  
  .hero {
    padding-top: 110px;
    padding-bottom: 50px;
  }
  
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 50px;
    text-align: center;
  }
  
  .hero-content h1 {
    font-size: 2.2rem;
  }
  
  .hero-pain-points {
    text-align: left;
    max-width: 450px;
    margin: 0 auto 30px;
  }
  
  .hero-ctas {
    justify-content: center;
    flex-direction: column;
    width: 100%;
  }
  
  .hero-ctas .btn {
    width: 100%;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .feature-card {
    padding: 30px;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
    text-align: center;
  }
  
  .footer-nav {
    align-items: center;
  }
  
  .footer-divider {
    flex-direction: column;
    text-align: center;
  }
}

/* Scoped simulator card compaction to prevent vertical clipping of buttons */
.phone-screen .flex-body {
  padding: 8px !important;
  gap: 6px !important;
}

.phone-screen .flex-block {
  padding: 5px 8px !important;
}

.phone-screen .flex-text-large {
  font-size: 0.85rem !important;
}
