/* ============================================
   BCG LAW — style.css
   Sections:
   1. Variables & Reset
   2. Typography
   3. Header
   4. Hero
   5. About
   6. Services
   7. Contact
   8. Footer
   9. Page Hero
   10. Dropdown Nav
   11. Mobile Nav
   12. Responsive
============================================ */

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

:root {
  --navy: #1a2340;
  --gold: #b89a5a;
  --gold-light: #d4b97a;
  --cream: #f8f5f0;
  --text: #2c2c2c;
  --text-muted: #6b6b6b;
  --white: #ffffff;
  --border: #e2ddd6;
  --success: #2d6a4f;
  --success-bg: #d8f3dc;
  --error: #9b2226;
  --error-bg: #fde8e9;
}

html { scroll-behavior: smooth; }

/* === 2. TYPOGRAPHY === */
body {
  font-family: 'Jost', sans-serif;
  color: var(--text);
  background: var(--white);
  font-size: 16px;
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  color: var(--navy);
}

a { color: inherit; }

/* === 3. HEADER === */
.header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  padding: 16px 48px;
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.logo-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 11px;
  color: var(--text-muted);
  overflow: hidden;
}

.logo-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.site-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  font-weight: 500;
  color: var(--navy);
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0.5px;
}

.header-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

/* Target only the top-level ul */
.header-nav > ul {
  list-style: none;
  display: flex;
  gap: 36px;
  align-items: center;
}

/* Target only top-level nav links */
.header-nav > ul > li > a {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.header-nav > ul > li > a:hover { color: var(--navy); }

.header-nav > ul > li > a.active {
  color: var(--navy);
  font-weight: 500;
}

.header-phone {
  border: 2px solid var(--navy);
  border-radius: 8px;
  padding: 9px 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--navy);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.3px;
  transition: background 0.2s, color 0.2s;
}

.header-phone:hover {
  background: var(--navy);
  color: var(--white);
}

/* === 4. HERO === */
.hero {
  background: var(--navy);
  padding: 100px 48px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  border: 1px solid rgba(184, 154, 90, 0.15);
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -120px;
  right: 60px;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  border: 1px solid rgba(184, 154, 90, 0.08);
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(184, 154, 90, 0.4);
  padding: 6px 14px;
  border-radius: 4px;
  margin-bottom: 32px;
}

.hero h1 {
  font-size: clamp(44px, 6vw, 72px);
  font-weight: 300;
  color: var(--white);
  line-height: 1.15;
  max-width: 680px;
  margin-bottom: 28px;
}

.hero h1 em {
  font-style: italic;
  color: var(--gold-light);
}

.hero p {
  font-size: 16px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.65);
  max-width: 520px;
  line-height: 1.8;
  margin-bottom: 48px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-primary {
  background: var(--gold);
  color: var(--navy);
  padding: 14px 32px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.2s;
}

.btn-primary:hover { background: var(--gold-light); }

.btn-outline {
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--white);
  padding: 14px 32px;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 6px;
  transition: border-color 0.2s, background 0.2s;
}

.btn-outline:hover {
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.05);
}

/* === 5. ABOUT === */
.about {
  padding: 96px 48px;
  background: var(--white);
}

.about-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about-image {
  background: var(--cream);
  aspect-ratio: 4/5;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.about-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 20px,
    rgba(184, 154, 90, 0.04) 20px,
    rgba(184, 154, 90, 0.04) 21px
  );
}

.about-image span {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  position: relative;
  z-index: 1;
}

.section-label {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
  display: block;
}

.about-content h2 {
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.2;
  margin-bottom: 24px;
}

.about-content p {
  font-size: 15px;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.85;
  margin-bottom: 16px;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.stat-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 36px;
  font-weight: 500;
  color: var(--navy);
  display: block;
}

.stat-label {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-top: 4px;
  display: block;
}

/* === 6. SERVICES === */
.services {
  padding: 96px 48px;
  background: var(--cream);
}

.services-inner { max-width: 1200px; margin: 0 auto; }

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-header h2 {
  font-size: clamp(32px, 4vw, 48px);
  margin-top: 12px;
}

.services-grid {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 900px) {
  .services-grid { grid-template-columns: repeat(3, 1fr); }
}

.service-card {
  background: var(--white);
  padding: 40px 32px;
  transition: transform 0.2s;
}

