/* ============================================================
   盛事策劃 — Bold/Maximalist Celebration Design System
   Deep plum · Electric magenta · Gold luxury · Dramatic layouts
   Fonts: Playfair Display (display) + Bebas Neue (badge)
          Noto Serif TC (Chinese) + Noto Sans TC (body)
   ============================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,500;1,600;1,700&family=Bebas+Neue&family=Noto+Sans+TC:wght@300;400;500;600;700;900&family=Noto+Serif+TC:wght@400;500;600;700;900&display=swap');

/* --- CSS Custom Properties --- */
:root {
  /* Colors — Bold Celebration palette */
  --color-deep-plum:      #2D0A3D;   /* Deepest plum/eggplant */
  --color-plum:           #4A154B;   /* Rich plum */
  --color-magenta:        #D91A5C;   /* Electric magenta */
  --color-magenta-light:  #FF2D7A;   /* Bright magenta */
  --color-magenta-pale:   #FFD6E8;   /* Pale pink tint */
  --color-gold:           #D4A843;   /* Luxury gold */
  --color-gold-light:     #E8C96A;   /* Light gold */
  --color-gold-pale:      #FDF3D0;   /* Pale gold tint */
  --color-teal:           #00C9A7;   /* Teal accent */
  --color-teal-dark:      #009B82;   /* Dark teal */

  --color-surface:        #0D0A12;   /* Near-black with plum tint */
  --color-surface-alt:    #15101C;   /* Slightly lighter */
  --color-surface-card:   #1E1628;   /* Card surface */
  --color-surface-dark:   #08060C;   /* Darkest */
  --color-surface-light:  #2A1F38;   /* Lighter surface */

  --color-text:           #F5F0F8;   /* Near-white text */
  --color-text-muted:     #A89BB5;   /* Muted purple-gray */
  --color-text-inverse:   #0D0A12;   /* Dark on light */
  --color-text-gold:      #D4A843;   /* Gold text */

  --color-border:         #2E2340;   /* Subtle border */
  --color-border-light:   #1E1628;   /* Very subtle */

  /* Typography */
  --font-display:         'Playfair Display', 'Noto Serif TC', serif;
  --font-display-bold:    'Bebas Neue', sans-serif;
  --font-chinese:         'Noto Serif TC', serif;
  --font-body:            'Noto Sans TC', sans-serif;

  --text-scale-ratio: 1.25;
  --text-xs:    clamp(0.64rem, 0.06vw + 0.63rem, 0.70rem);
  --text-sm:    clamp(0.80rem, 0.08vw + 0.78rem, 0.88rem);
  --text-base:  clamp(1.00rem, 0.10vw + 0.98rem, 1.10rem);
  --text-md:    clamp(1.25rem, 0.12vw + 1.22rem, 1.37rem);
  --text-lg:    clamp(1.56rem, 0.15vw + 1.53rem, 1.71rem);
  --text-xl:    clamp(1.95rem, 0.19vw + 1.91rem, 2.14rem);
  --text-2xl:   clamp(2.44rem, 0.24vw + 2.38rem, 2.68rem);
  --text-3xl:   clamp(3.05rem, 0.30vw + 2.98rem, 3.35rem);
  --text-4xl:   clamp(3.81rem, 0.38vw + 3.72rem, 4.19rem);
  --text-5xl:   clamp(4.5rem, 0.5vw + 4.3rem, 5.5rem);

  /* Spacing — 8px base grid */
  --space-1:  0.5rem;
  --space-2:  1rem;
  --space-3:  1.5rem;
  --space-4:  2rem;
  --space-5:  3rem;
  --space-6:  4rem;
  --space-7:  6rem;
  --space-8:  8rem;

  /* Layout */
  --max-width:        1280px;
  --max-width-wide:   1440px;
  --header-height:    5rem;

  /* Borders & Radii */
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --radius-2xl: 32px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:  0 4px 20px rgba(0,0,0,0.5);
  --shadow-lg:  0 8px 40px rgba(0,0,0,0.6);
  --shadow-xl:  0 16px 60px rgba(0,0,0,0.7);
  --shadow-glow-magenta: 0 0 40px rgba(217,26,92,0.3);
  --shadow-glow-gold: 0 0 30px rgba(212,168,67,0.25);
  --shadow-glow-teal: 0 0 30px rgba(0,201,167,0.2);

  /* Motion */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-in-out:   cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast:   150ms;
  --duration-normal: 300ms;
  --duration-slow:   500ms;
  --duration-xl:     800ms;

  /* Grain */
  --grain-opacity: 0.04;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.75;
  color: var(--color-text);
  background-color: var(--color-surface);
  overflow-x: hidden;
}

