/* Styling that recurs across page types: the header and footer designs, the Black Friday band under the header, the
   blinking title cursor, and the roles every page type shows the same way: text links on a light surface, the selected
   item, the keyboard focus ring and the hero heading, label and description. Every page loads this file before its own stylesheet, which keeps only
   the page type's own composition and base and refers to the colour roles below instead of declaring their values.
   Each header and footer rule is scoped to #section-header or #section-footer so that it outranks the resets below. */

/* The colour roles of the whole site: each named for its job and each value written once, here. A colour change is
   made to its role; every page loads this file, so the change reaches every page. A colour that belongs to one
   component stays in that component's rules. */
:root {
  /* Surfaces. */
  --surface-dark: #1a1a1a;
  --surface-footer: #3d3d3d;
  --surface-light: #fff;
  /* Text, icons and borders on light surfaces. */
  --heading-on-light: #1a1a1a;
  --text-on-light: #535353;
  --border-on-light: #e0e0e0;
  /* Text and dividers on dark surfaces. */
  --text-on-dark: #fff;
  --text-secondary-on-dark: #aaa;
  --divider-on-dark: #535353;
  /* The brand accent, for marks and highlights that are not actions. */
  --brand-accent: #63b175;
  /* Interaction: links, hover, the selected item and the keyboard focus ring. */
  --link-hover-on-dark: #63b175;
  --card-hover-border: #63b175;
  --link-on-light: #4A7D58;
  --selected-item: #357a38;
  --selected-item-text: #fff;
  --focus-ring-on-dark: #f5c248;
  --focus-ring-on-light: #3d3d3d;
  /* Actions. */
  --action-primary: #f5c248;
  --action-primary-hover: #e0ad3a;
  --action-primary-text: #1a1a1a;
  --action-secondary: #f5c248;
}

/* The header bar both header designs sit in: the dark sticky band, the header row and how it wraps. */
#section-header { position: sticky; top: 0; z-index: 100; }
#section-header, #section-header .header-outer { width: 100%; background-color: var(--surface-dark); }
#section-header * { margin: 0; padding: 0; box-sizing: border-box; }
#section-header .header-inner { display: flex; align-items: center; justify-content: space-between; padding: 20px 40px; }
@media (max-width: 768px) {
  #section-header .header-inner { flex-wrap: wrap; gap: 12px 16px; padding: 15px 20px; }
}

/* The course and learning-path header: the logo mark, the course navigation and the two calls to action.
   The homepage wordmark sits in the same .logo container; its single child shows no gap. */
#section-header .logo { display: flex; align-items: center; gap: 10px; }
#section-header .logo a { display: flex; align-items: center; gap: inherit; text-decoration: none; }
#section-header .logo-icon { color: var(--brand-accent); font-family: Raleway, sans-serif; font-size: 24px; font-weight: 700; }
#section-header .logo-text { color: var(--text-on-dark); font-family: Raleway, sans-serif; font-size: 18px; font-weight: 600; letter-spacing: 3px; }
#section-header .nav-links { display: flex; align-items: center; gap: 50px; }
#section-header .nav-links a { color: var(--text-on-dark); font-family: Raleway, sans-serif; font-size: 16px; font-weight: 600; letter-spacing: 1px; text-decoration: none; }
#section-header .nav-links a:hover { color: var(--link-hover-on-dark); }
#section-header .nav-buttons { display: flex; align-items: center; gap: 15px; }
#section-header .nav-buttons a { border-style: solid; border-width: 1px; border-radius: 4px; cursor: pointer; font-family: Raleway, sans-serif; font-size: 14px; font-weight: 700; letter-spacing: 1px; text-decoration: none; }
#section-header .btn-login { background-color: transparent; border-color: var(--action-secondary); color: var(--action-secondary); padding: 12px 32px; }
#section-header .btn-login:hover { background-color: var(--action-secondary); color: var(--action-primary-text); }
#section-header .btn-enroll { background-color: var(--action-primary); border-color: var(--action-primary); color: var(--action-primary-text); padding: 12px 28px; }
#section-header .btn-enroll:hover { background-color: var(--action-primary-hover); border-color: var(--action-primary-hover); }
@media (max-width: 768px) {
  #section-header .nav-links { display: none; }
  #section-header .nav-buttons a { padding: 12px 16px; }
}

