/* Layout chrome: site header (.nav) and footer shared by both the
   marketing pages and the configurator shell. */

/* ---------- Nav / Site header --------------------------------------- */
.nav {
  color: var(--text-inverse);
  background: repeating-linear-gradient(to bottom, #0d0d0d 0px, #1c1c1c 1px, #1c1c1c 1px, #0d0d0d 3px);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.6);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 2px solid #000;
  padding: 0 32px;
}
.nav__inner {
  max-width: var(--width-marketing);
  margin: 0 auto;
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  min-height: 58px;
}
.nav__brand {
  display: flex;
  align-items: stretch;
  gap: 40px;
}
.nav__brand-link {
  display: inline-flex;
  align-items: center;
  padding: 0 18px;
  margin-left: -18px;
  border-bottom: none;
  transition: background-color 120ms ease;
}
.nav__brand-link:hover { background: rgba(255, 255, 255, 0.08); }
.nav__brand-link:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  outline: 2px solid rgba(250, 248, 245, 0.4);
  outline-offset: -2px;
}
.nav__logo {
  width: 200px;
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 42px;
  line-height: 1;
  color: #fdfdfd;
  letter-spacing: -0.01em;
  text-decoration: underline;
  font-style: italic;
}

/* Unified nav items: links and the Sign-in button share the same look. */
.nav__items {
  display: flex;
  align-items: stretch;
}
.nav__item {
  display: inline-flex;
  align-items: center;
  padding: 0 18px;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: var(--fw-semi);
  line-height: 1;
  color: var(--text-inverse-muted);
  background: transparent;
  border: 0;
  border-bottom: none;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 120ms ease, color 120ms ease;
}
.nav__item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-inverse);
}
.nav__item:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-inverse);
  outline: 2px solid rgba(250, 248, 245, 0.4);
  outline-offset: -2px;
}
.nav__item.is-active {
  background: rgba(255, 255, 255, 0.14);
  color: var(--text-inverse);
}
/* "Shop" — bold white, kept through the active/hover/focus states. */
.nav__item--shop,
.nav__item--shop:hover,
.nav__item--shop:focus-visible,
.nav__item--shop.is-active {
  color: #fff;
  font-weight: var(--fw-bold);
}

/* "Design a custom case" CTA — a gold pill, kept gold through the
   active/hover/focus states (listed after .is-active so it wins the tie). */
.nav__item--cta,
.nav__item--cta.is-active {
  color: var(--bg-ink);
  background: var(--accent-yellow);
  border-radius: 999px;
  padding: 0 18px;
  height: 36px;
  align-self: center;
  margin-left: 10px;
  font-weight: var(--fw-bold);
}
.nav__item--cta:hover,
.nav__item--cta:focus-visible {
  color: var(--bg-ink);
  background: #f6ce6f;
}

/* Mobile nav toggle (hidden on desktop) */
.nav__toggle {
  display: none;
  background: rgba(255, 255, 255, 0.14);
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.nav__toggle-bar {
  width: 18px;
  height: 2px;
  background: var(--text-inverse);
  display: block;
}
.nav__panel {
  display: flex;
  align-items: stretch;
  margin-left: auto;
}
.nav__items > :last-child:not(.nav__item--cta) { margin-right: -18px; }

/* ---------- Footer -------------------------------------------------- */
.footer {
  background: var(--bg-ink);
  color: var(--text-inverse);
  padding: 64px 32px 40px;
}
.footer__inner { max-width: var(--width-marketing); margin: 0 auto; }
.footer__top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
}
.footer__logo {
  display: block;
  margin-bottom: 18px;
  font-family: var(--font-sans);
  text-decoration: underline;
  font-style: italic;
  font-weight: 700;
  font-size: 28px;
  line-height: 1;
  color: #fff;
  letter-spacing: -0.01em;
}
.footer__tagline {
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-inverse-muted);
  max-width: 320px;
}
.footer__col .overline { color: var(--text-inverse-muted); }
.footer__links {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: grid;
  gap: 10px;
}
.footer__links li { font-size: 14px; color: var(--text-inverse); }
.footer__links a { color: inherit; border-bottom: none; }
.footer__links a:hover { border-bottom: 1px solid var(--text-inverse); }
.footer__bottom {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid rgba(250, 248, 245, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer__bottom .caption { color: var(--text-inverse-muted); }

/* ---------- Tablet (<= 1024px) -------------------------------------- */
@media (max-width: 1024px) {
  .footer { padding: 56px 24px 32px; }
  .footer__top {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }
}

/* ---------- Phone (<= 640px) ---------------------------------------- */
@media (max-width: 640px) {
  .nav { padding: 0 20px; position: relative; }
  .nav__inner { min-height: 56px; }
  .nav__brand { gap: 0; }
  .nav__brand-link { padding: 0; margin-left: 0; }
  .nav__toggle { display: flex; margin-left: auto; align-self: center; }
  .nav__panel {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-ink);
    border-top: 1px solid rgba(250, 248, 245, 0.1);
    border-bottom: 2px solid #000;
    box-shadow: 0 16px 28px rgba(0, 0, 0, 0.45);
    padding: 8px 20px 20px;
    flex-direction: column;
    margin-left: 0;
    z-index: 20;
  }
  .nav[data-nav-open] .nav__panel { display: flex; }
  .nav__items {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  .nav__items > :last-child { margin-right: 0; }
  .nav__items .nav__item {
    padding: 0 4px;
    min-height: 56px;
    font-size: 1.125rem;
    justify-content: flex-start;
    text-align: left;
    border-bottom: 1px solid rgba(250, 248, 245, 0.08);
  }
  .nav__items .nav__item.is-active {
    background: transparent;
    color: var(--accent-yellow);
  }
  .nav__items .nav__item:hover,
  .nav__items .nav__item:focus-visible { background: rgba(255, 255, 255, 0.06); }
  /* The CTA becomes a full-width gold button at the bottom of the panel. */
  .nav__items .nav__item--cta,
  .nav__items .nav__item--cta.is-active {
    align-self: stretch;
    justify-content: center;
    margin: 16px 0 0;
    padding: 0 18px;
    height: 52px;
    min-height: 0;
    border-bottom: none;
    color: var(--bg-ink);
    background: var(--accent-yellow);
    font-size: 1.0625rem;
  }

  .footer { padding: 48px 20px 28px; }
  .footer__top {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .footer__bottom {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
}
