:root {
  --orange: #e7681b;
  --orange-dark: #bd4710;
  --green: #276749;
  --green-dark: #164432;
  --green-pale: #d6ead5;
  --cream: #ffedda;
  --white: #ffffff;
  --ink: #243229;
  --muted: #617066;
  --line: #d8e1d8;
  --shadow: 0 18px 45px rgba(29, 70, 48, 0.10);
  --radius: 18px;
  --max-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--green-dark);
  line-height: 1.12;
}

h1 {
  margin-bottom: 1.4rem;
  font-size: clamp(2rem, 7vw, 5.9rem);
  letter-spacing: -0.055em;
}

h1 span {
  color: var(--orange);
}

h2 {
  margin-bottom: 1rem;
  font-size: clamp(2rem, 4vw, 3.25rem);
  letter-spacing: -0.035em;
}

h3 {
  margin-bottom: 0.65rem;
  font-size: 1.35rem;
}

.container {
  width: min(calc(100% - 2.5rem), var(--max-width));
  margin-inline: auto;
}

.narrow {
  max-width: 790px;
  text-align: center;
}

.skip-link {
  position: absolute;
  z-index: 100;
  top: -4rem;
  left: 1rem;
  padding: 0.7rem 1rem;
  background: var(--green-dark);
  color: var(--white);
}

.skip-link:focus {
  top: 1rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid rgba(39, 103, 73, 0.12);
  background: rgba(255, 255, 255, 0.95);
}

.header-inner,
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.header-inner {
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--green-dark);
  font-size: 1.4rem;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 2.2rem;
  height: 2.2rem;
  place-items: center;
  border-radius: 50% 50% 50% 12%;
  background: var(--orange);
  color: var(--white);
  font-size: 1rem;
  transform: rotate(-7deg);
}

.brand-mark + span {
  letter-spacing: -0.035em;
}

