/* Hallmark · macrostructure: Long Document · tone: editorial · anchor hue: 40 (warm ochre)
 * theme: Almanac (light paper · warm serif display · earthy terracotta accent)
 * nav: N6 Newspaper masthead · footer: Ft2 Inline single line
 * fonts: Fraunces (display) · Source Serif 4 (body) · Geist Mono (outlier)
 */

@import url('tokens.css');

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  overflow-x: clip;
  scroll-behavior: smooth;
}
body {
  overflow-x: clip;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--color-ink);
  background: var(--color-paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-accent); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }

/* ---------- selection ---------- */
::selection {
  background: var(--color-accent);
  color: var(--color-accent-ink);
}

/* ---------- typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
  min-width: 0;
  font-style: normal;
}
h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }

p { max-width: 65ch; }

.lede {
  margin-top: var(--space-sm);
  color: var(--color-ink-2);
  font-size: var(--text-lg);
  line-height: 1.5;
  text-wrap: pretty;
}

.small-caps {
  font-variant-caps: all-small-caps;
  letter-spacing: 0.08em;
  font-weight: 500;
}

.mono {
  font-family: var(--font-outlier);
  font-size: var(--text-sm);
  letter-spacing: 0.02em;
}

/* ---------- layout ---------- */
.page {
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
}

.section {
  padding-block: clamp(var(--space-2xl), 7vw, var(--space-3xl));
}
.section + .section {
  border-top: 1px solid var(--color-rule);
}

.section--tight {
  padding-block: var(--space-2xl);
}

/* ---------- nav: N6 Newspaper masthead ---------- */
.nav {
  border-bottom: 3px double var(--color-rule-2);
  padding-block: var(--space-lg) var(--space-sm);
  background: var(--color-paper);
}
.nav__inner {
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}
.nav__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  text-decoration: none;
  color: var(--color-ink);
}
.nav__logo {
  width: 144px;
  height: 144px;
  object-fit: contain;
}
.nav__wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-2xl);
  letter-spacing: -0.02em;
  line-height: 1;
  text-align: center;
}
.nav__tagline {
  font-family: var(--font-outlier);
  font-size: var(--text-xs);
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
.nav__row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  width: 100%;
  border-top: 1px solid var(--color-rule);
  padding-top: var(--space-sm);
}
.nav__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-lg);
  list-style: none;
  justify-content: center;
}
.nav__link {
  font-family: var(--font-outlier);
  font-size: var(--text-sm);
  color: var(--color-ink-2);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding-block: var(--space-2xs);
  border-bottom: 2px solid transparent;
  transition: border-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out);
  white-space: nowrap;
}
.nav__link:hover {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}
.nav__link[aria-current="page"] {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}
.nav__cta {
  font-family: var(--font-outlier);
  font-size: var(--text-xs);
  color: var(--color-accent);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: var(--space-2xs) var(--space-sm);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-sm);
  transition: background-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out);
  white-space: nowrap;
}
.nav__cta:hover {
  background: var(--color-accent);
  color: var(--color-accent-ink);
}
.nav__cta:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

/* mobile nav */
.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
  min-width: 44px;
  min-height: 44px;
}
.nav__toggle:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}
.nav__toggle-icon {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-ink);
  position: relative;
}
.nav__toggle-icon::before,
.nav__toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-ink);
}
.nav__toggle-icon::before { top: -6px; }
.nav__toggle-icon::after { top: 6px; }

@media (max-width: 60rem) {
  .nav {
    padding-block: var(--space-md) var(--space-sm);
  }
  .nav__inner {
    gap: var(--space-xs);
  }
  .nav__logo {
    width: 104px;
    height: 104px;
  }
  .nav__wordmark {
    font-size: clamp(var(--text-xl), 6vw, var(--text-2xl));
  }
  .nav__row {
    display: grid;
    grid-template-columns: auto auto;
    gap: var(--space-xs);
    width: auto;
  }
  .nav__row nav {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .nav__links {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg) 0;
  }
  .nav__links.is-open {
    display: flex;
  }
  .nav__toggle {
    display: block;
    grid-column: 2;
    grid-row: 1;
  }
  .nav__cta {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
  }
}

