/* ==========================================================================
   Chick-fil-A Raynham — shared theme
   Design tokens, reset, layout primitives, buttons, header, footer,
   shared components, scroll reveals, responsive rules.
   Load this BEFORE each page's own stylesheet.
   ========================================================================== */

:root {
  /* Brand */
  --red:         #e51636;
  --red-deep:    #a30f28;
  --red-tint:    #fde8ec;
  --butter:      #ffffff;   /* the old yellow accent now resolves to white */
  --butter-tint: #fde8ec;

  /* Neutrals — Chick-fil-A white and greys */
  --paper:   #ffffff;
  --paper-2: #f6f6f6;
  --sand:    #ebebeb;
  --white:   #ffffff;
  --ink:     #2b2b2b;
  --ink-2:   #4d4d4d;
  --muted:   #6f6f6f;
  --line:    #e4e4e4;

  /* Shape */
  --r-sm: 12px;
  --r:    22px;
  --r-lg: 34px;
  --pill: 999px;

  /* Depth */
  --shadow-sm: 0 1px 2px rgba(31, 26, 23, .06), 0 4px 12px rgba(31, 26, 23, .06);
  --shadow:    0 2px 4px rgba(31, 26, 23, .05), 0 18px 40px rgba(31, 26, 23, .12);
  --shadow-lg: 0 4px 8px rgba(31, 26, 23, .05), 0 36px 80px rgba(31, 26, 23, .18);

  /* Motion */
  --ease:     cubic-bezier(.2, .8, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --spring:   cubic-bezier(.34, 1.56, .64, 1);

  /* Type */
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body:    'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --header-h: 84px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  font-family: var(--font-body);
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, video, svg { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -.02em;
  color: var(--ink);
  font-variation-settings: "opsz" 144, "SOFT" 60;
}

h1 em, h2 em, h3 em {
  font-style: normal;
  font-weight: inherit;
  color: var(--red);
}

a { color: var(--red); text-underline-offset: .18em; }
::selection { background: var(--red); color: #fff; }

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Layout primitives ---------- */
.container { width: min(92%, 1180px); margin-inline: auto; }
.container--wide { width: min(94%, 1360px); margin-inline: auto; }

.section { padding: clamp(64px, 9vw, 120px) 0; }
.section--tight { padding: clamp(40px, 6vw, 72px) 0; }
.section--paper2 { background: var(--paper-2); }
.section--ink { background: var(--red-deep); color: rgba(255, 255, 255, .9); }
.section--ink h2, .section--ink h3 { color: #fff; }

.section-head {
  max-width: 720px;
  margin: 0 auto clamp(36px, 5vw, 60px);
  text-align: center;
}

.section-head--left { margin-inline: 0; text-align: left; }

.section-head h2 {
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  margin-bottom: 16px;
}

.section-head p {
  color: var(--ink-2);
  font-size: 1.1rem;
  max-width: 58ch;
  margin-inline: auto;
}

.section-head--left p { margin-inline: 0; }

/* Small all-caps label with a dot */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 18px;
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

/* Placeholder content the Operator still needs to supply (search "[ADD ") */
.tbd {
  color: var(--muted);
  font-weight: 600;
  border-bottom: 2px dotted var(--sand);
  white-space: nowrap;
}

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
  text-decoration: none;
  padding: 17px 30px;
  border: 2px solid transparent;
  border-radius: var(--pill);
  cursor: pointer;
  white-space: nowrap;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease),
              background .25s ease, color .25s ease, border-color .25s ease;
}

.btn svg { width: 18px; height: 18px; flex: none; }

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); transition-duration: .1s; }

.btn--red {
  background: var(--red);
  color: #fff;
  box-shadow: 0 10px 24px -8px rgba(229, 22, 54, .6);
}

.btn--red:hover { background: var(--red-deep); box-shadow: 0 16px 30px -10px rgba(229, 22, 54, .7); }

