/* ── CONTAINER ── */

.container {
  width: min(1200px, 94vw);
  margin: 0 auto;
}

/* ── PAGE WRAPPER ── */

.page {
  padding-top: 1.5rem;
  padding-bottom: 4rem;
}

/* ── HEADER ── */

.topbar {
  background: var(--black);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.topbar-upper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 1.5rem;
}

.brand {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1;
  flex-shrink: 0;
}

.brand-logo {
  height: 38px;
  width: auto;
  display: block;
}

.brand-sub {
  font-family: var(--font-body);
  font-size: 0.6rem;
  color: var(--gray-400);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 500;
}

.header-search {
  width: min(320px, 100%);
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
  transition: var(--transition);
}

.header-search:focus-within {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
}

.header-search input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--gray-100);
  font-size: 0.88rem;
  padding: 0.58rem 1rem;
  font-family: var(--font-body);
  min-width: 0;
}

.header-search input::placeholder {
  color: var(--gray-500);
}

.header-search input:focus {
  outline: none;
}

/* Nav row */

.topbar-lower {
  border-top: 1px solid var(--gray-800);
  height: 44px;
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.topbar-lower::-webkit-scrollbar {
  display: none;
}

.menu-main {
  display: flex;
  height: 100%;
}

.menu-main a {
  display: flex;
  align-items: center;
  padding: 0 1.25rem;
  color: var(--gray-400);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
}

.menu-main a.active,
.menu-main a:hover {
  color: var(--white);
  border-bottom-color: var(--white);
  text-decoration: none;
}

/* ── SECTION LABELS ── */

.section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 2px solid var(--black);
  padding-top: 0.75rem;
  margin-bottom: 1.5rem;
}

.section-label h1,
.section-label h2 {
  margin: 0;
  font-family: var(--font-headline);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--black);
}

.section-label > a {
  font-family: var(--font-body);
  font-size: 0.76rem;
  color: var(--gray-600);
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
  text-decoration: none;
  transition: color 150ms;
}

.section-label > a:hover {
  color: var(--gray-900);
  text-decoration: none;
}

/* ── PAGE HEADERS ── */

.page-header {
  padding: 1rem 0 3rem;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.page-header h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.1;
  margin: 0 0 1rem;
  font-family: var(--font-headline);
  font-weight: 800;
}

.page-header .lead {
  color: var(--gray-600);
  font-size: 1.25rem;
  line-height: 1.5;
  margin: 0;
  font-family: var(--font-body);
}

/* ── ARCHIVE ── */

.archive-controls {
  margin: 0 0 3rem;
}

.archive-filters {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  max-width: 600px;
  margin: 0 auto;
}

.archive-search-wrapper {
  width: 100%;
}

.archive-search-wrapper input[type="search"] {
  width: 100%;
  border: 2px solid var(--gray-200);
  border-radius: 8px;
  padding: 1rem 1.5rem;
  font-size: 1.1rem;
  font-family: var(--font-body);
  transition: border-color 0.2s;
  background: var(--surface);
}

.archive-search-wrapper input[type="search"]:focus {
  outline: none;
  border-color: var(--gray-900);
}

/* ── FOOTER ── */

.site-footer {
  background: var(--black);
  margin-top: 5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--gray-800);
}

.footer-brand-logo {
  height: 34px;
  width: auto;
  display: block;
  margin-bottom: 1rem;
}

.footer-brand p {
  color: var(--gray-500);
  font-size: 0.85rem;
  line-height: 1.6;
  margin: 0;
  max-width: 32ch;
}

.footer-col {
  display: flex;
  flex-direction: column;
}

.footer-col h4 {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gray-300);
  margin: 0 0 0.8rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--gray-800);
}

.footer-col a {
  color: var(--gray-500);
  text-decoration: none;
  font-size: 0.88rem;
  padding: 0.32rem 0;
  border-bottom: 1px solid var(--gray-900);
  transition: color 150ms;
}

.footer-col a:hover {
  color: var(--gray-200);
  text-decoration: none;
}

.footer-bottom {
  padding: 1rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-bottom p {
  margin: 0;
  color: var(--gray-700);
  font-size: 0.8rem;
}

/* ── SPLIT ── */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.3rem;
  margin-top: 1.5rem;
}

/* ── RESPONSIVE ── */

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

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .topbar-upper {
    flex-direction: column;
    align-items: center;
    padding: 1rem 0;
    gap: 1.25rem;
  }

  .brand {
    align-items: center;
  }

  .brand-logo {
    height: 32px;
  }

  .header-search {
    width: 100%;
  }
}

@media (max-width: 500px) {
  .brand-name {
    font-size: 1.6rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

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