/* =========================================
   CSS Custom Properties
   ========================================= */
:root {
  --color-primary: rgb(151, 135, 119);
  --color-primary-dark: rgb(120, 107, 94);
  --color-primary-light: rgb(245, 242, 239);
  --color-heading: rgb(34, 34, 40);
  --color-body: rgb(34, 34, 40);
  --color-muted: rgb(110, 105, 100);
  --color-light: rgb(250, 248, 246);
  --color-white: rgb(255, 255, 255);
  --font-family: 'Inter', sans-serif;
  --font-heading: 'Playfair Display', Georgia, serif;
  --max-width: 1200px;
  --header-height: 80px;
  --transition: 0.3s ease;
  --section-padding: 100px 0;
  --border-radius: 8px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  font-family: var(--font-family);
  color: var(--color-body);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  color: var(--color-heading);
  font-weight: 700;
  line-height: 1.2;
}

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

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

ul {
  list-style: none;
}

/* =========================================
   Utilities
   ========================================= */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.btn {
  display: inline-block;
  padding: 15px 40px;
  border-radius: var(--border-radius);
  font-family: var(--font-family);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color var(--transition), transform var(--transition), box-shadow var(--transition);
  border: none;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(151, 135, 119, 0.45);
}

/* =========================================
   Section Headers
   ========================================= */
.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header--left {
  text-align: left;
  margin-bottom: 28px;
}

.section-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 12px;
}

.section-header h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  color: var(--color-heading);
  position: relative;
  display: inline-block;
}

.section-header h2::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -14px;
  transform: translateX(-50%);
  width: 48px;
  height: 3px;
  background: var(--color-primary);
  border-radius: 2px;
}

.section-header--left h2::after {
  left: 0;
  transform: none;
}

/* =========================================
   Scroll Animations
   ========================================= */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease-out, transform 0.65s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.card:nth-child(2) { transition-delay: 0.08s; }
.card:nth-child(3) { transition-delay: 0.16s; }
.card:nth-child(4) { transition-delay: 0.24s; }
.card:nth-child(5) { transition-delay: 0.32s; }
.card:nth-child(6) { transition-delay: 0.40s; }

/* =========================================
   Header & Navigation
   ========================================= */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: background-color var(--transition), box-shadow var(--transition);
}

.site-header.scrolled {
  background: var(--color-white);
  box-shadow: 0 2px 24px rgba(0, 0, 0, 0.08);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.nav-logo img {
  height: 44px;
  width: auto;
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-white);
  letter-spacing: 0.3px;
  transition: color var(--transition);
}

.logo-text strong {
  font-weight: 800;
  display: block;
  font-size: 1.25rem;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  transition: color var(--transition);
}

.site-header.scrolled .logo-text strong {
  color: var(--color-primary);
}

.site-header.scrolled .logo-text {
  color: var(--color-heading);
}

/* Nav Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-link {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
  transition: color var(--transition);
  position: relative;
  padding-bottom: 4px;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.nav-link:hover {
  color: var(--color-white);
}

.site-header.scrolled .nav-link {
  color: var(--color-body);
}

.site-header.scrolled .nav-link:hover {
  color: var(--color-primary);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  z-index: 1100;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition), background-color var(--transition);
}

.site-header.scrolled .hamburger span {
  background: var(--color-heading);
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* =========================================
   Hero
   ========================================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: url('../images/office.jpg') center / cover no-repeat;
  background-color: var(--color-heading);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    160deg,
    rgba(34, 34, 40, 0.80) 0%,
    rgba(151, 135, 119, 0.50) 100%
  );
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'><g fill='none' stroke='white' stroke-width='0.9' stroke-linecap='round' stroke-linejoin='round'><line x1='70' y1='26' x2='70' y2='102'/><line x1='34' y1='44' x2='106' y2='44'/><line x1='34' y1='44' x2='22' y2='66'/><line x1='34' y1='44' x2='46' y2='66'/><line x1='106' y1='44' x2='94' y2='66'/><line x1='106' y1='44' x2='118' y2='66'/><path d='M22 66 Q34 77 46 66'/><path d='M94 66 Q106 77 118 66'/><line x1='58' y1='102' x2='82' y2='102'/><circle cx='70' cy='26' r='3' fill='white' stroke='none'/></g></svg>");
  background-size: 140px 140px;
  opacity: 0.055;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 3;
  color: var(--color-white);
  padding: 0 24px;
  animation: heroFadeIn 1s ease-out both;
}

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

.hero-eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  color: var(--color-white);
  font-weight: 700;
  letter-spacing: 0.18em;
  margin-bottom: 20px;
}

.hero-tagline {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(255, 255, 255, 0.82);
  font-weight: 400;
  margin-bottom: 40px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* =========================================
   Practice Areas
   ========================================= */
