/* Little Rooster Bread Co. — recreated from the Squarespace "Pacific" layout.
   Myriad Pro (Typekit) is replaced by Source Sans 3, its open-source sibling. */

@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/source-sans-3-latin.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "Raleway";
  src: url("../fonts/raleway-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --ink: #201713;          /* headings */
  --text: #5c5652;         /* body copy (original was 50% black; darkened for legibility) */
  --nav: #5a4a48;
  --accent: #8a1e04;       /* active nav, sampled from the logo */
  --header-bg: #fafaf9;
  --band: #d8d4d1;         /* grey alternating sections */
  --footer-bg: #522a0f;
  --footer-text: rgba(255, 255, 255, 0.55);
  --content: 1012px;
  --gutter: 16px;
  --font: "Source Sans 3", "Myriad Pro", "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 80px; }
body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font: 400 17px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { color: var(--ink); line-height: 1.3; margin: 0 0 0.6em; font-weight: 600; }
h2 { font-size: clamp(26px, 4vw, 34px); }
p { margin: 0 0 1em; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link { position: absolute; left: -999px; top: 0; background: #fff; padding: 8px 12px; z-index: 100; }
.skip-link:focus { left: 8px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}
.header-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 10px var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
}
.logo img { width: 150px; }

.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav a, .sub-toggle {
  display: block;
  font: 700 14px/1 var(--font);
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--nav); text-decoration: none;
  background: none; border: 0; cursor: pointer;
  padding: 12px 0;
}
.site-nav a:hover, .sub-toggle:hover,
.site-nav a[aria-current="page"], .sub-toggle.is-current { color: var(--accent); }
.sub-toggle::after { content: " ▾"; font-size: 0.8em; }

/* Mobile menu */
.nav-toggle {
  width: 44px; height: 44px; border: 0; background: none; cursor: pointer;
  display: grid; place-items: center;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  content: ""; display: block; width: 24px; height: 2px; background: var(--ink); position: relative;
}
.nav-toggle-bars::before { position: absolute; top: -7px; }
.nav-toggle-bars::after { position: absolute; top: 7px; }

@media (max-width: 899px) {
  .site-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--header-bg);
    padding: 8px var(--gutter) 20px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
    max-height: calc(100vh - 80px); overflow-y: auto;
  }
  .site-nav.is-open { display: block; }
  .site-nav li { border-bottom: 1px solid rgba(0, 0, 0, 0.06); }
  .sub-menu { display: none; padding-left: 16px !important; }
  .has-sub.is-open .sub-menu { display: block; }
  .sub-menu li:last-child { border-bottom: 0; }
}

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .header-inner { display: block; position: relative; padding-top: 14px; padding-bottom: 14px; }
  .logo { display: block; width: 190px; margin: 0 auto; }
  .logo img { width: 190px; }
  .site-nav { position: absolute; inset: 0 var(--gutter); display: flex; justify-content: space-between; align-items: center; pointer-events: none; }
  .site-nav > ul { display: flex; gap: 28px; pointer-events: auto; }
  .nav-left, .nav-right { width: calc(50% - 120px); }
  .nav-left { justify-content: flex-end; }
  .nav-right { justify-content: flex-start; }
  .has-sub { position: relative; }
  .sub-menu {
    display: none; position: absolute; left: -16px; top: 100%;
    background: var(--header-bg); min-width: 200px; padding: 8px 16px !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
  }
  .has-sub:hover .sub-menu, .has-sub:focus-within .sub-menu, .has-sub.is-open .sub-menu { display: block; }
  .sub-menu a { padding: 9px 0; letter-spacing: 0.08em; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 10vw, 140px) var(--gutter); }
.section--band { background: var(--band); }
.wrap { max-width: var(--content); margin: 0 auto; }
.center { text-align: center; }

.split { display: grid; gap: 32px; align-items: center; }
@media (min-width: 768px) {
  .split { grid-template-columns: 1fr 1fr; gap: 40px; }
  .split--top { align-items: start; }
}
.split img { width: 100%; }

.label {
  font-size: 15px; font-weight: 400; letter-spacing: 0.06em;
  text-transform: uppercase; color: rgba(28, 28, 28, 0.8);
}
.caps { text-transform: uppercase; letter-spacing: 0.02em; }

/* ---------- Hero / banners ---------- */
.hero {
  position: relative; display: grid; place-items: center;
  min-height: clamp(380px, 85vh, 900px);
  color: #fff; text-align: center; overflow: hidden;
}
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, 0.18); }
.hero h1 {
  position: relative; z-index: 1; color: #fff; margin: 0; padding: 0 var(--gutter);
  font-size: clamp(36px, 7vw, 68px); font-weight: 700; text-transform: uppercase; letter-spacing: 0.01em;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}
