/*
 * Pacific Pathway — shared site chrome: design tokens, logo, header and footer.
 * Loaded by every page that shows the site header/footer (public pages via
 * components/site-head.php, admin pages via components/chrome-head.php).
 */

/* ===================== Tokens ===================== */
:root {
  --sand: #faf5ee;
  --sand-deep: #f3ebdf;
  --paper: #ffffff;
  --ink: #10282b;
  --ink-soft: #34494c;
  --muted: #5b6e70;
  --line: #e7ddcf;
  --line-soft: #efe7db;

  --lagoon: #0f6e6a;
  --lagoon-deep: #0b3f3d;
  --lagoon-ink: #072b2a;
  --lagoon-tint: #e2efec;
  --lagoon-mist: #f0f6f4;

  --coral: #e2725b;
  --coral-deep: #b4442f;
  --coral-tint: #fbe6df;

  --success-bg: #e3f3e8;
  --success-ink: #1d6b3a;
  --error-bg: #fbe4e1;
  --error-ink: #9b2c1f;

  --font-sans: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Fraunces', Georgia, 'Times New Roman', serif;

  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --shadow-sm: 0 1px 2px rgba(16, 40, 43, 0.06), 0 2px 8px rgba(16, 40, 43, 0.04);
  --shadow: 0 2px 4px rgba(16, 40, 43, 0.04), 0 12px 32px rgba(16, 40, 43, 0.08);
  --shadow-lg: 0 24px 60px rgba(11, 63, 61, 0.16);

  --container: 1160px;
  --gutter: clamp(1rem, 4vw, 2rem);
  --section-space: clamp(4rem, 9vw, 7rem);
  --header-h: 72px;
  --admin-bar-h: 0px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

body.admin-logged-in {
  --admin-bar-h: 40px;
}

/* The header and footer can sit on pages that use css/style.css (admin), so set
   the type and spacing they rely on instead of inheriting it. */
.site-header,
.site-footer {
  font-family: var(--font-sans);
  line-height: 1.65;
}

.site-header .container,
.site-footer .container {
  width: min(var(--container), 100% - 2 * var(--gutter));
  max-width: none;
  margin-inline: auto;
  padding: 0;
}

/* ===================== Skip link ===================== */
.skip-link {
  position: absolute;
  top: calc(var(--admin-bar-h) + 0.5rem);
  left: 0.5rem;
  z-index: 10000;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  color: #fff;
  transform: none;
}

/* ===================== Brand ===================== */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--lagoon);
  text-decoration: none;
}

.brand:hover {
  color: var(--lagoon-deep);
}

.brand-mark {
  flex: none;
  width: 38px;
  height: 38px;
}

.brand-name {
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 600;
  font-style: italic;
  letter-spacing: -0.01em;
  line-height: 1;
  white-space: nowrap;
}

.brand--light {
  color: var(--sand);
}

.brand--light .brand-name {
  color: var(--sand);
}

/* ===================== Header ===================== */
.site-header {
  position: sticky;
  top: var(--admin-bar-h);
  z-index: 900;
  background: rgba(250, 245, 238, 0.86);
  border-bottom: 1px solid rgba(231, 221, 207, 0.8);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--header-h);
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}

.site-nav a:hover {
  background: var(--sand-deep);
  color: var(--ink);
}

.site-nav .is-current > a {
  color: var(--lagoon);
  background: var(--lagoon-tint);
}

.site-nav .is-cta {
  margin-left: 0.5rem;
}

.site-nav .is-cta > a {
  padding-inline: 1.25rem;
  background: var(--lagoon);
  color: #fff;
}

.site-nav .is-cta > a:hover,
.site-nav .is-cta.is-current > a {
  background: var(--lagoon-deep);
  color: #fff;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  padding: 0.5rem 1rem;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
}

.nav-toggle-bars {
  display: inline-grid;
  gap: 4px;
  width: 18px;
}

.nav-toggle-bars span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* navigation.js closes the menu above 900px, so the breakpoint matches it */
@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    padding: 0.75rem var(--gutter) 1.25rem;
    background: var(--sand);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px rgba(16, 40, 43, 0.08);
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
  }

  .site-nav a {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 1.05rem;
  }

  .site-nav .is-cta {
    margin: 0.5rem 0 0;
  }

  .site-nav .is-cta > a {
    justify-content: center;
    border-radius: 999px;
  }
}

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

  .nav-toggle-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }
}

/* ===================== Footer ===================== */
.site-footer {
  position: relative;
  margin-top: auto;
  padding: clamp(3.5rem, 7vw, 5rem) 0 2rem;
  background: var(--lagoon-ink);
  color: rgba(250, 245, 238, 0.78);
  font-size: 0.98rem;
  overflow: hidden;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--lagoon), var(--coral) 55%, #f2a48f);
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(250, 245, 238, 0.14);
}

.footer-tagline {
  max-width: 34ch;
  margin-top: 1.1rem;
  color: rgba(250, 245, 238, 0.72);
}

.footer-heading {
  margin: 0 0 0.9rem;
  line-height: 1.15;
  color: #f6b4a3;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.footer-nav ul {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a:not(.btn):not(.brand) {
  color: rgba(250, 245, 238, 0.9);
  text-decoration: none;
}

.site-footer a:not(.btn):not(.brand):hover {
  color: #fff;
  text-decoration: underline;
}

.footer-connect {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.9rem;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.footer-link-icon {
  flex: none;
  width: 1.1em;
  height: 1.1em;
}

.footer-bottom {
  display: grid;
  gap: 0.6rem;
  padding-top: 1.75rem;
  font-size: 0.88rem;
  color: rgba(250, 245, 238, 0.6);
}

.footer-copy {
  color: rgba(250, 245, 238, 0.78);
}

.footer-disclaimer {
  max-width: 80ch;
}

@media (max-width: 820px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }

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

@media (max-width: 480px) {
  .footer-top {
    grid-template-columns: 1fr;
  }
}
