/* =============================================================================
   NBWM — TN Express Web (TNEW) custom template styles
   Phase 1: branded header + footer (+ sub-footer).

   Ported from the theme SCSS (wp-content/themes/nbwm/scss/) and checked against
   the rendered live site at 1920px. Where a value came off the live DOM rather
   than the SCSS it is noted inline. Loaded AFTER TNEW's own stylesheets so these
   override.

   Breakpoints match the theme (scss/breakpoints.scss):
     medium 768   large 1024   xlarge 1200   xxlarge 1450

   Hosted at:
   https://www.whalingmuseum.org/wp-content/themes/nbwm/tnew/tnew_custom.css

   Every URL in here must be absolute — Tessitura serves the template from the
   TNEW domain, so relative paths would resolve against the wrong host.
   ========================================================================== */

:root {
  --nbwm-navy:        #1D2549;   /* $primary-color / $navy-blue                */
  --nbwm-secondary:   #4B6F95;   /* $secondary-color — mobile divider rules    */
  --nbwm-btn:         #333E94;   /* $purple-blue — button fill, matches site   */
  --nbwm-btn-hover:   #0857aa;   /* $bright-blue — button + link hover         */
  --nbwm-ctct-field:  #333E94;   /* $purple-blue — newsletter input bg         */
  --nbwm-text:        #404040;   /* $dark-gray                                 */
  --nbwm-white:       #FFFFFF;
  --nbwm-font: "Open Sans", Arial, Helvetica, sans-serif;
}

body { font-family: var(--nbwm-font); font-size: 16px; line-height: 1.8; color: var(--nbwm-text); margin: 0; }
a { color: var(--nbwm-btn); }

/* =============================================================================
   TNEW COMPONENT BRANDING — buttons and links inside .container
   -----------------------------------------------------------------------------
   Phase 1 styled the chrome only. This section re-colours Tessitura's own
   components so the purchase path reads as part of whalingmuseum.org.

   It does that WITHOUT touching Tessitura's markup or overriding their component
   rules. TNEW's stylesheet is entirely design-token driven — every colour in it
   resolves through a `--tn-*` custom property, and every literal hex is paired
   with a var() fallback. Redefining the tokens here (this file loads last) is
   the supported seam, and it survives their component updates.

   Values are NBWM's own, from the theme SCSS:
     $purple-blue  #333E94  scss/buttons.scss — button background
     $bright-blue  #0857aa  scss/buttons.scss — button hover, and link hover
                                                in scss/typography.scss
     6px radius, 700 weight, uppercase        — scss/buttons.scss

   Accessibility note: this is also a contrast win. White on Bootstrap's #337ab7
   is 4.56:1, barely over the 4.5:1 AA floor. White on #333E94 is 9.30:1, and on
   the #0857aa hover 7.11:1.
   ========================================================================== */
:root {
  /* Brand ramp. The darken steps are literal in TNEW's stylesheet (they are
     compiled Sass output, not computed), so each one needs redefining or the
     derived states fall back to Bootstrap blue. */
  --tn-brand-primary:            #333E94;
  --tn-brand-primary-darken-5:   #2c3681;
  --tn-brand-primary-darken-10:  #262e6e;
  --tn-brand-primary-darken-15:  #1f265b;
  --tn-brand-primary-darken-17:  #1d2354;
  --tn-brand-primary-darken-30:  #0c0e22;
  --tn-brand-primary-lighten-40: #afb5e4;

  /* NBWM buttons brighten on hover rather than darkening the way Bootstrap
     does, so these point at $bright-blue instead of the darken- steps. */
  --tn-btn-primary-bg-hover:        #0857aa;
  --tn-btn-primary-bg-focus:        #0857aa;
  --tn-btn-primary-bg-active:       #0857aa;
  --tn-btn-primary-bg-active-focus: #0857aa;

  /* NBWM buttons are borderless, so the border matches the fill. The focus
     border stays darker so keyboard focus is still visible on its own. */
  --tn-btn-primary-border:         #333E94;
  --tn-btn-primary-border-hover:   #0857aa;
  --tn-btn-primary-border-active:  #0857aa;
  --tn-btn-primary-border-focus:   #1d2354;

  --tn-btn-border-radius-base:  6px;
  --tn-btn-border-radius-large: 6px;
  --tn-btn-border-radius-small: 4px;
  --tn-btn-font-weight: 700;

  /* Links. The marketing site uses navy #1D2549 with a permanent underline;
     TNEW renders links with no underline at rest, so navy alone would leave
     them nearly indistinguishable from #333 body copy (WCAG 1.4.1). Keeping a
     clearly blue link colour from the same NBWM palette preserves the
     affordance, and the hover is the site's exact $bright-blue. Revisit once
     the full purchase path can be reviewed with real inventory. */
  --tn-link-color:       #333E94;
  --tn-link-color-hover: #0857aa;
}