/* The homepage header: its wordmark and its two links. */
#section-header .nav-right { display: flex; align-items: center; gap: 30px; }
#section-header .nav-link { color: var(--text-on-dark); font-family: Raleway, sans-serif; font-size: 16px; font-weight: 500; letter-spacing: 0.5px; line-height: 1.5; text-decoration: none; }
#section-header .nav-link:hover { color: var(--link-hover-on-dark); }
#section-header .btn-pricing { background-color: transparent; border: 1px solid #63b175; border-radius: 4px; color: #63b175; font-family: Raleway, sans-serif; font-size: 16px; font-weight: 600; letter-spacing: 0.5px; line-height: 1.5; padding: 10px 28px; text-decoration: none; }
#section-header .btn-pricing:hover { background-color: #63b175; color: #fff; }
@media (max-width: 768px) {
  #section-header .nav-right { flex-wrap: wrap; gap: 12px 20px; }
  #section-header .btn-pricing { padding: 10px 20px; }
}

/* The Black Friday band under the header, in both header forms. The header and the band stick together, so the band stays
   directly below the header whatever height the header takes; an in-page header link lands its section below both, and
   the offset is the tallest header (the course header wraps to 98px between 769 and 822px) plus the band's 104px, and
   only while the band is shown: before its script shows it, and once the sale ends and the script removes it, no offset
   applies. At 768px and narrower the wrapper drops out, the header keeps its own stickiness and the band scrolls away
   under it. */
.site-top { position: sticky; top: 0; z-index: 100; }
html:has(.bf-band:not([hidden])) { scroll-padding-top: 202px; }
@media (max-width: 768px) {
  .site-top { display: contents; }
  html:has(.bf-band:not([hidden])) { scroll-padding-top: 0; }
}
/* The band's own colours: the yellow of the tag and colons, the tag's lettering and the band's darker surface. Its gutters
   are the header's own, so the lettering and the tag line up with the header's logo and right edge. */
