/* style.css — Figure Capital · Swiss Private Bank Aesthetic */

/* ========================================
   DESIGN TOKENS
   ======================================== */
:root {
  /* Type Scale */
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem    + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1.2rem  + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 220ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1140px;

  /* Font families */
  --font-display: 'Playfair Display', 'Georgia', serif;
  --font-body: 'Inter', 'Helvetica Neue', 'PingFang SC', 'Microsoft YaHei', sans-serif;

  /* Brand palette */
  --navy:        #1A2A4A;
  --navy-deep:   #0F1A2E;
  --navy-light:  #2A3D62;
  --slate:       #4A5568;
  --slate-light: #718096;
  --gold:        #C5A24D;
  --gold-muted:  #B8975A;
  --ivory:       #FAFAF8;
  --warm-white:  #F7F6F3;
  --parchment:   #F0EDE8;
}

/* ========================================
   LIGHT MODE (default)
   ======================================== */
:root, [data-theme="light"] {
  --color-bg: #FAFAF8;
  --color-surface: #FFFFFF;
  --color-surface-2: #F7F6F3;
  --color-surface-offset: #F0EDE8;
  --color-divider: #E2DDD6;
  --color-border: #D5D0C8;
  --color-text: #1A2A4A;
  --color-text-muted: #4A5568;
  --color-text-faint: #A0A4AB;
  --color-text-inverse: #FAFAF8;
  --color-primary: #1A2A4A;
  --color-primary-hover: #2A3D62;
  --color-accent: #C5A24D;

  --shadow-sm: 0 1px 3px rgba(26, 42, 74, 0.04);
  --shadow-md: 0 4px 16px rgba(26, 42, 74, 0.06);
  --shadow-lg: 0 12px 40px rgba(26, 42, 74, 0.08);
}

/* ========================================
   DARK MODE
   ======================================== */
[data-theme="dark"] {
  --color-bg: #0D1420;
  --color-surface: #131D2E;
  --color-surface-2: #18243A;
  --color-surface-offset: #1A2640;
  --color-divider: #243050;
  --color-border: #2E3C5C;
  --color-text: #E4E2DD;
  --color-text-muted: #98A0B0;
  --color-text-faint: #5A6478;
  --color-text-inverse: #1A2A4A;
  --color-primary: #E4E2DD;
  --color-primary-hover: #C5A24D;
  --color-accent: #D4B45E;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.45);
}

[data-theme="dark"] .hero__logo,
[data-theme="dark"] .nav__logo-img {
  filter: brightness(1.25);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #0D1420;
    --color-surface: #131D2E;
    --color-surface-2: #18243A;
    --color-surface-offset: #1A2640;
    --color-divider: #243050;
    --color-border: #2E3C5C;
    --color-text: #E4E2DD;
    --color-text-muted: #98A0B0;
    --color-text-faint: #5A6478;
    --color-text-inverse: #1A2A4A;
    --color-primary: #E4E2DD;
    --color-primary-hover: #C5A24D;
    --color-accent: #D4B45E;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.45);
  }
  :root:not([data-theme]) .hero__logo,
  :root:not([data-theme]) .nav__logo-img {
    filter: brightness(1.25);
  }
}

/* ========================================
   GLOBAL
   ======================================== */
body {
  overflow-x: hidden;
}

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover {
  color: var(--gold-muted);
}

.container {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

/* ========================================
   NAVIGATION
   ======================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--space-5) 0;
  background: transparent;
  transition: background 0.5s ease, padding 0.4s ease, box-shadow 0.4s ease;
}

.nav--scrolled {
  background: var(--color-surface);
  padding: var(--space-3) 0;
  box-shadow: var(--shadow-sm);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
}

.nav__logo-img {
  height: 40px;
  width: auto;
  object-fit: contain;
}

.nav__logo-text {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: var(--color-text);
  text-transform: uppercase;
  line-height: 1.3;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  list-style: none;
}

.nav__links a {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--color-text-muted);
  text-decoration: none;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.nav__links a:hover {
  color: var(--color-text);
}

.theme-toggle {
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: var(--space-2);
  color: var(--color-text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.theme-toggle:hover {
  border-color: var(--color-text);
  color: var(--color-text);
}

/* Mobile nav toggle */
.nav__mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--color-text);
  cursor: pointer;
  padding: var(--space-2);
}

@media (max-width: 768px) {
  .nav__mobile-toggle {
    display: flex;
    align-items: center;
  }

  .nav__links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 75%;
    max-width: 320px;
    height: 100vh;
    background: var(--color-surface);
    flex-direction: column;
    align-items: flex-start;
    padding: var(--space-20) var(--space-8);
    gap: var(--space-6);
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.12);
  }

  .nav__links.active {
    right: 0;
  }

  .nav__links a {
    font-size: var(--text-sm);
    color: var(--color-text);
  }
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--color-bg);
  position: relative;
  text-align: center;
  padding: var(--space-24) var(--space-6);
}

.hero__content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__logo {
  width: clamp(80px, 10vw, 120px);
  height: auto;
  object-fit: contain;
  margin-bottom: var(--space-12);
}

.hero__rule {
  width: 48px;
  height: 1px;
  background: var(--color-accent);
  margin-bottom: var(--space-8);
}

.hero__tagline {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-weight: 400;
  margin-bottom: var(--space-4);
}

