/* ========================================
       CSS Custom Properties
       ======================================== */
:root {
  /* Colors - warm neutrals with azure accent */
  --color-text: #2d3436;
  --color-text-light: #636e72;
  --color-accent: #1520a6;
  --color-accent-light: #4650be;
  --color-bg: #fdfcfa;
  --color-bg-alt: #f5f3ef;
  --color-border: #e0dcd4;
  --color-white: #ffffff;

  /* Typography */
  --font-heading: "Libre Baskerville", Georgia, serif;
  --font-body: "Source Sans 3", -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;

  /* Layout */
  --max-width: 64rem;
  --border-radius: 4px;
}

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

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--color-text);
}

a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* ========================================
       Typography
       ======================================== */
h1,
h2,
h3 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.3;
  color: var(--color-text);
}

h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  margin-bottom: var(--space-md);
  display: inline-block;
}

/* Decorative underline for section headings */
section > .container > h2 {
  position: relative;
  padding-bottom: var(--space-sm);
}

section > .container > h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 3rem;
  height: 2px;
  background: linear-gradient(
    90deg,
    var(--color-accent) 0%,
    var(--color-accent-light) 100%
  );
  border-radius: 1px;
}

h3 {
  font-size: 1.25rem;
  margin-bottom: var(--space-sm);
}

p {
  margin-bottom: var(--space-sm);
}

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

/* ========================================
       Layout
       ======================================== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

section {
  padding: var(--space-xl) 0;
}

@media (min-width: 48rem) {
  section {
    padding: var(--space-2xl) 0;
  }
}

/* ========================================
       Header
       ======================================== */
.site-header {
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-white);
  position: relative;
}

/* Thin accent line at top of page */
.site-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--color-accent) 0%,
    var(--color-accent-light) 50%,
    var(--color-accent) 100%
  );
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.site-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
}

.site-title:hover {
  color: var(--color-accent);
}

.nav-list {
  display: flex;
  gap: var(--space-md);
  list-style: none;
}

.nav-list a {
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--color-text-light);
  transition: color 0.2s ease;
  position: relative;
}

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

.nav-list a:hover {
  color: var(--color-text);
}

.nav-list a:hover::after {
  width: 100%;
}

/* ========================================
       Hero
       ======================================== */
.hero {
  padding: var(--space-xl) 0 var(--space-2xl);
  background: linear-gradient(135deg, var(--color-bg-alt) 0%, #eae7df 100%);
  position: relative;
  overflow: hidden;
}

/* Decorative botanical accent */
.hero::before {
  content: "";
  position: absolute;
  top: -5%;
  right: -5%;
  width: 45%;
  max-width: 400px;
  aspect-ratio: 1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cpath d='M100 20 Q120 60 100 100 Q80 60 100 20' fill='none' stroke='%231520a6' stroke-width='1' opacity='0.15'/%3E%3Cpath d='M100 100 Q140 80 160 100 Q140 120 100 100' fill='none' stroke='%231520a6' stroke-width='1' opacity='0.12'/%3E%3Cpath d='M100 100 Q60 80 40 100 Q60 120 100 100' fill='none' stroke='%231520a6' stroke-width='1' opacity='0.12'/%3E%3Cpath d='M100 100 Q120 140 100 180 Q80 140 100 100' fill='none' stroke='%231520a6' stroke-width='1' opacity='0.1'/%3E%3Ccircle cx='100' cy='100' r='60' fill='none' stroke='%231520a6' stroke-width='0.5' opacity='0.08'/%3E%3Ccircle cx='100' cy='100' r='80' fill='none' stroke='%231520a6' stroke-width='0.5' opacity='0.06'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
}

.hero-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

@media (max-width: 48rem) {
  .hero-layout {
    position: relative;
    grid-template-columns: 1fr;
    gap: 0;
  }
}

.hero-logo-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-logo {
  max-width: 100%;
  height: auto;
  display: block;
  max-height: 24rem;
}

@media (max-width: 48rem) {
  .hero-logo-wrapper {
    position: absolute;
    top: 50%;
    right: -10%;
    transform: translateY(-50%);
    width: 80%;
    max-width: 20rem;
    opacity: 0.15;
    z-index: 0;
    pointer-events: none;
  }

  .hero-logo {
    max-height: none;
    width: 100%;
  }

  .hero-content {
    position: relative;
    z-index: 1;
  }
}

.hero-content {
  max-width: 40rem;
  position: relative;
}

.hero h1 {
  margin-bottom: var(--space-md);
}

.hero-tagline {
  font-size: 1.1875rem;
  color: var(--color-text-light);
  margin-bottom: var(--space-lg);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-lg);
  font-size: 0.9375rem;
}

