/* ══════════════════════════════
   RESET & BASE
══════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { 
  scroll-behavior: smooth; 
  font-size: 17px;
}
body {
  font-family: 'Jost', 'Noto Sans TC', sans-serif;
  background: #EEE8FF;
  color: #0f0f0f;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  font-size: 1rem;
  line-height: 1.6;
}
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }

/* ══════════════════════════════
   TOKENS
══════════════════════════════ */
:root {
  --a:    #7C5CFC;
  --ink:  #0f0f0f;
  --dark: #151515;
  --bg:   #EEE8FF;
  --w:    #ffffff;
  --px:   clamp(1.25rem, 5vw, 2rem);
  --max:  1100px;
}

/* ══════════════════════════════
   TYPOGRAPHY
══════════════════════════════ */
.hd {
  font-family: 'Jost', sans-serif;
  font-weight: 900;
  letter-spacing: -.035em;
  line-height: 1.0;
}
.label-tag {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--a);
  display: block;
  margin-bottom: 12px;
}

/* ══════════════════════════════
   REVEAL ANIMATION
══════════════════════════════ */
.rv {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .65s ease, transform .65s ease;
}
.rv.in { opacity: 1; transform: none; }
.rv.d1 { transition-delay: .08s; }
.rv.d2 { transition-delay: .16s; }
.rv.d3 { transition-delay: .24s; }

/* ══════════════════════════════
   ELEGANT FADE-IN SCALE
══════════════════════════════ */
.fade-scale {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity .8s cubic-bezier(0.4, 0, 0.2, 1), 
              transform .8s cubic-bezier(0.4, 0, 0.2, 1);
}
.fade-scale.in { opacity: 1; transform: scale(1); }

/* ══════════════════════════════
   SLIDE IN FROM SIDES
══════════════════════════════ */
.slide-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity .7s ease, transform .7s ease;
}
.slide-left.in { opacity: 1; transform: translateX(0); }

.slide-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity .7s ease, transform .7s ease;
}
.slide-right.in { opacity: 1; transform: translateX(0); }

/* ══════════════════════════════
   HOVER LIFT
══════════════════════════════ */
.lift { transition: transform .22s, box-shadow .22s; }
.lift:hover { transform: translateY(-3px); box-shadow: 0 12px 36px rgba(0,0,0,.11); }

/* ══════════════════════════════
   NAV
══════════════════════════════ */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(238,232,255,.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(0,0,0,.07);
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--px);
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  overflow: visible;
}
.nav-logo { font-size: 20px; letter-spacing: -.03em; }
.nav-logo span { color: var(--a); }

.nav-links {
  display: none;
  list-style: none;
  gap: 28px;
  align-items: center;
}
.nav-links a {
  font-size: 13px;
  font-weight: 600;
  color: #444;
  letter-spacing: .02em;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1.5px;
  background: var(--ink);
  transition: width .22s;
}
.nav-links a:hover::after { width: 100%; }
.nav-links a.active::after { width: 100%; }

.nav-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; overflow: visible; }

/* Lang toggle */
.lang-toggle {
  display: none;
  background: rgba(0,0,0,.07);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.lang-btn {
  font-family: 'Jost', sans-serif;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  letter-spacing: .04em;
  background: transparent;
  color: #555;
  transition: background .2s, color .2s;
}
.lang-btn.active { background: var(--ink); color: #fff; }

.nav-cta {
  display: none;
  align-items: center;
  gap: 6px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: 999px;
  letter-spacing: .02em;
  transition: opacity .2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-cta:hover { opacity: .85; }

/* Hamburger */
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  position: relative;
  z-index: 101;
  -webkit-tap-highlight-color: transparent;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ink);
  border-radius: 2px;
  transition: .3s;
  pointer-events: none;
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* Mobile drawer */
.drawer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease;
  background: var(--bg);
  border-top: 1px solid transparent;
}
.drawer.open {
  max-height: 600px;
  border-top-color: rgba(0,0,0,.07);
  overflow-y: auto;
}
.drawer-inner { padding: 12px var(--px) 20px; display: flex; flex-direction: column; }
.drawer-inner a {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -.03em;
  color: var(--ink);
  padding: 9px 0;
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.drawer-inner a:last-child { border-bottom: none; }

/* Mobile drawer footer */
.drawer-footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(0,0,0,.06);
}

.drawer-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 999px;
  letter-spacing: .02em;
  transition: opacity .2s;
}
.drawer-cta:hover { opacity: .85; }

/* Mobile drawer language toggle */
.drawer-lang {
  display: flex;
  justify-content: center;
  gap: 8px;
}
.drawer-lang .lang-btn {
  font-size: 13px;
  padding: 8px 20px;
}

