/* ==========================================================================
   Crosswise — Header / Footer / shared layout
   ========================================================================== */

.cw-site-header {
  background: var(--cw-white);
  position: relative;
  z-index: 50;
}

.cw-header-inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 24px;
  padding-top: 24px;
  padding-bottom: 24px;
  position: relative;
}
.cw-header-inner::after {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 0;
  border-bottom: 1px solid var(--cw-border);
}
@media (max-width: 700px) {
  .cw-header-inner::after { left: 20px; right: 20px; }
}

.cw-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--cw-font-serif);
  font-size: 40px;
  color: var(--cw-ink);
  font-weight: 400;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.cw-logo svg { width: 34px; height: 34px; }
/* Publication logo / icon from Ghost branding settings (Design > Brand) */
.cw-logo .cw-logo-img { height: 42px; width: auto; max-width: 320px; object-fit: contain; }
.cw-logo .cw-logo-mark { width: 34px; height: 34px; object-fit: contain; }
.cw-logo .cw-logo-text { text-transform: uppercase; }
/* footer logo sits smaller than the header logo */
.cw-footer-brand .cw-logo-img { height: 30px; }
@media (max-width: 700px) {
  .cw-logo .cw-logo-img { height: 32px; }
  .cw-footer-brand .cw-logo-img { height: 26px; }
}

.cw-nav {
  display: flex;
  align-items: center;
  gap: 44px;
  flex-wrap: wrap;
  margin-left: auto;
}

.cw-nav a {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--cw-ink);
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}
.cw-nav a:hover,
.cw-nav a.cw-nav-active {
  color: var(--cw-red);
  border-bottom-color: var(--cw-red);
}

/* member sign-in link next to the Subscribe button */
.cw-signin {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--cw-ink);
  white-space: nowrap;
}
.cw-signin:hover { color: var(--cw-red); }

.cw-header-cta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: 28px;
}

.cw-nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--cw-ink);
}
.cw-nav-toggle svg { width: 26px; height: 26px; }

@media (max-width: 900px) {
  .cw-nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--cw-white);
    border-bottom: 1px solid var(--cw-border);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 24px 20px;
  }
  .cw-nav a { display: block; width: 100%; padding: 10px 0; border-bottom: 1px solid var(--cw-border); }
  .cw-nav.is-open { display: flex; }
  .cw-nav-toggle { display: inline-flex; }
}

/* Footer */
.cw-site-footer {
  background: var(--cw-black);
  color: var(--cw-muted-dark);
  padding: 64px 0 28px;
}

.cw-footer-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 40px;
}

.cw-footer-brand .cw-logo { color: #fff; margin-bottom: 14px; }
.cw-footer-tagline { font-size: 14px; color: var(--cw-muted-dark); margin-bottom: 18px; }

.cw-footer-social { display: flex; gap: 16px; }
.cw-footer-social a {
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 50%;
  color: #fff;
  font-size: 13px;
}
.cw-footer-social a svg { width: 15px; height: 15px; fill: currentColor; stroke: none; }

.cw-footer-col h4 {
  font-family: var(--cw-font-sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 16px;
}
.cw-footer-col ul li { margin-bottom: 12px; }
.cw-footer-col a { font-size: 13px; color: var(--cw-muted-dark); }
.cw-footer-col a:hover { color: #fff; }

.cw-footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.14);
  padding-top: 20px;
  text-align: center;
  font-size: 11px;
  color: var(--cw-muted-dark);
}

@media (max-width: 800px) {
  .cw-footer-top { grid-template-columns: 1fr 1fr; row-gap: 32px; }
  .cw-footer-brand { grid-column: 1 / -1; }
}

/* Generic section rhythm */
.cw-section { padding: 64px 0; }
.cw-section--tight { padding: 40px 0; }
.cw-section--cream { background: var(--cw-cream); }
.cw-section--cream-2 { background: var(--cw-cream-4); }
.cw-section--dark { background: var(--cw-near-black); color: #fff; }
.cw-section--red { background: var(--cw-red); color: #fff; }

.cw-section-head { margin-bottom: 28px; }
.cw-section-head h2 { font-size: 28px; margin-bottom: 0; }
.cw-section-head.cw-head-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

hr.cw-hr { border: none; border-top: 1px solid var(--cw-border); margin: 0; }

.cw-skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--cw-red);
  color: #fff;
  padding: 10px 16px;
  z-index: 100;
}
.cw-skip-link:focus { left: 12px; top: 12px; }