.practice-areas {
  padding: var(--section-padding);
  background: var(--color-light);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.card {
  background: var(--color-white);
  padding: 40px 32px;
  border-radius: var(--border-radius);
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition), opacity 0.65s ease-out;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.1);
}

.card-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 22px;
  color: var(--color-primary);
  background: var(--color-primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.card-icon svg {
  width: 100%;
  height: 100%;
}

.card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--color-heading);
}

.card p {
  font-size: 0.9rem;
  color: var(--color-muted);
  line-height: 1.7;
}

/* =========================================
   About
   ========================================= */
.about {
  padding: var(--section-padding);
  background: var(--color-white);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}

.about-image {
  position: relative;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.12);
  min-height: 480px;
  background: var(--color-light);
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.about-image.image-placeholder .placeholder-icon {
  display: flex;
}

.placeholder-icon {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  color: #c0c0c0;
}

.placeholder-icon svg {
  width: 80px;
  height: 80px;
}

.about-text p {
  color: var(--color-muted);
  margin-bottom: 18px;
  font-size: 0.95rem;
}

.about-highlights {
  display: flex;
  gap: 36px;
  margin-top: 36px;
  padding-top: 32px;
  border-top: 1px solid rgba(0, 0, 0, 0.07);
}

.highlight {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.highlight-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
}

.highlight-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* =========================================
   Contact
   ========================================= */
.contact {
  padding: var(--section-padding);
  background: var(--color-light);
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 60px;
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

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

.contact-icon {
  width: 44px;
  height: 44px;
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 10px;
}

.contact-icon svg {
  width: 100%;
  height: 100%;
}

.contact-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 4px;
}

.contact-value {
  font-size: 0.95rem;
  color: var(--color-heading);
  font-weight: 500;
  line-height: 1.5;
}

.contact-link {
  transition: color var(--transition);
}

.contact-link:hover {
  color: var(--color-primary);
}

.contact-map {
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.contact-map iframe {
  display: block;
  width: 100%;
  height: 420px;
  border: 0;
}

/* =========================================
   Footer
   ========================================= */
.site-footer {
  background: var(--color-heading);
  color: rgba(255, 255, 255, 0.55);
  padding: 28px 0;
}

.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-footer p {
  font-size: 0.82rem;
  letter-spacing: 0.2px;
}

.back-to-top {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.6);
  transition: background-color var(--transition), color var(--transition), border-color var(--transition);
  flex-shrink: 0;
}

.back-to-top svg {
  width: 16px;
  height: 16px;
}

.back-to-top:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.4);
}

/* =========================================
   Responsive — 1024px
   ========================================= */
@media (max-width: 1024px) {
  :root {
    --section-padding: 80px 0;
  }

  .about-content {
    gap: 48px;
  }

  .contact-content {
    gap: 40px;
  }
}

/* =========================================
   Responsive — 768px
   ========================================= */
@media (max-width: 768px) {
  :root {
    --section-padding: 64px 0;
    --header-height: 68px;
  }

  /* Mobile nav */
  .hamburger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    inset: 0;
    background: var(--color-heading);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    z-index: 1050;
  }

  .nav-links.active {
    transform: translateX(0);
  }

  .nav-link {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 2px;
  }

  .nav-link:hover {
    color: var(--color-white);
  }

  .site-header.scrolled .nav-link {
    color: rgba(255, 255, 255, 0.85);
  }

  /* Cards — 2 columns */
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .card {
    padding: 30px 22px;
  }

  /* About — stacked */
  .about-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-image {
    min-height: 360px;
  }

  .section-header--left {
    text-align: center;
  }

  .section-header--left h2::after {
    left: 50%;
    transform: translateX(-50%);
  }

  /* Contact — stacked */
  .contact-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .contact-map iframe {
    height: 300px;
  }
}

/* =========================================
   Responsive — 480px
   ========================================= */
@media (max-width: 480px) {
  :root {
    --section-padding: 56px 0;
  }

  .cards-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .card:nth-child(n) {
    transition-delay: 0s;
  }

  .about-highlights {
    gap: 24px;
  }

  .highlight-number {
    font-size: 1.6rem;
  }

  .site-footer .container {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}
