/* =========================================================
   Canyon Equine at Tom Faul Ranch — spec preview
   Woodcrest Marketing
   ========================================================= */

:root {
  /* brand-derived western palette */
  --ink: #2c2118;          /* deep saddle brown / near-black */
  --ink-soft: #4a3a2c;
  --cream: #f4ede0;        /* warm paper */
  --cream-deep: #e8dcc7;
  --paper: #fbf7ef;
  --accent: #b1601f;       /* copper / leather tan */
  --accent-deep: #8a4715;
  --sage: #6c7355;         /* muted pasture green */
  --line: rgba(44, 33, 24, 0.14);
  --on-dark: #f3e9da;
  --on-dark-soft: rgba(243, 233, 218, 0.78);

  --maxw: 1240px;
  --gutter: clamp(1.15rem, 4vw, 3.5rem);

  /* fluid type scale */
  --step--1: clamp(0.82rem, 0.79rem + 0.15vw, 0.92rem);
  --step-0:  clamp(1rem, 0.96rem + 0.2vw, 1.13rem);
  --step-1:  clamp(1.2rem, 1.12rem + 0.4vw, 1.45rem);
  --step-2:  clamp(1.5rem, 1.32rem + 0.9vw, 2.1rem);
  --step-3:  clamp(2rem, 1.6rem + 2vw, 3.2rem);
  --step-4:  clamp(2.6rem, 1.9rem + 3.4vw, 4.8rem);
  --step-5:  clamp(3rem, 2rem + 5vw, 6rem);

  --display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --radius: 8px;
  --shadow: 0 26px 60px -28px rgba(44, 33, 24, 0.55);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

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

body {
  margin: 0;
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1rem; max-width: 62ch; }

a { color: inherit; }

.eyebrow {
  font-family: var(--body);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--accent-deep);
  margin: 0 0 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.eyebrow::before {
  content: "";
  flex: none;
  width: clamp(1.6rem, 3vw, 2.6rem);
  height: 2px;
  background: currentColor;
  opacity: 0.55;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--on-dark);
  padding: 0.7rem 1.1rem;
  z-index: 200;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--body);
  font-weight: 600;
  font-size: var(--step-0);
  letter-spacing: 0.01em;
  padding: 0.92em 1.6em;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 12px 26px -12px rgba(177, 96, 31, 0.85);
}
.btn-primary:hover { background: var(--accent-deep); transform: translateY(-2px); }
.btn-ghost {
  background: transparent;
  border-color: currentColor;
  color: var(--ink);
}
.hero .btn-ghost { color: var(--on-dark); }
.btn-ghost:hover { background: rgba(255,255,255,0.08); transform: translateY(-2px); }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.text-link {
  display: inline-block;
  font-weight: 600;
  color: var(--accent-deep);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.text-link:hover { border-color: var(--accent); transform: translateX(3px); }

/* ---------- header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease), backdrop-filter 0.35s var(--ease);
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(20,13,7,0.74) 0%, rgba(20,13,7,0.34) 50%, rgba(20,13,7,0) 100%);
  transition: opacity 0.35s var(--ease);
}
.site-header.scrolled::before { opacity: 0; }
.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.1rem var(--gutter);
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; color: var(--on-dark); text-shadow: 0 1px 14px rgba(12,8,4,0.55); }
.brand-text { display: flex; flex-direction: column; line-height: 1.02; }
.brand-name { font-family: var(--display); font-size: 1.42rem; font-weight: 600; letter-spacing: 0.01em; }
.brand-sub { font-size: 0.66rem; letter-spacing: 0.26em; text-transform: uppercase; opacity: 0.82; margin-top: 0.18rem; }

.site-nav { display: none; gap: 1.8rem; margin-left: auto; }
.site-nav a {
  text-decoration: none;
  color: var(--on-dark);
  font-weight: 500;
  font-size: 0.96rem;
  position: relative;
  padding: 0.2rem 0;
  text-shadow: 0 1px 12px rgba(12,8,4,0.5);
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.site-nav a:hover::after { transform: scaleX(1); }
.site-nav .nav-cta {
  border: 1.5px solid currentColor;
  padding: 0.4rem 1rem;
  border-radius: 999px;
}
.site-nav .nav-cta::after { display: none; }
.header-phone { display: none; }

/* scrolled state (set by JS) */
.site-header.scrolled {
  background: rgba(44, 33, 24, 0.96);
  box-shadow: 0 4px 24px -10px rgba(0,0,0,0.45);
  backdrop-filter: saturate(140%) blur(6px);
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: clamp(580px, 90svh, 840px);
  display: flex;
  align-items: flex-end;
  padding: 0 var(--gutter) clamp(3rem, 7vh, 5.5rem);
  color: var(--on-dark);
  isolation: isolate;
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%;
  transform-origin: 52% 58%;
  animation: heroZoom 22s var(--ease) forwards;
}
@keyframes heroZoom { from { transform: scale(1.1); } to { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .hero-media img { animation: none; } }
.hero-scrim {
  position: absolute; inset: 0; z-index: -1;
  background:
    /* warm sunset glaze so the pale sky reads graded, not washed out */
    linear-gradient(180deg,
      rgba(58,36,18,0.5) 0%,
      rgba(58,36,18,0.16) 16%,
      rgba(28,20,14,0.02) 34%,
      rgba(24,17,11,0.30) 52%,
      rgba(20,14,9,0.72) 74%,
      rgba(16,11,6,0.94) 90%,
      rgba(14,9,5,0.985) 100%),
    /* left wash for extra type contrast */
    linear-gradient(78deg, rgba(16,11,6,0.66) 0%, rgba(16,11,6,0.14) 44%, rgba(16,11,6,0) 68%),
    /* cinematic vignette */
    radial-gradient(135% 100% at 48% 30%, rgba(0,0,0,0) 48%, rgba(0,0,0,0.34) 100%);
}
/* fine film grain — pure CSS, keeps the warm sky from looking flat/digital */
.hero-scrim::after {
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.05;
  mix-blend-mode: overlay;
  pointer-events: none;
}
.hero-content { max-width: 820px; margin-bottom: 0.4rem; }
.hero .eyebrow { color: #f0cda3; }
.hero h1 {
  color: var(--on-dark);
  font-size: clamp(2.6rem, 1.4rem + 4.4vw, 4.7rem);
  line-height: 1.015;
  letter-spacing: -0.018em;
  max-width: 18ch;
  margin-bottom: 1.4rem;
  text-shadow: 0 2px 38px rgba(16,10,6,0.6);
}
.hero-lede {
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--on-dark);
  max-width: 56ch;
  margin-bottom: 1.8rem;
  text-shadow: 0 1px 16px rgba(0,0,0,0.4);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-bottom: 1.1rem; }
.hero-note { font-size: var(--step--1); color: var(--on-dark-soft); margin: 0; }

/* delicate scroll cue, decorative only */
.hero::after {
  content: "";
  position: absolute;
  right: var(--gutter);
  bottom: clamp(1.4rem, 4vh, 2.6rem);
  width: 1px;
  height: clamp(2.4rem, 6vh, 4rem);
  background: linear-gradient(180deg, rgba(243,233,218,0) 0%, rgba(243,233,218,0.65) 100%);
  z-index: 1;
  animation: scrollCue 2.6s var(--ease) infinite;
}
@media (max-width: 859px) { .hero::after { display: none; } }
@keyframes scrollCue {
  0%, 100% { opacity: 0.25; transform: scaleY(0.6); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); transform-origin: top; }
}
@media (prefers-reduced-motion: reduce) { .hero::after { animation: none; opacity: 0.6; } }

.hero-meta {
  list-style: none;
  margin: 1.7rem 0 0;
  padding: 1.1rem 0 0;
  border-top: 1px solid rgba(243,233,218,0.24);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  font-family: var(--body);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--on-dark-soft);
}
.hero-meta li { position: relative; }
.hero-meta li + li::before {
  content: "";
  position: absolute;
  left: -0.85rem;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateY(-50%);
}

