/* Ranch-and-store alpaca farm profiles
   Load after /alpaca-farm/style/farm-profile.css */

.ranch-store-profile {
  --rs-navy: #24475a;
  --rs-navy-dark: #173442;
  --rs-blue: #527b8d;
  --rs-forest: #3f5d4d;
  --rs-copper: #ad5a3d;
  --rs-gold: #d7aa5a;
  --rs-cream: #f4ead8;
  --rs-mist: #dfeaec;
  --rs-paper: #fffdf8;
  --rs-ink: #292e2d;
  --rs-muted: #66716e;
  --rs-rule: #d8d1c5;
  background: #faf7f0;
  color: var(--rs-ink);
}

.ranch-store-profile main {
  padding-top: clamp(1.2rem, 3vw, 2rem);
}

.ranch-store-profile .eyebrow,
.rs-kicker {
  color: var(--rs-copper);
}

.ranch-store-profile a:focus-visible {
  outline: 3px solid var(--rs-gold);
  outline-offset: 3px;
}

.ranch-store-profile .button-link {
  border-color: var(--rs-copper);
  background: var(--rs-copper);
  color: #fff;
}

.ranch-store-profile .button-link:hover {
  border-color: var(--rs-navy-dark);
  background: var(--rs-navy-dark);
  color: #fff;
}

/* Hero: business identity on the left, state illustration on the right */
.rs-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(24rem, 0.92fr);
  margin-bottom: clamp(4rem, 8vw, 6.5rem);
  overflow: hidden;
  background: var(--rs-paper);
  border: 1px solid var(--rs-rule);
  box-shadow: 0 1.6rem 4rem rgba(33, 53, 58, 0.12);
}

.rs-hero__copy {
  align-self: center;
  padding: clamp(2.4rem, 5.5vw, 5rem);
}

.rs-kicker {
  margin: 0 0 0.75rem;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.rs-hero h1 {
  max-width: 12ch;
  margin: 0 0 1rem;
  color: var(--rs-navy-dark);
  font-size: clamp(2.7rem, 4.7vw, 4.5rem);
  line-height: 0.94;
}

.rs-hero__summary {
  max-width: 37rem;
  margin: 0;
  color: var(--rs-muted);
  font-size: 1.04rem;
  line-height: 1.68;
}

.rs-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem 1rem;
  margin-top: 1.5rem;
}

.rs-text-link,
.rs-text-link:visited {
  color: var(--rs-navy-dark);
  font-size: 0.84rem;
  font-weight: 850;
  text-underline-offset: 0.22rem;
}

.rs-text-link:hover {
  color: var(--rs-copper);
}

.rs-hero__figure {
  position: relative;
  min-height: 33rem;
  margin: 0;
  background: var(--rs-navy-dark);
}

.rs-hero__figure::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 65%, rgba(16, 39, 49, 0.52));
  content: "";
  pointer-events: none;
}

.rs-hero__figure img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rs-hero__figure figcaption {
  position: absolute;
  z-index: 1;
  right: 1rem;
  bottom: 0.85rem;
  left: 1rem;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.67rem;
  line-height: 1.4;
  text-align: right;
}

.rs-facts {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  background: var(--rs-navy-dark);
  color: #fff;
}

.rs-facts div {
  min-width: 0;
  padding: 1rem 1.15rem;
}

.rs-facts div + div {
  border-left: 1px solid rgba(255, 255, 255, 0.17);
}