nav ul {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

nav a {
  color: var(--green-dark);
  font-size: 0.94rem;
  font-weight: 700;
  text-decoration: none;
}

nav a:hover,
nav a:focus-visible {
  color: var(--orange-dark);
}

.hero {
  overflow: hidden;
  padding: clamp(4rem, 9vw, 8rem) 0;
  background: linear-gradient(125deg, var(--cream) 0 58%, var(--green-pale) 58% 100%);
}

.hero-grid,
.split-layout {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  align-items: center;
  gap: clamp(2.5rem, 7vw, 6rem);
}

.eyebrow {
  margin-bottom: 0.75rem;
  color: var(--orange-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow.light {
  color: #ffbc87;
}

.lead {
  max-width: 650px;
  color: var(--muted);
  font-size: clamp(1.08rem, 2vw, 1.28rem);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 2rem 0 1.8rem;
}

.button {
  display: inline-block;
  padding: 0.8rem 1.25rem;
  border: 2px solid var(--orange);
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
}

.button-primary {
  background: var(--orange-dark);
  border-color: var(--orange-dark);
  color: var(--white);
}

.button-primary:hover,
.button-primary:focus-visible {
  background: var(--orange-dark);
  border-color: var(--orange-dark);
}

.button-secondary {
  color: var(--green-dark);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  background: #fff0e5;
}

.button-light {
  border-color: var(--white);
  background: var(--white);
  color: var(--green-dark);
}

.frog-note {
  margin-bottom: 0;
  color: var(--green);
  font-weight: 700;
}

.frog-note span {
  margin-right: 0.35rem;
}

.image-placeholder {
  display: grid;
  min-height: 320px;
  align-content: center;
  justify-items: center;
  padding: 2rem;
  border: 2px dashed rgba(39, 103, 73, 0.42);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.62);
  color: var(--green);
  text-align: center;
}

.image-placeholder span {
  font-size: 1.3rem;
  font-weight: 800;
}

.image-placeholder small {
  max-width: 240px;
  margin-top: 0.45rem;
  color: var(--muted);
}


.hero-image {
  display: block;
  width: 100%;
  min-height: 470px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 48% 48% 24px 48%;
  box-shadow: var(--shadow);
}

.section {
  padding: clamp(4.5rem, 8vw, 7rem) 0;
}

.section-tinted {
  background: var(--cream);
}

.section-intro {
  margin: 0 auto;
  color: var(--muted);
  font-size: 1.1rem;
}

.section-intro.left {
  margin-left: 0;
}

.section-heading {
  display: grid;
  grid-template-columns: 1fr 0.75fr;
  align-items: end;
  gap: 3rem;
  margin-bottom: 2.5rem;
}

.section-heading h2,
.section-heading p {
  margin-bottom: 0;
}

.section-heading > p {
  color: var(--muted);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.card {
  padding: 2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 8px 25px rgba(29, 70, 48, 0.06);
}

.card-icon {
  display: grid;
  width: 3rem;
  height: 3rem;
  margin-bottom: 1.3rem;
  place-items: center;
  border-radius: 12px;
  background: var(--green-pale);
  color: var(--green);
  font-weight: 900;
}

.card p,
.lab-grid p,
.about-layout p {
  color: var(--muted);
}

.card a {
  color: var(--orange-dark);
  font-weight: 800;
  text-decoration: none;
}

.notice {
  display: grid;
  gap: 0.15rem;
  margin-top: 2rem;
  padding: 1.1rem 1.25rem;
  border-left: 5px solid var(--orange);
  background: var(--cream);
}

.notice strong {
  color: var(--green-dark);
}

.notice span {
  color: var(--muted);
}

.teaching-image {
  min-height: 370px;
}

.quest-section {
  background: var(--green-dark);
  color: var(--white);
}

.quest-card {
  display: grid;
  grid-template-columns: auto 1fr 0.62fr;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3.5rem);
}

.quest-card h2,
.quest-card p {
  color: var(--white);
}

.quest-number {
  color: rgba(255, 255, 255, 0.14);
  font-size: clamp(5rem, 12vw, 9rem);
  font-weight: 900;
  line-height: 1;
}

.quest-detail {
  display: grid;
  gap: 0.7rem;
}

.quest-detail span {
  padding: 0.65rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.9rem;
  font-weight: 700;
}

.portrait-image {
  min-height: 430px;
  border-radius: 48% 48% 18px 18px;
  background: var(--green-pale);
}

.about-layout {
  grid-template-columns: 0.8fr 1.2fr;
}

.lab-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.lab-grid > div {
  padding: 1.5rem;
  border-top: 4px solid var(--orange);
  background: var(--white);
}

.lab-grid span {
  color: var(--green);
  font-size: 1.35rem;
  font-weight: 900;
}

.lab-grid h3 {
  margin-top: 1rem;
  font-size: 1.1rem;
}

.lab-grid p {
  margin-bottom: 0;
  font-size: 0.94rem;
}

.site-footer {
  padding: 2.75rem 0;
  background: #102f23;
  color: rgba(255, 255, 255, 0.76);
}

.footer-brand {
  color: var(--white);
}

.site-footer p {
  margin: 0.6rem 0 0;
  font-size: 0.9rem;
}

/******************
CYBERSECURITY CHALLENGE
*******************/

.quest-section h2,
.quest-section h3 {
  color: var(--white);
}

.quest-section h2 {
  margin-bottom: 2rem;
}

.cipher-text {
  max-width: 650px;
  margin: 1.5rem 0 2rem;
  padding: 1.5rem 2rem;
  border-left: 6px solid var(--orange);
  border-radius: 0 12px 12px 0;
  background: var(--cream);
  color: var(--green-dark);
  font-family: Consolas, "Courier New", monospace;
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.challenge-block {
  max-width: 750px;
  margin: 2.5rem 0;
  padding: 1.5rem 1.75rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
}

.challenge-block h3 {
  color: #ffbc87;
}

.decoder-tools {
  margin: 2.5rem 0;
}

.decoder-tools ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.decoder-tools a {
  display: inline-block;
  padding: 0.65rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  color: var(--white);
  font-weight: 700;
  text-decoration: none;
}

.decoder-tools a:hover,
.decoder-tools a:focus-visible {
  border-color: var(--orange);
  background: var(--orange);
}

.challenge-hint {
  max-width: 750px;
  margin: 1rem 0;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
}

.challenge-hint summary {
  color: var(--white);
  font-weight: 800;
  cursor: pointer;
}

.challenge-hint p {
  margin: 0.8rem 0 0;
  color: rgba(255, 255, 255, 0.85);
}

.challenge-answer {
  max-width: 750px;
  margin-top: 3rem;
  padding: 2rem;
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
}

.challenge-answer h3 {
  color: var(--green-dark);
}

.challenge-answer p {
  color: var(--ink);
}

.answer-lines {
  color: var(--muted);
  line-height: 2;
}

@media (max-width: 800px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.85rem;
    padding: 1rem 0;
  }

  .hero {
    background: linear-gradient(155deg, var(--cream) 0 67%, var(--green-pale) 67% 100%);
  }

  .hero-grid,
  .split-layout,
  .section-heading,
  .quest-card {
    grid-template-columns: 1fr;
  }

  .hero-image {
    min-height: 340px;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .quest-number {
    display: none;
  }

  .about-layout .portrait-image {
    max-width: 500px;
  }

  .lab-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

/******************
FEATURED PRODUCT
*******************/

.product-section {
  background: var(--cream);
}

.product-layout {
  grid-template-columns: 1.05fr 0.95fr;
}

.product-image {
  display: block;
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.product-copy > p:not(.eyebrow):not(.product-tagline) {
  color: var(--muted);
}

.product-tagline {
  margin-bottom: 1.25rem;
  color: var(--orange-dark);
  font-size: 1.3rem;
  font-weight: 800;
}

.product-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 1.75rem 0;
}

.product-features span {
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  background: var(--green-pale);
  color: var(--green-dark);
  font-size: 0.9rem;
  font-weight: 800;
}

.product-copy .button {
  margin-top: 0.5rem;
}

/******************
TEACHING IMAGE
*******************/

.teaching-image {
  width: 100%;
  text-align: center;
}

.teaching-image a {
  display: block;
}

.teaching-image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}

.teaching-image a:hover img {
  transform: scale(1.02);
}

/******************
ABOUT DAWN PHOTO
*******************/

.about-photo {
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
}

.about-photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.about-copy {
  max-width: 650px;
}

.about-copy p {
  line-height: 1.75;
}

/******************
ANCHOR NAVIGATION
*******************/

html {
  scroll-padding-top: 110px;
}

section[id] {
  scroll-margin-top: 110px;
}


/* Resource card links */
.resource-links {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
}

.resource-links li {
  margin-bottom: 12px;
}

.resource-links a {
  color: var(--green);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.resource-links a:hover,
.resource-links a:focus-visible {
  color: var(--orange-dark);
}

@media (max-width: 480px) {
  .container {
    width: min(calc(100% - 1.5rem), var(--max-width));
  }

  .button-row,
  .button {
    width: 100%;
    text-align: center;
  }

  .lab-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* Interactive cybersecurity answer form */
.challenge-answer .answer-field { margin-top: 1.25rem; }
.challenge-answer label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 700;
}
.challenge-answer input,
.challenge-answer textarea {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 0.75rem;
  border: 2px solid var(--muted);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
}
.challenge-answer textarea { resize: vertical; }
.challenge-answer #cipher-shift { max-width: 8rem; }
.challenge-answer .field-help {
  margin: 0.4rem 0 0;
  font-size: 0.9rem;
}
.challenge-answer .button {
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.challenge-answer .button-primary {
  background: var(--orange-dark);
  border-color: var(--orange-dark);
}
.challenge-answer .button-secondary { background: var(--white); }
.challenge-answer .button-secondary:hover { background: var(--cream); }
.challenge-answer :is(input, textarea, button):focus-visible {
  outline: 3px solid var(--green-dark);
  outline-offset: 3px;
}
.challenge-answer [aria-invalid="true"] { border-color: var(--orange-dark); }
.challenge-answer .answer-feedback {
  min-height: 3.3em;
  margin-bottom: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.challenge-answer .answer-feedback[data-state="success"] { color: var(--green); }
.challenge-answer .answer-feedback[data-state="retry"] { color: var(--orange-dark); }
@media (max-width: 480px) {
  .challenge-answer { padding: 1.25rem; }
}

@media (max-width: 800px) {
  .product-layout {
    grid-template-columns: 1fr;
  }
}


/* Mobile navigation menu */

/* Hide the Menu button on desktop */
.menu-toggle {
  display: none;
}

@media (max-width: 800px) {
  .header-inner {
    position: relative;
    flex-wrap: wrap;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    border: 2px solid var(--green);
    border-radius: 10px;
    background: var(--white);
    color: var(--green-dark);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
  }

  .menu-toggle:focus-visible {
    outline: 3px solid var(--orange);
    outline-offset: 3px;
  }

  #main-menu {
    display: none;
    width: 100%;
  }

  #main-menu.is-open {
    display: block;
    background: #ffffff;
  }

  #main-menu ul {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 0;
  }

  #main-menu a {
    display: block;
    padding: 0.75rem 0.5rem;
  }
}