/* ---------- discipline strip ---------- */
.strip {
  background: var(--ink);
  color: var(--on-dark);
  overflow: hidden;
  padding: 0.95rem 0;
  border-block: 1px solid rgba(255,255,255,0.08);
}
.strip-track {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  white-space: nowrap;
  width: max-content;
  animation: marquee 38s linear infinite;
  font-family: var(--display);
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}
.strip-track i { color: var(--accent); font-size: 0.7rem; font-style: normal; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .strip-track { animation: none; flex-wrap: wrap; white-space: normal; width: auto; justify-content: center; padding: 0 var(--gutter); }
}

/* ---------- section rhythm ---------- */
.about, .services, .facility, .gallery, .contact {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(4rem, 11vh, 8rem) var(--gutter);
}
.section-head { max-width: 720px; margin-bottom: clamp(2.2rem, 5vh, 3.5rem); }
.section-head h2 { font-size: var(--step-3); }

/* ---------- about ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2.4rem, 6vw, 5rem);
  align-items: center;
}
.about-photos { position: relative; display: grid; }
.about-photo { margin: 0; overflow: hidden; border-radius: var(--radius); box-shadow: var(--shadow); }
.about-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.about-photo:hover img { transform: scale(1.05); }
.about-photo-a { aspect-ratio: 4 / 5; }
.about-photo-b { display: none; }
.about-badge {
  position: absolute;
  right: -0.4rem; bottom: -0.4rem;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  padding: 0.9rem 1.2rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}
.about-badge-num { font-family: var(--display); font-size: 1.8rem; line-height: 1; }
.about-badge-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; max-width: 11ch; margin-top: 0.3rem; }
.about-copy h2 { font-size: var(--step-3); margin-bottom: 1.2rem; }
.disc-list {
  list-style: none;
  margin: 1.6rem 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 0.55rem 1.4rem;
}
.disc-list li {
  position: relative;
  padding-left: 1.4rem;
  font-weight: 500;
}
.disc-list li::before {
  content: "\2666";
  position: absolute; left: 0;
  color: var(--accent);
  font-size: 0.7rem;
  top: 0.45em;
}

/* ---------- services ---------- */
.services { background: var(--cream); max-width: none; }
.services > .section-head, .svc-grid { max-width: var(--maxw); margin-inline: auto; }
.svc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
.svc {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.svc:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.svc-media { overflow: hidden; aspect-ratio: 16 / 10; }
.svc-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease); }
.svc-media img.focus-right { object-position: 78% center; }
.svc:hover .svc-media img { transform: scale(1.06); }
.svc-body { padding: 1.5rem 1.6rem 1.8rem; }
.svc-body h3 { font-size: var(--step-2); margin-bottom: 0.6rem; }
.svc-body p { margin: 0; color: var(--ink-soft); }

