/*
 * North Carolina Churches: Carolina blue.
 *
 * Loaded only on the NC hosts (the middleware adds this sheet and the
 * theme-nc class to every NC page). It re-tokens tokens.css, so every sheet
 * built on --lac-* turns with it; LA and the other tenants never load it.
 *
 *   Paper  #f8fafc  a cool white, so the blue reads clean
 *   Ink    #13294b  Carolina navy: text, buttons, the reader's own dot
 *   Blue   #4b9cd3  Carolina blue: marks on the map, fills, rules, pressed chips
 *   Deep   #1f6aa5  the same blue darkened to pass AA as text (5.7:1 on paper):
 *                   links and anything that must be read in colour
 *
 * Carolina blue itself is 2.8:1 on paper, so it is never used for text; a
 * mark on the map carries a navy edge to clear 3:1 as a graphic.
 */

html.theme-nc {
  --lac-paper: #ffffff;
  --lac-ink:   #13294b;
  --lac-red:   #1f6aa5;

  --lac-bg:        var(--lac-paper);
  --lac-bg-warm:   #edf3f9;
  --lac-rule:      #d3dde8;
  --lac-stone:     #b3c0cf;
  --lac-ink-3:     #4b5d75;
  --lac-ink-2:     #2d405c;

  --lac-gold:      var(--lac-red);
  --lac-gold-deep: var(--lac-ink);
  --lac-pacific:   var(--lac-red);
  --lac-sunset:    var(--lac-red);
  --lac-accent:    var(--lac-red);

  --nc-blue:  #4b9cd3;
  --nc-wash:  #e4f0fa;
  --nc-navy:  #13294b;
  --nc-type:  #3a8bc6;   /* Carolina blue deep enough for large type (3.6:1 on white; AA large) */

  /* read once by the map bundles (atlas/marks.js) */
  --map-paper: #f8fafc;
  --map-ink:   #13294b;
  --map-mark:  #4b9cd3;
  --map-mark-edge: #13294b;
  --map-water: #d2e4f3;
  --map-mark-grow: 1.7;
  --map-relief: on;
  --map-focus: /assets/data/nc-outline.json;

  background: var(--lac-paper);
}

html.theme-nc body { background: var(--lac-paper); color: var(--lac-ink); }

/* The footer's gold links were LA's; on the NC paper they were unreadable. */
html.theme-nc .site-footer .footer-primary-links a,
html.theme-nc .site-footer .footer-secondary-links a,
html.theme-nc .site-footer .footer-copyright a,
html.theme-nc .site-footer .footer-copyright .footer-ubimissa-link { color: var(--lac-red); }
html.theme-nc .site-footer .footer-primary-links a:hover,
html.theme-nc .site-footer .footer-secondary-links a:hover { color: var(--lac-ink); }
html.theme-nc .site-footer { color: var(--lac-ink-3); }

