/* ============================================================
   HORSE & HOUND 2.0 — MAIN STYLESHEET
   Base + layout + chrome. Component classes live in
   components.css. Ported from the Fox at Walton architecture;
   consumes Horse tokens only — no hardcoded colours/spacing.
   ============================================================ */

/* ---------- Reset (modern, minimal) ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
/* Root background is ink: Android Chrome colours the OS navigation bar
   from the root background, so the bottom bar blends with dark heroes
   and the footer. The body's paper covers the page. */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--c-ink); }
body {
  font-family: var(--font-body);
  font-size: var(--text-md);
  line-height: var(--lh-base);
  color: var(--c-ink);
  background: var(--c-paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, picture, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }
input, textarea, select { font: inherit; color: inherit; }
:focus-visible {
  outline: 2px solid var(--c-focus);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

/* ---------- Typography base ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600; /* Plex Serif ships 600/700; 400 not loaded */
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--c-ink);
}
h1 { font-size: var(--text-hero); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
p  { color: var(--c-text); }

/* Utility atoms */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  font-family: var(--font-label);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--c-ink-soft); /* slate: large/label text only — AA-large */
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
}
.eyebrow--light { color: var(--c-paper); }

.lede {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  line-height: var(--lh-snug);
  color: var(--c-text);
  letter-spacing: var(--tracking-tight);
}

/* ---------- Legal pages (privacy, terms) ---------- */
.legal { font-family: var(--font-body); color: var(--c-ink); font-size: var(--text-base); line-height: 1.7; max-width: 68ch; margin: 0 auto; }
.legal p { margin: 0 0 1.1em; }
.legal h2 { font-family: var(--font-display); font-size: var(--text-2xl); margin: var(--s-8) 0 var(--s-3); color: var(--c-ink); }
.legal h2:first-child { margin-top: 0; }
.legal h3 { font-family: var(--font-display); font-size: var(--text-lg); margin: var(--s-6) 0 var(--s-2); color: var(--c-ink); }
.legal ul, .legal ol { margin: 0 0 1.1em; padding-left: 1.4em; }
.legal li { margin-bottom: 0.4em; }
.legal a { color: var(--c-navy); border-bottom: 1px solid currentColor; }
.legal a:hover { color: var(--c-ink); }
.legal hr { border: 0; border-top: 1px solid var(--c-hairline); margin: var(--s-8) 0; }
.legal .legal__meta { font-size: var(--text-sm); color: var(--c-ink-mute); font-style: italic; margin-bottom: var(--s-6); }