/* ---------- facility ---------- */
.facility {
  position: relative;
  background: radial-gradient(130% 130% at 82% 0%, #3c2d20 0%, var(--ink) 58%);
  color: var(--on-dark);
  max-width: none;
  isolation: isolate;
}
.facility::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.04;
  mix-blend-mode: overlay;
  pointer-events: none;
}
.facility-grid {
  max-width: var(--maxw);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2.4rem, 6vw, 4.5rem);
  align-items: center;
}
.facility h2 { color: var(--on-dark); font-size: var(--step-3); margin-bottom: 1.2rem; }
.facility .eyebrow { color: #e9c39a; }
.facility p { color: var(--on-dark-soft); }
.amenities {
  list-style: none;
  margin: 1.6rem 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 0.55rem 1.2rem;
}
.amenities li {
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  font-weight: 500;
}
.rate-cards { display: flex; flex-wrap: wrap; gap: 1rem; margin: 1.8rem 0; }
.rate-card {
  flex: 1 1 200px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
}
.rate-card-feature { border-color: var(--accent); background: rgba(177,96,31,0.16); }
.rate-label { display: block; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--on-dark-soft); }
.rate-price { display: block; font-family: var(--display); font-size: 2.1rem; margin-top: 0.35rem; }
.rate-price small { font-size: 0.95rem; opacity: 0.7; }
.rate-note { display: block; font-size: 0.8rem; color: var(--on-dark-soft); margin-top: 0.2rem; }
.facility-photo img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }

/* ---------- gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 180px;
  gap: 1rem;
}
.g { margin: 0; overflow: hidden; border-radius: var(--radius); }
.g img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.g:hover img { transform: scale(1.07); }
.g1 { grid-column: span 2; grid-row: span 2; }
.g4 { grid-column: span 2; }

/* ---------- contact ---------- */
.contact { background: var(--cream-deep); max-width: none; }
.contact-inner {
  max-width: var(--maxw);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.contact h2 { font-size: var(--step-3); margin-bottom: 1.1rem; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1.6rem; }
.contact-details {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 1.8rem;
  box-shadow: var(--shadow);
}
.contact-logo {
  display: block;
  width: 100%;
  max-width: 300px;
  margin: 0 auto 1.7rem;
  border-radius: var(--radius);
}
.contact-details dl { margin: 0; display: grid; gap: 1.3rem; }
.contact-details dt { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--accent-deep); font-weight: 700; }
.contact-details dd { margin: 0.25rem 0 0; font-size: var(--step-1); font-family: var(--display); }
.contact-details a { text-decoration: none; border-bottom: 1px solid var(--line); }
.contact-details a:hover { border-color: var(--accent); }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: var(--on-dark); }
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 3rem var(--gutter);
  display: grid;
  gap: 1.6rem;
  align-items: center;
}
.footer-brand { display: flex; align-items: center; gap: 0.9rem; }
.footer-name { font-family: var(--display); font-size: 1.42rem; margin: 0; line-height: 1.05; }
.footer-sub { margin: 0.2rem 0 0; font-size: 0.66rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--on-dark-soft); }
.footer-tag { margin: 0.55rem 0 0; font-style: italic; color: var(--on-dark-soft); font-size: 0.92rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.footer-nav a { color: var(--on-dark-soft); text-decoration: none; font-size: 0.95rem; }
.footer-nav a:hover { color: var(--on-dark); }
.footer-loc { margin: 0; color: var(--on-dark-soft); font-size: 0.88rem; }

/* ---------- spec footer ---------- */
.spec-footer {
  background: #1c140e;
  color: rgba(243,233,218,0.72);
  text-align: center;
  font-size: 0.82rem;
  padding: 1.1rem var(--gutter);
  line-height: 1.6;
}
.spec-footer a { color: #e9c39a; }

/* ---------- reveal animation ----------
   Only hidden when JS is present (html.js). With no JS, content is fully visible. */
.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: calc(var(--d, 0) * 110ms);
  will-change: opacity, transform;
}
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* =========================================================
   Breakpoints
   ========================================================= */
@media (min-width: 620px) {
  .gallery-grid { grid-auto-rows: 220px; }
  .footer-inner { grid-template-columns: auto 1fr auto; }
  .footer-nav { justify-content: center; }
}

@media (min-width: 860px) {
  .site-nav { display: flex; }
  .header-phone {
    display: inline-flex;
    margin-left: 1.4rem;
    color: var(--on-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    border-left: 1px solid rgba(255,255,255,0.3);
    padding-left: 1.4rem;
    text-shadow: 0 1px 12px rgba(12,8,4,0.5);
  }
  .about-grid { grid-template-columns: 0.95fr 1.05fr; }
  .about-photos { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .about-photo-a { grid-column: 1 / 2; }
  .about-photo-b { display: block; aspect-ratio: 3 / 4; align-self: end; grid-column: 2 / 3; transform: translateY(2rem); }
  .about-badge { right: 1rem; bottom: 1rem; }

  .svc-grid { grid-template-columns: repeat(2, 1fr); }
  .svc-wide { grid-column: span 2; flex-direction: row; }
  .svc-wide .svc-media { flex: 1 1 50%; aspect-ratio: auto; }
  .svc-wide .svc-body { flex: 1 1 50%; display: flex; flex-direction: column; justify-content: center; }
  .svc-flip { flex-direction: row-reverse; }

  .facility-grid { grid-template-columns: 1.1fr 0.9fr; }
  .contact-inner { grid-template-columns: 1.3fr 0.85fr; }
}

@media (min-width: 1100px) {
  .svc-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-flow: dense;
  }
  .svc-wide { grid-column: span 3; }
}
