:root {
  --red: #a5222d;
  --red-dark: #7c1720;
  --red-deep: #651219;
  --charcoal: #2d3033;
  --charcoal-dark: #1d2022;
  --charcoal-deeper: #151718;
  --warm-gray: #dedbd6;
  --light-gray: #efefec;
  --off-white: #f8f7f4;
  --white: #ffffff;
  --text: #262626;
  --muted: #666666;
  --border: #d7d4cf;

  --content-width: 1180px;
  --content-narrow: 880px;
  --page-gutter: clamp(18px, 4vw, 36px);

  --radius-sm: 6px;
  --radius-md: 10px;
  --shadow-soft: 0 16px 40px rgba(0, 0, 0, 0.16);

  --transition: 180ms ease;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 18px;
  line-height: 1.65;
  color: var(--text);
  background: var(--charcoal-deeper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--red-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover,
a:focus-visible {
  color: var(--red);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

h1,
h2,
h3 {
  margin-top: 0;
  line-height: 1.15;
  color: var(--charcoal-dark);
}

h1 {
  margin-bottom: 22px;
  font-size: clamp(2.15rem, 5vw, 4.25rem);
  letter-spacing: -0.035em;
}

h2 {
  margin-bottom: 22px;
  font-size: clamp(1.8rem, 3.5vw, 2.7rem);
  letter-spacing: -0.025em;
}

h3 {
  margin-bottom: 14px;
  font-size: 1.35rem;
}

p {
  margin-top: 0;
  margin-bottom: 1.2em;
}

.container {
  width: min(calc(100% - (var(--page-gutter) * 2)), var(--content-width));
  margin-inline: auto;
}

.content-narrow {
  max-width: var(--content-narrow);
}

.section {
  padding: clamp(56px, 8vw, 96px) 0;
}

.section-light {
  background: var(--off-white);
}

.section-dark {
  color: var(--white);
  background:
    linear-gradient(120deg, rgba(20, 22, 23, 0.97), rgba(46, 48, 50, 0.94));
}

.section-accent {
  color: var(--white);
  background:
    linear-gradient(135deg, var(--red-deep), var(--red-dark));
}

.section-dark h1,
.section-dark h2,
.section-dark h3,
.section-accent h1,
.section-accent h2,
.section-accent h3 {
  color: var(--white);
}

.eyebrow {
  margin-bottom: 12px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--red-dark);
}

.eyebrow-light {
  color: rgba(255, 255, 255, 0.80);
}

.section-dark .eyebrow:not(.eyebrow-light) {
  color: #c32a36;
}

/* Header */
.site-header {
  position: relative;
  z-index: 100;
  background: var(--off-white);
}

.header-top {
  border-bottom: 1px solid var(--border);
}

.brand-wrap {
  min-height: 106px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  color: var(--text);
  text-decoration: none;
}

.brand:hover,
.brand:focus-visible {
  color: var(--text);
}

.brand-logo {
  width: 88px;
  height: 88px;
  object-fit: contain;
  flex: 0 0 auto;
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-name {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.45rem, 3vw, 2.35rem);
  line-height: 1.05;
  font-weight: 700;
}

.brand-subtitle {
  font-size: 0.9rem;
  color: var(--muted);
}

.main-nav {
  background: var(--charcoal);
  border-bottom: 4px solid var(--red);
}

.nav-inner {
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  padding: 0 22px;
  color: var(--white);
  font-size: 0.98rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color var(--transition), color var(--transition);
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.active {
  color: var(--white);
  background: var(--red-dark);
}

.menu-toggle {
  display: none;
  align-items: center;
  gap: 12px;
  border: 0;
  padding: 10px 12px;
  color: var(--white);
  background: var(--charcoal);
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.menu-icon {
  width: 24px;
  display: grid;
  gap: 5px;
}

.menu-icon span {
  display: block;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

/* Hero */
.hero {
  padding: clamp(58px, 9vw, 110px) 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  align-items: center;
  gap: clamp(38px, 7vw, 82px);
}

.hero-lead {
  max-width: 690px;
  margin-bottom: 30px;
  font-size: clamp(1.08rem, 2vw, 1.3rem);
  color: rgba(255, 255, 255, 0.88);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-photo-wrap {
  position: relative;
}

.hero-photo-wrap::before {
  content: "";
  position: absolute;
  inset: 18px -18px -18px 18px;
  border: 2px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-md);
  pointer-events: none;
}

.hero-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

/* Buttons and links */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 11px 20px;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 0.98rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform var(--transition), background-color var(--transition), border-color var(--transition);
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.button-primary {
  color: var(--white);
  background: var(--red);
  border-color: var(--red);
}

.button-primary:hover,
.button-primary:focus-visible {
  color: var(--white);
  background: var(--red-dark);
  border-color: var(--red-dark);
}

.button-secondary {
  color: var(--white);
  background: transparent;
  border-color: rgba(255, 255, 255, 0.76);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  color: var(--white);
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

.text-link {
  font-weight: 700;
}

.text-link-light {
  color: var(--white);
}

.text-link-light:hover,
.text-link-light:focus-visible {
  color: var(--white);
}

/* Feature sections */
.feature-grid,
.split-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(34px, 7vw, 78px);
}

.feature-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

.callout {
  padding: clamp(26px, 4vw, 38px);
  background: var(--white);
  border-left: 5px solid var(--red);
  border-radius: var(--radius-sm);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.callout p:last-of-type {
  margin-bottom: 12px;
}

.split-content > .callout {
  margin-top: 12px;
}

/* Footer */
.site-footer {
  padding: 50px 0;
  color: rgba(255, 255, 255, 0.78);
  background: var(--charcoal-deeper);
  border-top: 4px solid var(--red-dark);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr auto 1fr;
  gap: 34px;
  align-items: start;
}

.site-footer strong {
  color: var(--white);
}

.site-footer p {
  margin-bottom: 4px;
  font-size: 0.86rem;
}

.footer-links {
  display: grid;
  gap: 6px;
}

.footer-links a {
  color: var(--white);
  text-decoration: none;
  font-size: 0.9rem;
}

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

.footer-copy {
  text-align: right;
}

/* Tablet */
@media (max-width: 900px) {
  body {
    font-size: 17px;
  }

  .brand-wrap {
    min-height: 96px;
  }

  .brand-logo {
    width: 72px;
    height: 72px;
  }

  .brand-subtitle {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .main-nav {
    display: none;
  }

  .main-nav.is-open {
    display: block;
  }

  .nav-inner {
    width: 100%;
    display: grid;
  }

  .nav-link {
    justify-content: flex-start;
    min-height: 52px;
    padding: 0 var(--page-gutter);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .hero-grid,
  .feature-grid,
  .split-content {
    grid-template-columns: 1fr;
  }

  .hero-photo-wrap {
    max-width: 720px;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }

  .footer-copy {
    grid-column: 1 / -1;
    text-align: left;
  }
}

/* Phone */
@media (max-width: 560px) {
  :root {
    --page-gutter: 18px;
  }

  body {
    font-size: 15px;
    line-height: 1.52;
  }

  h1 {
    font-size: clamp(1.9rem, 9.5vw, 2.45rem);
    line-height: 1.12;
  }

  h2 {
    font-size: clamp(1.55rem, 7.2vw, 1.9rem);
    line-height: 1.16;
  }

  .brand-wrap {
    gap: 10px;
    min-height: 78px;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .brand {
    gap: 9px;
  }

  .brand-logo {
    width: 54px;
    height: 54px;
  }

  .brand-name {
    max-width: 210px;
    font-size: 1.06rem;
    line-height: 1.04;
  }

  .menu-toggle {
    padding: 9px 10px;
  }

  .menu-toggle-label {
    display: none;
  }

  .hero {
    padding-top: 42px;
    padding-bottom: 54px;
  }

  .hero .eyebrow {
    margin-bottom: 10px;
    font-size: 0.76rem;
    letter-spacing: 0.14em;
  }

  .hero-lead {
    max-width: 100%;
    margin-bottom: 26px;
    font-size: 0.98rem;
    line-height: 1.56;
  }

  .hero-actions {
    display: grid;
    gap: 12px;
  }

  .button {
    width: 100%;
    min-height: 46px;
  }

  .hero-photo-wrap::before {
    inset: 10px -10px -10px 10px;
  }

  .section {
    padding: 40px 0;
  }

  /* CT permit page mobile spacing: tighten the large gap before Course Overview. */
  .section-light + .section-light {
    padding-top: 24px;
  }

  /* Keep the registration heading comfortably within the mobile viewport. */
  #register h2 {
    font-size: clamp(1.45rem, 6.5vw, 1.75rem);
  }

  .section p {
    margin-bottom: 1.05em;
  }

  .feature-grid,
  .split-content {
    gap: 30px;
  }

  .split-content > .callout {
    margin-top: 0;
  }

  .callout {
    padding: 26px 24px;
  }

  .site-footer {
    padding: 40px 0;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-copy {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
