/* ================================================================
   PEGASUS EQUINE SERVICES - "SADDLE & MEADOW" DESIGN SYSTEM
   Warm parchment base, forest green panels, chestnut + honey gold
   accents, saddle-stitch motif. All text pairs pass WCAG AA.
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Albert+Sans:ital,wght@0,400;0,500;0,700;1,400&display=swap');

/* ================================================================
   CUSTOM PROPERTIES
   ================================================================ */

:root {
  /* Palette */
  --parchment: #FAF6EF;      /* page background */
  --card: #FFFDF8;           /* card background */
  --tan: #E9DCC3;            /* placeholder blocks */
  --band: #F3E9D5;           /* certification band */
  --line: #E2D7C3;           /* hairline borders */
  --ink: #241F1A;            /* body text, 15.2:1 on parchment */
  --ink-soft: #3B342C;       /* secondary text, 11.4:1 on parchment */
  --chestnut: #8C3B1B;       /* accent + links, 7.1:1 on parchment */
  --forest: #2E4034;         /* dark panel */
  --forest-deep: #26352C;    /* footer */
  --cream: #F7F3E9;          /* light text on green, 9.8:1 */
  --gold: #D9A441;           /* labels on green 4.9:1, decorative on light */
  --stitch: rgba(140, 59, 27, 0.35);
  --stitch-light: rgba(217, 164, 65, 0.45);

  /* Typography */
  --font-display: 'Fraunces', 'Georgia', serif;
  --font-body: 'Albert Sans', 'Helvetica Neue', Arial, sans-serif;

  --text-h1: clamp(2.1rem, 4.5vw, 3.6rem);
  --text-h2: clamp(1.6rem, 3vw, 2.3rem);
  --text-h3: clamp(1.2rem, 2vw, 1.45rem);
  --text-body: clamp(1.0625rem, 0.4vw + 1rem, 1.125rem);
  --text-lead: clamp(1.15rem, 0.8vw + 1rem, 1.3rem);
  --text-label: clamp(0.8125rem, 0.2vw + 0.75rem, 0.875rem);

  /* Layout */
  --container: 1160px;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --section-space: clamp(3.5rem, 8vw, 6.5rem);
  --radius: 10px;

  --transition-fast: 150ms ease;
}

/* ================================================================
   RESET & BASE
   ================================================================ */

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--parchment);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.7;
}

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

a {
  color: var(--chestnut);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: text-decoration-thickness var(--transition-fast);
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--chestnut);
  outline-offset: 3px;
}

button {
  font-family: var(--font-body);
  cursor: pointer;
}

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.15;
}

h1 {
  font-size: var(--text-h1);
  font-weight: 600;
  letter-spacing: -0.01em;
}

h2 {
  font-size: var(--text-h2);
  font-weight: 600;
}

h3 {
  font-size: var(--text-h3);
  font-weight: 600;
  line-height: 1.3;
}

p {
  max-width: 66ch;
  margin-bottom: 1.4rem;
}

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

ul, ol {
  margin-left: 1.5em;
  margin-bottom: 1.4rem;
}

li {
  margin-bottom: 0.6rem;
}

/* ================================================================
   SHARED PIECES
   ================================================================ */

.container {
  width: min(calc(100% - (2 * var(--gutter))), var(--container));
  margin-inline: auto;
}

section {
  padding-block: var(--section-space);
}

/* Eyebrow label */
.eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-label);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--chestnut);
  margin-bottom: 0.9rem;
}

/* Signature motif: gold rule with a chestnut diamond tick */
.brand-rule {
  position: relative;
  width: 64px;
  height: 3px;
  background: var(--gold);
  border-radius: 2px;
  margin: 1.25rem 0;
}

.brand-rule::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 100%;
  width: 9px;
  height: 9px;
  margin-left: 8px;
  background: var(--chestnut);
  transform: translateY(-50%) rotate(45deg);
}

.brand-rule.centered {
  margin-left: auto;
  margin-right: auto;
}

.brand-rule.centered::after {
  left: auto;
  right: 100%;
  margin-left: 0;
  margin-right: 8px;
}

.brand-rule.on-dark {
  background: var(--gold);
}

.brand-rule.on-dark::after {
  background: var(--cream);
}