/* The only rule here that is not a token: NBWM buttons are uppercase. Scoped to
   primary buttons inside the TNEW content area, so it cannot touch the header or
   footer, and cannot touch Tessitura's neutral `.btn-default` controls — the date
   picker is button-classed, and `.container .btn` turned it into "AUGUST 2026"
   while the heading beneath it still read "August 2026".
   If any CTA label in the live purchase path reads badly in caps, delete this one
   rule — nothing else depends on it. */
.container .btn-primary { text-transform: uppercase; }

/* =============================================================================
   LOGO (shared by header + footer)
   The real NBWM lockup: viewBox 0 0 393.69 106.02, aspect ratio ~3.71:1.
   Paths carry no fill of their own, so they inherit currentColor.
   ========================================================================== */
.nbwm-logo { display: block; line-height: 0; font-size: 0; text-decoration: none; color: var(--nbwm-white); }
.nbwm-logo__mark { display: block; width: 100%; height: auto; fill: currentColor; }

/* The logo is not a hover affordance — it must never tint or fade in either the
   header or the footer. The marks inherit `currentColor`, so the generic
   `.nbwm-footer a:hover` rule would otherwise dim the whole lockup. Specificity
   here (two classes + pseudo-class) deliberately beats it, so these stay correct
   regardless of where they sit in the file. */
.nbwm-header .nbwm-logo:hover, .nbwm-header .nbwm-logo:focus,
.nbwm-footer .nbwm-logo:hover, .nbwm-footer .nbwm-logo:focus {
  color: var(--nbwm-white);
}
/* Nothing to animate, and it must not inherit the footer link transition. */
.nbwm-header .nbwm-logo, .nbwm-header .nbwm-logo .nbwm-logo__mark,
.nbwm-footer .nbwm-logo, .nbwm-footer .nbwm-logo .nbwm-logo__mark { transition: none; }

/* =============================================================================
   HEADER  (full-width navy bar; logo left, top-level nav right)
   Live #top-bar is exactly 110px tall with 19px/700 nav links whose 48px padding
   makes them 114px — they overflow the bar by 2px top and bottom, invisibly,
   because both are navy. Reproduced rather than "corrected" so the bar height
   and the link rhythm both match.
   Logo: the live #top-bar .logo is max-width 230px → 330px across 1024 → 1450,
   but that box INCLUDES its 45px left padding. Here that padding lives on
   .nbwm-header__inner instead, so the artwork values are 45px smaller — 185px →
   285px, landing at exactly 285 x 76.75 like the live site.
   ========================================================================== */
.nbwm-header { background: var(--nbwm-navy); color: var(--nbwm-white); position: relative; }
.nbwm-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 45px;                    /* matches .logo padding-left at large */
  height: 110px;
}
.nbwm-header .nbwm-logo { flex: 0 0 auto; width: 100%; max-width: 185px; }
@media (min-width: 1024px) { .nbwm-header .nbwm-logo { max-width: calc(185px + 100 * (100vw - 1024px) / 426); } }
@media (min-width: 1450px) { .nbwm-header .nbwm-logo { max-width: 285px; } }

.nbwm-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; }
.nbwm-nav a {
  color: var(--nbwm-white); text-decoration: none;
  font-size: 19px; font-weight: 700; line-height: 18px;
  text-transform: uppercase; letter-spacing: normal;
  padding: 48px 20px;
  display: block;
  transition: all .3s ease-in-out;
}
.nbwm-nav a:hover, .nbwm-nav a:focus { color: rgba(255,255,255,.6); }

