/**
 * fidelis-base.css
 * Fidelis Catholic Credit Union — Base Layer
 *
 * HOSTED AT: https://assets.fideliscu.org/css/fidelis-base.css
 *
 * ─── ⚠ WHERE NOT TO LOAD THIS ───
 * NEVER load this file inside a Blossom CMS HTML block. It sets
 * element-level styles (body, headings, p, a) that will override
 * the CMS template's header, footer, and neighbouring blocks.
 *
 * ─── WHERE TO LOAD IT ───
 * Standalone pages only (go.fideliscu.org / go.fdl.is), AFTER
 * fidelis-tokens.css and BEFORE page-specific styles:
 *
 *   <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Barlow:wght@300;400;500;600;700&family=EB+Garamond:ital,wght@0,400;0,500;0,600;1,400&display=swap">
 *   <link rel="stylesheet" href="https://assets.fideliscu.org/css/fidelis-tokens.css">
 *   <link rel="stylesheet" href="https://assets.fideliscu.org/css/fidelis-base.css">
 *
 * The font <link> is deliberately not an @import here — @import
 * blocks rendering and stacks serially behind this file.
 *
 * Last updated: 2026-08
 */


@import url("https://fonts.googleapis.com/css2?family=Barlow:wght@300;400;500;600;700&family=EB+Garamond:ital,wght@0,400;0,500;0,600;1,400&display=swap");


/* ============================================================
   RESET
   ============================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
}


/* ============================================================
   ELEMENTS
   ============================================================ */

body {
  margin:                   0;
  font-family:              var(--fdl-font-body);
  font-size:                var(--fdl-text-base);
  font-weight:              var(--fdl-weight-regular);
  line-height:              var(--fdl-leading-body);
  color:                    var(--fdl-color-text);
  background-color:         var(--fdl-color-bg);
  -webkit-font-smoothing:   antialiased;
  -moz-osx-font-smoothing:  grayscale;
}

/* Headlines use the display serif; body copy matches Blossom exactly.
   This is the seam-hiding trick: paragraphs read identically on a
   landing page and a CMS page, headlines stay elevated. */
h1, h2, h3, h4 {
  margin:        0 0 var(--fdl-space-4);
  font-family:   var(--fdl-font-display);
  font-weight:   var(--fdl-weight-regular);
  line-height:   1.2;
  color:         var(--fdl-color-text-heading);
}

h5, h6 {
  margin:        0 0 var(--fdl-space-3);
  font-family:   var(--fdl-font-body);
  font-weight:   var(--fdl-weight-semibold);
  line-height:   1.3;
  color:         var(--fdl-color-text-heading);
}

p {
  margin:      0 0 var(--fdl-space-4);
  line-height: var(--fdl-leading-body);
}

/* Lead paragraph — hero subs and section intros */
.lead {
  font-size:   var(--fdl-text-lg);
  line-height: 1.55;
}

a {
  color:           var(--fdl-color-primary);
  text-decoration: none;
  transition:      color var(--fdl-transition-fast);
}

a:hover {
  color: var(--fdl-color-primary-hover);
}

img,
picture,
video {
  max-width: 100%;
  height:    auto;
}


/* ============================================================
   ACCESSIBILITY BASELINE
   ============================================================ */

/* Visible keyboard focus on every interactive element */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline:        3px solid var(--fdl-color-focus);
  outline-offset: 2px;
  border-radius:  var(--fdl-radius-sm);
}

/* Skip link — place as the first element inside <body>,
   with <main id="main-content" tabindex="-1"> as the target.
   Satisfies WCAG 2.4.1 Bypass Blocks. */
.fdl-skip-link {
  position:        absolute;
  left:            -9999px;
  top:             0;
  z-index:         var(--fdl-z-toast);
  padding:         12px 20px;
  background:      var(--fdl-color-primary-dark);
  color:           var(--fdl-color-text-inverse);
  font-weight:     var(--fdl-weight-bold);
  text-decoration: none;
  border-radius:   0 0 var(--fdl-radius-md) 0;
}
.fdl-skip-link:focus {
  left:  0;
  color: var(--fdl-color-text-inverse);
}

/* Screen-reader-only text */
.fdl-sr-only {
  position:  absolute;
  width:     1px;
  height:    1px;
  padding:   0;
  margin:    -1px;
  overflow:  hidden;
  clip:      rect(0, 0, 0, 0);
  white-space: nowrap;
  border:    0;
}

/* Smooth scroll, but only for visitors who haven't asked otherwise */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration:        0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration:       0.01ms !important;
    scroll-behavior:           auto !important;
  }
}


/* ============================================================
   SECTION MODIFIERS
   Match Blossom's common section background patterns.
   ============================================================ */

.fdl-section {
  padding: var(--fdl-space-16) var(--fdl-padding-mobile);
}

@media (min-width: 768px) {
  .fdl-section {
    padding-left:  var(--fdl-padding-tablet);
    padding-right: var(--fdl-padding-tablet);
  }
}

@media (min-width: 1200px) {
  .fdl-section {
    padding-left:  var(--fdl-padding-desktop);
    padding-right: var(--fdl-padding-desktop);
  }
}

.fdl-section--white {
  background-color: var(--fdl-color-bg);
}

.fdl-section--subtle {
  background-color: var(--fdl-color-bg-subtle);
}

.fdl-section--navy {
  background-color: var(--fdl-color-bg-dark);
  color:            var(--fdl-color-text-inverse);
}

.fdl-section--navy-deep {
  background-color: var(--fdl-color-bg-deeper);
  color:            var(--fdl-color-text-inverse);
}

.fdl-section--navy h1,
.fdl-section--navy h2,
.fdl-section--navy h3,
.fdl-section--navy h4,
.fdl-section--navy-deep h1,
.fdl-section--navy-deep h2,
.fdl-section--navy-deep h3,
.fdl-section--navy-deep h4 {
  color: var(--fdl-color-text-inverse);
}

.fdl-section--navy a,
.fdl-section--navy-deep a {
  color: var(--fdl-color-text-inverse);
  text-decoration: underline;
}

.fdl-section--navy a:focus-visible,
.fdl-section--navy-deep a:focus-visible {
  outline-color: var(--fdl-color-accent);
}
