:root {
  --color-bg: #f7f4ef;
  --color-bg-alt: #ede8e0;
  --color-surface: #ffffff;
  --color-primary: #1a2332;
  --color-secondary: #3d5a80;
  --color-accent: #e07a5f;
  --color-accent-hover: #c96a52;
  --color-text: #2c3344;
  --color-text-muted: #5c6478;
  --color-border: #d4cfc6;
  --font-heading: 'Fraunces', Georgia, serif;
  --font-body: 'Source Sans 3', system-ui, sans-serif;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --shadow-sm: 0 2px 8px rgba(26, 35, 50, 0.06);
  --shadow-md: 0 8px 24px rgba(26, 35, 50, 0.1);
  --max-width: 1140px;
  --header-height: 72px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a { color: var(--color-secondary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--color-accent); }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.25;
  color: var(--color-primary);
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.125rem); margin-bottom: 1rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.75rem; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

ul, ol { margin-bottom: 1rem; padding-left: 1.5rem; }
li { margin-bottom: 0.35rem; }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

main { flex: 1; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 244, 239, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  height: var(--header-height);
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: -0.02em;
}

.logo span { color: var(--color-accent); }

.nav-desktop { display: flex; gap: 1.75rem; align-items: center; }

.nav-desktop a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text);
  position: relative;
}

.nav-desktop a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width 0.25s;
}

.nav-desktop a:hover { color: var(--color-primary); }
.nav-desktop a:hover::after { width: 100%; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--color-primary);
}

.nav-toggle svg { width: 28px; height: 28px; }

.nav-mobile {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 1.25rem 1.5rem;
  box-shadow: var(--shadow-md);
  z-index: 99;
}

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

.nav-mobile a {
  display: block;
  padding: 0.75rem 0;
  font-weight: 500;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-bg-alt);
}

.nav-mobile a:last-child { border-bottom: none; }

@media (max-width: 768px) {
  .nav-desktop { display: none; }
  .nav-toggle { display: block; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-outline:hover {
  background: var(--color-primary);
  color: #fff;
}

.btn-secondary {
  background: var(--color-secondary);
  color: #fff;
  border-color: var(--color-secondary);
}

.btn-secondary:hover {
  background: #2e4666;
  border-color: #2e4666;
  color: #fff;
}

/* Footer */
.site-footer {
  background: var(--color-primary);
  color: rgba(255, 255, 255, 0.85);
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}

.site-footer a { color: rgba(255, 255, 255, 0.75); }
.site-footer a:hover { color: var(--color-accent); }

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand .logo { color: #fff; margin-bottom: 0.75rem; display: block; }
.footer-brand p { font-size: 0.9375rem; opacity: 0.8; }

.footer-col h4 {
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.footer-col ul { list-style: none; padding: 0; }
.footer-col li { margin-bottom: 0.5rem; }
.footer-col a { font-size: 0.9375rem; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.8125rem;
  opacity: 0.65;
}

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

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

/* Hero variants */
.hero {
  padding: 4rem 0 3rem;
  position: relative;
  overflow: hidden;
}

.hero-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-split .hero-content { max-width: 540px; }

.hero-tag {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: 1rem;
}

.hero h1 { margin-bottom: 1.25rem; }

.hero-lead {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
}

.hero-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  position: relative;
}

.hero-image img {
  width: 100%;
  height: 380px;
  object-fit: cover;
}

.hero-image::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 3px solid var(--color-accent);
  border-radius: var(--radius-lg);
  transform: translate(12px, 12px);
  z-index: -1;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

@media (max-width: 768px) {
  .hero-split { grid-template-columns: 1fr; }
  .hero-image img { height: 260px; }
}

.hero-compact {
  background: var(--color-primary);
  color: rgba(255, 255, 255, 0.9);
  padding: 3rem 0;
  text-align: center;
}

.hero-compact h1 { color: #fff; margin-bottom: 0.75rem; }
.hero-compact p { color: rgba(255, 255, 255, 0.75); max-width: 600px; margin: 0 auto; }

/* Sections */
.section { padding: 4rem 0; }
.section-alt { background: var(--color-bg-alt); }

.section-header {
  max-width: 640px;
  margin-bottom: 2.5rem;
}

.section-header.centered {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.section-label {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.75rem;
}

.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s, box-shadow 0.25s;
  border: 1px solid var(--color-border);
}

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

.card-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-body { padding: 1.5rem; }

.card-meta {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 0.9375rem;
  margin-top: 1rem;
  color: var(--color-accent);
}

/* Feature strip */
.feature-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  padding: 2.5rem 0;
}

.feature-item {
  text-align: center;
  padding: 1.5rem;
}

.feature-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  background: var(--color-bg-alt);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
  font-size: 1.25rem;
}

@media (max-width: 768px) {
  .feature-strip { grid-template-columns: 1fr; }
}

/* Testimonials */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.75rem;
}

.testimonial {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  border: 1px solid var(--color-border);
  position: relative;
}

.testimonial::before {
  content: '\201C';
  font-family: var(--font-heading);
  font-size: 3rem;
  color: var(--color-accent);
  opacity: 0.3;
  position: absolute;
  top: 0.5rem;
  left: 1.25rem;
  line-height: 1;
}

.testimonial-text {
  font-style: italic;
  margin-bottom: 1.25rem;
  padding-top: 1.5rem;
}

.testimonial-author {
  font-weight: 600;
  font-size: 0.9375rem;
}

.testimonial-detail {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

/* Forms */
.form-group { margin-bottom: 1.25rem; }

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9375rem;
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  transition: border-color 0.2s;
}

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

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

.form-error {
  color: #b33;
  font-size: 0.8125rem;
  margin-top: 0.35rem;
  display: none;
}

.form-error.visible { display: block; }

.form-success {
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
  color: #2e7d32;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  display: none;
}

.form-success.visible { display: block; }

.form-failure {
  background: #fce4ec;
  border: 1px solid #ef9a9a;
  color: #c62828;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  display: none;
}

.form-failure.visible { display: block; }

.script-error {
  background: #fff3e0;
  border: 1px solid #ffcc80;
  color: #e65100;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  margin: 1rem 0;
  font-size: 0.875rem;
}

/* Contact layout */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
}

