/* ============================================================
   EAST & WEST LAW FIRM — GLOBAL STYLESHEET
   ============================================================ */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Inter:wght@300;400;500;600&display=swap');

/* ============================================================
   1. CSS CUSTOM PROPERTIES (DESIGN TOKENS)
   ============================================================ */
:root {
  /* Brand Colors — East & West Burgundy Identity */
  --primary:         #6E2343;
  --primary-dark:    #541C33;
  --secondary:       #7E2B4E;
  --accent:          #CFA6B3;
  --accent-light:    #EEDCE3;

  --background:      #F9F6F5;
  --surface:         #FFFFFF;
  --border:          #E6DCDD;

  --text:            #2F2F2F;
  --text-muted:      #6B6B6B;

  --navy:            #541C33;   /* alias — used in shared component refs */
  --navy-mid:        #6E2343;

  /* Gradient */
  --gradient-primary: linear-gradient(
    135deg,
    #541C33 0%,
    #6E2343 50%,
    #7E2B4E 100%
  );

  /* Typography */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing Scale */
  --sp-xs:   0.5rem;
  --sp-sm:   1rem;
  --sp-md:   1.5rem;
  --sp-lg:   2.5rem;
  --sp-xl:   4rem;
  --sp-2xl:  6rem;
  --sp-3xl:  9rem;

  /* Transitions */
  --transition-fast:   0.2s ease;
  --transition-base:   0.35s ease;
  --transition-slow:   0.6s cubic-bezier(0.16, 1, 0.3, 1);

  /* Borders */
  --border-accent: 1px solid var(--accent);
  --border-line:   1px solid var(--border);

  /* Shadows */
  --shadow-card:  0 4px 30px rgba(110, 35, 67, 0.07);
  --shadow-hover: 0 10px 30px rgba(110, 35, 67, 0.14);
}

/* ============================================================
   2. CSS RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text);
  background-color: var(--background);
  line-height: 1.7;
  overflow-x: hidden;
}

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

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

ul, ol {
  list-style: none;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

/* ============================================================
   3. TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 500;
  line-height: 1.2;
  color: var(--text);
}

.display-xl {
  font-size: clamp(3rem, 7vw, 6.5rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.display-lg {
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.display-md {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 500;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 500;
  color: var(--primary-dark);
}

.section-subtitle {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--primary);
}

.body-lg {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-muted);
}

.body-sm {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ============================================================
   4. LAYOUT UTILITIES
   ============================================================ */
.container {
  width: 100%;
  max-width: 1320px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 5rem);
}

.container--narrow {
  max-width: 860px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 5rem);
}

.section-pad {
  padding-block: clamp(4rem, 9vw, 8rem);
}

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.grid { display: grid; }

.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-navy   { color: var(--primary-dark); }
.text-white  { color: var(--surface); }

.mt-xs { margin-top: var(--sp-xs); }
.mt-sm { margin-top: var(--sp-sm); }
.mt-md { margin-top: var(--sp-md); }
.mt-lg { margin-top: var(--sp-lg); }
.mt-xl { margin-top: var(--sp-xl); }

/* ============================================================
   5. ACCENT DIVIDER
   ============================================================ */
.gold-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-block: var(--sp-md);
}

.gold-divider::before,
.gold-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--primary);
  opacity: 0.25;
}

.gold-divider--centered {
  justify-content: center;
  max-width: 300px;
  margin-inline: auto;
}

.gold-line {
  display: block;
  width: 60px;
  height: 2px;
  background: var(--primary);
  margin-block: var(--sp-md);
}

.gold-line--center {
  margin-inline: auto;
}

/* ============================================================
   6. BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 1rem 2.2rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.08);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.btn:hover::after { opacity: 1; }

/* Primary — Burgundy */
.btn-primary {
  background: var(--primary);
  color: var(--surface);
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(110, 35, 67, 0.35);
}

/* Outline — White (for dark backgrounds) */
.btn-outline {
  background: var(--surface);
  color: var(--primary);
  border-color: var(--primary);
}

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

/* Outline Dark (for light backgrounds) */
.btn-outline-dark {
  background: transparent;
  color: var(--primary-dark);
  border-color: var(--primary-dark);
}

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

/* Arrow text link */
.btn-arrow {
  background: transparent;
  color: var(--primary);
  border: none;
  padding: 0;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  font-weight: 600;
  text-transform: uppercase;
  gap: 0.5rem;
  position: relative;
}

.btn-arrow::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--primary);
  transition: width var(--transition-base);
}

.btn-arrow:hover::before { width: 100%; }
.btn-arrow:hover { gap: 0.9rem; }

.btn svg { transition: transform var(--transition-base); }
.btn-arrow:hover svg { transform: translateX(4px); }

/* ============================================================
   7. NAVIGATION
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1.5rem 0;
  background: transparent;
  transition: background 0.45s ease, padding 0.4s ease, box-shadow 0.4s ease;
}

.nav--scrolled {
  background: rgba(84, 28, 51, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 1rem 0;
  box-shadow: 0 2px 30px rgba(84, 28, 51, 0.3);
}

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

.nav__brand {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  transition: transform var(--transition-fast);
}

.nav__brand:hover {
  transform: translateY(-1px);
}

.nav__brand-name {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--surface);
  letter-spacing: 0.08em;
  line-height: 1.1;
  text-transform: uppercase;
}

.nav__brand-amp {
  color: var(--accent);
  font-style: italic;
  font-family: var(--font-heading);
}

.nav__brand-sub {
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--accent-light);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  margin-top: 2px;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.nav__logo img {
  height: 52px;
  width: auto;
  transition: height var(--transition-base);
}

.nav--scrolled .nav__logo img { height: 42px; }

.nav__links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav__link {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  transition: color var(--transition-fast);
  position: relative;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width var(--transition-base);
}

.nav__link:hover,
.nav__link.active {
  color: var(--accent);
}

.nav__link:hover::after,
.nav__link.active::after {
  width: 100%;
}

.nav__cta {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--surface);
  padding: 0.65rem 1.6rem;
  transition: all var(--transition-base);
}

.nav__cta:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
}

/* Hamburger */
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  cursor: pointer;
  padding: 4px;
}