.hero-meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.hero-meta-item strong {
  color: var(--color-accent);
  font-size: 1.25rem;
}

.btn {
  display: inline-block;
  padding: 0.875rem 1.75rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--border-radius);
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(
    135deg,
    var(--color-accent) 0%,
    var(--color-accent-light) 100%
  );
  color: var(--color-white);
  box-shadow: 0 2px 8px rgba(107, 124, 94, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--color-text) 0%, #4a4f50 100%);
  color: var(--color-white);
  box-shadow: 0 4px 12px rgba(45, 52, 54, 0.3);
  transform: translateY(-1px);
}

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

.btn-secondary:hover {
  background: var(--color-accent);
  color: var(--color-white);
  transform: translateY(-1px);
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

/* ========================================
       Services
       ======================================== */
.services {
  background: var(--color-white);
}

.services-grid {
  display: grid;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

@media (min-width: 40rem) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 60rem) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.service-card {
  padding: var(--space-md);
  background: var(--color-bg);
  border-radius: var(--border-radius);
  border: 1px solid var(--color-border);
  box-shadow: 0 2px 8px rgba(107, 124, 94, 0.06);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  position: relative;
}

.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 0;
  background: var(--color-accent);
  border-radius: var(--border-radius) 0 0 var(--border-radius);
  transition: height 0.2s ease;
}

.service-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(107, 124, 94, 0.12);
}

.service-card:hover::before {
  height: 100%;
}

.service-card h3 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.0625rem;
  margin-bottom: var(--space-xs);
}

.service-card p {
  font-size: 0.9375rem;
  color: var(--color-text-light);
}

.service-card ul {
  margin: var(--space-sm) 0 0 0;
  padding-left: var(--space-md);
  list-style: disc;
  color: var(--color-text-light);
}

.service-card li {
  margin-bottom: 0.25rem;
  font-size: 0.9375rem;
}

/* ========================================
       Reviews
       ======================================== */
.reviews {
  background: var(--color-bg-alt);
  position: relative;
}

/* Subtle dot pattern */
.reviews::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
    circle,
    var(--color-accent) 1px,
    transparent 1px
  );
  background-size: 24px 24px;
  opacity: 0.03;
  pointer-events: none;
}

.reviews > .container {
  position: relative;
}

.reviews-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.rating-summary {
  font-size: 1.125rem;
  color: var(--color-text-light);
}

.rating-summary strong {
  color: var(--color-accent);
  font-size: 1.5rem;
}

.reviews-grid {
  display: grid;
  gap: var(--space-md);
}

@media (min-width: 48rem) {
  .reviews-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.review-card {
  padding: var(--space-md);
  padding-top: var(--space-lg);
  background: var(--color-white);
  border-radius: var(--border-radius);
  border: 1px solid var(--color-border);
  box-shadow: 0 2px 8px rgba(107, 124, 94, 0.06);
  position: relative;
  transition: box-shadow 0.2s ease;
}

.review-card::before {
  content: "\201C";
  position: absolute;
  top: var(--space-sm);
  left: var(--space-md);
  font-family: var(--font-heading);
  font-size: 3.5rem;
  line-height: 1;
  color: var(--color-accent);
  opacity: 0.2;
}

.review-card:hover {
  box-shadow: 0 4px 16px rgba(107, 124, 94, 0.1);
}

.review-text {
  font-style: italic;
  margin-bottom: var(--space-sm);
  position: relative;
}

.review-author {
  font-size: 0.875rem;
  color: var(--color-text-light);
}

.review-stars {
  color: var(--color-accent);
  letter-spacing: 2px;
  margin-bottom: var(--space-xs);
}

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

.about-content {
  max-width: 42rem;
}

.about-content p {
  margin-bottom: var(--space-md);
}

.credentials {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-lg);
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border);
  font-size: 0.9375rem;
}

