/* Amberoo history: people, friendship and the cattle cared for today. */
main#main:has(> .beginnings-page) { scroll-margin-top: 96px; }
.beginnings-page {
  --history-gap: clamp(56px, 7.2vw, 96px);
  --history-gutter: clamp(24px, 4.7vw, 64px);
  color: var(--ink);
  background: var(--paper);
  padding-bottom: var(--history-gap);
}
.beginnings-page *, .beginnings-page *::before, .beginnings-page *::after { box-sizing: border-box; }
.beginnings-page .wrap { width: min(100%, 1280px); margin-inline: auto; padding-inline: var(--history-gutter); }
.beginnings-page :is(h1, h2, h3, p, figure) { margin: 0; }
.beginnings-page :is(h1, h2, h3) { font-family: var(--serif); font-weight: 400; letter-spacing: -.035em; text-wrap: balance; }
.beginnings-page .eyebrow { font: 600 11px/1.7 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.beginnings-page .intro {
  display: grid;
  grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr);
  column-gap: clamp(48px, 6vw, 80px);
  align-items: start;
  padding-block: clamp(48px, 5vw, 64px) 44px;
  border: 0;
  background: transparent;
  text-align: left;
}
.beginnings-page .opening-title .eyebrow { margin-bottom: 24px; }
.beginnings-page .intro h1 { max-width: 11ch; font-size: clamp(52px, 5.1vw, 68px); line-height: 1.05; }
.beginnings-page .opening-copy { padding-top: 2px; max-width: 56ch; }
.beginnings-page .intro .page-intro { max-width: none; color: var(--ink); font-size: 22px; line-height: 1.65; text-wrap: pretty; }
.beginnings-page .intro .intro-continuation { margin-top: 24px; color: var(--muted); font-size: 18px; line-height: 1.85; text-wrap: pretty; }
.beginnings-page .page-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 36px;
  align-items: center;
  padding-block: 22px;
  position: relative;
  font-size: 14px;
  line-height: 1.6;
}
.beginnings-page .page-links::before, .beginnings-page .page-links::after {
  content: "";
  position: absolute;
  inset-inline: var(--history-gutter);
  height: 1px;
  background: var(--line);
}
.beginnings-page .page-links::before { top: 0; }
.beginnings-page .page-links::after { bottom: 0; }
.beginnings-page .page-links a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 3px; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.beginnings-page a:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }
.beginnings-page :is(.shared-beginnings, .today-story) {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: 40px clamp(56px, 7vw, 96px);
  margin-top: var(--history-gap);
}
.beginnings-page :is(.shared-beginnings, .today-story) h2 { max-width: 15ch; color: var(--accent); font-size: clamp(34px, 3.4vw, 46px); line-height: 1.15; }
.beginnings-page .chapter-heading .eyebrow { margin-bottom: 20px; }
.beginnings-page .chapter-copy { max-width: 61ch; }
.beginnings-page :is(.chapter-copy, .copy) p { font-size: 18px; line-height: 1.8; text-wrap: pretty; }
.beginnings-page :is(.chapter-copy, .copy) p + p { margin-top: 26px; }
.beginnings-page .founder-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(48px, 6vw, 80px); align-items: start; margin-top: 44px; }
.beginnings-page .people-story { min-width: 0; }
.beginnings-page .story-heading { margin-bottom: 30px; }
.beginnings-page .story-heading .eyebrow { margin-bottom: 14px; }
.beginnings-page .story-heading h2 { font-size: clamp(32px, 3.25vw, 44px); line-height: 1.16; }
.beginnings-page .story-photo { width: 100%; padding: 0; border: 0; background: transparent; }
.beginnings-page .portrait-frame { width: 100%; }
.beginnings-page .story-photo img { display: block; width: 100%; height: auto; max-width: 100%; object-fit: contain; filter: none !important; transform: none !important; border-radius: 0; }
.beginnings-page .founder-story .portrait-frame { aspect-ratio: 128 / 95; overflow: hidden; }
.beginnings-page .founder-story .portrait-frame img { height: 100%; }
.beginnings-page #rick-barton .portrait-frame img { object-fit: cover; object-position: 52% 50%; }
.beginnings-page .founder-story .copy { margin-top: 32px; max-width: 58ch; }
.beginnings-page .remembrance-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px clamp(48px, 6vw, 80px);
  align-items: center;
  margin-top: 40px;
}
.beginnings-page .remembrance-row > p { max-width: 36ch; font-family: var(--serif); font-size: clamp(23px, 2.1vw, 28px); line-height: 1.5; text-wrap: pretty; }
.beginnings-page .remembrance-photo { max-width: 420px; justify-self: end; }
.beginnings-page .continuing-story {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas: "photo heading" "photo copy";
  grid-template-rows: auto 1fr;
  column-gap: clamp(48px, 6vw, 80px);
  row-gap: 26px;
  align-items: start;
  margin-top: var(--history-gap);
}
.beginnings-page .continuing-story .story-heading { grid-area: heading; margin: 0; }
.beginnings-page .continuing-story .story-photo { grid-area: photo; }
.beginnings-page .continuing-story .copy { grid-area: copy; }
.beginnings-page figcaption { margin-top: 14px; font-size: 13px; line-height: 1.6; color: var(--muted); }
.beginnings-page .shared-heritage {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: 20px clamp(56px, 7vw, 96px);
  margin-top: var(--history-gap);
  padding-top: 44px;
  border-top: 1px solid var(--line);
}
.beginnings-page .shared-heritage h2 { grid-column: 1; grid-row: 1 / 3; font-size: 30px; line-height: 1.2; }
.beginnings-page .shared-heritage p { grid-column: 2; max-width: 62ch; font-size: 16px; line-height: 1.8; color: var(--muted); }
.beginnings-page .shared-heritage .text-link { grid-column: 2; justify-self: start; max-width: 100%; font-size: 14px; line-height: 1.75; text-wrap: pretty; text-underline-offset: 5px; }
.beginnings-page .today-story { grid-template-areas: "photo heading" "photo copy"; grid-template-rows: auto 1fr; row-gap: 26px; align-items: start; padding-top: 44px; border-top: 1px solid var(--line); }
.beginnings-page .today-story .chapter-heading { grid-area: heading; }
.beginnings-page .today-story .chapter-copy { grid-area: copy; }
.beginnings-page .today-story .care-photo { grid-area: photo; width: min(100%, 400px); justify-self: start; }
.beginnings-page .story-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 28px; }
.beginnings-page .story-actions .text-link { display: inline-block; min-height: 44px; padding-block: 8px; font-size: 16px; line-height: 1.75; color: var(--accent); text-underline-offset: 5px; }
.beginnings-page .story-actions .secondary-link { color: var(--ink); }
.beginnings-page section[id] { scroll-margin-top: 120px; }