.rs-facts dt {
  margin-bottom: 0.2rem;
  color: #bed0d8;
  font-size: 0.61rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.rs-facts dd {
  margin: 0;
  color: #fff;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

/* Origin story */
.rs-origin {
  display: grid;
  grid-template-columns: minmax(15rem, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
  margin-bottom: clamp(4rem, 8vw, 6rem);
}

.rs-origin__heading {
  padding-top: 0.9rem;
  border-top: 5px solid var(--rs-copper);
}

.rs-origin h2,
.rs-section-heading h2,
.rs-visits h2,
.rs-herd h2,
.rs-work h2,
.rs-contact h2 {
  color: var(--rs-navy-dark);
  line-height: 1.03;
}

.rs-origin h2 {
  max-width: 14ch;
  margin: 0.35rem 0 0;
  font-size: clamp(2.1rem, 4vw, 3.35rem);
}

.rs-origin__copy {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
}

.rs-origin__year {
  color: var(--rs-blue);
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 6vw, 5.2rem);
  font-weight: 700;
  line-height: 0.9;
}

.rs-origin__text p {
  max-width: 43rem;
  margin: 0 0 1rem;
  line-height: 1.75;
}

.rs-origin__text a,
.rs-work a,
.rs-home-link a {
  color: #7f402f;
  font-weight: 800;
  text-decoration-color: rgba(127, 64, 47, 0.38);
  text-underline-offset: 0.2rem;
}

.rs-origin__text a:visited,
.rs-work a:visited,
.rs-home-link a:visited {
  color: #7f402f;
}

.rs-origin__text a:hover,
.rs-work a:hover,
.rs-home-link a:hover {
  color: var(--rs-navy-dark);
  text-decoration-color: currentColor;
}

/* Two Belfast destinations */
.rs-locations {
  margin: 0 calc(50% - 50vw) clamp(4rem, 8vw, 6rem);
  padding: clamp(3rem, 6vw, 5rem) max(1.25rem, calc((100vw - var(--wrap)) / 2));
  background: var(--rs-mist);
}

.rs-section-heading {
  display: grid;
  grid-template-columns: minmax(14rem, 0.7fr) minmax(0, 1.3fr);
  gap: 1rem clamp(2rem, 6vw, 5rem);
  align-items: end;
  margin-bottom: 2.3rem;
}

.rs-section-heading h2 {
  max-width: 15ch;
  margin: 0.35rem 0 0;
  font-size: clamp(2.1rem, 4vw, 3.35rem);
}

.rs-section-heading > p:last-child {
  max-width: 43rem;
  margin: 0;
  color: var(--rs-muted);
  line-height: 1.7;
}

.rs-location-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  background: var(--rs-rule);
  border: 1px solid var(--rs-rule);
  gap: 1px;
}

.rs-location {
  min-width: 0;
  padding: clamp(1.7rem, 4vw, 2.8rem);
  background: var(--rs-paper);
}

.rs-location:first-child {
  border-top: 7px solid var(--rs-forest);
}

.rs-location:last-child {
  border-top: 7px solid var(--rs-blue);
}

.rs-location__label {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--rs-copper);
  font-size: 0.63rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.rs-location h3 {
  margin: 0 0 0.75rem;
  color: var(--rs-navy-dark);
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.rs-location p {
  max-width: 34rem;
  margin: 0 0 1rem;
  color: var(--rs-muted);
  line-height: 1.68;
}

.rs-location address {
  color: var(--rs-ink);
  font-size: 0.84rem;
  font-style: normal;
  font-weight: 800;
}

.rs-location a,
.rs-location a:visited {
  color: var(--rs-navy-dark);
  font-size: 0.82rem;
  font-weight: 850;
  text-underline-offset: 0.2rem;
}

.rs-location a:hover {
  color: var(--rs-copper);
}

/* Tours and guided walks */
.rs-visits {
  display: grid;
  grid-template-columns: minmax(14rem, 0.62fr) minmax(0, 1.38fr);
  gap: clamp(2rem, 6vw, 5rem);
  margin-bottom: clamp(4rem, 8vw, 6rem);
}

.rs-visits__heading {
  position: sticky;
  top: 6.5rem;
  align-self: start;
}

.rs-visits h2 {
  max-width: 12ch;
  margin: 0.35rem 0 0.9rem;
  font-size: clamp(2.1rem, 4vw, 3.35rem);
}

.rs-visits__heading > p:last-child {
  max-width: 26rem;
  margin: 0;
  color: var(--rs-muted);
  line-height: 1.65;
}

.rs-visit-list {
  border-top: 1px solid var(--rs-rule);
}

.rs-visit-list article {
  display: grid;
  grid-template-columns: 3.5rem minmax(11rem, 0.7fr) minmax(0, 1.3fr);
  gap: 1.2rem;
  align-items: start;
  padding: 1.8rem 0;
  border-bottom: 1px solid var(--rs-rule);
}

.rs-visit-list__number {
  color: var(--rs-blue);
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1;
}

.rs-visit-list h3 {
  margin: 0;
  color: var(--rs-navy-dark);
  font-size: 1.35rem;
}

.rs-visit-list__copy p {
  margin: 0 0 0.8rem;
  color: var(--rs-muted);
  font-size: 0.9rem;
  line-height: 1.68;
}

.rs-arrow-link,
.rs-arrow-link:visited {
  color: var(--rs-navy-dark);
  font-size: 0.82rem;
  font-weight: 900;
  text-decoration: none;
}

.rs-arrow-link::after {
  content: " \2192";
}

.rs-arrow-link:hover {
  color: var(--rs-copper);
}

/* Herd directory feature */
.rs-herd {
  display: grid;
  grid-template-columns: 12rem minmax(0, 1fr) auto;
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
  margin: 0 calc(50% - 50vw) clamp(4rem, 8vw, 6rem);
  padding: clamp(3rem, 6vw, 5rem) max(1.25rem, calc((100vw - var(--wrap)) / 2));
  background: var(--rs-navy-dark);
  color: #fff;
}

.rs-herd__count {
  padding-right: 2rem;
  border-right: 1px solid rgba(255, 255, 255, 0.22);
  text-align: center;
}

.rs-herd__count strong {
  display: block;
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(4rem, 8vw, 6.5rem);
  line-height: 0.85;
}

.rs-herd__count span {
  display: block;
  margin-top: 0.65rem;
  color: #bdd1da;
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.rs-herd .eyebrow {
  color: #e1b774;
}

.rs-herd h2 {
  max-width: 18ch;
  margin: 0.3rem 0 0.7rem;
  color: #fff;
  font-size: clamp(2rem, 4vw, 3.15rem);
}

.rs-herd__copy p {
  max-width: 44rem;
  margin: 0;
  color: #d7e1e5;
  line-height: 1.7;
}

.rs-herd .rs-arrow-link,
.rs-herd .rs-arrow-link:visited {
  color: #fff;
  white-space: nowrap;
}

.rs-herd .rs-arrow-link:hover {
  color: #e7be7d;
}

/* Working ranch: fiber, breeding and boarding */
.rs-work {
  margin-bottom: clamp(4rem, 8vw, 6rem);
}

.rs-work__heading {
  display: grid;
  grid-template-columns: minmax(14rem, 0.7fr) minmax(0, 1.3fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: end;
  margin-bottom: 2rem;
}

.rs-work h2 {
  max-width: 15ch;
  margin: 0.35rem 0 0;
  font-size: clamp(2.1rem, 4vw, 3.35rem);
}

.rs-work__heading > p:last-child {
  max-width: 44rem;
  margin: 0;
  color: var(--rs-muted);
  line-height: 1.7;
}

.rs-work-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--rs-rule);
  border-bottom: 1px solid var(--rs-rule);
}

.rs-work-grid article {
  min-width: 0;
  padding: 1.7rem;
}

.rs-work-grid article + article {
  border-left: 1px solid var(--rs-rule);
}

.rs-work-grid span {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--rs-copper);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.rs-work-grid h3 {
  margin: 0 0 0.55rem;
  color: var(--rs-navy-dark);
  font-size: 1.3rem;
}

.rs-work-grid p {
  margin: 0;
  color: var(--rs-muted);
  font-size: 0.87rem;
  line-height: 1.65;
}

/* Alpaca Farms editorial asides */
.rs-asides {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-bottom: clamp(4rem, 8vw, 6rem);
}

.rs-aside {
  display: grid;
  grid-template-columns: minmax(10rem, 0.88fr) minmax(0, 1.12fr);
  min-width: 0;
  overflow: hidden;
  background: var(--rs-paper);
  border: 1px solid var(--rs-rule);
}

.rs-aside img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 14rem;
  object-fit: cover;
}

.rs-aside > div {
  padding: 1.4rem;
}

.rs-aside h2 {
  margin: 0.25rem 0 0.55rem;
  color: var(--rs-navy-dark);
  font-size: 1.45rem;
  line-height: 1.16;
}

.rs-aside h2 a,
.rs-aside h2 a:visited {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  text-decoration: none;
}

.rs-aside h2 a:hover {
  color: var(--rs-copper);
}

.rs-aside p:not(.eyebrow) {
  margin: 0 0 0.75rem;
  color: var(--rs-muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.rs-aside > div > a,
.rs-aside > div > a:visited {
  color: var(--rs-navy-dark);
  font-size: 0.78rem;
  font-weight: 900;
}

.rs-aside > div > a:hover {
  color: var(--rs-copper);
}

/* Contact and source notes */
.rs-contact {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(18rem, 0.8fr);
  gap: 2rem;
  align-items: end;
  padding: clamp(1.9rem, 4vw, 3rem);
  background: var(--rs-navy-dark);
  color: #fff;
}

.rs-contact .eyebrow {
  color: #e1b774;
}

.rs-contact h2 {
  margin: 0.3rem 0 0.5rem;
  color: #fff;
}

.rs-contact p {
  max-width: 42rem;
  margin: 0;
  color: #d8e2e6;
  line-height: 1.65;
}

.rs-contact__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem 1rem;
}

.rs-contact__actions a:not(.button-link),
.rs-contact__actions a:not(.button-link):visited {
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
}

.rs-contact__actions a:not(.button-link):hover {
  color: #e7be7d;
}

.rs-contact .button-link {
  border-color: var(--rs-gold);
  background: var(--rs-gold);
  color: var(--rs-navy-dark);
}

.rs-contact .button-link:hover {
  border-color: #fff;
  background: #fff;
  color: var(--rs-navy-dark);
}

.rs-source-note,
.rs-home-link {
  max-width: 58rem;
  margin: 1rem 0 0;
  color: var(--rs-muted);
  font-size: 0.75rem;
  line-height: 1.55;
}

.rs-home-link {
  margin-bottom: 2rem;
}

@media (max-width: 64rem) {
  .rs-hero {
    grid-template-columns: minmax(0, 1.05fr) minmax(21rem, 0.95fr);
  }

  .rs-hero__copy {
    padding: clamp(2.2rem, 4.5vw, 3.5rem);
  }

  .rs-hero h1 {
    font-size: clamp(2.7rem, 5vw, 3.8rem);
  }

  .rs-herd {
    grid-template-columns: 10rem minmax(0, 1fr);
  }

  .rs-herd .rs-arrow-link {
    grid-column: 2;
    justify-self: start;
  }

  .rs-aside {
    grid-template-columns: 1fr;
  }

  .rs-aside img {
    min-height: 0;
    max-height: 15rem;
  }
}

@media (max-width: 50rem) {
  .rs-hero,
  .rs-origin,
  .rs-section-heading,
  .rs-visits,
  .rs-work__heading,
  .rs-contact {
    grid-template-columns: 1fr;
  }

  .rs-hero__copy {
    order: 2;
  }

  .rs-hero__figure {
    order: 1;
    min-height: 24rem;
  }

  .rs-facts {
    order: 3;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rs-facts div:nth-child(3) {
    border-top: 1px solid rgba(255, 255, 255, 0.17);
    border-left: 0;
  }

  .rs-facts div:nth-child(4) {
    border-top: 1px solid rgba(255, 255, 255, 0.17);
  }

  .rs-origin__copy {
    grid-template-columns: 6.5rem minmax(0, 1fr);
  }

  .rs-location-grid,
  .rs-work-grid,
  .rs-asides {
    grid-template-columns: 1fr;
  }

  .rs-location + .rs-location {
    border-top-width: 7px;
  }

  .rs-visits__heading {
    position: static;
  }

  .rs-work-grid article + article {
    border-top: 1px solid var(--rs-rule);
    border-left: 0;
  }

  .rs-contact__actions {
    justify-content: flex-start;
  }
}

@media (max-width: 38rem) {
  .rs-hero__figure {
    min-height: 19rem;
  }

  .rs-hero h1 {
    max-width: 100%;
    font-size: clamp(2.45rem, 12vw, 3.15rem);
  }

  .rs-facts {
    grid-template-columns: 1fr;
  }

  .rs-facts div + div,
  .rs-facts div:nth-child(3) {
    border-top: 1px solid rgba(255, 255, 255, 0.17);
    border-left: 0;
  }

  .rs-origin__copy {
    grid-template-columns: 1fr;
  }

  .rs-origin__year {
    font-size: 3.7rem;
  }

  .rs-visit-list article {
    grid-template-columns: 2.5rem minmax(0, 1fr);
  }

  .rs-visit-list__copy {
    grid-column: 2;
  }

  .rs-herd {
    grid-template-columns: 1fr;
  }

  .rs-herd__count {
    max-width: 9rem;
    padding: 0 0 1.3rem;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.22);
    text-align: left;
  }

  .rs-herd .rs-arrow-link {
    grid-column: 1;
  }

  .rs-contact,
  .rs-contact__actions {
    align-items: flex-start;
  }

  .rs-contact__actions {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ranch-store-profile *,
  .ranch-store-profile *::before,
  .ranch-store-profile *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
