/* Tucson Equestrian Center — Nature Distilled palette (terracotta + sand +
   sage), Playfair Display + Inter, hand-rolled vanilla CSS. */

:root {
  /* Surfaces */
  --bg:           #fbf7f0;  /* warm cream — page bg */
  --bg-alt:       #f1e7d4;  /* pale sand — alt section */
  --bg-tint:      #ece5d3;  /* slightly cooler tint */
  --bg-dark:      #3a261a;  /* saddle leather */
  --bg-darker:    #1f1410;  /* deep walnut */
  --card:         #ffffff;

  /* Type */
  --fg:           #1a120c;  /* near-black */
  --fg-soft:      #3d2e22;
  --fg-muted:     #6b5a4a;
  --fg-on-dark:   #f5ece0;

  /* Brand & accents */
  --brand:        #b85a2c;  /* warm clay (WCAG-checked) */
  --brand-deep:   #8a3f1a;
  --brand-tint:   #e6cba7;
  --accent:       #6b7b3c;  /* desert sage */
  --accent-deep:  #4a572a;
  --accent-soft:  #d8dec6;

  /* Lines & dividers */
  --line:         #d9cdb8;
  --line-soft:    #ecdfc9;

  /* Layout tokens */
  --max-w:        78rem;
  --max-w-narrow: 44rem;
  --gutter:       1.5rem;
  --section-y:    clamp(4rem, 8vw, 6.5rem);

  /* Type tokens */
  --font-display: "Playfair Display", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-sans:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Effects */
  --shadow-card:  0 1px 2px rgba(31, 20, 16, 0.04), 0 6px 18px rgba(31, 20, 16, 0.06);
  --radius-sm:    6px;
  --radius:       12px;
  --radius-lg:    18px;
}

/* --------- Reset + base ----------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--brand-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

a:focus-visible,
button:focus-visible,
.btn:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--fg);
  letter-spacing: -0.01em;
  margin: 0 0 0.5em 0;
  font-weight: 600;
  line-height: 1.15;
}

h1 { font-size: clamp(2.25rem, 5.2vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.25rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); font-weight: 600; }

p { margin: 0 0 1em 0; }

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

.eyebrow {
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--brand-deep);
  margin: 0 0 0.85rem 0;
}
.eyebrow--light { color: var(--brand-tint); }

.lede {
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  color: var(--fg-soft);
  max-width: 42rem;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* --------- Skip link -------------------------------------------------- */
.skip-link {
  position: absolute;
  left: -9999px; top: 0;
  background: var(--fg);
  color: var(--bg);
  padding: 0.75rem 1rem;
  z-index: 100;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus-visible {
  left: 0;
  outline: 3px solid var(--brand-tint);
}

/* --------- Site header ------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 247, 240, 0.94);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line-soft);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}

.brand {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.05;
  text-decoration: none;
  color: var(--fg);
  font-family: var(--font-display);
}
.brand__name { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; }
.brand__mark { font-size: 0.85rem; color: var(--brand-deep); font-style: italic; }

.site-nav {
  margin-left: auto;
}
.site-nav ul {
  display: flex; gap: 1.25rem;
  list-style: none; margin: 0; padding: 0;
}
.site-nav a {
  color: var(--fg-soft);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 0.25rem;
  border-bottom: 2px solid transparent;
  transition: color 180ms ease, border-color 180ms ease;
}
.site-nav a:hover { color: var(--fg); border-bottom-color: var(--brand-tint); }
.site-nav a[aria-current="page"] { color: var(--brand-deep); border-bottom-color: var(--brand); }

.cta.cta--phone {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  min-height: 44px;
  transition: background 180ms ease, transform 180ms ease;
}
.cta.cta--phone:hover { background: var(--brand-deep); color: #fff; }
.cta__icon { display: inline-flex; }

@media (max-width: 880px) {
  .site-nav { display: none; }
  .cta.cta--phone .cta__label { display: none; }
  .cta.cta--phone { padding: 0.6rem 0.8rem; }
}

/* --------- Buttons ---------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.4rem;
  min-height: 44px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 2px solid transparent;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease;
  cursor: pointer;
}
.btn + .btn { margin-left: 0.5rem; }

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

.btn--ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--fg);
}
.btn--ghost:hover { background: var(--fg); color: var(--bg); }

.btn--large { padding: 1rem 1.7rem; font-size: 1rem; }

.link-arrow {
  font-weight: 600;
  color: var(--brand-deep);
  text-decoration: none;
  border-bottom: 1px solid var(--brand-tint);
  padding-bottom: 1px;
}
.link-arrow:hover { color: var(--brand); border-bottom-color: var(--brand); }

/* --------- Hero ------------------------------------------------------- */
.hero {
  position: relative;
  isolation: isolate;
  min-height: 78vh;
  display: flex;
  align-items: flex-end;
  color: #fff;
  overflow: hidden;
}
.hero__image {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-darker);
  z-index: -2;
}
.hero__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(
    180deg,
    rgba(31, 20, 16, 0.20) 0%,
    rgba(31, 20, 16, 0.55) 55%,
    rgba(31, 20, 16, 0.85) 100%
  );
  z-index: -1;
}
.hero__inner {
  padding-top: 6rem;
  padding-bottom: 3.5rem;
  max-width: 60rem;
}
.hero__title {
  color: #fff;
  font-size: clamp(2.5rem, 6.5vw, 4.5rem);
  letter-spacing: -0.015em;
  margin-bottom: 1rem;
  text-shadow: 0 2px 16px rgba(0,0,0,0.25);
}
.hero__title em {
  font-style: italic;
  color: var(--brand-tint);
  font-weight: 500;
}
.hero__lede {
  color: var(--fg-on-dark);
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  max-width: 36rem;
  margin-bottom: 1.8rem;
  text-shadow: 0 1px 8px rgba(0,0,0,0.30);
}
.hero__actions { margin-bottom: 2rem; }
.hero__actions .btn--ghost { color: #fff; border-color: rgba(255,255,255,0.7); }
.hero__actions .btn--ghost:hover { background: #fff; color: var(--fg); }

.hero__stats {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem;
  border-top: 1px solid rgba(255,255,255,0.18);
  padding-top: 1.5rem;
}
.hero__stats li {
  font-size: 0.95rem;
  color: var(--fg-on-dark);
}
.hero__stats strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: #fff;
  font-weight: 600;
}

/* --------- Sections --------------------------------------------------- */
.section {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
}
.section--alt { background: var(--bg-alt); }
.section--reviews { background: var(--bg-tint); }
.section--intro { padding-top: calc(var(--section-y) - 1rem); }

.section__grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.section__figure img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  object-fit: cover;
  aspect-ratio: 4/3;
}

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