@media (max-width: 959px) {
  .beginnings-page { --history-gap: 64px; --history-gutter: 32px; }
  .beginnings-page .intro { grid-template-columns: 1fr; gap: 32px; padding-block: 52px 44px; }
  .beginnings-page .intro h1 { max-width: none; font-size: clamp(48px, 7.3vw, 68px); }
  .beginnings-page .opening-title .eyebrow { margin-bottom: 20px; }
  .beginnings-page .opening-copy { max-width: 62ch; padding: 0; }
  .beginnings-page .intro .page-intro { font-size: 21px; line-height: 1.7; }
  .beginnings-page .intro .intro-continuation { margin-top: 22px; }
  .beginnings-page .page-links { gap: 8px 28px; padding-block: 18px; }
  .beginnings-page :is(.shared-beginnings, .today-story) { grid-template-columns: 1fr; gap: 28px; }
  .beginnings-page .today-story { grid-template-areas: "heading" "photo" "copy"; grid-template-rows: auto; }
  .beginnings-page :is(.shared-beginnings, .today-story) h2 { max-width: 22ch; font-size: 38px; }
  .beginnings-page .chapter-copy { max-width: 64ch; }
  .beginnings-page .founder-pair { display: block; }
  .beginnings-page .founder-story + .founder-story { margin-top: var(--history-gap); }
  .beginnings-page .story-heading h2 { font-size: 38px; }
  .beginnings-page .founder-story .copy { max-width: 64ch; }
  .beginnings-page .remembrance-row { grid-template-columns: 1fr; gap: 24px; margin-top: 32px; }
  .beginnings-page .remembrance-photo { justify-self: start; }
  .beginnings-page .continuing-story { grid-template-columns: 1fr; grid-template-areas: "heading" "photo" "copy"; grid-template-rows: auto; gap: 28px; }
  .beginnings-page .continuing-story .copy { max-width: 64ch; }
  .beginnings-page .shared-heritage { grid-template-columns: 1fr; gap: 20px; padding-top: 36px; }
  .beginnings-page .shared-heritage :is(h2, p, .text-link) { grid-column: auto; grid-row: auto; }
}
@media (max-width: 540px) {
  .beginnings-page { --history-gap: 56px; --history-gutter: 24px; }
  .beginnings-page .intro { padding-top: 44px; padding-bottom: 36px; gap: 28px; }
  .beginnings-page .intro h1 { font-size: clamp(40px, 11.5vw, 56px); line-height: 1.08; }
  .beginnings-page .intro .page-intro { font-size: 19px; line-height: 1.75; }
  .beginnings-page .intro .intro-continuation { font-size: 17px; line-height: 1.85; }
  .beginnings-page .page-links { gap: 6px 20px; font-size: 13px; }
  .beginnings-page .page-links a { min-height: 44px; }
  .beginnings-page :is(.shared-beginnings, .today-story) h2 { max-width: 18ch; font-size: 34px; }
  .beginnings-page :is(.chapter-copy, .copy) p { font-size: 17px; line-height: 1.85; }
  .beginnings-page :is(.chapter-copy, .copy) p + p { margin-top: 24px; }
  .beginnings-page .story-heading h2 { font-size: 34px; }
  .beginnings-page .story-heading { margin-bottom: 26px; }
  .beginnings-page .story-heading .eyebrow { margin-bottom: 12px; }
  .beginnings-page .founder-story .copy { margin-top: 26px; }
  .beginnings-page .founder-pair { margin-top: 36px; }
  .beginnings-page .shared-heritage h2 { font-size: 28px; }
  .beginnings-page section[id] { scroll-margin-top: 92px; }
}
@media print {
  .beginnings-page { padding-bottom: 0; --history-gap: 32px; }
  .beginnings-page .intro { padding-block: 24px; }
  .beginnings-page .page-links { display: none; }
  .beginnings-page .story-heading { break-after: avoid; }
  .beginnings-page .story-photo { break-inside: avoid; }
}