/* ---------- hero ---------- */
/* The artwork is composed as a wide banner with animals at both edges and
   open parchment in the center. Preserve that composition instead of using
   object-fit: cover, which would crop away the animals on narrow screens. */
.hero {
  position: relative;
  aspect-ratio: 2170 / 725;
  background: var(--color-paper);
  overflow: hidden;
}
.hero__art,
.hero__art img {
  width: 100%;
  height: 100%;
}
.hero__art img {
  display: block;
  object-fit: contain;
}
.hero__content {
  position: absolute;
  inset: 0;
  z-index: var(--z-raised);
  display: grid;
  place-items: center;
  padding: clamp(1rem, 3vw, 2.5rem);
}
.hero__content-inner {
  width: min(42vw, 46rem);
  text-align: center;
}
.hero__eyebrow {
  font-family: var(--font-outlier);
  font-size: var(--text-xs);
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: var(--space-sm);
}
.hero__title {
  font-size: clamp(2rem, 3.6vw, 4.4rem);
  color: var(--color-ink);
  line-height: 0.98;
  text-wrap: balance;
}
.hero__lede {
  font-size: clamp(0.9rem, 1.25vw, 1.25rem);
  color: var(--color-muted);
  margin: var(--space-md) auto 0;
  max-width: 42ch;
  line-height: 1.4;
}

/* Once the center copy would compete with the edge subjects, keep the full
   artwork as a banner and give the introduction its own parchment panel. */
@media (max-width: 64rem) {
  .hero {
    aspect-ratio: auto;
    overflow: visible;
  }
  .hero__art {
    height: auto;
    aspect-ratio: 2170 / 725;
  }
  .hero__content {
    position: static;
    padding: clamp(2rem, 6vw, 3.5rem) clamp(1rem, 6vw, 3rem);
    border-bottom: 1px solid var(--color-rule);
  }
  .hero__content-inner {
    width: min(100%, 42rem);
  }
  .hero__title {
    font-size: var(--text-display-s);
    line-height: 1.05;
  }
  .hero__lede {
    font-size: var(--text-md);
  }
}

@media (max-width: 40rem) {
  .hero__title {
    font-size: clamp(2.25rem, 11vw, 3.25rem);
  }
  .hero__lede {
    font-size: var(--text-base);
    max-width: 40ch;
  }
}

/* ---------- long document prose ---------- */
.prose {
  max-width: 65ch;
}
.prose > h1:first-child {
  max-width: 18ch;
  text-wrap: balance;
}
.prose p + p {
  margin-top: var(--space-md);
}
.prose h2 {
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-md);
  font-size: var(--text-xl);
}
.prose h3 {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-sm);
  font-size: var(--text-lg);
}
.prose ul, .prose ol {
  margin-top: var(--space-md);
  padding-left: var(--space-lg);
}
.prose li + li {
  margin-top: var(--space-xs);
}
.prose blockquote {
  margin-top: var(--space-lg);
  padding-left: var(--space-lg);
  border-left: 2px solid var(--color-accent);
  font-style: italic;
  color: var(--color-muted);
}
.prose figure {
  margin-top: var(--space-xl);
}
.prose figcaption {
  font-family: var(--font-outlier);
  font-size: var(--text-xs);
  color: var(--color-muted);
  margin-top: var(--space-xs);
}
.prose img {
  border-radius: var(--radius-sm);
}

/* ---------- section heads ---------- */
.section-head {
  margin-bottom: var(--space-xl);
}
.section-head--compact {
  margin-bottom: var(--space-md);
}
.section-head__title {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-sm);
}
.section-head__lede {
  font-size: var(--text-md);
  color: var(--color-muted);
  max-width: 55ch;
}