/* Grain texture overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-size: 256px;
}

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

a {
  color: var(--color-gold);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out-expo);
}

a:hover { color: var(--color-magenta-light); }

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  color: var(--color-text);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-md); }

.display {
  font-family: var(--font-display-bold);
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.display-serif {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.zh-display {
  font-family: var(--font-chinese);
  font-weight: 700;
}

.gradient-text {
  background: linear-gradient(135deg, var(--color-gold-light), var(--color-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-magenta {
  background: linear-gradient(135deg, var(--color-magenta-light), var(--color-magenta), var(--color-plum));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-teal {
  background: linear-gradient(135deg, var(--color-teal), var(--color-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Utility Classes --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-3);
}

.container-wide {
  width: 100%;
  max-width: var(--max-width-wide);
  margin-inline: auto;
  padding-inline: var(--space-3);
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.text-center { text-align: center; }
.text-gold { color: var(--color-gold); }
.text-magenta { color: var(--color-magenta-light); }
.text-muted { color: var(--color-text-muted); }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  padding: 0.85rem 2rem;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.03em;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out-expo);
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.1) 50%, transparent 100%);
  transform: translateX(-100%);
  transition: transform 0.6s;
}

.btn:hover::after { transform: translateX(100%); }

.btn-primary {
  background: linear-gradient(135deg, var(--color-magenta), var(--color-magenta-light));
  color: #fff;
  box-shadow: var(--shadow-glow-magenta);
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 50px rgba(255,45,122,0.4); }

.btn-gold {
  background: linear-gradient(135deg, var(--color-gold), var(--color-gold-light));
  color: var(--color-text-inverse);
  box-shadow: var(--shadow-glow-gold);
}

.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 0 50px rgba(212,168,67,0.4); }

.btn-outline {
  background: transparent;
  color: var(--color-text);
  border: 1.5px solid var(--color-border);
}

.btn-outline:hover { border-color: var(--color-gold); color: var(--color-gold); background: rgba(212,168,67,0.05); }

.btn-outline-magenta {
  background: transparent;
  color: var(--color-magenta-light);
  border: 1.5px solid var(--color-magenta);
}

.btn-outline-magenta:hover { background: rgba(217,26,92,0.1); box-shadow: var(--shadow-glow-magenta); }

/* --- Section --- */
.section {
  padding-block: var(--space-7);
  position: relative;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-family: var(--font-display-bold);
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  color: var(--color-gold);
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}

.section-label::before {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--color-magenta);
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: var(--space-3);
}

.section-subtitle {
  font-family: var(--font-body);
  font-size: var(--text-md);
  color: var(--color-text-muted);
  max-width: 600px;
  line-height: 1.6;
}

/* --- Header / Navbar --- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-4);
  z-index: 1000;
  transition: background var(--duration-normal) var(--ease-out-expo),
              box-shadow var(--duration-normal) var(--ease-out-expo);
}

.navbar.scrolled {
  background: rgba(13,10,18,0.92);
  backdrop-filter: blur(16px);
  box-shadow: 0 2px 30px rgba(0,0,0,0.5);
  border-bottom: 1px solid var(--color-border);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: 0.04em;
}

.navbar-brand .brand-zh {
  font-family: var(--font-chinese);
  font-size: 1.3rem;
}

.navbar-brand .brand-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--color-magenta);
  animation: pulse-glow 2s ease-in-out infinite;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  list-style: none;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
  transition: color var(--duration-fast);
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a.active { color: var(--color-gold); }

.nav-cta {
  background: linear-gradient(135deg, var(--color-magenta), var(--color-magenta-light));
  color: #fff !important;
  padding: 0.6rem 1.5rem !important;
  border-radius: var(--radius-full) !important;
  font-weight: 600 !important;
  transition: transform var(--duration-fast), box-shadow var(--duration-fast) !important;
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow-magenta);
}

.nav-toggle {
  display: none;
  background: none; border: none;
  cursor: pointer; padding: var(--space-1);
  flex-direction: column; gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--color-text);
  transition: var(--duration-normal);
  border-radius: 2px;
}

/* --- Footer --- */
.footer {
  background: var(--color-surface-dark);
  border-top: 1px solid var(--color-border);
  padding-block: var(--space-6);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-5);
}

.footer-brand {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.footer-brand .zh { font-family: var(--font-chinese); }

.footer-desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-3);
}

.footer h4 {
  font-family: var(--font-display-bold);
  font-size: var(--text-sm);
  letter-spacing: 0.08em;
  color: var(--color-gold);
  text-transform: uppercase;
  margin-bottom: var(--space-3);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.footer-links a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  transition: color var(--duration-fast);
}

