/* Fonts: Source Sans 3, self-hosted (SIL Open Font License, see fonts/OFL-LICENSE.txt).
   One variable file per style covers every weight from 200 to 900. */
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("fonts/source-sans-3-latin-wght-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Source Sans 3";
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
  src: url("fonts/source-sans-3-latin-wght-italic.woff2") format("woff2");
}

/* Base reset-ish */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.125rem; /* 18px; Source Sans runs a little small */
  line-height: 1.6;
  color: #111;
  background: #f4f0e6;
}

/* Headings: heavier and tighter than body text */
h1,
h2,
h3 {
  font-weight: 700;
  line-height: 1.2;
}

h3 {
  font-weight: 600;
}

/* Keep lines of text at a comfortable reading length */
.section p,
.section li {
  max-width: 65ch;
}

/* Space above a heading that follows text */
.section-content > * + h2,
.section-content > * + h3 {
  margin-top: 2rem;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
}

/* Visible keyboard focus everywhere */
a:focus-visible,
button:focus-visible {
  outline: 3px solid #111;
  outline-offset: 2px;
}

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

/* Skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: #000;
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 1000;
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

/* Layout helpers */
.section {
  padding: 3rem 1.5rem;
  background: #fff;
}

.section-alt {
  background: #f4f0e6;
}

.section-inner {
  max-width: 1080px;
  margin: 0 auto;
}

.section-header {
  margin-bottom: 2rem;
}

.section h2,
.section-header h2 {
  margin: 0 0 0.75rem;
}

/* Basic responsive grid */
.section-grid {
  display: grid;
  gap: 2rem;
}

.section-content {
  min-width: 0;
}

.section-aside {
  min-width: 0;
}

.section-aside img {
  border-radius: 6px;
}

/* Text helpers (carried over from the old tyylit.css) */
.center {
  text-align: center;
  margin-inline: auto; /* keeps width-limited centered text in the middle */
}

.small {
  font-size: 0.85rem;
}

.green {
  color: #236b15;
}

.notice {
  font-weight: 700;
  color: #236b15;
}

/* Placeholder text that still needs real content */
.todo {
  color: #666;
  font-style: italic;
}

/* Links inside page content must look like links */
.site-main a {
  color: #236b15;
  text-decoration: underline;
}

.site-main a:hover,
.site-main a:focus-visible {
  text-decoration-thickness: 2px;
}

/* Hero / header */
.site-header {
  background: #000;
  color: #fff;
}

.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
}

.brand-text {
  white-space: nowrap;
}

/* NAV */
/* Keep in-page anchor targets from hiding under the sticky nav bar */
html {
  scroll-padding-top: 4rem;
}

.nav-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #000 /* #4c7612 */;
  color: #fff;
  transition: box-shadow 0.2s ease;
}

/* Dark focus ring is invisible on the green bars, use white there */
.nav-bar a:focus-visible,
.nav-bar button:focus-visible,
.site-footer a:focus-visible {
  outline-color: #fff;
}

.nav-bar--stuck {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.main-nav {
  position: relative;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0.5rem 1.5rem;
}

.nav-toggle {
  border: none;
  background: transparent;
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  padding: 0.25rem;
  cursor: pointer;
}

.nav-toggle-bar {
  width: 22px;
  height: 2px;
  background: #fff;
}

.nav-toggle-label {
  position: absolute;
  left: -999px; /* visually hidden, for screen readers */
}

/* Mobile nav hidden by default */
.nav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: none;
  position: absolute;
  right: 1.5rem;
  top: 100%;
  background: #000;
  min-width: 180px;
  z-index: 10;
}

.nav-menu li {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-menu a {
  display: block;
  padding: 0.75rem 1rem;
}

.nav-menu--open {
  display: block;
}

/* HERO */
.hero {
  position: relative;
}

.hero-media img {
  width: 100%;
  height: auto;
  display: block;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem 1.5rem;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.7),
    rgba(0, 0, 0, 0.2),
    transparent
  );
}

.hero-overlay h1,
.hero-overlay p {
  margin: 0 0 0.5rem;
  color: #fff;
}

/* Intro at the top of the page (holds the page's h1) */
.intro h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 5vw, 2.75rem);
}

.intro-lead {
  font-size: 1.25rem;
}

/* Call-to-action button. ".site-main" is repeated so it beats the
   general content link style (green underlined text). */
.btn-primary,
.site-main .btn-primary {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.6rem 1.2rem;
  border-radius: 4px;
  background: #236b15; /* white text on this green: 6.59:1 contrast */
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.btn-primary:hover,
.site-main .btn-primary:hover {
  background: #1a5210;
  text-decoration: none;
}

/* Cards (e.g. instructors) */
.cards-grid {
  display: grid;
  gap: 1.5rem;
}

.card {
  background: #fff; /* white cards stand out on the cream section */
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.card img {
  border-radius: 6px;
  margin-bottom: 0.75rem;
}

/* Pricing layout */
.pricing-layout {
  display: grid;
  gap: 1rem;
}

/* Footer */
.site-footer {
  background: #3c690c;
  color: #fff;
  padding: 1.5rem;
}

.site-footer p {
  margin: 0;
}

.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

/* RESPONSIVE BREAKPOINTS */
@media (min-width: 600px) {
  .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pricing-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  .section-grid {
    grid-template-columns: 2fr 1.2fr;
    align-items: flex-start;
  }

  .nav-toggle {
    display: none;
  }

  .nav-menu {
    position: static;
    display: flex !important;
    background: transparent;
    gap: 1rem;
  }

  .nav-menu li {
    border: none;
  }

  .nav-menu a {
    padding: 0.25rem 0;
  }

  .hero-overlay {
    padding: 4rem 1.5rem;
  }
}

@media (min-width: 1024px) {
  .hero-overlay {
    padding: 5rem calc((100vw - 1080px) / 2) 5rem;
  }

  .header-inner {
    padding-inline: calc((100vw - 1080px) / 2);
  }

  .main-nav {
    padding-inline: 0;
  }
}