/* ---------- breed cards ---------- */
.breed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}
.breed-grid--links,
.breed-grid--compact {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.breed-grid--gallery {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.breed-grid--specimens {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.breed-grid--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 48rem;
}
.breed-grid--media {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  margin-block: var(--space-lg);
}
.breed-grid > .breed-card__image,
.breed-grid figure .breed-card__image {
  border-radius: var(--radius-sm);
}
.breed-grid figure {
  min-width: 0;
  margin: 0;
}
.breed-grid figcaption,
.photo-figure figcaption {
  margin-top: var(--space-xs);
  color: var(--color-muted);
  font-size: var(--text-sm);
  line-height: 1.45;
}
.turkey-gallery .breed-card__image {
  aspect-ratio: 3 / 2;
}
.breed-card {
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--color-paper);
  transition: box-shadow var(--dur-short) var(--ease-out);
}
.breed-card--link {
  color: inherit;
  text-decoration: none;
}
.breed-card--link:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
}
.breed-card:hover {
  box-shadow: 0 4px 12px oklch(20% 0.01 60 / 0.08);
}
.breed-card__image {
  aspect-ratio: 4/3;
  object-fit: cover;
  width: 100%;
}
/* Inside an actual breed-card, show the whole animal (no head-cropping).
   Standalone uses (photo strips, husbandry figures) keep cover behavior. */
.breed-card > .breed-card__image {
  object-fit: contain;
  background: var(--color-paper-3, #f2ede3);
}
.breed-card__media-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--color-paper-3);
}
.breed-card__media-pair img {
  width: 100%;
  height: 100%;
  min-width: 0;
  object-fit: cover;
}
.animal-gallery .breed-card__image {
  object-fit: contain;
  background: var(--color-paper-3);
}
.breed-card__body {
  padding: var(--space-md);
}
.breed-card__name {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 600;
  margin-bottom: var(--space-2xs);
}
.breed-card__desc {
  font-size: var(--text-sm);
  color: var(--color-muted);
  line-height: 1.5;
}
.breed-card__badge {
  display: inline-block;
  font-family: var(--font-outlier);
  font-size: var(--text-xs);
  color: var(--color-accent);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-sm);
  padding: var(--space-3xs) var(--space-2xs);
  margin-top: var(--space-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ---------- editorial media ---------- */
.photo-figure {
  margin-block: var(--space-lg);
}
.photo-figure--spacious {
  margin-top: var(--space-xl);
}
.photo-figure--wide {
  max-width: 45rem;
}
.photo-figure--medium {
  max-width: 40rem;
}
.photo-figure--narrow {
  max-width: 32.5rem;
}
.photo-figure img {
  width: 100%;
  border-radius: var(--radius-sm);
  background: var(--color-paper-3);
}
.photo-figure--landscape img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center 44%;
}
.media-placeholder {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  padding: var(--space-lg);
  background: var(--color-paper-3);
  color: var(--color-muted);
  font-family: var(--font-outlier);
  font-size: var(--text-xs);
  line-height: 1.5;
  text-align: center;
}

/* ---------- status badges ---------- */
.status-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}
.status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  font-family: var(--font-outlier);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: var(--space-3xs) var(--space-sm);
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.status--available {
  background: oklch(55% 0.15 140 / 0.12);
  color: oklch(40% 0.12 140);
}
.status--waitlist {
  background: oklch(55% 0.15 40 / 0.12);
  color: var(--color-accent);
}
.status--closed {
  background: oklch(18% 0.010 60 / 0.08);
  color: var(--color-muted);
}
.status__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ---------- membership badges ---------- */
.memberships {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}
.membership {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md);
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--color-ink);
  transition: border-color var(--dur-short) var(--ease-out);
}
.membership:hover {
  border-color: var(--color-accent);
}
.membership__icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  font-family: var(--font-outlier);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-muted);
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-sm);
}
.membership__name {
  font-family: var(--font-outlier);
  font-size: var(--text-sm);
  font-weight: 500;
}
.membership__note {
  font-size: var(--text-xs);
  color: var(--color-muted);
}