.btn--ink { background: var(--red-deep); color: #fff; }
.btn--ink:hover { background: var(--red); }

.btn--outline {
  background: transparent;
  color: var(--red);
  border-color: var(--red);
}

.btn--outline:hover { background: var(--red); color: #fff; }

.btn--paper {
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.btn--paper:hover { background: var(--paper); }

.btn--ghost {
  background: rgba(255, 255, 255, .1);
  color: #fff;
  border-color: rgba(255, 255, 255, .4);
  backdrop-filter: blur(6px);
}

.btn--ghost:hover { background: #fff; color: var(--ink); border-color: #fff; }

/* Arrow link */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  transition: color .2s ease, gap .25s var(--ease);
}

.link-arrow::after { content: "\2192"; }
.link-arrow:hover { color: var(--red); gap: 12px; }

/* ==========================================================================
   Header
   ========================================================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, box-shadow .3s ease, background .3s ease;
}

.header.is-stuck {
  background: rgba(255, 255, 255, .96);
  border-color: var(--line);
  box-shadow: 0 10px 30px -18px rgba(31, 26, 23, .35);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: var(--header-h);
  transition: min-height .3s ease;
}

.header.is-stuck .header-inner { min-height: 68px; }

/* Brand block: logo mark + wordmark lockup */
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--ink);
  flex: none;
}

.brand img {
  width: 46px;
  height: 46px;
  transition: transform .4s var(--spring);
}

.brand:hover img { transform: rotate(-8deg) scale(1.06); }

.brand span {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand strong {
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 600;
  letter-spacing: -.01em;
}

.brand small {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--red);
}

/* Primary navigation — a pill rail */
.nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 5px;
  background: rgba(31, 26, 23, .05);
  border-radius: var(--pill);
}

.nav a {
  display: block;
  padding: 10px 16px;
  font-weight: 600;
  font-size: .95rem;
  color: var(--ink-2);
  text-decoration: none;
  border-radius: var(--pill);
  transition: background .25s ease, color .2s ease;
}

.nav a:hover { color: var(--ink); background: #fff; }

.nav a.is-active {
  color: var(--red);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.header-cta { display: flex; align-items: center; gap: 12px; flex: none; }
.header-cta .btn { padding: 13px 22px; font-size: .94rem; }

/* Live hours chip (filled by script.js) */
.open-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 10px;
  border-radius: var(--pill);
  background: #fff;
  border: 1px solid var(--line);
  font-size: .82rem;
  font-weight: 700;
  color: var(--ink-2);
  white-space: nowrap;
}

.open-chip::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--muted);
}

.open-chip.is-open::before {
  background: #22aa5a;
  animation: chipPulse 2s ease-out infinite;
}

.open-chip.is-closed::before { background: var(--red); }

@keyframes chipPulse {
  0%   { box-shadow: 0 0 0 0 rgba(34, 170, 90, .55); }
  100% { box-shadow: 0 0 0 9px rgba(34, 170, 90, 0); }
}

/* Mobile toggle */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--pill);
  cursor: pointer;
  flex: none;
}

.nav-toggle span {
  position: relative;
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: background .2s ease;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .3s var(--ease), top .3s var(--ease);
}

.nav-toggle span::before { top: -6px; }
.nav-toggle span::after  { top: 6px; }

.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after  { top: 0; transform: rotate(-45deg); }

/* ==========================================================================
   Page hero (sub-pages) — big headline on paper with a tilted photo card
   ========================================================================== */
.page-hero {
  position: relative;
  padding: clamp(48px, 8vw, 96px) 0 clamp(40px, 6vw, 72px);
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: auto -10% -40% auto;
  width: 60vw;
  max-width: 820px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 183, 3, .18), transparent 62%);
  pointer-events: none;
}

.page-hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  align-items: center;
  gap: clamp(36px, 6vw, 80px);
}

.page-hero h1 {
  font-size: clamp(2.8rem, 6.4vw, 5.2rem);
  margin-bottom: 22px;
}

.page-hero__lede {
  font-size: clamp(1.08rem, 1.6vw, 1.3rem);
  color: var(--ink-2);
  max-width: 52ch;
  margin-bottom: 30px;
}

.page-hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

.page-hero__media {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transform: rotate(1.5deg);
  transition: transform .6s var(--ease);
}

.page-hero__media:hover { transform: rotate(0); }

.page-hero__media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* ==========================================================================
   Shared components
   ========================================================================== */

/* Card */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: clamp(24px, 3vw, 34px);
  box-shadow: var(--shadow-sm);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: transparent;
}

.card h3 { font-size: 1.45rem; margin-bottom: 10px; }
.card p { color: var(--ink-2); }

/* Sticker — rotated pill label */
.sticker {
  display: inline-block;
  padding: 10px 18px;
  border-radius: var(--pill);
  background: #fff;
  color: var(--red);
  font-weight: 800;
  font-size: .86rem;
  letter-spacing: .04em;
  box-shadow: var(--shadow-sm);
  transform: rotate(-4deg);
}

.sticker--red { background: var(--red); color: #fff; }
.sticker--ink { background: var(--red-deep); color: #fff; }

/* Icon bubble */
.icon-bubble {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: var(--red-tint);
  color: var(--red);
  margin-bottom: 18px;
}

.icon-bubble svg { width: 26px; height: 26px; }

/* Steps (numbered) */
.steps {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 32px);
}

.step {
  position: relative;
  padding: 32px 28px 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r);
}

.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  display: inline-block;
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 600;
  line-height: 1;
  color: var(--red);
  margin-bottom: 18px;
}

