/* ============================================================
   美居窗簾地板 — Luxe/Showroom Design System
   Warm woods + rich fabrics · Gold & burgundy accents · Serif elegance
   Aesthetic: Premium showroom, dark warm base, layered textures
   Fonts: Noto Serif TC (display) + Noto Sans TC (body)
   ============================================================ */

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

/* --- CSS Custom Properties --- */
:root {
  /* Colors — Warm Luxe palette (aged wood + gold + deep fabric tones) */
  --color-primary:       #c8963e;   /* Warm golden wood */
  --color-primary-light: #e0b866;   /* Light gold highlight */
  --color-primary-dark:  #9a6f2a;   /* Deep bronze */
  --color-primary-pale:  rgba(200,150,62,0.12);

  --color-accent:        #8b3a3a;   /* Rich burgundy/wine */
  --color-accent-light:  #b55a5a;   /* Lighter burgundy */
  --color-accent-pale:   rgba(139,58,58,0.12);

  --color-surface:       #1a1410;   /* Very dark warm brown-black */
  --color-surface-alt:   #231d16;   /* Dark wood brown */
  --color-surface-card:  #2a231a;   /* Card surface — deep brown */
  --color-surface-dark:  #120e0a;   /* Darkest surface */
  --color-surface-light: #342b20;   /* Lighter warm surface */

  --color-text:          #f5f0e8;   /* Warm cream white */
  --color-text-muted:    #b8ad9a;   /* Muted warm beige */
  --color-text-dim:      #7a7065;   /* Dim warm gray */
  --color-text-inverse:  #1a1410;   /* Dark on light */

  --color-border:        #3a3228;   /* Warm subtle border */
  --color-border-strong: #5a4f40;   /* Stronger warm border */

  --color-success:       #5a8f4a;   /* Muted green */

  /* Accent glow */
  --accent-glow:         rgba(200,150,62,0.2);

  /* Typography */
  --font-display:        'Noto Serif TC', serif;
  --font-heading:        'Noto Sans TC', sans-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);

  /* 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;
  --content-width:    65ch;
  --header-height:    5rem;

  /* Borders & Radii — soft luxury */
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --radius-xl:  16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.3);
  --shadow-md:  0 4px 20px rgba(0,0,0,0.4);
  --shadow-lg:  0 8px 40px rgba(0,0,0,0.5);
  --shadow-xl:  0 16px 60px rgba(0,0,0,0.6);
  --shadow-glow: 0 0 40px var(--accent-glow);
  --shadow-gold: 0 4px 30px rgba(200,150,62,0.25);

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

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

/* --- 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.7;
  color: var(--color-text);
  background-color: var(--color-surface);
  overflow-x: hidden;
}

body.page-transition {
  animation: pageIn 0.4s ease-out;
}

@keyframes pageIn {
  from { opacity: 0; filter: blur(4px); }
  to   { opacity: 1; filter: blur(0); }
}

/* 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%;
}

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

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

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

.section-header {
  text-align: center;
  margin-bottom: var(--space-6);
}

.section-label {
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-1);
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 900;
  line-height: 1.2;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.section-desc {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 55ch;
  margin-inline: auto;
  line-height: 1.8;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0.85rem 2rem;
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  border: none;
  transition: all var(--duration-normal) var(--ease-out-expo);
  text-transform: uppercase;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
  background: var(--color-primary-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 40px rgba(200,150,62,0.4);
}

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

.btn-outline:hover {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  transform: translateY(-2px);
}

.btn-accent {
  background: var(--color-accent);
  color: #fff;
}

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

/* --- Header / Nav --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  background: rgba(26,20,16,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
  transition: all var(--duration-normal);
}

.header-inner {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-3);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 900;
  color: var(--color-text);
  letter-spacing: 0.04em;
}

.site-logo span {
  color: var(--color-primary);
}

.nav-links {
  display: flex;
  gap: var(--space-4);
  list-style: none;
}

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

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

.nav-cta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.nav-phone {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-primary);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

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

/* --- Footer --- */
.site-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);
  margin-bottom: var(--space-5);
}

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

.footer-brand h3 span {
  color: var(--color-primary);
}

.footer-brand p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.8;
  max-width: 35ch;
}

.footer-col h4 {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--space-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-col ul {
  list-style: none;
  display: grid;
  gap: var(--space-1);
}

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

.footer-col a:hover {
  color: var(--color-primary);
}

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

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

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 50%, rgba(200,150,62,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 30%, rgba(139,58,58,0.05) 0%, transparent 40%);
  z-index: 0;
}

.page-hero .container {
  position: relative;
  z-index: 1;
}

.page-hero-title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: var(--space-2);
}

.page-hero-title .highlight {
  color: var(--color-primary);
}

.page-hero-sub {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 50ch;
  line-height: 1.8;
}

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

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-cta .btn {
    display: none;
  }

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

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

@media (max-width: 640px) {
  .page-hero-title {
    font-size: var(--text-2xl);
  }
}
