/* ============================================
   Cambridge Butchers - Cousins | Option C
   Glossy One-Page Scroll
   ============================================ */

/* --- Custom Properties --- */
:root {
  /* Colours — burgundy/cream/green/amber from profile */
  --color-field: #3B0F18;
  --color-field-ink: #F5EDE4;
  --color-paper: #E0DCD6;
  --color-paper-2: #D6D2CC;
  --color-paper-3: #CCC8C2;
  --color-ink: #2A1A14;
  --color-ink-muted: #6B5A50;
  --color-accent: #C4943D;
  --color-accent-ink: #2A1A14;
  --color-green: #2D5A3D;
  --color-rule: oklch(20% 0.01 35 / 0.12);
  --color-focus: #D4A44D;

  /* Typography */
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --text-display: clamp(3rem, 7vw, 5.25rem);
  --text-display-s: clamp(2.25rem, 5vw, 3.75rem);
  --text-section: clamp(1.75rem, 3.5vw, 3.25rem);
  --text-title: clamp(1.25rem, 2vw, 1.563rem);
  --text-lead: clamp(1.125rem, 1.5vw, 1.313rem);
  --text-md: 1.0625rem;
  --text-sm: 0.875rem;

  /* Spacing */
  --space-3xs: 2px;
  --space-2xs: 4px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 40px;
  --space-2xl: 64px;
  --space-3xl: 96px;
  --space-4xl: 144px;

  /* Layout */
  --container: 1440px;
  --gutter: 64px;
  --gap-columns: 32px;
  --banner-height: 72px;
  --section-gap-s: 120px;
  --section-gap: 144px;
  --section-gap-l: 176px;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in: cubic-bezier(0.64, 0, 0.78, 0);
  --dur-short: 220ms;
  --dur-long: 420ms;

  /* Z */
  --z-sticky: 200;
  --z-nav: 300;

  /* Radius */
  --radius-card: 4px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-md);
  line-height: 1.6;
  color: var(--color-ink);
  background: var(--color-paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-wrap: pretty;
}

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

a {
  color: inherit;
  text-decoration: none;
}

address {
  font-style: normal;
}

/* Focus */
:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

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

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* --- Typography --- */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  text-wrap: balance;
}

h1 { font-size: var(--text-display); }
h2 { font-size: var(--text-section); }
h3 { font-size: var(--text-title); }

.section__head {
  font-size: var(--text-section);
  margin-bottom: var(--space-md);
}

.section__lead {
  font-size: var(--text-lead);
  color: var(--color-ink-muted);
  max-width: 60ch;
  margin-bottom: var(--space-2xl);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  font-family: var(--font-body);
  font-size: var(--text-md);
  font-weight: 600;
  border: 2px solid transparent;
  border-radius: var(--radius-card);
  cursor: pointer;
  transition: background var(--dur-short) var(--ease-out),
              color var(--dur-short) var(--ease-out);
  min-height: 48px;
}

.btn--primary {
  background: var(--color-accent);
  color: var(--color-accent-ink);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background: #D4A44D;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-nav);
  height: var(--banner-height);
  background: oklch(20% 0.01 35 / 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform var(--dur-short) var(--ease-out);
}

.nav--hidden {
  transform: translateY(-100%);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav__brand {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.nav__wordmark {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--color-field-ink);
  letter-spacing: -0.02em;
}

.nav__sub {
  font-size: var(--text-sm);
  color: var(--color-accent);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav__link {
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-field-ink);
  opacity: 0.75;
  transition: opacity var(--dur-short) var(--ease-out);
  white-space: nowrap;
}

.nav__link:hover,
.nav__link:focus-visible {
  opacity: 1;
}

.nav__link--cta {
  color: var(--color-accent);
  opacity: 1;
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
}

.nav__toggle-line {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-field-ink);
  transition: transform var(--dur-short) var(--ease-out);
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: oklch(6% 0.01 35);
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    oklch(6% 0.01 35 / 1.0) 0%,
    oklch(6% 0.01 35 / 0.9) 25%,
    oklch(6% 0.01 35 / 0.6) 50%,
    transparent 100%
  );
}