/* Saddle-stitch card */
.stitch-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2.25rem);
}

.stitch-card::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1.5px dashed var(--stitch);
  border-radius: calc(var(--radius) - 4px);
  pointer-events: none;
}

.stitch-card > * {
  position: relative;
}

/* Real photo styling */
.photo-frame {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  display: block;
  box-shadow: 0 2px 12px rgba(36, 31, 26, 0.12);
}

.split-left .photo-frame {
  margin-top: 1.5rem;
}

.services-photo {
  margin-top: 2.5rem;
}

.contact-left .photo-frame {
  margin-top: 1.5rem;
  max-width: 420px;
}

.hero-media .photo-frame {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.about-portrait .photo-frame {
  aspect-ratio: 5 / 6;
  object-fit: cover;
}

/* Photo placeholder block */
.photo-slot {
  position: relative;
  background: var(--tan);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
  color: var(--chestnut);
  font-weight: 500;
  min-height: 240px;
}

.photo-slot::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1.5px dashed var(--stitch);
  border-radius: calc(var(--radius) - 4px);
  pointer-events: none;
}

.photo-slot span {
  position: relative;
  font-size: var(--text-label);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
}

/* ================================================================
   HEADER & NAVIGATION
   ================================================================ */

header {
  background-color: var(--parchment);
  border-bottom: 1px solid var(--line);
  padding: 0.75rem var(--gutter);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--container);
  margin-inline: auto;
  gap: 2rem;
  position: relative;
}

.logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  text-decoration: none;
}

.logo img {
  width: auto;
  height: 58px;
  display: block;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.15;
  max-width: 11ch;
}

.logo svg {
  max-width: 180px;
  height: auto;
  max-height: 58px;
  display: block;
}

@media (max-width: 899px) {
  .logo img {
    height: 46px;
  }

  .logo-text {
    font-size: 1.05rem;
  }
}

nav ul {
  display: flex;
  gap: 2.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

nav li {
  margin: 0;
}

nav a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  position: relative;
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 0;
  width: 0;
  height: 3px;
  border-radius: 2px;
  background-color: var(--gold);
  transition: width var(--transition-fast);
}

nav a:hover::after {
  width: 100%;
}

nav [aria-current="page"] {
  color: var(--chestnut);
  font-weight: 700;
}

nav [aria-current="page"]::after {
  width: 100%;
}

.menu-button {
  display: none;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  padding: 0.5rem 1rem;
  min-width: 48px;
  min-height: 48px;
}

/* ================================================================
   MOBILE NAVIGATION
   ================================================================ */

@media (max-width: 899px) {
  nav {
    display: none;
    position: absolute;
    top: calc(100% + 0.75rem);
    left: calc(-1 * var(--gutter));
    right: calc(-1 * var(--gutter));
    background-color: var(--parchment);
    border-bottom: 2px solid var(--gold);
    box-shadow: 0 10px 24px rgba(36, 31, 26, 0.12);
  }

  nav.open {
    display: block;
  }

  nav ul {
    flex-direction: column;
    gap: 0;
  }

  nav li {
    border-top: 1px solid var(--line);
  }

  nav a {
    display: flex;
    padding: 0.85rem var(--gutter);
    min-height: 48px;
  }

  nav a::after {
    display: none;
  }

  nav [aria-current="page"] {
    background-color: var(--band);
  }

  .menu-button {
    display: block;
  }
}

/* ================================================================
   HERO (normal flow grid, never clipped at any viewport)
   ================================================================ */

