/* ============================================================
   Cascadia.me — canonical production site frame
   Header, navigation, wordmark, share control, and footer.
   Loaded last so page surfaces cannot accidentally restyle global chrome.
   ============================================================ */

body.site-frame-page {
  --site-frame-cream: var(--cascadia-cream);
  --site-frame-cream-deep: var(--cascadia-cream-deep);
  --site-frame-ocean: var(--cascadia-ocean);
  --site-frame-text: var(--cascadia-ink);
  --site-frame-muted: var(--cascadia-muted);
  --site-frame-coral: var(--cascadia-coral);
  --site-frame-glacial: var(--cascadia-glacial);
  --site-frame-sun: var(--cascadia-sun);
  --site-frame-basalt: var(--cascadia-basalt);
  --site-frame-line: var(--cascadia-line);
}

body.site-frame-page .site-header {
  color: var(--site-frame-text);
  background: rgba(251, 247, 238, 0.94);
  border-bottom-color: rgba(6, 59, 92, 0.11);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

body.site-frame-page .site-header.scrolled {
  border-bottom-color: rgba(6, 59, 92, 0.18);
  box-shadow: 0 8px 30px rgba(6, 59, 92, 0.07);
}

body.site-frame-page .nav-inner {
  max-width: 90rem;
  gap: 1rem;
  padding-inline: clamp(1.25rem, 4vw, 3rem);
}

body.site-frame-page .nav-logo {
  color: var(--site-frame-ocean);
  font-family: 'Newsreader', Georgia, 'Times New Roman', serif;
  font-size: clamp(1.5rem, 2vw, 2rem);
  font-weight: 600;
  line-height: 1.6;
}

body.site-frame-page .nav-logo span {
  color: inherit;
  font-weight: inherit;
}

body.site-frame-page .nav-logo:hover,
body.site-frame-page .nav-links a:hover,
body.site-frame-page .nav-links a.active {
  color: var(--site-frame-coral);
}

body.site-frame-page .nav-links a {
  color: var(--site-frame-text);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

body.site-frame-page .nav-links a.active {
  border-bottom-color: var(--site-frame-coral);
}

body.site-frame-page .nav-toggle,
body.site-frame-page .nav-share-btn {
  width: 2.75rem;
  min-width: 2.75rem;
  height: 2.75rem;
  min-height: 2.75rem;
}

body.site-frame-page .nav-toggle-bar {
  background: var(--site-frame-ocean);
}

body.site-frame-page .share-button {
  color: var(--site-frame-ocean);
  background: rgba(251, 247, 238, 0.96);
  border-color: rgba(6, 59, 92, 0.18);
  box-shadow: none;
}

body.site-frame-page .share-button:hover {
  color: var(--site-frame-ocean);
  background: #e2f3f2;
  border-color: var(--site-frame-glacial);
  box-shadow: none;
}

body.site-frame-page .floating-share-btn {
  display: none;
}

@media (min-width: 1081px) {
  body.site-frame-page .nav-links {
    gap: clamp(0.55rem, 0.85vw, 0.9rem);
  }

  body.site-frame-page .nav-share-btn {
    margin-left: clamp(0.3rem, 0.7vw, 0.65rem);
  }

  body.site-frame-page .nav-utility a {
    padding: 0.45rem 0.65rem;
    border: 1px solid rgba(6, 59, 92, 0.2);
    border-radius: 999px;
  }
}

body.site-frame-page .site-footer {
  color: var(--site-frame-cream-deep);
  background: var(--site-frame-basalt);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1rem;
  line-height: 1.6;
}

body.site-frame-page .footer-inner {
  max-width: 90rem;
  padding-inline: clamp(1.25rem, 4vw, 3rem);
}

body.site-frame-page .footer-brand {
  max-width: 28rem;
}

body.site-frame-page .footer-brand h3 {
  color: var(--site-frame-cream);
  font-size: 2rem;
  font-weight: 500;
}

body.site-frame-page .footer-brand h3 span {
  color: inherit;
  font-weight: inherit;
}

body.site-frame-page .footer-brand p,
body.site-frame-page .footer-col a {
  color: rgba(251, 247, 238, 0.72);
}

body.site-frame-page .footer-col h4 {
  color: var(--site-frame-glacial);
}

body.site-frame-page .footer-col a:hover,
body.site-frame-page .footer-bottom a:hover,
body.site-frame-page .footer-col a[aria-current='page'] {
  color: var(--site-frame-sun);
}

body.site-frame-page .footer-bottom {
  color: rgba(251, 247, 238, 0.6);
  border-top-color: rgba(251, 247, 238, 0.17);
}

body.site-frame-page .seasonal-footer {
  color: rgba(242, 233, 215, 0.62);
}

body.share-dialog-open,
body.nowweplan-dialog-open {
  overflow: hidden;
}

.share-dialog {
  width: min(36rem, calc(100% - 2rem));
  max-width: none;
  max-height: calc(100dvh - 2rem);
  margin: auto;
  padding: 0;
  overflow: visible;
  border: 0;
  color: var(--site-frame-text, #24343a);
  background: transparent;
}

.share-dialog::backdrop {
  background: rgba(23, 34, 38, 0.62);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.share-dialog.is-open {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  width: auto;
  max-height: none;
  padding: 1rem;
  place-items: center;
  background: rgba(23, 34, 38, 0.62);
}

.share-dialog-card {
  display: grid;
  gap: 0.75rem;
  max-height: calc(100dvh - 2rem);
  padding: clamp(1.25rem, 4vw, 2rem);
  overflow: auto;
  border: 1px solid rgba(6, 59, 92, 0.16);
  border-radius: 0.75rem;
  background: var(--site-frame-cream, #fbf7ee);
  box-shadow: 0 26px 70px rgba(10, 30, 37, 0.28);
}

.share-dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.share-dialog h2 {
  margin: 0;
  color: var(--site-frame-ocean, #063b5c);
  font-family: 'Newsreader', Georgia, 'Times New Roman', serif;
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  font-weight: 600;
  line-height: 1.05;
}

.share-dialog-close {
  display: inline-grid;
  width: 2.75rem;
  min-width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(6, 59, 92, 0.18);
  border-radius: 999px;
  color: var(--site-frame-ocean, #063b5c);
  background: transparent;
  font: inherit;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
}

.share-dialog-message {
  width: 100%;
  min-height: 7rem;
  resize: vertical;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(6, 59, 92, 0.24);
  border-radius: 0.45rem;
  color: var(--site-frame-text, #24343a);
  background: #fffdf8;
  font: 500 0.95rem/1.55 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.share-dialog-message:focus,
.share-dialog-close:focus-visible,
.share-dialog-action:focus-visible {
  outline: 3px solid var(--site-frame-sun, #e2b93b);
  outline-offset: 2px;
}

.share-dialog-status {
  min-height: 1.35rem;
  margin: 0;
  color: var(--site-frame-muted, #5c6f76);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.8rem;
  line-height: 1.45;
}

.share-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.share-dialog-action {
  min-height: 2.75rem;
  padding: 0.65rem 0.9rem;
  border: 1px solid rgba(6, 59, 92, 0.23);
  border-radius: 0.35rem;
  color: var(--site-frame-ocean, #063b5c);
  background: transparent;
  font: 700 0.8rem/1.2 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  cursor: pointer;
}

.share-dialog-action:hover,
.share-dialog-close:hover {
  border-color: var(--site-frame-glacial, #2faab3);
  background: rgba(47, 170, 179, 0.1);
}

.share-dialog-action-primary {
  border-color: var(--site-frame-ocean, #063b5c);
  color: var(--site-frame-cream, #fbf7ee);
  background: var(--site-frame-ocean, #063b5c);
}

.share-dialog-action-primary:hover {
  color: var(--site-frame-cream, #fbf7ee);
  background: #0b5277;
}

.share-dialog-action-quiet {
  border-color: transparent;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.nowweplan-dialog-copy {
  display: grid;
  gap: 0.75rem;
  color: var(--site-frame-text, #24343a);
  font: 500 0.95rem/1.6 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.nowweplan-dialog-copy p {
  margin: 0;
}

@media (max-width: 1080px) {
  body.site-frame-page .nav-links {
    gap: 1rem;
    background: var(--site-frame-cream);
    border-bottom-color: var(--site-frame-line);
    box-shadow: 0 8px 30px rgba(6, 59, 92, 0.07);
  }

  body.site-frame-page .nav-share-btn {
    margin-left: auto;
  }
}

@media (max-width: 520px) {
  .share-dialog {
    width: min(100% - 1rem, 36rem);
    max-height: calc(100dvh - 1rem);
  }

  .share-dialog.is-open {
    padding: 0.5rem;
  }

  .share-dialog-card {
    max-height: calc(100dvh - 1rem);
    padding: 1.15rem;
  }

  .share-dialog-actions {
    display: grid;
  }

  .share-dialog-action {
    width: 100%;
  }
}

@media print {
  body.site-frame-page .site-header,
  body.site-frame-page .site-footer,
  .share-dialog {
    display: none !important;
  }
}