.credential {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0.5rem 1rem;
  background: var(--color-bg-alt);
  border-radius: 2rem;
  border: 1px solid var(--color-border);
}

.credential::before {
  content: "✓";
  color: var(--color-accent);
  font-weight: bold;
}

/* ========================================
       Contact
       ======================================== */
.contact {
  background: var(--color-bg-alt);
}

.contact-layout {
  display: grid;
  gap: var(--space-xl);
}

@media (min-width: 48rem) {
  .contact-layout {
    grid-template-columns: 1fr 1fr;
  }
}

.contact-info h2 {
  margin-bottom: var(--space-md);
}

.contact-details {
  margin-top: var(--space-lg);
}

.contact-details dt {
  font-weight: 600;
  margin-top: var(--space-sm);
}

.contact-details dt:first-child {
  margin-top: 0;
}

.contact-details dd {
  color: var(--color-text-light);
}

.contact-form {
  background: var(--color-white);
  padding: var(--space-lg);
  border-radius: var(--border-radius);
  border: 1px solid var(--color-border);
  box-shadow: 0 4px 20px rgba(107, 124, 94, 0.08);
}

.form-group {
  margin-bottom: var(--space-md);
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--space-xs);
  font-size: 0.9375rem;
}

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

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(107, 124, 94, 0.15);
}

.form-group textarea {
  min-height: 6rem;
  resize: vertical;
}

.form-row {
  display: grid;
  gap: var(--space-md);
}

@media (min-width: 30rem) {
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
}

.form-note {
  font-size: 0.8125rem;
  color: var(--color-text-light);
  margin-top: var(--space-sm);
}

/* ========================================
       Footer
       ======================================== */
.site-footer {
  padding: var(--space-lg) 0;
  background: var(--color-text);
  color: var(--color-bg);
  position: relative;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--color-accent) 50%,
    transparent 100%
  );
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  text-align: center;
}

@media (min-width: 48rem) {
  .footer-content {
    grid-template-columns: 1fr auto 1fr;
    text-align: left;
  }
  .footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
  }
  .footer-credit {
    text-align: right;
  }
}

.footer-main p,
.footer-credit p {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0.25rem 0;
}

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

.footer-content a:hover {
  color: var(--color-white);
  text-decoration: underline;
}

.footer-links a {
  display: block;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
}

.footer-links a:hover {
  color: var(--color-white);
}

/* ========================================
       Utilities
       ======================================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-text);
  color: var(--color-white);
  text-decoration: none;
  z-index: 100;
  border-radius: var(--border-radius);
}

.skip-link:focus {
  top: var(--space-sm);
}
.legal-page {
  padding: var(--space-2xl) 0;
}

.legal-page h1 {
  margin-bottom: var(--space-lg);
}

.legal-page p {
  margin-bottom: var(--space-md);
}

.legal-page ul {
  margin: var(--space-md) 0;
  padding-left: var(--space-lg);
}

.legal-page li {
  margin-bottom: var(--space-sm);
}

/* ========================================
   A/B Test: Section Ordering
   ======================================== */
main {
  display: flex;
  flex-direction: column;
}

/* Default order (A): Services before About */
.hero {
  order: 1;
}
.services {
  order: 2;
}
.reviews {
  order: 3;
}
.about {
  order: 4;
}
.contact {
  order: 5;
}
