@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@300;400;500;700&family=Noto+Serif+TC:wght@400;500;600;700&display=swap');

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background: #192617;
  color: #f0f0e8;
}

body {
  font-family: 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', sans-serif;
  background: #192617;
  color: #f0f0e8;
  line-height: 1.65;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3 {
  font-family: 'Noto Serif TC', 'Georgia', serif;
  line-height: 1.25;
  letter-spacing: 0.02em;
}

h1 { font-size: clamp(2rem, 6vw, 4rem); font-weight: 700; color: #87ff71; }
h2 { font-size: clamp(1.4rem, 3.5vw, 2.2rem); font-weight: 600; color: #ffce5c; }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.5rem); font-weight: 500; color: #87ff71; }

p { font-size: 1rem; line-height: 1.7; margin-bottom: 1rem; }
a { color: #87ff71; text-decoration: none; transition: color 0.2s; }
a:hover { color: #ffce5c; }
ul, ol { padding-left: 1.5rem; }
li { margin-bottom: 0.4rem; }

/* ===== SCROLL MARGIN FOR STICKY NAV ===== */
div[id] { scroll-margin-top: 100px; }

/* ===== MEMPHIS BG SHAPES ===== */
.memphis-bg-shapes {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.shape { position: absolute; opacity: 0.08; }

.shape-tri-1 {
  width: 0; height: 0;
  border-left: 120px solid transparent;
  border-right: 120px solid transparent;
  border-bottom: 200px solid #87ff71;
  top: 5%; right: 8%;
  transform: rotate(15deg);
  opacity: 0.12;
}

.shape-tri-2 {
  width: 0; height: 0;
  border-left: 80px solid transparent;
  border-right: 80px solid transparent;
  border-top: 140px solid #ffce5c;
  bottom: 15%; left: 3%;
  transform: rotate(-20deg);
  opacity: 0.1;
}

.shape-circle-1 {
  width: 300px; height: 300px;
  border-radius: 50%;
  border: 8px solid #ffce5c;
  top: 30%; right: -80px;
  opacity: 0.1;
}

.shape-zigzag-1 {
  width: 200px; height: 40px;
  background: repeating-linear-gradient(
    90deg,
    transparent, transparent 10px,
    #87ff71 10px, #87ff71 20px
  );
  clip-path: polygon(0% 100%, 5% 0%, 10% 100%, 15% 0%, 20% 100%, 25% 0%, 30% 100%, 35% 0%, 40% 100%, 45% 0%, 50% 100%, 55% 0%, 60% 100%, 65% 0%, 70% 100%, 75% 0%, 80% 100%, 85% 0%, 90% 100%, 95% 0%, 100% 100%);
  top: 60%; left: 10%;
  opacity: 0.15;
}

.shape-dot-grid {
  width: 200px; height: 200px;
  background-image: radial-gradient(circle, #87ff71 2px, transparent 2px);
  background-size: 20px 20px;
  bottom: 20%; right: 5%;
  opacity: 0.12;
}

.shape-rect-1 {
  width: 60px; height: 60px;
  background: #ffce5c;
  transform: rotate(45deg);
  top: 70%; left: 50%;
  opacity: 0.07;
}

/* ===== HEADER ===== */
.site-header {
  position: relative;
  z-index: 100;
  background: rgba(25, 38, 23, 0.97);
  border-bottom: 3px solid #87ff71;
}

/* ===== DETAILS NAV ===== */
.nav-details {
  position: relative;
}

.nav-details[open] .hamburger-icon span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-details[open] .hamburger-icon span:nth-child(2) { opacity: 0; }
.nav-details[open] .hamburger-icon span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.nav-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  height: 64px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.nav-summary::-webkit-details-marker { display: none; }

.nav-brand-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.brand-link, .brand-link-inner {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.brand-text {
  font-family: 'Noto Serif TC', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #87ff71;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.site-logo-img {
  height: 40px;
  width: auto;
  display: block;
}

.hamburger-icon {
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  margin-left: auto;
}

.hamburger-icon span {
  display: block;
  width: 24px;
  height: 2px;
  background: #87ff71;
  transition: transform 0.25s, opacity 0.2s;
}

/* Full nav menu */
.nav-menu-full {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem 1rem;
  list-style: none;
  border-top: 1px dashed rgba(135, 255, 113, 0.3);
  background: rgba(25, 38, 23, 0.99);
}

.nav-left-group, .nav-right-group {
  flex: 1;
}

.nav-right-group { display: flex; justify-content: flex-end; }

.nav-left-group ul, .nav-right-group ul {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  flex-wrap: wrap;
}

.nav-center-brand {
  flex: 0 0 auto;
  padding: 0 2rem;
}

.nav-menu-full li a {
  display: block;
  padding: 0.6rem 0.9rem;
  min-height: 40px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #f0f0e8;
  border: 1.5px solid transparent;
  border-radius: 4px;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  display: flex;
  align-items: center;
}

.nav-menu-full li a:hover {
  color: #192617;
  background: #87ff71;
  border-color: #87ff71;
}

/* ===== STICKY ANCHOR BAR ===== */
.sticky-anchor-bar {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(25, 38, 23, 0.98);
  border-bottom: 2px solid #ffce5c;
  backdrop-filter: blur(4px);
}

.sticky-anchor-bar ul {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  gap: 0;
  list-style: none;
  padding: 0;
}

.sticky-anchor-bar ul::-webkit-scrollbar { display: none; }

.sticky-anchor-bar li a {
  display: flex;
  align-items: center;
  padding: 0.7rem 1.1rem;
  min-height: 44px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #c8e8c0;
  white-space: nowrap;
  border-right: 1px solid rgba(135, 255, 113, 0.15);
  transition: color 0.2s, background 0.2s;
}

.sticky-anchor-bar li a:hover {
  color: #192617;
  background: #ffce5c;
}

/* ===== HERO ===== */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 120px 2rem 4rem;
  z-index: 1;
}

.hero-deco-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Noto Serif TC', serif;
  font-size: clamp(8rem, 25vw, 22rem);
  font-weight: 700;
  color: rgba(135, 255, 113, 0.04);
  pointer-events: none;
  user-select: none;
  letter-spacing: -0.05em;
  white-space: nowrap;
  mix-blend-mode: screen;
}

.hero-content {
  display: flex;
  align-items: center;
  gap: 4rem;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.hero-text {
  flex: 1 1 55%;
  max-width: 600px;
}

.hero-eyebrow {
  margin-bottom: 1rem;
}

.eyebrow-tag {
  display: inline-block;
  background: #ffce5c;
  color: #192617;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.hero-desc {
  font-size: 1.05rem;
  color: #b8d8b0;
  margin: 1.2rem 0 2rem;
  max-width: 480px;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.75rem 2rem;
  background: #87ff71;
  color: #192617;
  font-weight: 700;
  font-size: 1rem;
  border-radius: 4px;
  border: 2px solid #87ff71;
  transition: background 0.2s, color 0.2s, transform 0.15s;
}

.btn-primary:hover {
  background: #192617;
  color: #87ff71;
  transform: translate(-2px, -2px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.75rem 2rem;
  background: transparent;
  color: #ffce5c;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 4px;
  border: 2px solid #ffce5c;
  transition: background 0.2s, color 0.2s;
}

.btn-secondary:hover {
  background: #ffce5c;
  color: #192617;
}

/* Hero visual */
.hero-visual {
  flex: 0 0 380px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-img-frame {
  width: 340px;
  height: 380px;
  position: relative;
  border: 3px solid #87ff71;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(135, 255, 113, 0.05);
  overflow: hidden;
}

.hero-img-frame::before {
  content: '';
  position: absolute;
  top: -10px; left: -10px;
  width: 100%; height: 100%;
  border: 2px dashed rgba(255, 206, 92, 0.4);
  border-radius: 4px;
  pointer-events: none;
}

.hero-shape-inner {
  position: relative;
  width: 220px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.inner-geo {
  position: absolute;
  border-radius: 4px;
}

.geo-1 {
  width: 120px; height: 120px;
  background: rgba(135, 255, 113, 0.15);
  border: 2px solid #87ff71;
  transform: rotate(15deg);
}

.geo-2 {
  width: 80px; height: 80px;
  background: rgba(255, 206, 92, 0.15);
  border: 2px solid #ffce5c;
  transform: rotate(-20deg);
  top: 10px; right: 10px;
}

.geo-3 {
  width: 0; height: 0;
  border-left: 40px solid transparent;
  border-right: 40px solid transparent;
  border-bottom: 70px solid rgba(135, 255, 113, 0.2);
  bottom: 20px; left: 10px;
  border-radius: 0;
}

.inner-label {
  position: relative;
  z-index: 2;
  font-family: 'Noto Serif TC', serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: #87ff71;
  text-shadow: 0 0 20px rgba(135, 255, 113, 0.4);
}

/* Hero scroll hint */
.hero-scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: rgba(240, 240, 232, 0.5);
}

.scroll-arrow {
  width: 20px;
  height: 20px;
  border-right: 2px solid rgba(135, 255, 113, 0.4);
  border-bottom: 2px solid rgba(135, 255, 113, 0.4);
  transform: rotate(45deg);
  animation: bounce-down 1.5s ease-in-out infinite;
}

@keyframes bounce-down {
  0%, 100% { transform: rotate(45deg) translateY(0); opacity: 0.5; }
  50% { transform: rotate(45deg) translateY(6px); opacity: 1; }
}

/* ===== MAIN LAYOUT WITH ASIDE ===== */
main {
  position: relative;
  z-index: 1;
}

.content-with-aside {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
}

.aside-quick {
  display: none;
}

/* Sidebar aside */
.sidebar-quick {
  display: block;
  float: left;
  width: 220px;
  margin: 0 0 2rem 2rem;
  position: sticky;
  top: 110px;
  align-self: flex-start;
}

/* Content area wraps around aside */
.content-with-aside {
  display: flex;
  gap: 0;
}

aside.sidebar-quick {
  flex: 0 0 220px;
  position: sticky;
  top: 110px;
  align-self: flex-start;
  order: -1;
  margin-right: 2.5rem;
  margin-left: 0;
}

.main-content {
  flex: 1 1 0;
  min-width: 0;
}

.aside-inner {
  background: rgba(135, 255, 113, 0.05);
  border: 2px solid rgba(135, 255, 113, 0.3);
  border-radius: 4px;
  padding: 1.5rem 1.2rem;
  position: relative;
  overflow: hidden;
}

.aside-title {
  font-size: 1rem;
  font-weight: 700;
  color: #ffce5c;
  margin-bottom: 0.25rem;
}

.aside-title + p.subtitle {
  font-size: 0.8rem;
  color: rgba(240, 240, 232, 0.55);
  margin-bottom: 1rem;
}

.aside-link-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.aside-link-list li {
  margin: 0;
  border-bottom: 1px dashed rgba(135, 255, 113, 0.2);
}

.aside-link-list li:last-child { border-bottom: none; }

.aside-link-list li a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0.5rem 0.4rem;
  font-size: 0.875rem;
  color: #b8d8b0;
  transition: color 0.2s;
}

.aside-link-list li a::before {
  content: '▶';
  font-size: 0.6rem;
  margin-right: 0.5rem;
  color: #87ff71;
  flex-shrink: 0;
}

.aside-link-list li a:hover { color: #87ff71; }

.aside-deco { position: absolute; bottom: -15px; right: -15px; opacity: 0.15; }

.aside-tri {
  width: 0; height: 0;
  border-left: 40px solid transparent;
  border-right: 40px solid transparent;
  border-bottom: 70px solid #ffce5c;
  transform: rotate(10deg);
}

/* ===== PAGE CONTENT SECTIONS ===== */
.main-content div {
  padding: 4rem 0;
  border-bottom: 1px solid rgba(135, 255, 113, 0.12);
  position: relative;
}

.main-content div:last-child { border-bottom: none; }

.main-content div h2 {
  margin-bottom: 0.5rem;
  position: relative;
  display: inline-block;
}

.main-content div h2::after {
  content: '';
  display: block;
  width: 60%;
  height: 3px;
  background: linear-gradient(90deg, #87ff71, transparent);
  margin-top: 0.4rem;
}

.main-content div > h2 + p {
  color: rgba(240, 240, 232, 0.7);
  margin-bottom: 1.5rem;
}

/* Glass card style */
.main-content .card,
.main-content [class*="card"] {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(135, 255, 113, 0.2);
  border-radius: 4px;
  padding: 1.5rem;
  transition: border-color 0.2s, transform 0.2s;
}

.main-content .card:hover,
.main-content [class*="card"]:hover {
  border-color: rgba(135, 255, 113, 0.5);
  transform: translateY(-2px);
}

/* Lists inside content */
.main-content ul {
  color: #c8e8c0;
}

.main-content li::marker {
  color: #87ff71;
}

.main-content strong {
  color: #ffce5c;
}

.main-content a {
  color: #87ff71;
  border-bottom: 1px dashed rgba(135, 255, 113, 0.4);
}

.main-content a:hover {
  color: #ffce5c;
  border-bottom-color: #ffce5c;
}

/* Table styles */
.main-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

.main-content th {
  background: rgba(135, 255, 113, 0.1);
  color: #87ff71;
  padding: 0.75rem 1rem;
  text-align: left;
  border: 1px solid rgba(135, 255, 113, 0.2);
  font-weight: 600;
}

.main-content td {
  padding: 0.65rem 1rem;
  border: 1px solid rgba(135, 255, 113, 0.1);
  color: #c8e8c0;
}

.main-content tr:hover td {
  background: rgba(135, 255, 113, 0.04);
}

/* ===== MEMPHIS SECTION DECORATORS ===== */
.main-content div:nth-child(odd)::before {
  content: '';
  position: absolute;
  top: 2rem;
  right: 0;
  width: 60px;
  height: 60px;
  border: 3px solid rgba(255, 206, 92, 0.2);
  transform: rotate(45deg);
  pointer-events: none;
}

/* ===== FOOTER ===== */
.site-footer {
  background: rgba(10, 20, 9, 0.98);
  border-top: 3px solid #ffce5c;
  padding: 2rem 2rem 1.5rem;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  position: relative;
  z-index: 2;
}

.footer-logo-wrap { flex: 0 0 auto; }

.footer-brand { display: flex; align-items: center; }

.footer-brand-text {
  font-family: 'Noto Serif TC', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #87ff71;
}

.footer-nav { flex: 1 1 auto; }

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  list-style: none;
  padding: 0;
  justify-content: center;
}

.footer-nav ul li a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  color: rgba(240, 240, 232, 0.65);
  transition: color 0.2s;
}

.footer-nav ul li a:hover { color: #87ff71; }

.footer-copy {
  flex: 0 0 auto;
  text-align: right;
}

.footer-copy p {
  font-size: 0.8rem;
  color: rgba(240, 240, 232, 0.45);
  margin-bottom: 0.25rem;
}

.footer-note {
  font-size: 0.72rem !important;
  color: rgba(240, 240, 232, 0.3) !important;
}

.footer-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.f-shape { position: absolute; }

.f-tri {
  width: 0; height: 0;
  border-left: 60px solid transparent;
  border-right: 60px solid transparent;
  border-bottom: 100px solid rgba(135, 255, 113, 0.05);
  bottom: -10px;
  left: 10%;
}

.f-circle {
  width: 150px; height: 150px;
  border-radius: 50%;
  background: rgba(255, 206, 92, 0.04);
  right: 5%;
  top: -30px;
}

/* ===== SUBTITLE CLASS ===== */
p.subtitle {
  color: rgba(240, 240, 232, 0.6);
  font-size: 0.95rem;
  margin-bottom: 1.2rem;
}

/* ===== PARALLAX STAGGER ===== */
.main-content div {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.main-content div.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scroll-arrow { animation: none; }
  .main-content div {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .btn-primary:hover { transform: none; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .hero-visual { display: none; }
  .hero-content { flex-direction: column; }
  .hero-text { max-width: 100%; }

  .content-with-aside {
    flex-direction: column;
  }

  aside.sidebar-quick {
    position: static;
    width: 100%;
    flex: none;
    margin-right: 0;
    margin-bottom: 2rem;
    order: 0;
  }

  .aside-inner { display: flex; gap: 1rem; flex-wrap: wrap; align-items: flex-start; }
  .aside-link-list { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; }
  .aside-link-list li { border: none; }
  .aside-link-list li a {
    background: rgba(135, 255, 113, 0.08);
    border: 1px solid rgba(135, 255, 113, 0.25);
    border-radius: 4px;
    padding: 0.4rem 0.8rem;
    min-height: 40px;
  }
  .aside-deco { display: none; }
  .aside-title { flex: 0 0 100%; }
  .aside-title + p.subtitle { flex: 0 0 100%; }
}

@media (max-width: 768px) {
  .hero-section { padding: 100px 1.25rem 3rem; }

  .nav-summary { padding: 0 1rem; }

  .nav-menu-full {
    flex-direction: column;
    padding: 1rem;
    gap: 0.5rem;
  }

  .nav-left-group ul, .nav-right-group ul {
    flex-wrap: wrap;
  }

  .nav-center-brand { display: none; }
  .nav-left-group, .nav-right-group { width: 100%; }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }

  .footer-copy { text-align: left; }

  .footer-nav ul { justify-content: flex-start; }

  .content-with-aside { padding: 0 1.25rem 3rem; }

  .main-content div { padding: 2.5rem 0; }
}

@media (max-width: 480px) {
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.3rem; }

  .sticky-anchor-bar li a { padding: 0.6rem 0.75rem; font-size: 0.78rem; }

  .hero-cta { flex-direction: column; }
  .btn-primary, .btn-secondary { width: 100%; justify-content: center; }
}

button[aria-expanded]{min-width:44px;min-height:44px}