.banner { min-height: clamp(260px, 60vh, 640px); }

/* ---------- Slideshow ---------- */
.slideshow { position: relative; background: #2b1a10; }
.slides {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none; list-style: none; margin: 0; padding: 0;
}
.slides::-webkit-scrollbar { display: none; }
.slides li { flex: 0 0 100%; scroll-snap-align: center; position: relative; overflow: hidden; }
/* Blurred backdrop fills the bars beside each photo. It uses a 64px copy (assets/img/blur/),
   so it costs ~1 KB per slide instead of loading every full photo up front. */
.slides li::before {
  content: ""; position: absolute; inset: -40px;
  background: var(--bg) center / cover;
  filter: blur(28px) brightness(0.7);
}
/* contain, not cover: show the whole photo (the square rooster shot lost its head and feet when cropped) */
.slides img { position: relative; width: 100%; height: clamp(300px, 70vh, 760px); object-fit: contain; }
.slide-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; border: 0; background: none; cursor: pointer;
  color: #fff; font-size: 36px; line-height: 1; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}
.slide-btn.prev { left: 8px; }
.slide-btn.next { right: 8px; }
.slide-dots { position: absolute; bottom: 20px; left: 0; right: 0; display: flex; justify-content: center; gap: 10px; }
.slide-dots button {
  width: 11px; height: 11px; border-radius: 50%; padding: 0; cursor: pointer;
  border: 1.5px solid #fff; background: transparent;
}
.slide-dots button[aria-current="true"] { background: #fff; }

/* ---------- Products ---------- */
.product h2 { text-align: center; text-transform: uppercase; font-weight: 700; font-size: clamp(28px, 4.5vw, 38px); }
.product img { width: 100%; margin: 24px 0 36px; }
.product .label { margin-bottom: 0.4em; }
.pooh { font-style: italic; padding-left: 1em; border-left: 3px solid var(--band); }

/* ---------- Where to buy ---------- */
.locations { list-style: none; margin: 0 0 2.5em; padding: 0; display: grid; gap: 14px 40px; }
@media (min-width: 700px) { .locations { grid-template-columns: 1fr 1fr; } }
.locations li { display: flex; gap: 10px; align-items: flex-start; }
.locations .pin { flex: none; margin-top: 4px; color: #e53e3e; }
.locations .name { color: var(--ink); font-weight: 600; }
.locations .addr { display: block; font-size: 15px; }

/* ---------- Nutrition ---------- */
.nutrition-label { max-width: 480px; margin: 0 auto; }
.nutrition-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; list-style: none; padding: 0; margin: 40px 0 0; font-size: 15px; }
.nutrition-nav a[aria-current="page"] { color: var(--accent); font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { background: var(--footer-bg); color: var(--footer-text); padding: 64px var(--gutter) 56px; }
.footer-inner {
  max-width: var(--content); margin: 0 auto;
  display: grid; gap: 32px; justify-items: center; text-align: center;
}
@media (min-width: 768px) {
  .footer-inner { grid-template-columns: 1fr 100px; align-items: start; justify-items: stretch; }
}
.site-footer a { color: var(--footer-text); }
.site-footer a:hover { color: #fff; }
.footer-big { font-size: clamp(24px, 3.5vw, 32px); font-weight: 600; margin: 0 0 0.6em; }
.footer-big a { text-decoration: none; }
.footer-quote { margin: 48px 0 40px; font-family: "Raleway", var(--font); }
.footer-quote blockquote { margin: 0; }
.footer-quote blockquote p { margin: 0 0 12px; font-size: clamp(22px, 3vw, 30px); line-height: 1.3; color: rgba(255, 255, 255, 0.75); }
.footer-quote blockquote p::before { content: "\201C"; display: block; font-size: 28px; line-height: 1; margin-bottom: 8px; }
.footer-quote figcaption { font-size: 17px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 56px; }
.footer-links a { font-weight: 700; font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; }
.snail { justify-self: center; }

/* ---------- Wholesale ---------- */
.wholesale-banner { width: 100%; height: clamp(260px, 60vh, 640px); object-fit: cover; }

/* Desktop: once scrolled, collapse to a slim nav-only bar like the original. */
@media (min-width: 900px) {
  .site-header.is-scrolled .logo { display: none; }
  .site-header.is-scrolled .header-inner { padding-top: 4px; padding-bottom: 4px; }
  .site-header.is-scrolled .site-nav { position: static; justify-content: center; gap: 28px; }
  .site-header.is-scrolled .nav-left, .site-header.is-scrolled .nav-right { width: auto; }
}