/* ---------- Layout primitives ---------- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.container--narrow { max-width: var(--container-narrow); }
.container--wide   { max-width: var(--container-wide); }

.section { padding: var(--s-section) 0; position: relative; }
.section--tight { padding: var(--s-section-tight) 0; }
.section--loose { padding: var(--s-section-loose) 0; }
.section--paper { background: var(--c-paper); }
.section--warm  { background: var(--c-paper-warm); }
.section--white { background: var(--c-pure); }
.section--ink   { background: var(--c-ink); color: var(--c-paper); }
.section--ink p { color: var(--c-paper-deep); opacity: 0.9; }
.section--ink h1, .section--ink h2, .section--ink h3 { color: var(--c-paper); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  padding: 1rem 2.25rem;
  border-radius: var(--r-pill);
  font-size: var(--text-base);
  font-weight: 500;
  text-decoration: none;
  transition:
    background var(--dur) var(--ease-out-quart),
    color var(--dur) var(--ease-out-quart),
    transform var(--dur) var(--ease-out-expo),
    box-shadow var(--dur) var(--ease-out-expo);
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 14px; height: 14px; }
.btn--primary { background: var(--c-navy); color: #fff; }
.btn--primary:hover { background: var(--c-navy-deep); box-shadow: 0 18px 32px -12px rgba(22, 54, 93, 0.45); }
.btn--ink { background: var(--c-ink); color: var(--c-paper); }
.btn--ink:hover { background: var(--c-navy-deep); }
.btn--ghost { background: transparent; color: var(--c-ink); border: 1px solid var(--c-hairline); }
.btn--ghost:hover { background: var(--c-paper-warm); border-color: var(--c-ink); }
.btn--ghost-light { background: transparent; color: var(--c-paper); border: 1px solid rgba(255,255,255,0.35); }
.btn--ghost-light:hover { background: rgba(255,255,255,0.08); border-color: var(--c-paper); }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: var(--z-nav);
  padding: var(--s-4) 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0) 100%);
  transition: background var(--dur) var(--ease-out-quart), padding var(--dur) var(--ease-out-quart), box-shadow var(--dur) var(--ease-out-quart);
}
.nav.is-pinned {
  background: var(--c-paper);
  padding: var(--s-3) 0;
  box-shadow: 0 1px 0 0 var(--c-hairline);
}
.nav__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--s-6);
}
.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
}
.nav__logo {
  display: block;
  height: 56px;
  width: auto;
  object-fit: contain; /* never distort the logo when the grid squeezes */
  /* logo artwork is dark — invert to white over the hero, restore on pinned */
  filter: brightness(0) invert(1);
  transition: filter var(--dur) var(--ease-out-quart), height var(--dur) var(--ease-out-quart);
}
@media (min-width: 1100px) {
  .nav__brand { min-width: max-content; }
}
.nav.is-pinned .nav__logo {
  filter: none;
  height: 48px;
}
@media (max-width: 720px) {
  .nav__logo { height: 44px; }
  .nav.is-pinned .nav__logo { height: 40px; }
}
.nav__links {
  display: none;
  list-style: none;
  padding: 0;
  justify-content: center;
  gap: var(--s-8);
  flex-wrap: nowrap;
}
.nav__links li { white-space: nowrap; }
@media (min-width: 1100px) {
  .nav__links { display: flex; }
}
@media (min-width: 1100px) and (max-width: 1259px) {
  .nav__links { gap: var(--s-4); }
}
/* Logo links home — drop the Home item from the top bar (mobile keeps it) */
.nav__links .menu-item-home { display: none; }
.nav__links a {
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #fff;
  position: relative;
  padding: var(--s-2) 0;
  transition: color var(--dur) var(--ease-out-quart);
}
.nav.is-pinned .nav__links a { color: var(--c-ink); }
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transition: right var(--dur) var(--ease-out-expo);
}
.nav__links a:hover::after { right: 0; }
.nav__cta { display: none; }
@media (min-width: 720px) { .nav__cta { display: inline-flex; } }
.nav__menu-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: #fff;
}
.nav.is-pinned .nav__menu-btn { color: var(--c-ink); }
@media (min-width: 1100px) { .nav__menu-btn { display: none; } }
.nav__menu-btn svg { width: 18px; height: 18px; }

/* ---------- Hero (editorial) ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
  background: var(--c-ink);
  color: var(--c-paper);
}
.hero__photo {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.hero__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: hero-zoom var(--dur-photo) var(--ease-out-quart) forwards;
  transform-origin: center;
}
@keyframes hero-zoom {
  from { transform: scale(1.08); }
  to   { transform: scale(1); }
}
.hero__photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.15) 35%, rgba(0,0,0,0.65) 100%);
}
/* Light artwork can't carry white text with the photo scrim — deepen it,
   weighted to the text zone. Opt in per hero with .hero--light-art. */
.hero--light-art .hero__photo::after {
  background:
    linear-gradient(180deg, rgba(15,23,42,0.50) 0%, rgba(15,23,42,0.52) 45%, rgba(15,23,42,0.88) 100%);
}
.hero--light-art .hero__copy h1,
.hero--light-art .hero__copy .hero__sub,
.hero--light-art .hero__copy .eyebrow {
  text-shadow: 0 1px 3px rgba(0,0,0,0.45), 0 4px 28px rgba(0,0,0,0.55);
}

.hero__inner {
  position: relative;
  z-index: 1;
  min-height: inherit;
  display: grid;
  align-items: end;
  /* Split shorthand so .container's horizontal --gutter survives */
  padding-top: calc(var(--s-section) + var(--s-12));
  padding-bottom: var(--s-8);
}