.step h3 { font-size: 1.35rem; margin-bottom: 8px; }
.step p { color: var(--ink-2); }

/* Big closing banner shared by pages */
.banner {
  position: relative;
  overflow: hidden;
  background: var(--red-deep);
  color: #fff;
  padding: clamp(72px, 10vw, 128px) 0;
  text-align: center;
}

.banner::before,
.banner::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  pointer-events: none;
}

.banner::before { width: 48vw; height: 48vw; left: -16vw; top: -20vw; }
.banner::after  { width: 36vw; height: 36vw; right: -12vw; bottom: -18vw; }

.banner__inner { position: relative; z-index: 1; max-width: 760px; margin-inline: auto; }

.banner h2 {
  color: #fff;
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  margin-bottom: 16px;
}

.banner h2 em { color: #fff; }

.banner p {
  font-size: 1.12rem;
  color: rgba(255, 255, 255, .86);
  margin-bottom: 30px;
}

.banner__cows {
  width: min(560px, 86%);
  margin: 0 auto 26px;
  filter: drop-shadow(0 20px 30px rgba(0, 0, 0, .25));
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  position: relative;
  background: var(--red);
  color: rgba(255, 255, 255, .88);
  font-size: .95rem;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) repeat(3, minmax(0, 1fr));
  gap: clamp(32px, 5vw, 64px);
  padding: clamp(56px, 7vw, 88px) 0 clamp(40px, 5vw, 56px);
}

.footer-brand .brand { color: #fff; margin-bottom: 20px; }
.footer-brand .brand small { color: #fff; }

.footer-tagline {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: #fff;
  line-height: 1.35;
  max-width: 24ch;
  margin-bottom: 22px;
}

.footer-col h4 {
  font-family: var(--font-body);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .7);
  margin-bottom: 16px;
}

.footer-col ul { list-style: none; display: grid; gap: 10px; }

.footer-col a {
  color: inherit;
  text-decoration: none;
  transition: color .2s ease;
}

.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-col p { line-height: 1.7; }

.footer-strong {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: #fff;
}

.footer-closed {
  display: inline-block;
  margin-top: 10px;
  padding: 5px 12px;
  border-radius: var(--pill);
  background: rgba(255, 255, 255, .16);
  color: #fff;
  font-weight: 700;
  font-size: .82rem;
}

.footer-social { display: flex; gap: 10px; }

.footer-social a {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12);
  transition: transform .3s var(--spring), background .25s ease;
}

.footer-social a:hover { background: #fff; transform: translateY(-3px); }
.footer-social a:hover img { filter: none; }
.footer-social img { width: 18px; height: 18px; object-fit: contain; filter: brightness(0) invert(1); }

.footer-bar {
  border-top: 1px solid rgba(255, 255, 255, .22);
  padding: 26px 0 34px;
}

.footer-bar-inner {
  display: grid;
  gap: 16px;
  justify-items: center;
  text-align: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 22px;
}

.footer-links a,
.footer-links button {
  font: inherit;
  font-size: .88rem;
  color: rgba(255, 255, 255, .88);
  background: none;
  border: none;
  padding: 6px 0;
  cursor: pointer;
  text-decoration: none;
  transition: color .2s ease;
}

.footer-links a:hover,
.footer-links button:hover { color: #fff; }

.footer-copy {
  font-size: .78rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, .72);
  max-width: 76ch;
}

/* ==========================================================================
   Scroll reveals
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s var(--ease-out), transform 1s var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal--left  { transform: translateX(-30px); }
.reveal--right { transform: translateX(30px); }
.reveal--zoom  { transform: scale(.94); }

.reveal.is-visible { opacity: 1; transform: none; }

/* Body lock while the home-page intro plays (intro styles live in style.css) */
body.intro-active { overflow: hidden; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .nav-toggle { display: inline-flex; }
  .header-cta .open-chip { display: none; }

  .header-inner { flex-wrap: wrap; }

  .nav {
    order: 10;
    flex-basis: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height .5s var(--ease);
  }

  .nav.is-open { max-height: 560px; }

  .nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 8px;
    margin: 4px 0 16px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r);
  }

  .nav a { padding: 14px 16px; border-radius: var(--r-sm); }
  .nav a:hover { background: var(--paper); }

  .page-hero__grid { grid-template-columns: 1fr; }
  .page-hero__media { transform: none; }
}

@media (max-width: 900px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .steps { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .header-cta .btn { display: none; }
  .brand strong { font-size: 1.12rem; }
  .section { padding: 60px 0; }
  .footer-top { grid-template-columns: 1fr; }
  .btn { padding: 15px 24px; font-size: .96rem; }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

  .reveal { opacity: 1; transform: none; }
}