.hero__content {
  position: relative;
  z-index: 1;
  padding-bottom: var(--space-3xl);
  width: 100%;
}

.hero__title {
  color: #FFFFFF;
  margin-bottom: var(--space-lg);
  max-width: 18ch;
}

.hero__title-line {
  display: block;
}

.hero__lead {
  font-size: var(--text-lead);
  color: #FFFFFF;
  opacity: 0.9;
  max-width: 50ch;
  margin-bottom: var(--space-xl);
  line-height: 1.5;
}

/* --- Sections --- */
.section {
  padding-block: var(--section-gap);
}

/* --- Heritage --- */
.section--heritage {
  background: var(--color-paper);
}

.heritage {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--space-3xl);
  align-items: center;
}

.heritage__eyebrow {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-field);
  margin-bottom: var(--space-md);
}

.heritage__title {
  font-size: var(--text-display-s);
  margin-bottom: var(--space-xl);
  color: var(--color-field);
}

.heritage__title-line {
  display: block;
}

.heritage__body {
  max-width: 52ch;
  margin-bottom: var(--space-lg);
  color: var(--color-ink-muted);
}

.heritage__image {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-card);
  overflow: hidden;
}

.heritage__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- Products --- */
.section--products {
  background: var(--color-paper-2);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
}

.product-card {
  background: var(--color-paper);
  border-radius: var(--radius-card);
  overflow: hidden;
  transition: transform var(--dur-long) var(--ease-out);
}

.product-card:hover {
  transform: translateY(-4px);
}

.product-card__img {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.product-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-long) var(--ease-out);
}

.product-card:hover .product-card__img img {
  transform: scale(1.03);
}

.product-card__info {
  padding: var(--space-lg);
}

.product-card__title {
  margin-bottom: var(--space-xs);
  color: var(--color-field);
}

.product-card__desc {
  font-size: var(--text-md);
  color: var(--color-ink-muted);
  line-height: 1.55;
}

/* --- Awards --- */
.section--awards {
  background: var(--color-field);
  color: var(--color-field-ink);
}

.awards {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--space-3xl);
  align-items: center;
}

.awards__badge {
  aspect-ratio: 1;
  border-radius: var(--radius-card);
  overflow: hidden;
}

.awards__badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.awards__title {
  font-size: var(--text-display-s);
  margin-bottom: var(--space-lg);
  color: var(--color-field-ink);
}

.awards__body {
  font-size: var(--text-lead);
  opacity: 0.8;
  max-width: 48ch;
  margin-bottom: var(--space-xl);
  line-height: 1.5;
}

.awards__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.award-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: var(--space-md);
  border-bottom: 1px solid oklch(90% 0.01 35 / 0.15);
}

.award-item__title {
  font-family: var(--font-display);
  font-size: var(--text-title);
  font-weight: 600;
}

.award-item__year {
  font-size: 1rem;
  opacity: 0.6;
  font-variant-numeric: tabular-nums;
}

/* --- Team --- */
.section--team {
  background: var(--color-paper);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}

.team-card {
  text-align: center;
}

.team-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius-card);
  margin-bottom: var(--space-md);
}

.team-card__name {
  font-size: var(--text-title);
  color: var(--color-field);
}

/* --- Testimonials --- */
.section--testimonials {
  background: var(--color-paper-2);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
}

.testimonial {
  background: var(--color-paper);
  padding: var(--space-xl);
  border-radius: var(--radius-card);
  border-left: 3px solid var(--color-accent);
}

.testimonial__text {
  font-size: var(--text-md);
  line-height: 1.6;
  margin-bottom: var(--space-lg);
  color: var(--color-ink);
}

.testimonial__author {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-ink-muted);
}

/* --- Contact --- */
.section--contact {
  background: var(--color-field);
  color: var(--color-field-ink);
}

.contact {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--space-3xl);
}