@media (min-width: 768px) {
  .nav-links { display: flex; }
  .nav-cta   { display: flex; }
  .hamburger { display: none; }
  .lang-toggle { display: flex; }
  .drawer { display: none; }
}

/* Adjust for medium screens */
@media (min-width: 768px) and (max-width: 1024px) {
  .nav-links { gap: 20px; }
  .nav-links a { font-size: 12px; }
  .nav-cta { font-size: 12px; padding: 8px 14px; }
  .lang-btn { font-size: 10px; padding: 4px 10px; }
}

/* ══════════════════════════════
   SECTION WRAPPER
══════════════════════════════ */
.sec {
  max-width: var(--max);
  margin: 0 auto;
  padding: 68px var(--px);
}
.sec-dark {
  background: var(--dark);
  padding: 68px 0;
}
.sec-dark .sec-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--px);
}

/* ══════════════════════════════
   BUTTONS
══════════════════════════════ */
.btn-dark {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ink); color: #fff;
  font-family: 'Jost', sans-serif;
  font-size: 14px; font-weight: 700;
  padding: 13px 22px; border-radius: 999px;
  letter-spacing: .02em; border: none; cursor: pointer;
  transition: opacity .2s;
}
.btn-dark:hover { opacity: .85; }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; color: var(--ink);
  font-family: 'Jost', sans-serif;
  font-size: 14px; font-weight: 700;
  padding: 12px 20px; border-radius: 999px;
  border: 1.5px solid rgba(0,0,0,.18); cursor: pointer;
  transition: all .2s;
}
.btn-ghost:hover { border-color: var(--ink); }

/* ══════════════════════════════
   FOOTER - Enhanced Design
══════════════════════════════ */
footer {
  background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 50%, #0f0f0f 100%);
  border-top: 1px solid rgba(124,92,252,.15);
  padding: 4rem var(--px) 2rem;
  position: relative;
  overflow: hidden;
}

/* Subtle gradient overlay */
footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: radial-gradient(ellipse at 50% 0%, rgba(124,92,252,.08) 0%, transparent 70%);
  pointer-events: none;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* Footer Grid Layout */
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

/* Brand Section */
.footer-brand h3 {
  font-family: 'Jost', sans-serif;
  font-size: 2rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -.03em;
  margin-bottom: 1rem;
}
.footer-brand h3 span {
  color: var(--a);
}
.footer-brand p {
  font-size: 0.9rem;
  color: rgba(255,255,255,.5);
  line-height: 1.7;
  max-width: 320px;
  margin-bottom: 1.5rem;
}

/* Footer Section Title */
.footer-section h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

/* Footer Links */
.footer-links-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-links-list li {
  margin-bottom: 0.75rem;
}
.footer-links-list a {
  font-size: 0.9rem;
  color: rgba(255,255,255,.45);
  font-weight: 500;
  transition: all .3s ease;
  display: inline-block;
  position: relative;
}
.footer-links-list a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--a);
  transition: width .3s ease;
}
.footer-links-list a:hover {
  color: var(--a);
  transform: translateX(4px);
}
.footer-links-list a:hover::after {
  width: 100%;
}

/* Social Icons */
.footer-socials {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.footer-social-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(124,92,252,.1);
  border: 1px solid rgba(124,92,252,.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.6);
  transition: all .3s ease;
}
.footer-social-icon:hover {
  background: var(--a);
  border-color: var(--a);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(124,92,252,.3);
}

/* Footer Bottom */
.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-copy {
  font-size: 0.85rem;
  color: rgba(255,255,255,.35);
  font-weight: 500;
}
.footer-copy strong {
  color: rgba(255,255,255,.6);
  font-weight: 700;
}
.footer-copy .highlight {
  color: var(--a);
  font-weight: 700;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}
.footer-links a {
  font-size: 0.85rem;
  color: rgba(255,255,255,.4);
  font-weight: 600;
  transition: color .3s ease;
}
.footer-links a:hover {
  color: var(--a);
}

/* Large Text Hover Effect (Optional) */
.footer-hero-text {
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Jost', sans-serif;
  font-size: clamp(4rem, 12vw, 10rem);
  font-weight: 900;
  color: transparent;
  -webkit-text-stroke: 1px rgba(124,92,252,.08);
  letter-spacing: -.05em;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  opacity: 0.6;
  transition: all .5s ease;
}
footer:hover .footer-hero-text {
  -webkit-text-stroke: 1px rgba(124,92,252,.15);
  opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
  footer {
    padding: 3rem var(--px) 1.5rem;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
  .footer-hero-text {
    font-size: 3rem;
    bottom: -20px;
  }
}