/* ---------- forms ---------- */
.form {
  max-width: 32rem;
  margin-top: var(--space-xl);
}
.form__group {
  margin-bottom: var(--space-lg);
}
.form__label {
  display: block;
  font-family: var(--font-outlier);
  font-size: var(--text-sm);
  font-weight: 500;
  margin-bottom: var(--space-2xs);
  color: var(--color-ink-2);
}
.form__input,
.form__select,
.form__textarea {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--color-rule-2);
  border-radius: var(--radius-sm);
  background: var(--color-paper);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-ink);
  outline: 2px solid transparent;
  outline-offset: 1px;
  transition: background-color var(--dur-short) var(--ease-out);
}
.form__input:hover,
.form__select:hover,
.form__textarea:hover {
  background: var(--color-paper-2);
}
.form__input:focus-visible,
.form__select:focus-visible,
.form__textarea:focus-visible {
  outline: 2px solid var(--color-focus);
}
.form__input::placeholder,
.form__textarea::placeholder {
  color: var(--color-muted);
}
.form__helper {
  font-size: var(--text-xs);
  color: var(--color-muted);
  margin-top: var(--space-2xs);
  min-height: 1lh;
}
.form__error {
  font-size: var(--text-xs);
  color: var(--color-error);
  margin-top: var(--space-2xs);
}
.form__submit {
  font-family: var(--font-outlier);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-accent-ink);
  background: var(--color-accent);
  border: none;
  border-radius: var(--radius-sm);
  padding: var(--space-sm) var(--space-xl);
  cursor: pointer;
  transition: background-color var(--dur-short) var(--ease-out), transform 100ms var(--ease-out);
  min-height: 44px;
}
.form__submit:hover {
  background: oklch(50% 0.14 40);
}
.form__submit:active {
  transform: translateY(1px);
}
.form__submit:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}
.form__submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  font-family: var(--font-outlier);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out), transform 100ms var(--ease-out), border-color var(--dur-short) var(--ease-out);
  min-height: 44px;
  white-space: nowrap;
}
.btn--primary {
  background: var(--color-accent);
  color: var(--color-accent-ink);
  border: 1px solid var(--color-accent);
}
.btn--primary:hover {
  background: oklch(50% 0.14 40);
}
.btn--primary:active {
  transform: translateY(1px);
}
.btn--secondary {
  background: transparent;
  color: var(--color-accent);
  border: 1px solid var(--color-accent);
}
.btn--secondary:hover {
  background: var(--color-accent);
  color: var(--color-accent-ink);
}
.btn--secondary:active {
  transform: translateY(1px);
}
.btn:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

/* ---------- footer: stacked brand block ---------- */
.footer {
  border-top: 1px solid var(--color-rule);
  padding-block: var(--space-2xl);
  margin-top: var(--space-3xl);
}
.footer__inner {
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
}
.footer__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}
.footer__logo {
  width: 128px;
  height: 128px;
  object-fit: contain;
}
.footer__wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-md);
  letter-spacing: -0.01em;
  line-height: 1.2;
  text-align: center;
}
.footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-md) var(--space-lg);
  list-style: none;
}
.footer__link {
  font-family: var(--font-outlier);
  font-size: var(--text-sm);
  color: var(--color-muted);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.footer__link:hover {
  color: var(--color-accent);
}
.footer__copy {
  font-family: var(--font-outlier);
  font-size: var(--text-xs);
  color: var(--color-muted);
  text-align: center;
}

/* ---------- tinted band (contained) ---------- */
.band {
  background: var(--color-paper-2);
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
}

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

.text-muted { color: var(--color-muted); }
.text-accent { color: var(--color-accent); }

.mt-0 { margin-top: 0; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 150ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 150ms !important;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ---------- responsive adjustments ---------- */
@media (max-width: 40rem) {
  h1 {
    font-size: var(--text-2xl);
  }
  .section {
    padding-block: var(--space-2xl);
  }
  .section--tight {
    padding-block: var(--space-xl);
  }
  .nav__logo {
    width: 96px;
    height: 96px;
  }
  .nav__wordmark {
    font-size: var(--text-xl);
  }
  .prose h2 {
    margin-top: var(--space-xl);
  }
  .lede {
    font-size: var(--text-md);
  }
  .breed-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
    margin-top: var(--space-lg);
  }
  .footer__logo {
    width: 96px;
    height: 96px;
  }
  .footer {
    margin-top: var(--space-xl);
    padding-block: var(--space-xl);
  }
  .band {
    padding: var(--space-md);
  }
}
