/*
 * Page chrome.
 *
 * Everything that is not a content section: the announcement bar, the sticky header, the
 * footer and the mobile sticky CTA. These four appear on every template, including the
 * checkout, which is why they are separated from sections.css.
 *
 * Media queries that only touch these components live at the bottom of this file rather
 * than in one global breakpoint block, so a component can be read in one place.
 */

/* ---------- Announcement bar ---------- */

.announce {
  background: var(--ink);
  color: #fff;
  font-size: var(--step--1);
  letter-spacing: 0.02em;
  text-align: center;
  padding: 10px 20px;
}

/* ---------- Header ---------- */

.header {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 30;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}

.header__logo {
  display: inline-flex;
  color: var(--ink);
}

.nav {
  display: flex;
  gap: 28px;
  font-size: var(--step--1);
}

.nav ul {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  padding-block: 4px;
  border-bottom: 1px solid transparent;
}

.nav a:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
  padding: 8px 14px;
  cursor: pointer;
  font-size: var(--step--1);
  color: var(--ink);
  text-decoration: none;
}

.cart-btn:hover {
  border-color: var(--ink);
}

/* ---------- Sticky mobile CTA ---------- */

.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
}

.sticky-cta__price {
  font-weight: 600;
}

.sticky-cta__meta {
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.sticky-cta .btn-primary {
  width: auto;
  padding: 13px 22px;
  font-size: var(--step-0);
}

/* ---------- Footer ---------- */

.footer {
  background: var(--ink);
  color: #cfc7bd;
  padding-block: 56px 28px;
}

.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
}

.footer__logo {
  height: 32px;
  color: #fff;
  margin-bottom: 16px;
}

.footer__blurb {
  margin: 0 0 18px;
  max-width: 34ch;
}

.footer__contact {
  margin: 0;
  font-size: var(--step--1);
  line-height: 1.8;
}

.footer h4 {
  color: #fff;
  font-size: var(--step--1);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 14px;
}

.footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
  font-size: var(--step--1);
}

.footer a {
  color: #cfc7bd;
  text-decoration: none;
}

.footer a:hover {
  color: #fff;
  text-decoration: underline;
}

/*
 * The focus ring in the footer is white, not ink.
 *
 * The global rule in base.css draws it in var(--ink), which is #1A1A1A. The footer ground is
 * also #1A1A1A. Contrast 1:1, so the ring was drawn and was invisible, on all eleven links.
 *
 * Only a keyboard user ever sees this, which is exactly why it went unnoticed: it is the one
 * state that never appears in a screenshot review. The dark offset keeps the ring readable
 * where a link sits on the slightly lighter bottom bar.
 */
.footer a:focus-visible,
.footer button:focus-visible {
  outline-color: #fff;
  outline-offset: 3px;
  border-radius: 2px;
}

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.75rem;
  color: #9c948b;
}

.footer .pay span {
  border-color: rgba(255, 255, 255, 0.2);
  background: transparent;
  color: #9c948b;
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 960px) {
  .nav {
    display: none;
  }

  .sticky-cta.is-visible {
    display: flex;
  }

  /* The sticky bar must not cover the last section. */
  .footer {
    padding-bottom: 100px;
  }
}

@media (max-width: 720px) {
  .footer__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer__bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}