.service-card:hover { transform: translateY(-4px); }

.service-icon {
  width: 44px;
  height: 44px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.service-icon svg {
  width: 18px;
  height: 18px;
  stroke: var(--gold);
  fill: none;
  stroke-width: 1.5;
}

.service-card h3 {
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 12px;
}

.service-card p {
  font-size: 14px;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.8;
}

.service-link {
  display: inline-block;
  margin-top: 20px;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid rgba(184, 154, 90, 0.3);
  padding-bottom: 2px;
  transition: border-color 0.2s;
}

.service-link:hover { border-color: var(--gold); }

/* === 7. CONTACT === */
.contact {
  padding: 96px 48px;
  background: var(--white);
}

.contact-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 80px;
  align-items: start;
}

.contact-info h2 {
  font-size: clamp(32px, 4vw, 48px);
  margin-top: 12px;
  margin-bottom: 24px;
}

.contact-info p {
  font-size: 15px;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.85;
  margin-bottom: 40px;
}

.contact-detail {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.contact-item-icon {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-item-icon svg {
  width: 14px;
  height: 14px;
  stroke: var(--gold);
  fill: none;
  stroke-width: 1.5;
}

.contact-item-text span {
  display: block;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.contact-item-text a,
.contact-item-text p {
  font-size: 15px;
  color: var(--navy);
  text-decoration: none;
  font-weight: 400;
  margin: 0;
}

.contact-form {
  background: var(--cream);
  padding: 48px;
  border-radius: 20px;
}

.form-message {
  padding: 14px 18px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 400;
  margin-bottom: 24px;
  line-height: 1.6;
}

.form-message--success {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid rgba(45, 106, 79, 0.2);
}

.form-message--error {
  background: var(--error-bg);
  color: var(--error);
  border: 1px solid rgba(155, 34, 38, 0.2);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.form-group label {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 12px 16px;
  font-family: 'Jost', sans-serif;
  font-size: 14px;
  font-weight: 300;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
  appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--gold); }

.form-group input.error,
.form-group select.error,
.form-group textarea.error { border-color: var(--error); }

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

.form-submit {
  background: var(--navy);
  color: var(--white);
  border: none;
  padding: 14px 36px;
  font-family: 'Jost', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
  width: 100%;
}

.form-submit:hover { background: #243060; }
.form-submit:disabled { opacity: 0.6; cursor: not-allowed; }

/* === 8. FOOTER === */
.footer {
  background: var(--navy);
  padding: 64px 48px 32px;
}

.footer-inner { max-width: 1200px; margin: 0 auto; }

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: var(--white);
  display: block;
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: 14px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.8;
  max-width: 280px;
}

.footer-col h4 {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col ul li a {
  font-size: 14px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-col ul li a:hover { color: var(--white); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 32px;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom p {
  font-size: 13px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.3);
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.3);
  text-decoration: none;
}

.footer-bottom a:hover { color: rgba(255, 255, 255, 0.6); }

/* === 9. PAGE HERO === */
.page-hero {
  background: var(--navy);
  padding: 64px 48px;
}

.page-hero-inner { max-width: 1200px; margin: 0 auto; }

.page-hero h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 300;
  color: var(--white);
  margin: 12px 0 16px;
  line-height: 1.2;
}

.page-hero p {
  font-size: 16px;
  font-weight: 300;
  color: rgba(255,255,255,0.6);
  max-width: 520px;
  line-height: 1.8;
}

/* === 10. DESKTOP DROPDOWN === */
.nav-item { position: relative; }

.dropdown {
  list-style: none;
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  width: max-content;
  padding: 8px 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 200;
}

.dropdown::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid var(--border);
}

.dropdown::after {
  content: '';
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid var(--white);
}

@media (min-width: 900px) {
  .nav-item--dropdown:hover .dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
  }
}

/* Invisible bridge prevents accidental close */
.nav-item--dropdown::before {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 12px;
}

.dropdown li {
  display: block;
  width: 100%;
}

.dropdown li a {
  display: block;
  padding: 10px 20px;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0.3px;
  text-transform: none;
  transition: color 0.15s, background 0.15s;
}

.dropdown li a:hover {
  color: var(--navy);
  background: var(--cream);
}

/* Desktop chevron */
.nav-item--dropdown > a::after {
  content: '';
  display: inline-block;
  margin-left: 5px;
  width: 5px;
  height: 5px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  vertical-align: middle;
  transition: transform 0.2s;
}

.nav-item--dropdown:hover > a::after {
  transform: rotate(-135deg) translateY(-2px);
}

/* === 11. MOBILE NAV ELEMENTS (hidden on desktop) === */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
  z-index: 200;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.dropdown-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 14px 20px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
}

