/*------------------------------------
  Variables & Base
------------------------------------*/
:root {
  --color-dark1: #261D19;   /* near-black espresso */
  --color-dark2: #594E4A;   /* dark brown/gray */
  --color-light1: #D9CCC1;  /* light beige */
  --color-light2: #BFB1A4;  /* medium beige */
  --color-light3: #A6978A;  /* taupe accent */
  --color-accent: #8C544E;  /* subtle accent */

  /* Footer customization */
  --footer-bg-start: #594E4A;
  --footer-bg-end: #261D19;
  --footer-divider: #71655F;
  --footer-link-hover: #F5EEE6;
  --footer-padding-y: 2.5rem;
  --footer-text-size: 0.875rem;

  --transition-speed: 0.3s;
  --border-radius: 4px;

  --font-heading: 'Merriweather', serif;
  --font-body: 'Open Sans', sans-serif;
}

html {
  box-sizing: border-box;
  scroll-behavior: smooth;
}

*, *:before, *:after {
  box-sizing: inherit;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-dark1);
  background-color: var(--color-light1);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

ul,
ol {
  margin: 0 0 1rem 1.25rem;
  padding: 0;
}

a {
  color: var(--color-dark1);
  text-decoration-color: var(--color-accent);
  text-underline-offset: 0.15em;
  transition: color var(--transition-speed) ease;
}

a:hover,
a:focus-visible {
  color: var(--color-accent);
  outline: none;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

::selection {
  background: var(--color-accent);
  color: var(--color-light1);
}

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

/* Accessible skip link for keyboard users */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  background-color: var(--color-dark1);
  color: var(--color-light1);
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
}

.skip-link:focus {
  position: static;
  width: auto;
  height: auto;
  margin: 1rem;
  text-decoration: none;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  z-index: 1000;
}

/*------------------------------------
  Typography
------------------------------------*/
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 1em 0;
  font-family: var(--font-heading);
  color: var(--color-dark1);
  line-height: 1.2;
}

h1 {
  font-size: 2.5rem;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 2px rgba(0,0,0,0.1);
}

h2 {
  font-size: 2rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  position: relative;
  padding-bottom: 0.5rem;
}

h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 3rem;
  height: 2px;
  background-color: var(--color-accent);
}

h3 {
  font-size: 1.5rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

p {
  margin: 0 0 1em 0;
}

/* Drop cap styling for decorative first letters */
.drop-cap::first-letter {
  font-size: 3em;
  font-weight: bold;
  float: left;
  margin-right: 0.1em;
  line-height: 1;
}

/*------------------------------------
  Layout & Containers
------------------------------------*/
.container {
  max-width: 1200px;
  padding-left: 1rem;
  padding-right: 1rem;
  margin-left: auto;
  margin-right: auto;
}

section {
  padding: 3.75rem 0; /* 60px */
}

@media (max-width: 768px) {
  section {
    padding: 1.875rem 0; /* 30px */
  }
  .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
}

/* Alternate section backgrounds */
.section-light {
  background-color: var(--color-light1);
}

.section-alt {
  background-color: var(--color-light2);
}

/*------------------------------------
  Header & Navigation
------------------------------------*/
.header {
  background-color: var(--color-dark2);
  color: var(--color-light1);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--color-dark1);
  padding: 0.75rem 1rem;
  background-color: var(--color-dark1);
  transition: background-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.navbar-brand {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--color-light1);
  text-decoration: none;
  letter-spacing: 0.5px;
}

.navbar-menu {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.navbar-menu a {
  color: var(--color-light1);
  text-decoration: none;
  letter-spacing: 0.05em;
  font-family: var(--font-body);
  padding: 0.5rem 0;
  transition: color var(--transition-speed) ease;
}

.navbar-menu a:hover,
.navbar-menu a:focus {
  color: var(--color-light3);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--color-light1);
  font-size: 1.5rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  .navbar-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    background-color: var(--color-dark2);
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-speed) ease;
  }

  .navbar-menu.active {
    display: flex;
    max-height: 500px;
  }

  .menu-toggle {
    display: block;
  }
}

/*------------------------------------
  Buttons & Links
------------------------------------*/
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: var(--color-dark2);
  color: var(--color-light1);
  text-decoration: none;
  border-radius: var(--border-radius);
  transition: background-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease, transform var(--transition-speed) ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  cursor: pointer;
}

.btn:hover,
.btn:focus {
  background-color: var(--color-dark1);
  box-shadow: 0 4px 6px rgba(0,0,0,0.15);
  transform: translateY(-2px);
}

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

.btn-secondary {
  background-color: var(--color-accent);
  color: var(--color-light1);
}

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

.btn-lg { padding: 1rem 2rem; }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.875rem; }

/*------------------------------------
  Forms
------------------------------------*/
input,
textarea,
select {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--color-light3);
  border-radius: var(--border-radius);
  font-family: var(--font-body);
  font-size: 1rem;
  background-color: #fff;
  transition: border-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