.contact-info-block {
  background: var(--color-surface);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
}

.contact-info-block h3 { margin-bottom: 1.25rem; }

.contact-detail {
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--color-bg-alt);
}

.contact-detail:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.contact-detail strong {
  display: block;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: 0.35rem;
}

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

/* Pricing */
.pricing-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.pricing-table th,
.pricing-table td {
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.pricing-table th {
  background: var(--color-primary);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.875rem;
}

.pricing-table tr:last-child td { border-bottom: none; }

.pricing-note {
  background: var(--color-bg-alt);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  margin-top: 2rem;
  font-size: 0.9375rem;
}

/* Blog */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.blog-card .card-image img { height: 220px; }

.article-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.article-content h2 { margin-top: 2rem; }
.article-content h3 { margin-top: 1.5rem; }

.article-meta {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.article-hero img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
}

/* Legal pages */
.legal-content {
  max-width: 780px;
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.legal-content h2 {
  font-size: 1.375rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.legal-content h3 {
  font-size: 1.125rem;
  margin-top: 1.5rem;
}

.cookies-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9375rem;
}

.cookies-table th,
.cookies-table td {
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  text-align: left;
}

.cookies-table th { background: var(--color-bg-alt); }

/* Service detail */
.service-detail-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 3rem;
  margin-top: 2rem;
}

.service-sidebar {
  background: var(--color-surface);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  height: fit-content;
  position: sticky;
  top: calc(var(--header-height) + 1.5rem);
}

.service-sidebar dl { margin-bottom: 1.5rem; }

.service-sidebar dt {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: 0.25rem;
}

.service-sidebar dd {
  font-weight: 600;
  margin-bottom: 1rem;
  margin-left: 0;
}

@media (max-width: 768px) {
  .service-detail-grid { grid-template-columns: 1fr; }
  .service-sidebar { position: static; }
}

/* Practice lab */
.lab-schedule {
  display: grid;
  gap: 1rem;
}

.lab-slot {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 1.5rem;
  align-items: center;
  background: var(--color-surface);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.lab-slot-time {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-accent);
}

@media (max-width: 600px) {
  .lab-slot { grid-template-columns: 1fr; gap: 0.5rem; }
}

/* 404 */
.page-404 {
  text-align: center;
  padding: 6rem 0;
}

.page-404 h1 {
  font-size: 6rem;
  color: var(--color-accent);
  line-height: 1;
  margin-bottom: 1rem;
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-primary);
  color: rgba(255, 255, 255, 0.9);
  padding: 1.25rem 1.5rem;
  z-index: 1000;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  transform: translateY(100%);
  transition: transform 0.35s ease;
}

.cookie-banner.visible { transform: translateY(0); }

.cookie-banner-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cookie-banner p {
  flex: 1;
  min-width: 260px;
  font-size: 0.9375rem;
  margin: 0;
}

.cookie-banner a { color: var(--color-accent); }

.cookie-banner-actions {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}

.cookie-banner .btn-outline {
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}

.cookie-banner .btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* Breadcrumb */
.breadcrumb {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  padding: 1rem 0;
}

.breadcrumb a { color: var(--color-text-muted); }

/* About team */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 2rem;
}

.team-member {
  text-align: center;
}

.team-member img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1rem;
  border: 3px solid var(--color-bg-alt);
}

.team-member h3 { margin-bottom: 0.25rem; }

.team-role {
  font-size: 0.875rem;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
}

/* Case study */
.case-study {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 2rem;
  border: 1px solid var(--color-border);
  margin-bottom: 2rem;
}

.case-study h3 { margin-bottom: 1rem; }