.dropdown-toggle span {
  display: block;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--navy);
  border-bottom: 2px solid var(--navy);
  transform: rotate(45deg);
  transition: transform 0.3s ease;
}

.dropdown-toggle.open span { transform: rotate(-135deg); }

.nav-phone-mobile { display: none; }

/* === 12. RESPONSIVE === */
@media (max-width: 900px) {

  .header-inner { padding: 14px 20px; gap: 12px; }
  .header-phone { display: none; }
  .nav-toggle { display: flex; }
  .dropdown-toggle { display: flex; }
  .nav-phone-mobile { display: block; }

  /* Hide desktop chevron */
  .nav-item--dropdown > a::after { display: none; }

  /* Hide desktop bridge pseudo-element */
  .nav-item--dropdown::before { display: none; }

  /* Slide-down mobile nav */

  .header-nav {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    width: 40%;
    background: var(--white);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    z-index: 150;
    max-height: calc(100vh - 90px); /* fills remaining screen height */
    overflow-y: auto;               /* makes it scrollable */
  }

  .header-nav.open { display: block; }

  .header-nav > ul {
    flex-direction: column;
    gap: 0;
    padding: 8px 0;
  }

  /* Regular nav items */
  .header-nav > ul > li {
    border-bottom: 1px solid var(--border);
  }

  .header-nav > ul > li:last-child { border-bottom: none; }

  .header-nav > ul > li > a {
    display: block;
    padding: 14px 24px;
    font-size: 14px;
    color: var(--text);
    text-transform: none;
    letter-spacing: 0;
  }

  /* Services item — flex row so link and chevron sit side by side */
  .nav-item--dropdown {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    border-bottom: 1px solid var(--border);
  }

  .nav-item--dropdown > a {
    flex: 1;
    display: block; 
    padding: 14px 24px;
    font-size: 14px;
    color: var(--text);
    text-transform: none;
    letter-spacing: 0;
  }

  /* Mobile dropdown — stacks below Services row */
  .dropdown {
    display: none;
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    box-shadow: none;
    border: none;
    border-top: 1px solid var(--border);
    border-radius: 0;
    padding: 0;
    background: var(--cream);
    width: 100%;
    flex-basis: 100%;
  }

  .dropdown.open {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  .dropdown::before,
  .dropdown::after { display: none; }

  .dropdown li {
    display: block;
    border-bottom: 1px solid var(--border);
  }

  .dropdown li:last-child { border-bottom: none; }

  .dropdown li a {
    padding: 12px 36px;
    font-size: 13px;
    color: var(--text-muted);
    white-space: normal;
    text-transform: none;
    letter-spacing: 0;
  }

  .dropdown li a:hover { background: var(--border); color: var(--navy); }

  .nav-phone-mobile a {
    color: var(--gold) !important;
    font-weight: 500 !important;
  }

  /* Page sections */
  .hero { padding: 72px 24px; }
  .about { padding: 72px 24px; }
  .about-inner { grid-template-columns: 1fr; gap: 40px; }
  .about-image { aspect-ratio: 16/9; }
  .services { padding: 72px 24px; }
  .contact { padding: 72px 24px; }
  .contact-inner { grid-template-columns: 1fr; gap: 48px; }
  .contact-form { padding: 28px; }
  .form-row { grid-template-columns: 1fr; }
  .footer { padding: 48px 24px 24px; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 32px; }

  /* Remove hover behaviour on touch devices */
  @media (hover: none) {
    .nav-item--dropdown:hover .dropdown {
      display: none !important;
      opacity: 0 !important;
      visibility: hidden !important;
      pointer-events: none !important;
    }
  }

  /* JS controlled open state always wins */
  .dropdown.open {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }
}

@media (max-width: 560px) {
  .footer-top { grid-template-columns: 1fr; }
  .about-stats { grid-template-columns: 1fr 1fr; }
}