.bf-band { --bf-surface: #0b0b0b; --bf-yellow: #efbd26; --bf-on-yellow: #1a1200; position: relative; overflow: hidden; background-color: var(--bf-surface); color: var(--text-on-dark); font-family: Raleway, sans-serif; }
.bf-band, .bf-band * { margin: 0; padding: 0; box-sizing: border-box; }
.bf-inner { position: relative; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 104px; padding: 0 40px; }
.bf-watermark { position: absolute; left: 14%; top: -35%; opacity: 0.07; pointer-events: none; }
.bf-lettering { grid-column: 1; justify-self: start; display: block; }
.bf-timer { grid-column: 2; display: flex; }
.bf-item { position: relative; display: flex; flex-direction: column; align-items: center; min-width: 88px; }
.bf-item:not(:last-child)::after { content: ':'; position: absolute; top: 0; right: -5px; color: var(--bf-yellow); font: 500 44px/56px Oswald, Impact, sans-serif; }
.bf-digits { color: var(--text-on-dark); font: 500 52px/56px Oswald, Impact, 'Arial Narrow', sans-serif; font-variant-numeric: lining-nums tabular-nums; letter-spacing: 1px; }
.bf-label { margin-top: 3px; color: var(--text-secondary-on-dark); font: 600 11px/1 Raleway, Arial, sans-serif; letter-spacing: 2.5px; text-transform: uppercase; }
.bf-tag { grid-column: 3; justify-self: end; align-self: stretch; position: relative; display: flex; align-items: center; margin-right: -40px; padding: 0 40px 0 90px; background-color: var(--bf-yellow); color: var(--bf-on-yellow); clip-path: polygon(0 50%, 52px 0, 100% 0, 100% 100%, 52px 100%); font: 700 54px/1 Oswald, Impact, 'Arial Narrow', sans-serif; text-transform: uppercase; white-space: nowrap; }
.bf-tag::before { content: ''; position: absolute; top: 50%; left: 62px; width: 15px; height: 15px; margin-top: -7.5px; border-radius: 50%; background-color: var(--bf-surface); }
/* Below 1100px the timer in the middle of the viewport would sit within 40px of the tag, so it sits in the middle of the
   space between the lettering and the tag instead. Below 900px the full-size tag, the timer and the lettering leave under
   40px between them and, from 823px down, no longer fit the gutters at all (the approved option-B rules overflow there),
   so a smaller tag and narrower units keep them inside the band and clear of each other. The phone rules below take
   over at 768px and narrower. */
@media (max-width: 1099px) {
  .bf-inner { grid-template-columns: auto 1fr auto; }
  .bf-timer { justify-self: center; }
}
@media (max-width: 899px) {
  .bf-item { min-width: 72px; }
  .bf-tag { padding-left: 68px; clip-path: polygon(0 50%, 38px 0, 100% 0, 100% 100%, 38px 100%); font-size: 40px; }
  .bf-tag::before { left: 46px; width: 11px; height: 11px; margin-top: -5.5px; }
}
@media (max-width: 768px) {
  .bf-inner { grid-template-columns: 1fr auto; height: auto; padding: 0 20px 10px; row-gap: 6px; }
  .bf-watermark { left: 30%; top: -20%; opacity: 0.05; }
  .bf-lettering { margin-top: 6px; }
  .bf-timer { grid-column: 1 / -1; grid-row: 2; width: 100%; }
  .bf-item { flex: 1 1 0; min-width: 0; }
  .bf-item:not(:last-child)::after { right: -3px; font-size: 32px; line-height: 42px; }
  .bf-digits { font-size: 38px; line-height: 42px; }
  .bf-label { font-size: 10px; letter-spacing: 1.5px; }
  .bf-tag { grid-column: 2; margin-right: -20px; padding: 0 20px 0 52px; min-height: 58px; clip-path: polygon(0 50%, 29px 0, 100% 0, 100% 100%, 29px 100%); font-size: 32px; }
  .bf-tag::before { left: 34px; width: 10px; height: 10px; margin-top: -5px; }
}

/* What the two footer designs share. Both use .footer-inner with different values, so each design's rule
   selects its own footer by what the container holds: the site footer its main row, the course footer its columns. */
#section-footer, #section-footer * { margin: 0; padding: 0; box-sizing: border-box; }
#section-footer .footer-outer { width: 100%; background-color: var(--surface-footer); }
#section-footer .footer-column { display: flex; flex-direction: column; }

/* The site footer of the homepage, the learning-path pages and the learning-paths list. */
#section-footer .footer-inner:has(> .footer-main) { padding: 50px 10%; }
#section-footer .footer-main { display: flex; justify-content: flex-start; align-items: flex-start; gap: 120px; margin-bottom: 60px; }
#section-footer .footer-logo { flex: 0 0 auto; }
#section-footer .footer-columns { display: flex; flex-wrap: wrap; gap: 30px 120px; flex: 1; }
#section-footer .footer-column-heading { font-family: Raleway, sans-serif; font-size: 16px; font-weight: 700; color: var(--text-on-dark); letter-spacing: 0.5px; line-height: 1.4; margin-bottom: 20px; text-transform: uppercase; }
#section-footer .footer-column-links { display: flex; flex-direction: column; gap: 10px; }
#section-footer .footer-column-links a { font-family: Raleway, sans-serif; font-size: 14px; font-weight: 400; color: var(--text-secondary-on-dark); text-decoration: none; letter-spacing: 0.3px; line-height: 1.6; text-transform: uppercase; }
#section-footer .footer-column-links a:hover { color: var(--link-hover-on-dark); }
#section-footer .footer-bottom { display: flex; justify-content: center; align-items: center; padding-top: 30px; border-top: 1px solid var(--divider-on-dark); }
#section-footer .footer-bottom-links { display: flex; align-items: center; gap: 10px; }
#section-footer .footer-bottom-links a { font-family: Raleway, sans-serif; font-size: 12px; font-weight: 400; color: var(--text-secondary-on-dark); text-decoration: none; letter-spacing: 0.5px; line-height: 1.4; text-transform: uppercase; }
#section-footer .footer-bottom-links a:hover { color: var(--link-hover-on-dark); }
#section-footer .footer-bottom-divider { font-family: Raleway, sans-serif; font-size: 12px; color: var(--text-secondary-on-dark); }

/* The course footer. */
#section-footer .footer-inner:has(> .footer-column) { display: flex; justify-content: flex-start; gap: 120px; padding: 40px 10%; }
#section-footer .footer-heading { font-family: Raleway, sans-serif; font-size: 16px; font-weight: 700; color: var(--text-on-dark); margin: 0 0 24px; line-height: 1.4; letter-spacing: 0; }
#section-footer .footer-links { display: flex; flex-direction: column; gap: 12px; }
#section-footer .footer-link-uppercase { font-family: Raleway, sans-serif; font-size: 12px; font-weight: 400; color: var(--text-secondary-on-dark); text-decoration: none; letter-spacing: 0.5px; line-height: 1.5; text-transform: uppercase; }
#section-footer .footer-link-uppercase:hover { color: var(--link-hover-on-dark); }
#section-footer .footer-link { font-family: Raleway, sans-serif; font-size: 14px; font-weight: 400; color: var(--text-secondary-on-dark); text-decoration: none; letter-spacing: 0; line-height: 1.5; }
#section-footer .footer-link:hover { color: var(--link-hover-on-dark); }

@media (max-width: 768px) {
  #section-footer .footer-inner:has(> .footer-main) { padding: 40px 5%; }
  #section-footer .footer-main { flex-direction: column; gap: 40px; }
  #section-footer .footer-columns { flex-direction: column; gap: 30px; }
  #section-footer .footer-bottom-links { flex-wrap: wrap; justify-content: center; }
  #section-footer .footer-inner:has(> .footer-column) { flex-direction: column; gap: 40px; padding: 30px 5%; }
  #section-footer .footer-heading { margin-bottom: 16px; }
}

/* The blinking cursor after the title of the course, learning-path and learning-paths list pages. */
.cursor { animation: blink-cursor 1s step-end infinite; color: var(--brand-accent); font-weight: 300; }
@keyframes blink-cursor { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cursor { animation: none; } }

/* The text link on a light surface, on the course pages (all-access, team and FAQ links): one colour at every width
   and in every state; hovering underlines the link and leaves its colour. Card links keep their own look. */
#section-all-access .feature-text a, #section-team .team-link, #section-faq .faq-link { color: var(--link-on-light); }
#section-all-access .feature-text a:hover, #section-team .team-link:hover, #section-faq .faq-link:hover { text-decoration: underline; }

/* The selected item: the selected category filter's fill and border, and the hover cue of a filter that is not selected. */
.category-filter-btn.is-active { background-color: var(--selected-item); border-color: var(--selected-item); }
.category-filter-btn:not(.is-active):hover { border-color: var(--selected-item); color: var(--selected-item); }

/* The keyboard focus ring of every link and button: its colour follows the surface it sits on, dark or light.
   The learning-paths list's path card clips its overflow, so its ring is drawn inside the card's edge. */
:is(a, button):focus-visible { outline: 3px solid var(--focus-ring-on-light); outline-offset: 3px; }
:is(#section-header, #section-footer, #section-money-back, #section-hero .section-inner) :is(a, button):focus-visible { outline-color: var(--focus-ring-on-dark); }
.path-card > a:focus-visible { outline-offset: -3px; }

/* The hero heading of every page type: white on the dark heroes, dark on the homepage's light hero; a word too long
   for its line wraps within the heading. Spacing around it stays with each hero's layout. */
#section-hero h1 { color: var(--text-on-dark); font-family: Raleway, sans-serif; font-size: clamp(38px, 5vw, 56px); font-weight: 700; letter-spacing: normal; line-height: 1.1; overflow-wrap: anywhere; }
#section-hero .hero-inner h1 { color: var(--heading-on-light); }

/* The hero label above the heading: the course, learning-path and learning-paths list pages show an underscore prefix. */
#section-hero :is(.course-label, .path-label) { color: var(--text-secondary-on-dark); font-family: Raleway, sans-serif; font-size: 14px; font-weight: 600; letter-spacing: 2px; }
#section-hero :is(.course-label, .path-label) span { color: var(--brand-accent); }

/* The hero description under the heading on the dark heroes. The homepage's light hero keeps its own. */
#section-hero .section-inner .hero-description { color: var(--text-secondary-on-dark); font-family: Raleway, sans-serif; font-size: 18px; font-style: normal; font-weight: 400; line-height: 1.6; }
@media (max-width: 768px) {
  #section-hero .section-inner .hero-description { font-size: 16px; }
}