.nbwm-nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 10px; color: var(--nbwm-white); }
.nbwm-nav-toggle span { display: block; width: 26px; height: 3px; margin: 5px 0; background: var(--nbwm-white); }

/* =============================================================================
   TNEW CONTENT AREA — Tessitura injects the purchase path into .container.
   Only spacing is set here; TNEW's own Bootstrap supplies the width.
   ========================================================================== */
.container { padding-top: 28px; padding-bottom: 48px; }

/* =============================================================================
   FOOTER (navy)
   Live layout at >=1024 is a CSS grid:
     grid-template-areas: "logo nav social" / "contact nav social"
     grid-template-columns: .35fr 1fr auto   (resolves to 315 / 900 / 360 @1920)
     column-gap fluid 30px -> 130px across 1024 -> 1450
   The logo is right-aligned in its column and the address block hangs off its
   right edge (max-width 184px, margin-left auto) — that indent is deliberate.
   ========================================================================== */
.nbwm-footer { background: var(--nbwm-navy); color: var(--nbwm-white); padding: 60px 35px; }
/* No max-width: the live footer and sub-footer are full-bleed, unlike the
   page content, which TNEW constrains with its own Bootstrap .container. */
.nbwm-footer__inner { width: 100%; }
.nbwm-footer a { color: var(--nbwm-white); text-decoration: none; transition: all .3s ease-in-out; }
.nbwm-footer a:hover { color: rgba(255,255,255,.6); }

/* --- mobile first: single centred stack --- */
.nbwm-footer .nbwm-logo { margin: 0 auto; max-width: 256px; }
.nbwm-footer__addr {
  font-size: 15px; line-height: 28.5px; font-weight: 400;   /* 15px x 1.9 */
  text-transform: uppercase; text-align: center;
  margin: 2em 0 2.7em; padding: 0 0 2.5em;
  border-bottom: 2px solid var(--nbwm-secondary);
}
/* The phone is the one emphatic line in the address block: 21px/700, own row. */
.nbwm-footer__addr a { display: block; font-size: 21px; font-weight: 700; text-decoration: none; }
.nbwm-footer__addr a:hover { color: rgba(255,255,255,.5); }