.nav__hamburger span {
  display: block;
  height: 1.5px;
  background: var(--surface);
  transition: all var(--transition-base);
  transform-origin: left;
}

.nav__hamburger.open span:nth-child(1) { transform: rotate(42deg) scaleX(1.1); }
.nav__hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav__hamburger.open span:nth-child(3) { transform: rotate(-42deg) scaleX(1.1); }

/* Mobile Menu */
.nav__mobile {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--primary-dark);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.nav__mobile.open {
  opacity: 1;
  pointer-events: all;
  display: flex;
}

.nav__mobile-link {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: rgba(255,255,255,0.85);
  font-weight: 400;
  letter-spacing: 0.05em;
  transition: color var(--transition-fast);
}

.nav__mobile-link:hover { color: var(--accent); }

.nav__mobile-social {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
}

.nav__mobile-social a {
  color: rgba(255,255,255,0.4);
  transition: color var(--transition-fast);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
}

.nav__mobile-social a:hover { color: var(--accent); }

/* ============================================================
   8. FOOTER
   ============================================================ */
.footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.6);
}

.footer__top {
  padding-block: var(--sp-2xl);
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 3rem;
}

.footer__brand .footer__logo-wordmark {
  max-width: 240px;
  width: 100%;
  height: auto;
  margin-bottom: 1.5rem;
  display: block;
  /* Smoothly invert white background to transparent and burgundy text to crisp white */
  filter: grayscale(100%) invert(100%) contrast(170%);
  mix-blend-mode: screen;
}

.footer__tagline {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: rgba(255,255,255,0.45);
  font-style: italic;
  line-height: 1.6;
  max-width: 240px;
}

.footer__heading {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--surface);
  margin-bottom: 1.5rem;
}

.footer__links li {
  margin-bottom: 0.75rem;
}

.footer__links a {
  font-size: 0.875rem;
  color: var(--accent-light);
  transition: color var(--transition-fast);
  letter-spacing: 0.02em;
}

.footer__links a:hover { color: var(--surface); }

.footer__contact-item {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  align-items: flex-start;
}

.footer__contact-item svg {
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--accent);
}

.footer__contact-item span {
  font-size: 0.875rem;
  color: var(--accent-light);
  line-height: 1.5;
}

.footer__social {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.footer__social a {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.4);
  transition: all var(--transition-base);
}

.footer__social a:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-block: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer__copy {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.05em;
}

.footer__bottom-links {
  display: flex;
  gap: 2rem;
}

.footer__bottom-links a {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.05em;
  transition: color var(--transition-fast);
}

.footer__bottom-links a:hover { color: var(--accent); }

/* ============================================================
   9. SCROLL ANIMATIONS (AOS-like via JS)
   ============================================================ */
[data-animate] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

[data-animate="fade-left"] {
  transform: translateX(-30px);
}

[data-animate="fade-right"] {
  transform: translateX(30px);
}

[data-animate="fade-scale"] {
  transform: scale(0.94);
}

[data-animate].is-visible {
  opacity: 1;
  transform: none;
  will-change: auto;
}

[data-delay="100"] { transition-delay: 0.1s; }
[data-delay="200"] { transition-delay: 0.2s; }
[data-delay="300"] { transition-delay: 0.3s; }
[data-delay="400"] { transition-delay: 0.4s; }
[data-delay="500"] { transition-delay: 0.5s; }
[data-delay="600"] { transition-delay: 0.6s; }

/* ============================================================
   10. RESPONSIVE BREAKPOINTS
   ============================================================ */
@media (max-width: 1200px) {
  .footer__top {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
}

@media (max-width: 900px) {
  .nav__links, .nav__cta { display: none; }
  .nav__hamburger { display: flex; }
}

@media (max-width: 768px) {
  .footer__top {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

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

/* ============================================================
   11. PAGE HERO (shared across inner pages)
   ============================================================ */
.page-hero {
  background: var(--primary-dark);
  padding-top: 160px;
  padding-bottom: 5rem;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('images/hero.jpg') center/cover no-repeat;
  opacity: 0.1;
}

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

.page-hero__breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-bottom: 1.5rem;
}

.page-hero__breadcrumb a {
  color: var(--accent);
  transition: opacity var(--transition-fast);
}

.page-hero__breadcrumb a:hover { opacity: 0.7; }

.page-hero__title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 400;
  color: var(--surface);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.page-hero__subtitle {
  font-size: 1rem;
  color: rgba(255,255,255,0.55);
  max-width: 560px;
  margin-top: 1rem;
  line-height: 1.8;
}

/* ============================================================
   12. CARD COMPONENTS
   ============================================================ */
.card {
  background: var(--surface);
  border: var(--border-line);
  padding: 2.5rem;
  transition: all var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
  border-color: var(--primary);
}

.card--dark {
  background: var(--primary-dark);
  border-color: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.75);
}

/* ============================================================
   13. CUSTOM SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--background); }
::-webkit-scrollbar-thumb { background: var(--primary); }
::-webkit-scrollbar-thumb:hover { background: var(--primary-dark); }

/* ============================================================
   14. SELECTION
   ============================================================ */
::selection {
  background: var(--primary);
  color: var(--surface);
}