.hero__copy { max-width: 920px; }
.hero h1 {
  color: var(--c-paper);
  font-size: clamp(2.75rem, 1.25rem + 5vw, 5.25rem); /* Plex Serif runs wide */
  letter-spacing: -0.02em;
  line-height: 1;
  margin: var(--s-5) 0 var(--s-5);
  max-width: 18ch;
}
.hero h1 .hero__h1-sub {
  display: block;
  margin-top: var(--s-3);
  font-size: clamp(1.125rem, 0.5rem + 1.4vw, 1.75rem);
  font-family: var(--font-display);
  letter-spacing: 0;
  opacity: 0.85;
  line-height: 1.2;
  max-width: 22ch;
}
.hero__sub {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--c-paper-deep);
  max-width: 50ch;
  margin-bottom: var(--s-10);
  opacity: 0.95;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
}

.hero__meta {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: var(--s-6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 2;
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--c-paper);
  opacity: 0.7;
  pointer-events: none;
}
.hero__meta span { display: inline-flex; gap: var(--s-2); }
@media (max-width: 720px) { .hero__meta { display: none; } }

/* Subpage hero — only the type scale narrows */
.hero--subpage .hero__inner {
  padding-top: calc(var(--s-section) + var(--s-12));
  padding-bottom: var(--s-8);
}
.hero--subpage h1 { font-size: var(--text-5xl); max-width: 18ch; }
.hero--subpage .hero__sub { font-size: var(--text-lg); }

/* Banded hero on phones: photo band on top, copy on solid ink beneath.
   Phones only (<600px). Placed after ALL hero rules — the padding override
   must beat .hero--subpage .hero__inner in the cascade. */
@media (max-width: 599px) {
  .hero { min-height: 0; display: flex; flex-direction: column; }
  .hero__photo { position: relative; inset: auto; z-index: auto; height: 44svh; }
  .hero__photo::after,
  .hero--light-art .hero__photo::after {
    background: linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,0) 75%, rgba(15,23,42,0.55) 100%);
  }
  .hero__inner,
  .hero--subpage .hero__inner {
    min-height: 0;
    padding-top: var(--s-6);
    padding-bottom: var(--s-8);
  }
  .hero--light-art .hero__copy h1,
  .hero--light-art .hero__copy .hero__sub,
  .hero--light-art .hero__copy .eyebrow {
    text-shadow: none;
  }
}

/* ---------- Intro band (editorial) ---------- */
.intro { text-align: center; }
.intro h2 {
  max-width: 22ch;
  margin: var(--s-3) auto var(--s-5);
  font-size: var(--text-4xl);
  line-height: 1.05;
}
.intro p {
  max-width: 55ch;
  margin: 0 auto;
  font-size: var(--text-lg);
}
.intro__facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-6);
  max-width: 800px;
  margin: var(--s-12) auto 0;
  padding-top: var(--s-8);
  border-top: 1px solid var(--c-hairline);
}
@media (min-width: 720px) { .intro__facts { grid-template-columns: repeat(4, 1fr); } }
.intro__fact h4 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  margin-bottom: var(--s-1);
}
.intro__fact p {
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--c-ink-mute);
}

/* ---------- Editorial duo (split copy + photo) ---------- */
.duo {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: center;
}
@media (min-width: 900px) {
  .duo { grid-template-columns: 1fr 1.1fr; }
  .duo--reverse > :first-child { order: 2; }
}
.duo__copy h2 { margin: var(--s-5) 0 var(--s-5); font-size: var(--text-3xl); }
.duo__copy p  { margin-bottom: var(--s-4); }
.duo__copy p:last-of-type { margin-bottom: var(--s-8); }
.duo__photo {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--r);
  box-shadow: var(--shadow-photo);
}
.duo__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-photo) var(--ease-out-quart);
}
.duo__photo:hover img { transform: scale(1.04); }

/* Editorial number marker */
.marker {
  display: inline-block;
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-sm);
  color: var(--c-navy);
  letter-spacing: 0.05em;
}

