/* ==========================================================================
   Chick-fil-A Raynham — Policies page
   Layout only; tokens and shared components come from theme.css.
   ========================================================================== */

/* ---------- Compact hero (no media) ---------- */
.policy-hero { padding-bottom: clamp(28px, 4vw, 48px); }

.policy-hero__inner {
  position: relative;
  max-width: 780px;
}

.policy-hero h1 { font-size: clamp(2.7rem, 6vw, 4.8rem); }

.policy-hero .page-hero__lede { margin-bottom: 22px; }

.policy-hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  font-size: .92rem;
  color: var(--muted);
}

/* "Last updated" pill — used in the hero and in the Changes section */
.policy-updated {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: var(--pill);
  background: var(--butter-tint);
  color: var(--ink);
  font-size: .84rem;
  font-weight: 700;
  letter-spacing: .01em;
  white-space: nowrap;
}

.policy-updated::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--butter);
}

/* ---------- Two-column layout ---------- */
.policy { padding-top: 0; }

.policy-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}

/* Sticky table of contents */
.policy-toc {
  position: sticky;
  top: calc(var(--header-h) + 20px);
}

.policy-toc__label {
  font-family: var(--font-body);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

.policy-toc ol {
  list-style: none;
  display: grid;
  gap: 2px;
  border-left: 1px solid var(--line);
}

.policy-toc a {
  display: block;
  margin-left: -1px;
  padding: 8px 18px;
  border-left: 2px solid transparent;
  color: var(--ink-2);
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}

.policy-toc a:hover {
  color: var(--ink);
  border-color: var(--sand);
}

.policy-toc a.is-current {
  color: var(--red);
  border-color: var(--red);
}

.policy-toc__note {
  margin-top: 26px;
  padding: 18px 20px;
  border-radius: var(--r-sm);
  background: var(--paper-2);
  font-size: .9rem;
  line-height: 1.6;
  color: var(--ink-2);
}

.policy-toc__note strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}

/* ---------- Content ---------- */
.policy-content {
  counter-reset: policy;
  display: grid;
  gap: 22px;
}

.policy-block {
  padding: clamp(28px, 4vw, 48px);
  /* theme.css already sets scroll-padding-top on <html> for the sticky header;
     this adds a little breathing room above each heading. */
  scroll-margin-top: 20px;
}

/* A legal page should not lift on hover like a feature card */
.policy-block:hover {
  transform: none;
  box-shadow: var(--shadow-sm);
  border-color: var(--line);
}

.policy-block h2 {
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.policy-block h2::before {
  counter-increment: policy;
  content: counter(policy, decimal-leading-zero);
  display: block;
  font-family: var(--font-body);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .16em;
  color: var(--red);
  margin-bottom: 12px;
}

.policy-block h3 {
  font-size: 1.25rem;
  margin: 26px 0 8px;
}

.policy-block p,
.policy-block li {
  max-width: 70ch;
  color: var(--ink-2);
  line-height: 1.75;
}

.policy-block p { margin-bottom: 14px; }
.policy-block p:last-child { margin-bottom: 0; }

.policy-block ul {
  margin: 8px 0 18px;
  padding-left: 22px;
}

.policy-block li { margin-bottom: 6px; }
.policy-block li::marker { color: var(--red); }

.policy-block strong { color: var(--ink); }

.policy-block:target h2 em,
.policy-block:target h2::before { color: var(--red-deep); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .policy-layout {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  /* TOC becomes a horizontal pill row that sticks under the shrunken header */
  .policy-toc {
    top: 68px;
    z-index: 5;
    margin-inline: calc(-4vw);
    padding: 10px 4vw;
    background: rgba(251, 247, 241, .92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .policy-toc::-webkit-scrollbar { display: none; }

  .policy-toc__label,
  .policy-toc__note { display: none; }

  .policy-toc ol {
    display: flex;
    gap: 8px;
    width: max-content;
    border-left: 0;
  }

  .policy-toc a {
    margin: 0;
    padding: 9px 16px;
    border: 1px solid var(--line);
    border-radius: var(--pill);
    background: #fff;
    font-size: .88rem;
    white-space: nowrap;
  }

  .policy-toc a:hover {
    border-color: var(--ink);
    color: var(--ink);
  }

  .policy-toc a.is-current {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
  }

  /* Header (68px) + pill row (~62px) now sit above the content */
  .policy-block { scroll-margin-top: 72px; }
}

@media (max-width: 640px) {
  .policy-hero h1 { font-size: 2.5rem; }
  .policy-block h2 { font-size: 1.6rem; }
}