/* --------- Page head -------------------------------------------------- */
.page-head {
  padding: clamp(4rem, 8vw, 5.5rem) 0 clamp(2rem, 4vw, 3rem);
  background: var(--bg-alt);
  border-bottom: 1px solid var(--line);
}
.page-head h1 { margin-bottom: 0.5rem; }

/* --------- Card grid -------------------------------------------------- */
.card-grid {
  list-style: none; padding: 0; margin: 2rem 0 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 1.5rem;
}
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(31,20,16,0.05), 0 14px 28px rgba(31,20,16,0.10); }
.card__link {
  display: block; text-decoration: none; color: inherit;
}
.card__media img {
  width: 100%; aspect-ratio: 4/3; object-fit: cover;
}
.card__body { padding: 1.25rem 1.25rem 1.5rem; }
.card__title { margin: 0 0 0.4rem 0; font-size: 1.2rem; color: var(--fg); }
.card__summary { margin: 0; color: var(--fg-muted); font-size: 0.95rem; }

/* --------- Directory (services list) ---------------------------------- */
.directory {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column;
  gap: 2.5rem;
}
.directory__item {
  display: grid;
  grid-template-columns: 4rem 1fr 12rem;
  gap: 1.5rem;
  align-items: start;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--line-soft);
}
.directory__item:last-child { border-bottom: 0; padding-bottom: 0; }
.directory__index {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 2rem;
  color: var(--accent);
  line-height: 1;
}
.directory__title { margin-top: 0; }
.directory__figure img {
  width: 100%; aspect-ratio: 4/3; object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

@media (max-width: 760px) {
  .directory__item { grid-template-columns: 3rem 1fr; }
  .directory__figure { grid-column: 1 / -1; }
}

/* --------- Amenities -------------------------------------------------- */
.amenity-grid {
  list-style: none; padding: 0; margin: 1.5rem 0 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 0.85rem 1.5rem;
}
.amenity {
  display: flex; align-items: center; gap: 0.65rem;
  padding: 0.6rem 0;
  font-weight: 500;
  color: var(--fg-soft);
  border-top: 1px solid var(--line-soft);
}
.amenity__bullet { color: var(--accent); font-size: 0.75rem; }

/* --------- Reviews ---------------------------------------------------- */
.pullquote {
  margin: 1.5rem 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.2rem, 2.2vw, 1.7rem);
  color: var(--fg-soft);
  border-left: 3px solid var(--brand);
  padding-left: 1.25rem;
  max-width: 50rem;
}
.pullquote cite {
  display: block;
  font-style: normal;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--fg-muted);
  margin-top: 0.5rem;
}