/* ---------- Press quote ---------- */
.press {
  text-align: center;
  border-top: 1px solid var(--c-hairline);
  border-bottom: 1px solid var(--c-hairline);
}
.press blockquote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-3xl);
  line-height: 1.2;
  max-width: 24ch;
  margin: 0 auto var(--s-6);
  letter-spacing: -0.01em;
  color: var(--c-ink);
}
.press blockquote::before { content: "\201C"; color: var(--c-navy); margin-right: 0.2em; }
.press blockquote::after  { content: "\201D"; color: var(--c-navy); margin-left: 0.1em; }
.press cite {
  font-style: normal;
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--c-ink-mute);
}
.press cite a { color: var(--c-navy); text-decoration: none; border-bottom: 1px solid currentColor; }

/* ---------- Worth the drive ---------- */
.drive { text-align: center; }
.drive__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-8);
  max-width: 720px;
  margin: var(--s-12) auto 0;
}
@media (min-width: 720px) { .drive__grid { grid-template-columns: repeat(4, 1fr); } }
.drive__item h4 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: var(--c-ink);
  margin-bottom: var(--s-1);
}
.drive__item p {
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--c-ink-mute);
}
.drive__item span {
  display: block;
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-sm);
  color: var(--c-navy);
  margin-top: var(--s-1);
}

/* ---------- Final CTA / Visit ---------- */
.visit {
  text-align: center;
  padding-top: calc(var(--s-section) + var(--s-8));
  padding-bottom: calc(var(--s-section) + var(--s-8));
}
.visit h2 { color: var(--c-paper); max-width: 18ch; margin: var(--s-6) auto var(--s-6); }
.visit__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-6);
  max-width: 720px;
  margin: var(--s-12) auto var(--s-12);
  text-align: left;
}
@media (min-width: 720px) { .visit__grid { grid-template-columns: repeat(2, 1fr); } }
.visit__col h4 {
  color: var(--c-paper);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  margin-bottom: var(--s-2);
  opacity: 0.7;
}
.visit__col p {
  color: var(--c-paper-deep);
  opacity: 0.95;
  margin: 0;
}
.visit__col a {
  color: var(--c-paper);
  border-bottom: 1px solid rgba(233,237,242,0.3);
  transition: border-color var(--dur) ease;
}
.visit__col a:hover { border-color: var(--c-paper); }

/* ---------- Footer ---------- */
.footer {
  background: var(--c-paper-warm);
  padding: var(--s-section) 0 var(--s-12);
}
.footer__top {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-12);
  padding-bottom: var(--s-12);
  border-bottom: 1px solid var(--c-hairline);
}
@media (min-width: 720px) {
  .footer__top { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
}
.footer__brand h3 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  margin-bottom: var(--s-2);
}
.footer__brand p {
  font-size: var(--text-sm);
  color: var(--c-text);
  max-width: 30ch;
}
.footer__col h5 {
  font-family: var(--font-label);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--c-ink-mute);
  margin-bottom: var(--s-4);
}
.footer__col ul { list-style: none; padding: 0; display: grid; gap: var(--s-2); }
.footer__col a {
  font-size: var(--text-sm);
  color: var(--c-text);
  transition: color var(--dur) ease;
}
.footer__col a:hover { color: var(--c-ink); }
.footer__hours-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-6);
  padding: var(--s-8) 0;
  border-bottom: 1px solid var(--c-hairline);
}
@media (min-width: 720px) { .footer__hours-row { grid-template-columns: 1fr 1fr; } }
.footer__hours { font-size: var(--text-sm); color: var(--c-text); display: grid; gap: var(--s-1); }
.footer__hours strong {
  color: var(--c-ink);
  font-family: var(--font-label);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  margin-bottom: var(--s-1);
}
.footer__bottom {
  margin-top: var(--s-8);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4);
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-xs);
  color: var(--c-ink-mute);
  letter-spacing: 0.02em;
}
.footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4);
  align-items: center;
}
.footer__legal a {
  color: var(--c-ink-mute);
  text-decoration: none;
  transition: color var(--dur) ease;
}
.footer__legal a:hover { color: var(--c-ink); }
.footer__cookie-link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-underline-offset: 3px;
  opacity: 0.7;
  transition: opacity var(--dur) ease;
}
.footer__cookie-link:hover { opacity: 1; }