.contact__title {
  font-size: var(--text-display-s);
  margin-bottom: var(--space-xl);
  color: var(--color-field-ink);
}

.contact__address {
  font-size: var(--text-lead);
  line-height: 1.6;
  margin-bottom: var(--space-lg);
  color: var(--color-field-ink);
}

.contact__phone,
.contact__email {
  margin-bottom: var(--space-md);
}

.contact__phone a,
.contact__email a {
  font-size: var(--text-lead);
  color: var(--color-accent);
  border-bottom: 1px solid oklch(80% 0.02 35 / 0.3);
  transition: border-color var(--dur-short) var(--ease-out);
}

.contact__phone a:hover,
.contact__email a:hover {
  border-color: var(--color-accent);
}

.contact__subtitle {
  font-size: var(--text-title);
  margin-bottom: var(--space-sm);
  color: var(--color-field-ink);
}

.contact__body {
  font-size: var(--text-md);
  opacity: 0.8;
  max-width: 48ch;
  line-height: 1.55;
  margin-bottom: var(--space-xl);
}

/* --- Footer --- */
.footer {
  background: oklch(14% 0.01 35);
  color: var(--color-field-ink);
  padding-block: var(--space-xl);
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer__copy {
  font-size: 1rem;
  opacity: 0.6;
}

.footer__address {
  font-size: 1rem;
  opacity: 0.6;
}

/* ============================================
   Responsive — under 60rem
   ============================================ */
@media (max-width: 60rem) {
  :root {
    --gutter: 24px;
    --section-gap: 96px;
    --section-gap-s: 80px;
    --section-gap-l: 96px;
  }

  .nav__menu {
    position: fixed;
    top: var(--banner-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-field);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-xl);
    transform: translateX(100%);
    transition: transform var(--dur-long) var(--ease-out);
  }

  .nav__menu.open {
    transform: translateX(0);
  }

  .nav__toggle {
    display: flex;
  }

  .nav__toggle.open .nav__toggle-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav__toggle.open .nav__toggle-line:nth-child(2) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .heritage {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .heritage__image {
    order: -1;
    aspect-ratio: 16 / 9;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  .awards {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .awards__badge {
    max-width: 400px;
    margin: 0 auto;
  }

  .team-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }

  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  .contact {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .footer__inner {
    flex-direction: column;
    text-align: center;
  }
}

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

/* ============================================
   Scroll choreography (JS-driven)
   ============================================ */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--dur-long) var(--ease-out),
              transform var(--dur-long) var(--ease-out);
}

.js .reveal.is-seen {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.js .reveal[data-stagger] > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--dur-long) var(--ease-out),
              transform var(--dur-long) var(--ease-out);
}

.js .reveal[data-stagger].is-seen > * {
  opacity: 1;
  transform: translateY(0);
}

.js .reveal[data-stagger].is-seen > *:nth-child(1) { transition-delay: 0ms; }
.js .reveal[data-stagger].is-seen > *:nth-child(2) { transition-delay: 80ms; }
.js .reveal[data-stagger].is-seen > *:nth-child(3) { transition-delay: 160ms; }
.js .reveal[data-stagger].is-seen > *:nth-child(4) { transition-delay: 240ms; }

/* Hero entrance */
.hero__title,
.hero__lead,
.hero .btn {
  opacity: 0;
  transform: translateY(16px);
}

.js .hero__title { transition: opacity 0.6s var(--ease-out) 0.1s, transform 0.6s var(--ease-out) 0.1s; }
.js .hero__lead { transition: opacity 0.6s var(--ease-out) 0.25s, transform 0.6s var(--ease-out) 0.25s; }
.js .hero .btn { transition: opacity 0.6s var(--ease-out) 0.4s, transform 0.6s var(--ease-out) 0.4s; }

.js .hero.is-loaded .hero__title,
.js .hero.is-loaded .hero__lead,
.js .hero.is-loaded .btn {
  opacity: 1;
  transform: translateY(0);
}

/* Nav scroll hide/show */
.nav--scrolled {
  background: oklch(18% 0.01 35 / 0.97);
}