/* A pressed control is navy with white type (14:1); the gradient was LA's. */
html.theme-nc .lac-live-tab.is-active,
html.theme-nc .finder-switch a[aria-current="page"] { background: var(--nc-navy); color: #fff; box-shadow: none; }
html.theme-nc .lac-live-tab:hover,
html.theme-nc .finder-switch a:hover { background: var(--nc-wash); }

/* The site mark (the fish) is drawn in the chroma; keep it the readable blue. */
html.theme-nc ::selection { background: var(--nc-wash); color: var(--lac-ink); }

/* ── The NC header (server-drawn, functions/_lib/nc/theme.ts) ───────────── */
html.theme-nc .nc-nav { background: rgba(255, 255, 255, 0.95); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--lac-rule); box-shadow: 0 1px 0 rgba(19, 41, 75, 0.03); }
html.theme-nc .nc-nav .nav-container { max-width: 1320px; height: 64px; padding: 0 24px; display: flex; align-items: center; gap: 24px; margin: 0 auto; }
html.theme-nc .nc-nav .nc-logo { display: inline-flex; align-items: center; gap: 10px; flex: none; color: var(--lac-ink); text-decoration: none; letter-spacing: 0; }
html.theme-nc .nc-nav .nc-mark { width: 30px; height: 30px; color: var(--nc-blue); flex: none; }
html.theme-nc .nc-nav .site-name { font-family: var(--lac-display); font-weight: 700; font-size: 21px; line-height: 1; color: var(--lac-ink); white-space: nowrap; }
html.theme-nc .nc-nav .nc-logo:hover .site-name { color: var(--lac-red); }
html.theme-nc .nc-nav .nav-links { display: flex; align-items: center; gap: 2px; margin-left: auto; }
html.theme-nc .nc-nav .nav-link {
  position: relative; padding: 8px 11px; border: 0; border-radius: 2px; background: none;
  font: 500 15px/1 var(--lac-ui); letter-spacing: 0.01em; text-transform: none; color: var(--lac-ink-2); text-decoration: none;
}
html.theme-nc .nc-nav .nav-link:hover { color: var(--lac-ink); background: var(--nc-wash); }
html.theme-nc .nc-nav .nav-link[aria-current="page"] { color: var(--lac-ink); font-weight: 600; background: none; }
html.theme-nc .nc-nav .nav-link[aria-current="page"]::after { content: ""; position: absolute; left: 11px; right: 11px; bottom: -13px; height: 3px; background: var(--nc-blue); }
html.theme-nc .nc-nav .nc-nav-gap { width: 1px; height: 20px; margin: 0 8px; background: var(--lac-rule); }
html.theme-nc .nc-nav .nc-join { margin-left: 10px; padding: 8px 12px; border: 1px solid var(--lac-rule); color: var(--lac-ink-2); font-weight: 600; }
html.theme-nc .nc-nav .nc-join:hover { border-color: var(--nc-navy); background: none; color: var(--lac-ink); }
html.theme-nc .nc-nav .nc-lang { display: inline-flex; margin-left: 10px; border: 1px solid var(--lac-rule); border-radius: 2px; overflow: hidden; }
html.theme-nc .nc-nav .nc-lang a { padding: 7px 9px; font: 600 12px/1 var(--lac-ui); letter-spacing: 0.06em; color: var(--lac-ink-3); text-decoration: none; }
html.theme-nc .nc-nav .nc-lang a[aria-current="true"] { background: var(--nc-navy); color: #fff; }
html.theme-nc .nc-nav .nc-lang a:not([aria-current]):hover { background: var(--nc-wash); color: var(--lac-ink); }
html.theme-nc .nc-nav .nav-menu-toggle { color: var(--lac-ink); }
html.theme-nc .nc-nav a:focus-visible, html.theme-nc .nc-nav button:focus-visible { outline: 2px solid var(--lac-red); outline-offset: 2px; }

@media (min-width: 769px) and (max-width: 1120px) {
  html.theme-nc .nc-nav .nav-container { gap: 12px; padding: 0 16px; }
  html.theme-nc .nc-nav .site-name { font-size: 18px; }
  html.theme-nc .nc-nav .nav-link { padding: 8px 7px; font-size: 14px; }
  html.theme-nc .nc-nav .nc-join { display: none; }
  html.theme-nc .nc-nav .nc-nav-gap { margin: 0 4px; }
}
@media (max-width: 768px) {
  html.theme-nc .nc-nav .nav-container { height: 60px; padding: 0 12px 0 16px; }
  html.theme-nc .nc-nav .site-name { font-size: 19px; }
  html.theme-nc .nc-nav .nc-mark { width: 26px; height: 26px; }
  html.theme-nc .nc-nav .nav-links { margin-left: 0; background: var(--lac-paper) !important; padding: 84px 24px 40px !important; }
  html.theme-nc .nc-nav .nav-links { align-items: stretch !important; }
  html.theme-nc .nc-nav .nav-links .nav-link { display: block !important; width: 100%; text-align: left !important; font: 600 22px/1.2 var(--lac-display) !important; color: var(--lac-ink) !important; padding: 14px 0 !important; border-bottom: 1px solid var(--lac-rule) !important; text-transform: none !important; letter-spacing: 0 !important; }
  html.theme-nc .nc-nav .nav-link[aria-current="page"]::after { left: auto; right: 0; top: 50%; bottom: auto; width: 8px; height: 8px; border-radius: 50%; transform: translateY(-50%); }
  html.theme-nc .nc-nav .nc-nav-gap { display: none; }
  html.theme-nc .nc-nav .nav-links .nc-join { margin: 22px 0 0; border: 1px solid var(--nc-navy) !important; text-align: center !important; font: 600 16px/1 var(--lac-ui) !important; padding: 14px !important; border-radius: 2px; }
  html.theme-nc .nc-nav .nc-lang { margin: 16px 0 0; align-self: flex-start; }
  html.theme-nc .nc-nav .nc-lang a { padding: 10px 16px; font-size: 14px; }
}

/* The home page's old script adds a second fish to the logo; the NC header already draws one. */
html.theme-nc .nc-nav .lac-logo-mark { display: none !important; }

/* A church's description, written from its own words (church pages) */
html.theme-nc .lac-parish-about { margin: 22px 0 6px; padding: 18px 20px; background: var(--nc-wash); border-left: 3px solid var(--nc-blue); border-radius: 2px; }
html.theme-nc .lac-parish-about p { margin: 0 0 10px; font-family: var(--lac-serif); font-size: 18px; line-height: 1.6; color: var(--lac-ink); }
html.theme-nc .lac-parish-about .lac-about-src { margin: 4px 0 0; font: 13px var(--lac-ui); color: var(--lac-ink-3); }

/* The wordmark in two tones, after the University's own cards: the state in Carolina blue, the rest in navy. */
html.theme-nc .nc-nav .nc-wm-blue { color: var(--nc-type); }
html.theme-nc .nc-nav .nc-logo:hover .site-name, html.theme-nc .nc-nav .nc-logo:hover .nc-wm-blue { color: var(--lac-ink); }
/* Page titles in Carolina blue (large type only: 38px finder, 34px+ church pages). */
html.theme-nc .ncf .ncf-head h1, html.theme-nc .lac-parish-nc h1, html.theme-nc .lac-nc-places h1 { color: var(--nc-type); }
