/* ============================================
   聖輪宗 — 深邃神秘・金色傳承
   ============================================ */

/* --- Tailwind CDN 覆寫 + 自定義樣式 --- */

@tailwind base;
@tailwind components;
@tailwind utilities;

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

:root {
  --midnight: #0F172A;
  --midnight-light: #1a2744;
  --gold: #D4AF37;
  --gold-soft: #E9D38A;
  --gold-glow: rgba(212, 175, 55, 0.25);
  --ivory: #F8F5EE;
  --burgundy: #7A1F2B;
  --text-primary: #F8F5EE;
  --text-muted: #A8A4D8;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--midnight);
  color: var(--ivory);
  font-family: 'Noto Sans TC', sans-serif;
  font-weight: 300;
  line-height: 1.8;
}

h1, h2, h3, h4 {
  font-family: 'Noto Serif TC', serif;
  font-weight: 700;
  color: var(--gold);
  line-height: 1.4;
}

a { text-decoration: none; color: inherit; transition: all .3s; }
a:hover { color: var(--gold-soft); }

/* ---- Hero ---- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 30%, #1a2744 0%, #0F172A 70%);
}

.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 800'%3E%3Ccircle cx='400' cy='400' r='350' fill='none' stroke='%23D4AF37' stroke-width='0.5' opacity='0.1'/%3E%3Ccircle cx='400' cy='400' r='280' fill='none' stroke='%23D4AF37' stroke-width='0.4' opacity='0.08'/%3E%3Ccircle cx='400' cy='400' r='200' fill='none' stroke='%23D4AF37' stroke-width='0.3' opacity='0.06'/%3E%3Ccircle cx='400' cy='400' r='120' fill='none' stroke='%23D4AF37' stroke-width='0.3' opacity='0.05'/%3E%3C/svg%3E") center/cover no-repeat;
  animation: rotateMandala 60s linear infinite;
}

@keyframes rotateMandala {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.hero-title {
  font-size: clamp(3rem, 10vw, 7rem);
  font-weight: 900;
  letter-spacing: .3em;
  text-shadow: 0 0 60px rgba(212,175,55,.4);
  position: relative;
  z-index: 1;
}

.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  letter-spacing: .5em;
  color: var(--gold-soft);
  margin-top: 1.5rem;
  font-weight: 400;
  position: relative;
  z-index: 1;
}

.hero-tagline {
  font-size: 1rem;
  color: var(--text-muted);
  margin-top: 2rem;
  max-width: 560px;
  line-height: 2;
  position: relative;
  z-index: 1;
}

.hero-btns {
  display: flex; gap: 1.5rem; flex-wrap: wrap;
  justify-content: center;
  margin-top: 3rem;
  position: relative;
  z-index: 1;
}

.btn-gold {
  padding: .8rem 2.5rem;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: .95rem;
  letter-spacing: .15em;
  transition: all .3s;
  position: relative;
  overflow: hidden;
}
.btn-gold::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s;
  z-index: -1;
}
.btn-gold:hover::before { transform: scaleX(1); }
.btn-gold:hover { color: var(--midnight); }

.btn-outline {
  padding: .8rem 2.5rem;
  border: 1px solid rgba(248,245,238,.3);
  color: var(--ivory);
  font-size: .95rem;
  letter-spacing: .15em;
  transition: all .3s;
}
.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* ---- Nav ---- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(15,23,42,.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(212,175,55,.15);
  padding: 0 2rem;
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.nav-logo {
  font-family: 'Noto Serif TC', serif;
  font-size: 1.4rem; font-weight: 900;
  color: var(--gold); letter-spacing: .2em;
}
.nav-links {
  display: flex; gap: 2rem; list-style: none;
}
.nav-links a {
  font-size: .88rem; letter-spacing: .12em;
  color: var(--text-muted);
}
.nav-links a:hover, .nav-links a.active { color: var(--gold); }
.nav-mobile-btn {
  display: none;
  background: none; border: none;
  color: var(--gold); font-size: 1.5rem;
  cursor: pointer;
}

/* ---- Sections ---- */
.section {
  padding: 5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}
.section-dark {
  background: linear-gradient(180deg, var(--midnight) 0%, var(--midnight-light) 50%, var(--midnight) 100%);
}
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  text-align: center;
  margin-bottom: .5rem;
}
.section-sub {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 3.5rem;
  font-size: .95rem;
}

/* ---- Cards ---- */
.card {
  background: rgba(26,39,68,.6);
  border: 1px solid rgba(212,175,55,.12);
  padding: 2.5rem;
  transition: all .3s;
}
.card:hover {
  border-color: rgba(212,175,55,.35);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
.card-icon {
  font-size: 2.5rem;
  margin-bottom: 1.2rem;
}
.card-title {
  font-size: 1.3rem;
  margin-bottom: .8rem;
}
.card-text {
  color: var(--text-muted);
  font-size: .92rem;
  line-height: 1.8;
}

/* ---- Grid ---- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2.5rem;
}

/* ---- Path (時間軸) ---- */
.path-step {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  padding: 1.5rem 0;
  position: relative;
}
.path-num {
  width: 56px; height: 56px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Noto Serif TC', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gold);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.path-step:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 27px; top: 56px; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--gold), rgba(212,175,55,.2));
}
.path-content h4 {
  font-size: 1.15rem;
  margin-bottom: .3rem;
}
.path-content p {
  color: var(--text-muted);
  font-size: .88rem;
}

/* ---- CTA Banner ---- */
.cta-banner {
  background: radial-gradient(ellipse at center, rgba(212,175,55,.12) 0%, transparent 70%);
  border-top: 1px solid rgba(212,175,55,.2);
  border-bottom: 1px solid rgba(212,175,55,.2);
  text-align: center;
  padding: 5rem 2rem;
}
.cta-banner h2 { font-size: clamp(1.8rem, 4vw, 3rem); margin-bottom: 1rem; }
.cta-banner p { color: var(--text-muted); margin-bottom: 2rem; }

/* ---- Footer ---- */
.footer {
  background: #080e1a;
  border-top: 1px solid rgba(212,175,55,.1);
  padding: 3rem 2rem;
  text-align: center;
}
.footer-logo {
  font-family: 'Noto Serif TC', serif;
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--gold);
  letter-spacing: .2em;
  margin-bottom: 1rem;
}
.footer-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.footer-links a {
  color: var(--text-muted);
  font-size: .85rem;
  letter-spacing: .1em;
}
.footer-copy {
  color: rgba(168,164,216,.5);
  font-size: .8rem;
}

/* ---- Tag ---- */
.tag {
  display: inline-block;
  padding: .25rem .8rem;
  background: rgba(122,31,43,.4);
  border: 1px solid var(--burgundy);
  color: #e8a0a0;
  font-size: .78rem;
  letter-spacing: .1em;
  margin-bottom: .5rem;
}

/* ---- 響應式 ---- */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-mobile-btn { display: block; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: rgba(15,23,42,.97);
    padding: 1.5rem 2rem;
    gap: 1.2rem;
    border-bottom: 1px solid rgba(212,175,55,.15);
  }
  .hero-title { letter-spacing: .15em; }
  .section { padding: 3.5rem 1.5rem; }
  .path-step { gap: 1.2rem; }
}

/* ---- 滾動動畫 ---- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: all .6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}