/* ==========================================
   SCRIBARIUM — SHARED UI
   Navbar, Footer and common components
   ========================================== */

:root {
  --shell-bg: var(--paper, #faf9f6);
  --shell-text: var(--ink, #20201e);
  --shell-muted: var(--muted, #77756f);
  --shell-border: var(--line, #e5e2dc);
  --shell-accent: var(--shell-text);
  --shell-accent-text: #ffffff;
}

/* Accessibility */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 20px;
  z-index: 1000;
  padding: 12px 18px;
  background: var(--shell-text);
  color: white;
}

.skip-link:focus {
  top: 12px;
}

:focus-visible {
  outline: 2px solid var(--shell-accent);
  outline-offset: 3px;
}

/* ==========================================
   HEADER
   ========================================== */

.shell-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--shell-bg);
  border-bottom: 1px solid var(--shell-border);
}

.shell-header-inner {
  min-height: 76px;
  display: grid;
  grid-template-columns:
    max-content
    minmax(160px, 1fr)
    max-content;
  align-items: center;
  gap: 26px;
}

/* Brand */

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
}

.brand-symbol {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--shell-border);
  border-radius: 7px;
  font: italic 23px Georgia, serif;
}

.brand-name {
  font: 700 22px Georgia, serif;
  letter-spacing: -0.6px;
}

/* Main navigation */

.shell-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.shell-nav a {
  font-size: 16px;
  color: var(--shell-muted);
  transition: color 150ms ease;
}

.shell-nav a:hover,
.shell-nav a[aria-current="page"] {
  color: var(--shell-text);
}

.shell-nav a[aria-current="page"] {
  font-weight: 650;
}

/* Search */

.shell-search {
  display: flex;
  align-items: center;
  min-width: 0;
  max-width: 440px;
  width: 100%;
  margin: 0 auto;
  background: transparent;
  border: 1px solid var(--shell-border);
  border-radius: 7px;
  transition: border-color 150ms ease;
}

.shell-search:focus-within {
  border-color: var(--shell-text);
}

.shell-search input {
  flex: 1;
  width: 0;
  min-width: 0;
  height: 40px;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 0 12px;
  color: var(--shell-text);
  font-size: 15px;
}

.shell-search input::placeholder {
  color: var(--shell-muted);
}

.shell-search button {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  height: 40px;
  border: 0;
  background: transparent;
  color: var(--shell-muted);
}

.shell-search button:hover {
  color: var(--shell-text);
}

/* Account actions */

.shell-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 15px;
  white-space: nowrap;
}

.shell-actions a {
  font-size: 15px;
}

.login-link {
  color: var(--shell-muted);
}

.signup-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 13px;
  border-radius: 6px;
  background: var(--shell-accent);
  color: var(--shell-accent-text);
}

.signup-link:hover {
  opacity: 0.85;
}

.account-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  padding: 0;
  background: transparent;
  color: inherit;
  border: 1px solid var(--shell-border);
  border-radius: 50%;
}

.account-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

/* ==========================================
   FOOTER
   ========================================== */

.shell-footer {
  margin-top: 90px;
  padding-top: 50px;
  border-top: 1px solid var(--shell-border);
  background: var(--shell-bg);
}

.footer-main {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 45px;
  padding-bottom: 55px;
}

.footer-brand {
  max-width: 300px;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 700 25px Georgia, serif;
  letter-spacing: -0.5px;
}

.footer-symbol {
  font-style: italic;
  color: var(--shell-muted);
}

.footer-brand p {
  margin-top: 18px;
  color: var(--shell-muted);
  font-size: 16px;
  line-height: 1.8;
}

.footer-column {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.footer-column h2 {
  margin: 0 0 7px;
  font-size: 15px;
  font-weight: 700;
}

.footer-column a {
  color: var(--shell-muted);
  font-size: 15px;
  transition: color 150ms ease;
}

.footer-column a:hover {
  color: var(--shell-text);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0;
  border-top: 1px solid var(--shell-border);
  color: var(--shell-muted);
  font-size: 14px;
}

/* ==========================================
   PLACEHOLDER PAGES
   ========================================== */

.placeholder-page {
  max-width: 700px;
  padding-top: 100px;
  padding-bottom: 100px;
  text-align: center;
}

.placeholder-page h1 {
  font: 400 clamp(40px, 5vw, 65px) var(--serif);
  margin: 15px 0;
}

.placeholder-page > p:not(.eyebrow) {
  max-width: 480px;
  margin: 0 auto 30px;
  color: var(--shell-muted);
  line-height: 1.8;
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 1100px) {
  .shell-header-inner {
    grid-template-columns:
      max-content
      minmax(160px, 1fr)
      max-content;
    gap: 18px;
  }

  .shell-nav {
    display: none;
  }
}

@media (max-width: 720px) {
  .shell-header-inner {
    grid-template-columns: minmax(0, 1fr) max-content;
    grid-template-rows: 48px 44px;
    gap: 7px 12px;
    padding-top: 8px;
    padding-bottom: 12px;
  }

  .brand-link {
    grid-column: 1;
    grid-row: 1;
  }

  .shell-actions {
    grid-column: 2;
    grid-row: 1;
    gap: 10px;
  }

  .shell-search {
    grid-column: 1 / -1;
    grid-row: 2;
    max-width: none;
  }

  .signup-link {
    display: none;
  }

}

@media (max-width: 450px) {
  .brand-name {
    font-size: 19px;
  }

  .brand-symbol {
    width: 31px;
    height: 31px;
    font-size: 20px;
  }

  .footer-main {
    gap: 28px 15px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 7px;
  }

  .shell-footer {
    margin-top: 55px;
  }
}