.hero__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 400;
  color: var(--color-text);
  letter-spacing: 0.02em;
  margin-bottom: var(--space-3);
  line-height: 1.1;
}

.hero__subtitle-cn {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text-faint);
  letter-spacing: 0.3em;
  font-weight: 300;
  margin-bottom: var(--space-10);
}

.hero__desc {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  max-width: 42ch;
  line-height: 1.7;
  margin-inline: auto;
}

/* ========================================
   ABOUT / PHILOSOPHY SECTION
   ======================================== */
.philosophy {
  padding: clamp(var(--space-16), 8vw, var(--space-32)) 0;
  background: var(--navy);
}

.philosophy__inner {
  max-width: var(--content-narrow);
  margin-inline: auto;
  text-align: center;
}

.section-label {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-6);
  text-align: center;
  max-width: none;
}

.philosophy .section-label {
  color: var(--gold-muted);
}

.section-heading {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 400;
  color: var(--color-text);
  margin-bottom: var(--space-8);
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-align: center;
  max-width: none;
}

.philosophy .section-heading {
  color: #F0EDE8;
}

.philosophy__text {
  font-size: var(--text-base);
  color: rgba(240, 237, 232, 0.65);
  line-height: 1.8;
  max-width: 52ch;
  margin-inline: auto;
  margin-bottom: var(--space-8);
}

.philosophy__rule {
  width: 40px;
  height: 1px;
  background: var(--gold-muted);
  margin: 0 auto var(--space-6);
  opacity: 0.5;
}

.philosophy__partner {
  font-size: var(--text-xs);
  color: rgba(240, 237, 232, 0.35);
  letter-spacing: 0.08em;
}

/* ========================================
   SERVICES SECTION
   ======================================== */
.services {
  padding: clamp(var(--space-16), 8vw, var(--space-32)) 0;
  background: var(--color-bg);
}

.services__header {
  text-align: center;
  margin-bottom: clamp(var(--space-10), 5vw, var(--space-16));
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
  max-width: var(--content-default);
  margin-inline: auto;
}

@media (max-width: 640px) {
  .services__grid {
    grid-template-columns: 1fr;
  }
}

.service-card {
  padding: var(--space-8) var(--space-6);
  border-bottom: 1px solid var(--color-divider);
  transition: border-color 0.3s ease;
}

.service-card:hover {
  border-color: var(--color-accent);
}

.service-card__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 400;
  color: var(--color-text);
  margin-bottom: var(--space-1);
  line-height: 1.3;
}

.service-card__title-cn {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-bottom: var(--space-3);
  font-weight: 400;
  letter-spacing: 0.05em;
}

.service-card__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.65;
}

/* ========================================
   CONTACT SECTION
   ======================================== */
.contact {
  padding: clamp(var(--space-16), 8vw, var(--space-24)) 0;
  background: var(--color-surface-2);
  text-align: center;
}

[data-theme="dark"] .contact {
  background: var(--color-surface);
}

.contact__email {
  font-family: var(--font-body);
  font-size: var(--text-base);
  margin-top: var(--space-6);
  margin-bottom: var(--space-8);
  max-width: none;
  text-align: center;
}

.contact__email a {
  color: var(--color-text);
  text-decoration: underline;
  text-decoration-color: var(--color-divider);
  text-underline-offset: 4px;
  transition: text-decoration-color 0.2s ease;
}

.contact__email a:hover {
  text-decoration-color: var(--color-accent);
  color: var(--color-text);
}

.contact__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-inverse);
  background: var(--navy);
  padding: var(--space-4) var(--space-8);
  border: none;
  text-decoration: none;
  transition: background 0.25s ease, transform 0.2s ease;
}

[data-theme="dark"] .contact__cta {
  background: var(--color-accent);
  color: var(--navy-deep);
}

.contact__cta:hover {
  background: var(--navy-light);
  color: var(--color-text-inverse);
  transform: translateY(-1px);
}

[data-theme="dark"] .contact__cta:hover {
  background: var(--gold-muted);
  color: var(--navy-deep);
}

.contact__cta:active {
  transform: translateY(0);
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
  background: var(--navy-deep);
  padding: var(--space-6) 0;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
}

@media (max-width: 600px) {
  .footer__inner {
    flex-direction: column;
    text-align: center;
  }
}

.footer__copyright {
  font-size: var(--text-xs);
  color: rgba(240, 237, 232, 0.35);
}

.footer__attribution {
  font-size: var(--text-xs);
  color: rgba(240, 237, 232, 0.25);
}

.footer__attribution a {
  color: rgba(240, 237, 232, 0.35);
  text-decoration: underline;
  text-decoration-color: rgba(240, 237, 232, 0.15);
  text-underline-offset: 3px;
}

.footer__attribution a:hover {
  color: rgba(240, 237, 232, 0.6);
  text-decoration-color: rgba(240, 237, 232, 0.3);
}

/* ========================================
   SCROLL REVEAL
   ======================================== */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.reveal-stagger > .reveal:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger > .reveal:nth-child(2) { transition-delay: 80ms; }
.reveal-stagger > .reveal:nth-child(3) { transition-delay: 160ms; }
.reveal-stagger > .reveal:nth-child(4) { transition-delay: 240ms; }

/* ========================================
   MOBILE OVERLAY
   ======================================== */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.nav-overlay.active {
  opacity: 1;
  pointer-events: all;
}