input::placeholder,
textarea::placeholder {
  color: var(--color-light3);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(140,84,78,0.2);
}

textarea { resize: vertical; }

.form-group {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
}

.contact-details {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

.list-unstyled {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.contact-details li {
  margin-bottom: 0.5rem;
}

/*------------------------------------
  Hero / Banner
------------------------------------*/
.hero {
  background: linear-gradient(135deg, var(--color-dark2), var(--color-dark1));
  color: var(--color-light1);
  padding: 4rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}



.hero h1,
.hero p {
  color: var(--color-light1);
  position: relative;
  z-index: 1;
}

.hero h1 {
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/*------------------------------------
  Cards / Features
------------------------------------*/
.card {
  background-color: #fff;
  border: 1px solid var(--color-light3);
  border-radius: var(--border-radius);
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  padding: 1.5rem;
  margin-bottom: 2rem;
  transition: box-shadow var(--transition-speed) ease, transform var(--transition-speed) ease;
}

.card:hover {
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transform: translateY(-4px);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

/*------------------------------------
  Footer
------------------------------------*/
.footer {
  background: linear-gradient(180deg, var(--footer-bg-start), var(--footer-bg-end));
  color: var(--color-light1);
  padding: var(--footer-padding-y) 0;
  text-align: center;
  font-size: var(--footer-text-size);
  margin-top: 3rem;
  border-top: 3px solid var(--footer-divider);
  box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  line-height: 1.4;
}

.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--footer-divider), transparent);
}

.footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  max-width: 1100px;
}

.footer p {
  margin: 0.5rem 0;
  flex: 1 1 100%;
}

.footer a {
  color: var(--color-light1);
  text-decoration: none;
  transition: color var(--transition-speed) ease, opacity var(--transition-speed) ease;
  margin: 0 0.5rem;
  opacity: 0.85;
}

.footer a:hover,
.footer a:focus {
  color: var(--footer-link-hover);
  text-decoration: underline;
  opacity: 1;
}

.footer i {
  margin-right: 0.5rem;
  color: var(--footer-link-hover);
}

.footer [class^="fa-"],
.footer [class*=" fa-"] {
  font-size: 1rem;
  vertical-align: middle;
}

@media (max-width: 768px) {
  .footer .container {
    flex-direction: column;
    text-align: center;
  }
  .footer p {
    flex-basis: auto;
  }
}

.footer-tagline {
  font-size: 1rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  color: var(--color-light2);
}

/*------------------------------------
  Utility & Animation
------------------------------------*/
.fade-in {
  animation: fadeIn 1s ease both;
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-2 { margin-top: 0.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.shadow { box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.rounded { border-radius: var(--border-radius); }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.max-width-sm { max-width: 600px; margin-left: auto; margin-right: auto; }
.max-width-md { max-width: 800px; margin-left: auto; margin-right: auto; }

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Responsive Images */
img {
  display: block;
  max-width: 100%;
  height: auto;
  object-fit: cover;
}


/* Back to Top Link */
.back-to-top {
  text-align: center;
  margin: 2rem 0;
  font-size: 0.875rem;
}

.back-to-top a {
  color: var(--color-dark1);
  text-decoration: none;
  transition: color var(--transition-speed) ease;
}

.back-to-top a:hover,
.back-to-top a:focus {
  text-decoration: underline;
  color: var(--color-accent);
}

/*------------------------------------
  Pre-Footer Callout
------------------------------------*/
.pre-footer-cta {
  background-color: var(--color-dark2);
  color: var(--color-light1);
  text-align: center;
  padding: 2rem 0;
}

.pre-footer-cta h1 {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  margin: 0 0 0.5rem 0;
}

.pre-footer-cta p {
  margin: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

th,
td {
  border: 1px solid var(--color-light3);
  padding: 0.5rem;
  text-align: left;
}

blockquote {
  margin: 1rem 0;
  padding-left: 1rem;
  border-left: 4px solid var(--color-accent);
  color: var(--color-dark2);
  font-style: italic;
}

pre,
code {
  font-family: monospace;
  background-color: var(--color-light2);
  padding: 0.25rem 0.5rem;
  border-radius: var(--border-radius);
}

.disclaimer {
  font-size: 0.875rem;
  color: var(--color-dark2);
}

hr {
  border: none;
  border-top: 1px solid var(--color-light3);
  margin: 2rem 0;
}

.practice-index {
  columns: 2;
  column-gap: 2rem;
  list-style: none;
  padding-left: 0;
}
.practice-index > li {
  break-inside: avoid;
  margin-bottom: 1rem;
}
.practice-index ul {
  list-style: disc;
  margin: 0.25rem 0 0.75rem 1.25rem;
}


/* Footer Callout */
.footer-callout {
  background-color: var(--color-light2);
  color: var(--color-dark1);
  text-align: center;
  padding: 2rem 0;
}
.footer-callout h1 {
  font-family: var(--font-heading);
  margin-bottom: 0.5rem;
}