.nbwm-footer__nav { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.nbwm-footer .column a {
  display: block;
  font-size: 15px; line-height: 28.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: normal;
}

@media (min-width: 768px) {
  .nbwm-footer .nbwm-logo { margin: 0 0 0 30px; max-width: 314px; }
  .nbwm-footer__addr { text-align: left; margin: 2em 0 2.7em auto; max-width: 184px; border: none; padding: 0; }
  .nbwm-footer__nav { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1024px) {
  .nbwm-footer { padding: 80px 35px; }
  .nbwm-footer__inner {
    display: grid;
    grid-template-areas: "logo nav social" "contact nav social";
    grid-template-columns: .35fr 1fr auto;
    column-gap: calc(30px + 100 * (100vw - 1024px) / 426);
  }
  .nbwm-footer .nbwm-logo {
    grid-area: logo; margin: 0; width: 100%; justify-self: flex-end;
    max-width: calc(224px + 90 * (100vw - 1024px) / 176);
  }
  /* Keeps the 184px cap and the auto left margin from the 768 rule, so the block
     right-aligns under the logo — that is what the live site actually renders,
     even though footer.scss nominally clears max-width at this breakpoint. */
  .nbwm-footer__addr { grid-area: contact; }
  .nbwm-footer__nav  { grid-area: nav; }
  .nbwm-footer .column { margin-bottom: 2em; }
  .nbwm-connect      { grid-area: social; }
}
@media (min-width: 1200px) { .nbwm-footer .nbwm-logo { max-width: 314px; } }
@media (min-width: 1450px) { .nbwm-footer__inner { column-gap: 130px; } }

/* -----------------------------------------------------------------------------
   Social icons.
   Glyphs are the official Font Awesome 6 brand paths for the exact four icons
   the live site renders — instagram (U+F16D), facebook-f (U+F39E, a bare "f",
   not the rounded square), youtube (U+F167) and tiktok (U+E07B). Confirmed by
   reading the ::before codepoints off the live DOM. Drawn as inline SVG at the
   same size the webfont renders (height = the 30px font-size; each icon keeps
   its own advance width via its viewBox), so no FontAwesome kit is loaded on a
   checkout page.
   -------------------------------------------------------------------------- */
.nbwm-connect { width: 100%; }
.nbwm-social {
  display: flex; flex-direction: row; flex-wrap: nowrap;
  justify-content: space-between;
  max-width: 290px; margin: 0 auto;
}
.nbwm-social a {
  width: 35px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  color: var(--nbwm-white);
}
.nbwm-social a:hover { color: rgba(255,255,255,.6); }
.nbwm-social svg { height: 30px; width: auto; fill: currentColor; transition: all .3s ease-in-out; }

.nbwm-newsletter { width: 100%; margin: 2.2em auto 0; }

@media (min-width: 400px) { .nbwm-connect { width: 360px; margin: 0 auto; } }

@media (min-width: 1024px) {
  .nbwm-connect { width: calc(220px + 140 * (100vw - 1024px) / 176); margin: 0; }
  .nbwm-social { justify-content: center; max-height: 50px; }
  .nbwm-social a { margin: 0 calc(2px + 8 * (100vw - 1024px) / 176); }
  .nbwm-social a:first-child { margin-left: 0; }
  .nbwm-social a:last-child  { margin-right: 0; }
  .nbwm-social svg { height: calc(20px + 10 * (100vw - 1024px) / 176); }
  /* Live stacks the form 88px from the top of the social cell; the icon row is
     capped at 50px, leaving this gap. */
  .nbwm-newsletter { margin-top: 38px; }
}
@media (min-width: 1200px) {
  .nbwm-connect { width: 360px; }
  .nbwm-social a { margin: 0 10px; }
  .nbwm-social a:first-child { margin-left: 0; }
  .nbwm-social a:last-child  { margin-right: 0; }
  .nbwm-social svg { height: 30px; }
}

/* -----------------------------------------------------------------------------
   Newsletter — real Constant Contact inline form (widget renders into
   .ctct-inline-form). Rules ported from scss/constant-contact.scss.
   Difference from the main site: the submit glyph there is a FontAwesome \f124
   (location-arrow). TNEW pages do not load the FontAwesome kit, so the same
   arrow is inlined below as an SVG data URI — no font dependency.
   -------------------------------------------------------------------------- */
div.ctct-form-embed div.ctct-form-defaults {
  position: relative !important;
  padding: 0 !important;
  background: transparent !important;
}
div.ctct-form-embed div.ctct-form-defaults h2.ctct-form-header {
  margin-bottom: 25px !important;
  color: var(--nbwm-white) !important;
  font-family: var(--nbwm-font) !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  text-align: center !important;
}
div.ctct-form-embed div.ctct-form-defaults input.ctct-form-element {
  padding-right: 60px !important;
  color: rgba(255,255,255,.85) !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  font-family: var(--nbwm-font) !important;
  border: 1px solid rgba(255,255,255,.25) !important;
  border-radius: 6px !important;
  background: var(--nbwm-ctct-field) !important;
  box-shadow: none !important;
}
div.ctct-form-embed div.ctct-form-defaults input.ctct-form-element::placeholder {
  font-size: 16px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  font-family: var(--nbwm-font) !important;
  color: var(--nbwm-white) !important;
}
div.ctct-form-embed div.ctct-form-defaults #gdpr_text,
div.ctct-form-embed div.ctct-form-defaults p.ctct-form-footer { display: none !important; }

/* The main site hides this label with display:none, which strips the field's
   accessible name (the CC widget ships no placeholder either — the box reads as
   an unlabelled edit field). Hide it visually but keep it for screen readers;
   the template script adds the matching visible placeholder. */
div.ctct-form-embed div.ctct-form-defaults label.ctct-form-label {
  position: absolute !important;
  width: 1px !important; height: 1px !important;
  margin: -1px !important; padding: 0 !important;
  overflow: hidden !important; white-space: nowrap !important;
  clip: rect(0 0 0 0) !important; clip-path: inset(50%) !important;
  border: 0 !important;
}

div.ctct-form-embed div.ctct-form-defaults .ctct-form-button {
  position: absolute !important;
  width: auto !important;
  text-indent: -9999px;
  background: transparent !important;
  bottom: 2px; right: 0;
  padding: 14px 30px !important;
  border: none !important;
  cursor: pointer;
}
div.ctct-form-embed div.ctct-form-defaults .ctct-form-button:before {
  position: absolute;
  text-indent: 0;
  top: 50%; left: 50%;
  margin-top: -8px; margin-left: -8px;
  width: 16px; height: 16px;
  content: '';
  background: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20fill='%23ffffff'%3E%3Cpath%20d='M15.6.4%20.7%206.9c-.5.2-.5.9%200%201.1l5.6%202%202%205.6c.2.5.9.5%201.1%200L15.6.4z'/%3E%3C/svg%3E") no-repeat center / contain;
}
div.ctct-form-embed div.ctct-form-defaults .ctct-form-text { color: #707070; }

/* Consent/privacy microcopy — stands in for CC's own form footer, which is
   hidden above to match the main site's footer treatment. */
.nbwm-newsletter__note { display: block; margin-top: 10px; font-size: 12px; line-height: 1.6; opacity: .8; }
.nbwm-newsletter__note a { text-decoration: underline; }

/* Fallback shown only if the Constant Contact widget fails to load/render. */
.nbwm-newsletter__fallback { display: none; }
.nbwm-newsletter.is-fallback .nbwm-newsletter__fallback { display: block; }
.nbwm-newsletter__fallback h4 {
  font-size: 18px; line-height: 27px; font-weight: 700; text-transform: uppercase;
  margin: 0 0 16px; text-align: center;
}
.nbwm-newsletter__fallback a.nbwm-btn {
  display: inline-block;
  background: var(--nbwm-btn); color: var(--nbwm-white);
  font-weight: 700; text-transform: uppercase; letter-spacing: .02em;
  padding: 11px 18px; text-decoration: none;
}
.nbwm-newsletter__fallback a.nbwm-btn:hover { background: var(--nbwm-btn-hover); color: var(--nbwm-white); }

/* =============================================================================
   SUB-FOOTER (white). Live: padding 35px 30px, align-items centre, copyright
   first (order 0) then the partner logos. Copyright 14px/1.3 UPPERCASE navy,
   on two lines. Partner logos render at their natural size.
   ========================================================================== */
.nbwm-subfooter { background: var(--nbwm-white); padding: 35px 30px; font-size: 11px; color: var(--nbwm-navy); text-align: center; }
.nbwm-subfooter__inner { width: 100%; }
.nbwm-copyright { color: var(--nbwm-navy); font-size: 14px; line-height: 1.3; text-transform: uppercase; }
.nbwm-copyright p { margin: 0; }
.nbwm-copyright a { color: var(--nbwm-navy); text-decoration: underline; }
.nbwm-partners img { max-width: 100%; height: auto; display: block; }

@media (min-width: 1024px) {
  .nbwm-subfooter { text-align: left; }
  .nbwm-subfooter__inner { display: flex; flex-direction: row; flex-wrap: nowrap; align-items: center; }
  .nbwm-copyright { order: 0; flex: 1 0 auto; }
  .nbwm-partners { order: 1; display: flex; align-items: center; flex: 1; justify-content: flex-end; }
  .nbwm-partners a { margin: 0 0 0 3em; }
}
@media (max-width: 1023px) {
  .nbwm-partners { display: flex; flex-direction: column; align-items: center; gap: 3.5em; margin-top: 3.5em; }
}

/* =============================================================================
   RESPONSIVE — header
   Nav collapses to a hamburger once the full-size (19px) nav no longer fits.
   ========================================================================== */
@media (max-width: 1300px) {
  .nbwm-nav-toggle { display: block; }
  .nbwm-header__inner { padding: 0 24px; height: auto; min-height: 88px; }
  .nbwm-header .nbwm-logo { max-width: 200px; }
  .nbwm-nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--nbwm-navy); display: none; z-index: 50; }
  .nbwm-nav.is-open { display: block; }
  .nbwm-nav ul { flex-direction: column; align-items: stretch; padding: 6px 24px 18px; }
  .nbwm-nav li { border-bottom: 1px solid rgba(255,255,255,.18); }
  .nbwm-nav a { padding: 14px 0; font-size: 16px; line-height: 1.2; }
}
