/*
Theme Name: Black Hills Nordic
Theme URI: https://blackhillsnordicski.com
Description: Child theme of Twenty Twenty-Five for the Black Hills Nordic Ski Club. Alpine editorial, logo-native: navy, Big Hill sky blue, snow, one trail-marker orange. Built by Traditionally Different Technology.
Author: Traditionally Different Technology
Author URI: https://traddiff.com
Template: twentytwentyfive
Version: 0.1.0
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 8.2
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bhnsc
*/

/* Everything visual lives in theme.json. This file exists for the header and a few
   rules theme.json cannot express yet. Keep it short; the volunteer editor never touches it. */

/* Display type: condensed uppercase with a touch of tracking, echoing the logo ring. */
.is-style-bhnsc-display,
.wp-block-post-title,
h1, h2, h3 {
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-wrap: balance;
}
h4, h5, h6 { text-transform: none; letter-spacing: 0; }

/* Eyebrow label above section titles (used by patterns). */
.bhnsc-eyebrow {
  font-family: var(--wp--preset--font-family--display);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: var(--wp--preset--font-size--small);
  color: var(--wp--preset--color--sky-deep);
}

/* Conditions module: the one thing visitors come for in winter. */
.bhnsc-conditions {
  border-left: 6px solid var(--wp--preset--color--trail-orange);
}
.bhnsc-conditions .bhnsc-conditions__embed { min-height: 12rem; }

/* Trail cards: equal height, quiet border, lift on hover. */
.bhnsc-trail-card {
  border: 1px solid var(--wp--preset--color--line);
  border-radius: 6px;
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.bhnsc-trail-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(24, 32, 72, 0.12); }

/* Skip-link and focus: visible, high-contrast, never removed. */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--wp--preset--color--trail-orange-deep); /* 4.0:1 on snow, 3.7:1 on navy; plain trail-orange was 2.9:1 on snow */
  outline-offset: 3px;
}

/* Respect reduced motion. */
@media (prefers-reduced-motion: reduce) {
  .bhnsc-trail-card { transition: none; }
  .bhnsc-trail-card:hover { transform: none; }
}

/* Header: logo ring + condensed nav, one orange action. */
.bhnsc-header .wp-block-site-logo img { border-radius: 50%; }
.bhnsc-header__title { font-size: 1.35rem; line-height: 1.05; max-width: 11rem; }
.bhnsc-nav .wp-block-navigation-item__content {
  font-family: var(--wp--preset--font-family--display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--wp--preset--color--navy);
}
.bhnsc-nav .wp-block-navigation-item__content:hover,
.bhnsc-nav .current-menu-item > .wp-block-navigation-item__content { color: var(--wp--preset--color--sky-deep); text-decoration: underline; text-underline-offset: 0.35em; text-decoration-thickness: 2px; }
.bhnsc-header__cta .wp-block-button__link { padding: 0.55em 1.1em; }
/* The one ask stays visible on phones too; keep it to one line. */
.bhnsc-header__cta .wp-block-button__link { white-space: nowrap; }
@media (max-width: 600px) { .bhnsc-header__cta .wp-block-button__link { padding: 0.5em 0.8em; font-size: 0.85rem; } .bhnsc-header__title { font-size: 1.1rem; max-width: 9rem; } }