.hero {
  background-color: var(--parchment);
  padding-block: clamp(2.5rem, 6vw, 5rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.hero-panel h1 {
  margin-bottom: 0.75rem;
}

.hero-panel p {
  font-size: var(--text-lead);
  color: var(--ink);
}

.hero-media .photo-slot {
  aspect-ratio: 4 / 3;
  min-height: 280px;
}

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

  .hero-media .photo-slot {
    min-height: 220px;
  }
}

/* ================================================================
   TWO-COLUMN CONTENT SECTIONS (HOME)
   ================================================================ */

.split-section .container {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}

.split-section h2 {
  margin-bottom: 1.25rem;
}

.split-left h2 {
  max-width: 18ch;
}

.split-right > h2:first-child {
  margin-top: 0;
}

.split-section.alt {
  background-color: var(--card);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

@media (max-width: 899px) {
  .split-section .container {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
}

/* Symptom checklist */
.symptom-list {
  list-style: none;
  margin: 0;
}

.symptom-item {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 0.9rem 0;
  border-bottom: 1px dashed var(--stitch);
  margin: 0;
}

.symptom-item:last-child {
  border-bottom: none;
}

.symptom-index {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--chestnut);
  flex-shrink: 0;
  width: 2.25rem;
  text-align: right;
}

.symptom-text {
  flex: 1;
  color: var(--ink);
  font-weight: 500;
}

/* ================================================================
   BENEFITS GRID (HOME)
   ================================================================ */

.benefits {
  background-color: var(--forest);
}

.benefits h2 {
  color: var(--cream);
  text-align: center;
  margin-bottom: 0.75rem;
}

.benefits .brand-rule {
  margin-bottom: 3rem;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.benefit-block {
  position: relative;
  background: rgba(247, 243, 233, 0.06);
  border: 1px solid rgba(247, 243, 233, 0.18);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
}

.benefit-block::before {
  content: '';
  position: absolute;
  inset: 7px;
  border: 1.5px dashed var(--stitch-light);
  border-radius: calc(var(--radius) - 4px);
  pointer-events: none;
}

.benefit-block h3 {
  color: var(--gold);
  margin-bottom: 0.6rem;
}

.benefit-block p {
  color: var(--cream);
  font-size: 1rem;
  margin-bottom: 0;
}

@media (max-width: 1024px) {
  .benefits-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

/* ================================================================
   CERTIFICATION BAND
   ================================================================ */

.edpa-band {
  background-color: var(--band);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 2.25rem var(--gutter);
  text-align: center;
}

.edpa-band p {
  font-family: var(--font-body);
  font-size: var(--text-label);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--chestnut);
  margin: 0 auto;
  max-width: none;
}

.edpa-band-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.edpa-band-inner img {
  width: 110px;
  height: 110px;
  flex-shrink: 0;
}

.edpa-band-inner p {
  margin: 0;
  text-align: left;
}

@media (max-width: 599px) {
  .edpa-band-inner {
    flex-direction: column;
    gap: 1rem;
  }

  .edpa-band-inner p {
    text-align: center;
  }
}

/* ================================================================
   ABOUT PAGE
   ================================================================ */

.about-intro .container {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: center;
}

.about-intro-text h1 {
  margin-bottom: 1.25rem;
}

.about-portrait .photo-slot {
  aspect-ratio: 5 / 4;
}

@media (max-width: 899px) {
  .about-intro .container {
    grid-template-columns: 1fr;
  }
}

/* Barn book panel: forest green, cream text, gold labels */
.about-panel-section {
  background-color: var(--parchment);
  padding-top: 0;
}

.about-panel {
  position: relative;
  background-color: var(--forest);
  color: var(--cream);
  border-radius: var(--radius);
  padding: clamp(2rem, 4.5vw, 3.5rem);
}

.about-panel::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1.5px dashed var(--stitch-light);
  border-radius: calc(var(--radius) - 4px);
  pointer-events: none;
}

.about-panel > * {
  position: relative;
}

.panel-label {
  font-family: var(--font-body);
  font-size: var(--text-label);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--gold);
  margin-bottom: 1rem;
}

.about-panel ul {
  list-style: none;
  margin: 0 0 2.25rem 0;
}

.about-panel li {
  color: var(--cream);
  padding-left: 1.4rem;
  position: relative;
  margin-bottom: 0.7rem;
}

.about-panel li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  background: var(--gold);
  transform: rotate(45deg);
}

.about-panel .about-quote {
  color: var(--cream);
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-lead);
  line-height: 1.6;
}

.about-panel .about-bio {
  color: var(--cream);
}

.about-block {
  margin-bottom: 2.25rem;
}

.about-block:last-of-type {
  margin-bottom: 0;
}

.about-reference {
  margin-top: 2.5rem;
  text-align: center;
}

.about-reference-rule {
  width: 64px;
  height: 2px;
  background: var(--gold);
  border: none;
  margin: 0 auto 1rem auto;
}

.about-reference p {
  color: var(--cream);
  font-size: var(--text-label);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin: 0 auto;
}