.footer-links a:hover { color: var(--color-gold); }

.footer-bottom {
  margin-top: var(--space-5);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.footer-social {
  display: flex;
  gap: var(--space-2);
}

.footer-social a {
  width: 40px; height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  transition: all var(--duration-fast);
}

.footer-social a:hover {
  border-color: var(--color-gold);
  color: var(--color-gold);
  background: rgba(212,168,67,0.08);
}

/* --- Animations --- */
@keyframes pulse-glow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33% { transform: translateY(-15px) rotate(2deg); }
  66% { transform: translateY(8px) rotate(-2deg); }
}

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes borderGlow {
  0%, 100% { border-color: var(--color-magenta); box-shadow: 0 0 15px rgba(217,26,92,0.3); }
  50% { border-color: var(--color-gold); box-shadow: 0 0 20px rgba(212,168,67,0.3); }
}

/* --- Scroll Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity var(--duration-xl) var(--ease-out-expo),
              transform var(--duration-xl) var(--ease-out-expo);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity var(--duration-xl) var(--ease-out-expo),
              transform var(--duration-xl) var(--ease-out-expo);
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity var(--duration-xl) var(--ease-out-expo),
              transform var(--duration-xl) var(--ease-out-expo);
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.85);
  transition: opacity var(--duration-xl) var(--ease-out-back),
              transform var(--duration-xl) var(--ease-out-back);
}

.reveal-scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* Stagger delays */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }
.delay-6 { transition-delay: 0.6s; }

/* --- Card Hover --- */
.card-hover {
  transition: transform var(--duration-normal) var(--ease-out-expo),
              box-shadow var(--duration-normal) var(--ease-out-expo),
              border-color var(--duration-normal);
}

.card-hover:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

/* --- Input Styles --- */
.form-group {
  margin-bottom: var(--space-3);
}

.form-label {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  margin-bottom: var(--space-1);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--color-surface-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
  outline: none;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--color-magenta);
  box-shadow: 0 0 0 3px rgba(217,26,92,0.15);
}

.form-textarea {
  min-height: 140px;
  resize: vertical;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--color-text-muted);
  opacity: 0.5;
}

/* --- Map Container --- */
.map-container {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.map-container iframe {
  width: 100%;
  height: 350px;
  border: none;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 4rem;
  }

  .navbar {
    padding: 0 var(--space-3);
  }

  .nav-links {
    position: fixed;
    top: var(--header-height);
    left: 0; right: 0;
    background: rgba(13,10,18,0.97);
    backdrop-filter: blur(16px);
    flex-direction: column;
    padding: var(--space-4);
    gap: var(--space-3);
    border-bottom: 1px solid var(--color-border);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: all var(--duration-normal) var(--ease-out-expo);
    z-index: 999;
  }

  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-toggle {
    display: flex;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .section {
    padding-block: var(--space-5);
  }

  .section-title {
    font-size: var(--text-2xl);
  }
}

/* --- Page Hero (inner pages) --- */
.page-hero {
  position: relative;
  padding-block: calc(var(--header-height) + var(--space-7)) var(--space-7);
  overflow: hidden;
  background: var(--color-surface-dark);
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 50%, rgba(217,26,92,0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 30%, rgba(212,168,67,0.06) 0%, transparent 40%);
  z-index: 0;
}

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

.page-hero-content h1 {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 800;
  margin-bottom: var(--space-2);
  letter-spacing: 0.02em;
}

.page-hero-content .zh-title {
  font-family: var(--font-chinese);
}

.page-hero-content p {
  font-size: var(--text-md);
  color: var(--color-text-muted);
  max-width: 600px;
  margin-inline: auto;
}

/* --- Grid Lines decorative --- */
.grid-lines {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.03;
  background-image:
    linear-gradient(rgba(255,255,255,0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.5) 1px, transparent 1px);
  background-size: 80px 80px;
}

/* --- Diagonal Stripe --- */
.diagonal-stripe {
  position: absolute;
  width: 200%;
  height: 100px;
  background: linear-gradient(90deg, transparent 0%, var(--color-magenta) 50%, transparent 100%);
  opacity: 0.03;
  transform: rotate(-15deg);
  z-index: 0;
}

/* --- Badge --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  background: rgba(212,168,67,0.1);
  border: 1px solid rgba(212,168,67,0.3);
  color: var(--color-gold);
  font-family: var(--font-display-bold);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
}

.badge-magenta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  background: rgba(217,26,92,0.1);
  border: 1px solid rgba(217,26,92,0.3);
  color: var(--color-magenta-light);
  font-family: var(--font-display-bold);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
}