/* Footer on navy: links stay white, labels in sky. */
.bhnsc-footer a { color: #ffffff; text-decoration-color: #a9c9e4; }
.bhnsc-footer a:hover { color: #e3eff8; }
.bhnsc-footer__label { color: var(--wp--preset--color--sky-tint); /* sky on navy was 4.5:1 short at small size */ font-size: var(--wp--preset--font-size--small); margin-bottom: var(--wp--preset--spacing--20); }
.bhnsc-footer__nav .wp-block-navigation-item__content { text-decoration: none; }
.bhnsc-footer__nav .wp-block-navigation-item__content:hover { text-decoration: underline; }
.bhnsc-footer .wp-block-site-logo img { border-radius: 50%; background: #fff; }

/* Inner page header: excerpt reads as the deck. */
.bhnsc-page-header .wp-block-post-excerpt__excerpt { max-width: 38rem; }

/* Callout: one line the reader must not miss (etiquette, a closure, a hand-off). */
.bhnsc-note {
  background: var(--wp--preset--color--sky-tint);
  border-left: 6px solid var(--wp--preset--color--trail-orange);
  border-radius: 0 6px 6px 0;
  padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30);
}
.bhnsc-note p:last-child { margin-bottom: 0; }

/* Legal text: readable, quieter, never hidden. */
.bhnsc-legal p, .bhnsc-legal li { font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--slate); }
.bhnsc-legal h2 { font-size: var(--wp--preset--font-size--large); }

/* Trail loop entries: name as a run-in heading. */
.bhnsc-loop h3 { margin-bottom: 0.25rem; }
.bhnsc-loop + .bhnsc-loop { margin-top: var(--wp--preset--spacing--30); }

/* Giving options: QR next to its button, never larger than a palm. */
.bhnsc-give { border: 1px solid var(--wp--preset--color--line); border-radius: 6px; }
.bhnsc-give .wp-block-image img { max-width: 168px; height: auto; }

/* Map embed. */
.bhnsc-map iframe { width: 100%; aspect-ratio: 16 / 10; border: 0; border-radius: 6px; }

/* Placeholders (Nordic Pulse, Brevo) are visibly provisional, not blank space. */
.bhnsc-conditions__placeholder,
.bhnsc-newsletter--placeholder {
  border: 2px dashed var(--wp--preset--color--sky);
  border-radius: 6px;
  padding: var(--wp--preset--spacing--30);
  color: var(--wp--preset--color--sky-deep);
  text-align: center;
}
.bhnsc-conditions .bhnsc-conditions__embed { min-height: 0; }
.bhnsc-conditions__placeholder p:last-child, .bhnsc-newsletter--placeholder p:last-child { margin-bottom: 0; }

/* Hero: the headline sits on the navy side of the fade, never on bare snow. */
.bhnsc-hero .wp-block-cover__inner-container > .wp-block-group { max-width: 40rem; }
.bhnsc-hero h1 { text-shadow: 0 2px 24px rgba(24, 32, 72, 0.45); }
.bhnsc-hero { min-height: clamp(30rem, 72vh, 46rem) !important; }

/* Conditions module, wide two-column: the embed slot reads as a map-sized panel even while empty. */
.bhnsc-conditions__slot .bhnsc-conditions__embed { height: 100%; }
.bhnsc-conditions__slot .bhnsc-conditions__placeholder {
  min-height: 18rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--wp--preset--color--white);
}
.bhnsc-conditions__slot iframe { border-radius: 6px; background: var(--wp--preset--color--white); }
/* Eric 2026-11-30: text above, Nordic Pulse full width and taller (Home + Ski Trails). */
.bhnsc-conditions > .wp-block-columns { flex-direction: column; flex-wrap: nowrap; }
.bhnsc-conditions > .wp-block-columns > .wp-block-column { flex-basis: auto !important; width: 100%; }
.bhnsc-conditions > .wp-block-columns > .wp-block-column:not(.bhnsc-conditions__slot) { max-width: 48rem; }
.bhnsc-conditions__slot iframe { min-height: 44rem !important; }
@media (max-width: 600px) { .bhnsc-conditions__slot iframe { min-height: 36rem !important; } }
/* Same wide panel inside narrow page columns (Ski Trails); parent is centred, so centre on it. */
.bhnsc-conditions.alignwide {
  --bhnsc-cond-w: min(76rem, calc(100vw - 2.5rem));
  width: var(--bhnsc-cond-w);
  max-width: none !important;
  margin-left: calc(50% - var(--bhnsc-cond-w) / 2) !important;
  margin-right: calc(50% - var(--bhnsc-cond-w) / 2) !important;
}
@media (max-width: 781px) { .bhnsc-conditions__slot .bhnsc-conditions__placeholder { min-height: 10rem; } }
@media (max-width: 600px) {
  .bhnsc-conditions { padding-left: var(--wp--preset--spacing--30) !important; padding-right: var(--wp--preset--spacing--30) !important; }
}