/* ================================================================
   SERVICES PAGE
   ================================================================ */

.services-header {
  background-color: var(--forest);
  text-align: center;
  padding: clamp(3.5rem, 7vw, 6rem) 0;
}

.services-header h1 {
  color: var(--cream);
  margin-bottom: 0.75rem;
}

.services-header h2 {
  color: var(--gold);
  font-family: var(--font-body);
  font-size: var(--text-label);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin-bottom: 1.5rem;
}

.services-header p {
  color: var(--cream);
  font-size: var(--text-lead);
  max-width: 56ch;
  margin-left: auto;
  margin-right: auto;
}

.services-header .brand-rule {
  margin-top: 1.75rem;
}

.services-list .container {
  max-width: 980px;
}

.services-list-title {
  text-align: center;
  margin-bottom: 2.5rem;
}

.service-detail {
  display: grid;
  grid-template-columns: 0.38fr 0.62fr;
  gap: 2rem;
  padding: 1.9rem 0;
  border-bottom: 1px dashed var(--stitch);
}

.service-detail:last-of-type {
  border-bottom: none;
}

.service-detail-title {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
}

.service-detail-index {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--chestnut);
  flex-shrink: 0;
  line-height: 1.6;
}

.service-detail-body {
  color: var(--ink-soft);
}

.service-detail-body p {
  margin-bottom: 0;
}

.services-approach {
  margin-top: 3rem;
}

.services-approach h3 {
  margin-bottom: 1rem;
}

.services-approach p {
  color: var(--ink);
  margin-bottom: 1rem;
}

@media (max-width: 899px) {
  .service-detail {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

/* ================================================================
   CONTACT PAGE
   ================================================================ */

.contact-section .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}

.contact-left h1 {
  margin-bottom: 1.25rem;
}

.contact-panel {
  position: relative;
  background-color: var(--forest);
  color: var(--cream);
  border-radius: var(--radius);
  padding: clamp(2rem, 4.5vw, 3.25rem);
}

.contact-panel::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1.5px dashed var(--stitch-light);
  border-radius: calc(var(--radius) - 4px);
  pointer-events: none;
}

.contact-panel > * {
  position: relative;
}

.contact-method {
  margin-bottom: 1.75rem;
}

.contact-method-label {
  display: block;
  font-size: var(--text-label);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--gold);
  margin-bottom: 0.35rem;
}

.contact-method a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  color: var(--cream);
  text-decoration-color: var(--gold);
  overflow-wrap: anywhere;
}

.contact-method a:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.contact-social {
  margin-top: 2rem;
  border-top: 1px dashed var(--stitch-light);
  padding-top: 1.25rem;
}

.contact-social a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  margin-right: 1.75rem;
  color: var(--cream);
  font-weight: 500;
  text-decoration-color: var(--gold);
}

.contact-social a:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

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

/* ================================================================
   FOOTER
   ================================================================ */

footer {
  background-color: var(--forest-deep);
  color: var(--cream);
  border-top: 4px solid var(--gold);
  padding: 3.5rem var(--gutter) 0;
}

footer .container {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.footer-logo svg {
  max-width: 170px;
  height: auto;
  max-height: 54px;
  display: block;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
}

.footer-section p {
  margin-bottom: 0.4rem;
}

.footer-section strong {
  display: inline-block;
  font-size: var(--text-label);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.footer-section ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-section li {
  margin-bottom: 0.15rem;
}

.footer-section a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--cream);
  text-decoration-color: var(--gold);
}

.footer-section a:hover {
  text-decoration-thickness: 2px;
}

.footer-section a:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.footer-copyright {
  margin-top: 2.5rem;
  padding: 1.5rem 0;
  border-top: 1px dashed var(--stitch-light);
  text-align: center;
  max-width: var(--container);
  margin-inline: auto;
}

.footer-copyright p {
  color: var(--cream);
  font-size: 0.9rem;
  margin: 0 auto;
}

@media (max-width: 899px) {
  footer .container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* ================================================================
   REDUCED MOTION
   ================================================================ */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ================================================================
   PRINT
   ================================================================ */

@media print {
  body {
    background: white;
  }

  nav,
  .menu-button {
    display: none;
  }
}