.review {
  background: var(--card);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  height: 100%;
}
.review__rating { color: var(--brand); font-size: 1.1rem; margin: 0 0 0.75rem 0; letter-spacing: 0.1em; }
.review__quote { margin: 0; }
.review__quote p { margin: 0; color: var(--fg-soft); font-size: 0.97rem; }
.review__attr {
  margin-top: 1rem; padding-top: 0.85rem;
  border-top: 1px solid var(--line-soft);
  font-size: 0.85rem; color: var(--fg-muted);
}
.review__attr cite { font-style: normal; font-weight: 600; color: var(--fg); }

.review--feature {
  padding: 2rem clamp(1.5rem, 4vw, 2.5rem);
  margin-bottom: 2rem;
  background: var(--card);
  border-left: 4px solid var(--brand);
}
.review--feature .review__quote p {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  line-height: 1.45;
  color: var(--fg);
}

.reviews-grid {
  list-style: none; padding: 0; margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 1.5rem;
}

/* --------- Gallery ---------------------------------------------------- */
.gallery-grid {
  list-style: none; padding: 0; margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 1rem;
}
.gallery-grid__item figure { margin: 0; }
.gallery-grid img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  transition: transform 250ms ease;
}
.gallery-grid img:hover { transform: scale(1.02); }

/* --------- Contact ---------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
.contact-card {
  background: var(--card);
  padding: clamp(1.5rem, 3vw, 2rem);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.contact-card h2 { margin-top: 0; }
.contact-card__phone {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.5vw, 1.9rem);
  margin: 0.25rem 0 1rem 0;
}
.contact-card__phone a { color: var(--brand-deep); text-decoration: none; }
.contact-card__phone a:hover { color: var(--brand); }

.hours-list {
  margin: 0; padding: 0;
}
.hours-list__row {
  display: flex; justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--line-soft);
}
.hours-list__row:last-child { border-bottom: 0; }
.hours-list dt { font-weight: 600; color: var(--fg); margin: 0; }
.hours-list dd { margin: 0; color: var(--fg-muted); font-variant-numeric: tabular-nums; }

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

address { font-style: normal; }

/* --------- CTA band --------------------------------------------------- */
.section--cta { background: var(--bg-darker); color: var(--fg-on-dark); padding: clamp(3rem, 6vw, 4.5rem) 0; }
.section--cta h2 { color: #fff; }
.cta-band {
  display: flex; gap: 1.5rem; align-items: center; justify-content: space-between;
  flex-wrap: wrap;
}
.cta-band__title { margin: 0.25rem 0 0.4rem 0; }
.cta-band__sub { margin: 0; color: var(--brand-tint); }

/* --------- Footer ----------------------------------------------------- */
.site-footer {
  background: var(--bg-dark);
  color: var(--fg-on-dark);
  padding: clamp(3rem, 6vw, 4.5rem) 0 1.5rem;
}
.site-footer a { color: var(--brand-tint); }
.site-footer a:hover { color: #fff; }

.site-footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
  gap: 2rem;
}
.site-footer__col h2,
.site-footer__heading {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 600;
  color: var(--brand-tint);
  margin: 0 0 0.75rem 0;
}
.site-footer__name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: #fff;
  margin: 0 0 0.4rem 0;
}
.site-footer__tag { color: var(--fg-on-dark); margin: 0 0 0.5rem 0; font-size: 0.95rem; }
.site-footer__rating { color: var(--brand-tint); font-size: 0.9rem; margin: 0.25rem 0 0 0; }

.site-footer__bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(245, 236, 224, 0.12);
  font-size: 0.85rem;
  color: var(--brand-tint);
}

/* --------- Placeholders for build review ------------------------------ */
.kom-note,
.kom-warn {
  display: block;
  margin: 1rem 0;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  line-height: 1.45;
}
.kom-note {
  background: var(--accent-soft);
  color: var(--accent-deep);
  border-left: 3px solid var(--accent);
}
.kom-warn {
  background: #fbe9d8;
  color: var(--brand-deep);
  border-left: 3px solid var(--brand);
}

/* --------- Reduced motion --------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .gallery-grid img:hover,
  .card:hover { transform: none; }
}

/* Live Google reviews widget support (added for Places ToS compliance,
   2026-08-07) — minimal, additive rules only. */
.reviews-loading { list-style: none; color: var(--muted, #666); }
.reviews-attribution { font-size: 0.85rem; color: var(--muted, #666); margin-top: 0.5rem; }
.reviews-attribution a { color: inherit; }
.hours-loading { list-style: none; color: var(--muted, #666); }
.hours-attribution { font-size: 0.85rem; color: var(--muted, #666); margin-top: 0.5rem; }
.hours-attribution a { color: inherit; }
[data-reviews-live] { list-style: none; padding: 0; }
[data-reviews-live] .stars { letter-spacing: 0.05em; margin-bottom: 0.4rem; }
