/* The new header and footer on the static site's pages (data, companies,
   Blog, sources). The Cloudflare Worker swaps them into each static page as it
   is sent (switch/app-routing.mjs) and links this file. It is a static file of the site
   (shared/ek-shell.css), so the header looks right whether or not the app is up.
   Every rule is scoped to the ek-shell classes so the pages' own styles are
   not touched. Colours and type match the app (src/styles.css). */

@font-face {
  font-family: 'EK Shell Serif';
  font-style: normal;
  font-display: swap;
  font-weight: 200 900;
  src: url(/shared/ek-fonts/source-serif-4-latin-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'EK Shell Serif';
  font-style: normal;
  font-display: swap;
  font-weight: 200 900;
  src: url(/shared/ek-fonts/source-serif-4-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'EK Shell Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(/shared/ek-fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'EK Shell Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(/shared/ek-fonts/plus-jakarta-sans-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

.ek-shell-header,
.ek-shell-footer {
  --ek-paper: #fdf5ec;
  --ek-surface: #f7e8d8;
  --ek-rule: #dfcebc;
  --ek-ink: #1a1614;
  --ek-ink-soft: #3a322d;
  --ek-muted: #6b5e55;
  --ek-teal: #007a82;
  --ek-teal-dark: #005e64;
  box-sizing: border-box;
  color: var(--ek-ink);
  font-family: 'EK Shell Sans', 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.ek-shell-header *,
.ek-shell-footer * {
  box-sizing: border-box;
}

/* The static site's own frame (shared/site.css: min(1320px, 100% - 2 × 24px)),
   so the header lines up with the page content beneath it. */
.ek-shell-wrap {
  width: min(1320px, calc(100% - 48px));
  margin: 0 auto;
  padding: 0;
}

.ek-shell-header {
  background: var(--ek-paper);
  border-bottom: 3px double var(--ek-ink);
}

.ek-shell-brand-row {
  display: flex;
  align-items: center;
  gap: 32px;
  padding-top: 22px;
  padding-bottom: 18px;
}

.ek-shell-wordmark {
  font-family: 'EK Shell Serif', Georgia, serif;
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ek-ink);
  text-decoration: none;
}

.ek-shell-wordmark span {
  color: var(--ek-teal);
}

.ek-shell-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 28px;
  margin: 0 0 0 auto;
  padding: 0;
}

.ek-shell-nav a {
  padding: 4px 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ek-ink);
  text-decoration: none;
  white-space: nowrap;
}

.ek-shell-nav a:hover {
  color: var(--ek-teal-dark);
  text-decoration: underline;
}

.ek-shell-nav a[aria-current='page'] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 7px;
}

.ek-shell-button {
  display: inline-block;
  padding: 10px 18px;
  border: 1px solid var(--ek-teal);
  background: var(--ek-teal);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
}

.ek-shell-button:hover {
  border-color: var(--ek-teal-dark);
  background: var(--ek-teal-dark);
  color: #fff;
}

.ek-shell-footer {
  margin-top: 96px;
  padding: 30px 0 56px;
  border-top: 1px solid var(--ek-rule);
  background: var(--ek-surface);
}

.ek-shell-footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) auto;
  gap: 18px 48px;
  align-items: start;
}

.ek-shell-footer .ek-shell-wordmark {
  font-size: 1.6rem;
}

.ek-shell-about {
  margin: 8px 0 0;
  font-size: 0.9rem;
  color: var(--ek-ink-soft);
}

.ek-shell-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  font-size: 0.9375rem;
  font-weight: 600;
}

.ek-shell-footer nav a {
  color: var(--ek-ink);
}

.ek-shell-credit {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 16px;
  border-top: 1px solid var(--ek-rule);
  font-size: 0.84rem;
  color: var(--ek-muted);
}

.ek-shell-credit a {
  color: var(--ek-teal-dark);
}

.ek-shell-header a:focus-visible,
.ek-shell-footer a:focus-visible {
  outline: 2px solid var(--ek-teal);
  outline-offset: 2px;
}

@media (max-width: 900px) {
  .ek-shell-wrap {
    width: calc(100% - 32px);
  }

  .ek-shell-brand-row {
    flex-wrap: wrap;
    gap: 12px 16px;
    padding-top: 16px;
    padding-bottom: 12px;
  }

  .ek-shell-wordmark {
    font-size: 2rem;
  }

  .ek-shell-button {
    margin-left: auto;
  }

  .ek-shell-nav {
    order: 3;
    flex-basis: 100%;
    gap: 2px 18px;
    margin-left: 0;
  }

  .ek-shell-footer-inner {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 480px) {
  .ek-shell-wordmark {
    font-size: 1.7rem;
  }

  .ek-shell-button {
    padding: 8px 14px;
  }

  .ek-shell-nav {
    gap: 2px 14px;
  }

  .ek-shell-nav a {
    font-size: 0.875rem;
  }
}
