/* Clay Warren | WDV101 assignments 5-2 and 6-1 | September 23, 2026 */

/* Element selectors: the soft body color uses HSL notation. */
body {
  margin: 0;
  background-color: hsl(85, 30%, 94%);
  color: #253a30;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
}

/* Assignment 9-1: fixed desktop width; capped to fit smaller screens. */
.site-container {
  width: 1024px;
  max-width: calc(100% - 2rem);
  margin: 2rem auto;
  padding: 0;
  border: 1px solid #b3c6a3;
  background-color: #f7f9f3;
  box-shadow: 0 0.5rem 1.5rem rgb(36 75 58 / 12%);
  box-sizing: border-box;
}

/* Semantic regions stack into a single outer column inside the container. */
header, nav, main, footer {
  width: 100%;
  margin: 0;
  box-sizing: border-box;
}

h1 {
  margin: 0;
  padding: 1.5rem;
  background-color: #244b3a;
  color: ivory; /* Named color: light text on a dark background. */
  font-family: 'Lora', Georgia, 'Times New Roman', serif;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  line-height: 1.2;
  text-align: center;
}

h2, h3 {
  color: #305b46;
  font-family: 'Lora', Georgia, 'Times New Roman', serif;
  line-height: 1.3;
}

p {
  font-family: Arial, Helvetica, sans-serif; /* Web-safe paragraph fonts and fallback. */
  color: rgb(45, 62, 51); /* RGB color notation. */
  margin: 0 0 1rem;
}

img, video {
  max-width: 100%;
  height: auto;
}

/* Descendant selector: only the image within the header. */
header img {
  display: block;
  width: 100%;
}

main { padding: 1.5rem; box-sizing: border-box; }
section { margin-bottom: 2.5rem; }
figure { margin: 0; }
figure img { display: block; border-radius: 0.35rem; }
figcaption { max-width: 42rem; margin-top: 0.75rem; font-size: 0.875rem; }

/* Independent class: usable on paragraphs, sections, or other elements. */
.highlight {
  padding: 1rem 1.25rem;
  background-color: #e0ead6;
  border-left: 0.3rem solid #537348;
}

/* Dependent class: applies only to a paragraph with class intro. */
p.intro { font-size: 1.125rem; font-weight: 500; }

/* First-letter pseudo-element on the first paragraph of every page. */
.intro::first-letter {
  color: #305b46;
  font-family: 'Lora', Georgia, 'Times New Roman', serif;
  font-size: 1.8em;
  font-weight: bold;
}

/* Both kinds of content lists receive explicit marker styles and positions. */
main ul { list-style-type: square; list-style-position: outside; padding-left: 1.5rem; }
main ol { list-style-type: upper-roman; list-style-position: outside; padding-left: 2rem; }
main li { margin-bottom: 0.75rem; padding-left: 0.25rem; }

/* Hyperlink pseudo-classes. */
a:link { color: #215b45; text-decoration: underline; text-underline-offset: 0.2em; }
a:visited { color: #69476d; }
a:hover { color: #763a20; text-decoration-thickness: 0.15em; }
a:focus { outline: 3px solid #ae631d; outline-offset: 3px; }
a:active { color: #842727; }

/* Inline navigation: no bullets or underlines, with hover and focus feedback. */
nav { background-color: #244b3a; color: ivory; }
nav ul { list-style-type: none; margin: 0; padding: 0.5rem; text-align: center; }
nav li { display: inline-block; }
nav a:link, nav a:visited {
  display: inline-block;
  padding: 0.6rem 1rem;
  color: ivory;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 0.875rem;
  font-weight: bold;
  letter-spacing: 0.04em;
}
nav a[aria-current="page"] { background-color: #416750; }
nav a:hover, nav a:focus {
  background-color: #edf2de;
  color: #244b3a;
  text-decoration: none;
}
nav a:focus { outline-color: #e3b56b; outline-offset: -3px; }
nav a:active { background-color: #d4dfbf; }

footer {
  box-sizing: border-box;
  padding: 1.5rem;
  border-top: 2px solid #cedbc4;
  text-align: center;
  font-size: 0.875rem;
}
footer img { margin-bottom: 1rem; }

@media (max-width: 36rem) {
  main { padding: 1rem; }
  h1 { padding: 1.25rem 1rem; }
  nav a:link, nav a:visited { padding: 0.6rem 0.75rem; }
}

/* Assignment 7-1: custom heading typography with varied text properties. */
h1 { font-weight: 700; letter-spacing: 0.015em; }
h2, h3 { font-weight: 600; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.2rem; }
figcaption { line-height: 1.5; }

/* Assignment 7-2: CSS columns (not grid) apply only to the FAQ main element. */
.faq-columns {
  columns: 3;
  column-gap: 2.5rem;
  column-rule: 1px solid #9caf96;
  overflow-wrap: break-word;
}
.faq-heading {
  column-span: all;
  margin: 0 0 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #cedbc4;
  text-align: center;
}
.faq-columns h3 { break-after: avoid; margin-top: 0; }
.faq-columns li, .faq-columns figure, .faq-columns video { break-inside: avoid; }
.faq-columns li p:first-child { font-weight: bold; }
.faq-columns section { margin-bottom: 1.5rem; }

@media (max-width: 48rem) {
  .faq-columns { columns: 1; column-rule: none; }
}

/* Assignment 8-1: the image box includes padding, border, and outside margins. */
img {
  box-sizing: border-box;
  padding: 0.3rem;
  border: 1px solid #9caf96;
  margin: 0.75rem 0;
}
header img { margin: 0; }
h3, h4 {
  margin: 1.25rem 0 0.75rem;
  padding: 0.75rem 0 0.25rem;
  border-top: 2px solid #b3c6a3;
  color: #305b46;
  font-family: 'Lora', Georgia, 'Times New Roman', serif;
  line-height: 1.3;
}
h4 { font-size: 1.1rem; }
.float-left { float: left; margin: 0.25rem 1.25rem 0.75rem 0; }
.float-right { float: right; margin: 0.25rem 0 0.75rem 1.25rem; }
.float-left, .float-right { width: 15rem; max-width: 45%; }
.image-wrap { display: flow-root; margin: 0 0 1.25rem; padding: 0.5rem 0; }
.photo-credit { font-size: 0.875rem; }
.welcome { border-bottom: 2px solid #b3c6a3; padding-bottom: 1rem; }
.welcome h2 { letter-spacing: 0.04em; }
.urgent { color: #763a20; }
.faq-columns .image-wrap { break-inside: avoid; }

/* Semantic element spacing and colors for assignment 9-1. */
header { padding: 0; background-color: #244b3a; color: ivory; }
nav { padding: 0.25rem 0; border-bottom: 3px solid #b3c6a3; }
main { padding: 1.5rem; background-color: #f7f9f3; }
main section {
  margin: 0 0 1.5rem;
  padding: 1.25rem;
  border: 1px solid #d5dfcd;
  border-radius: 0.25rem;
  background-color: white;
  color: #253a30;
}
main section:last-child { margin-bottom: 0; }
main section.highlight { background-color: #e0ead6; border-left: 0.3rem solid #537348; }
main section > h2:first-child { margin-top: 0; }
footer { margin-top: 0.5rem; padding: 1.5rem; background-color: #e7edde; color: #244b3a; }
.faq-columns section { padding: 0.75rem; }

@media (max-width: 36rem) {
  .site-container { max-width: calc(100% - 1rem); margin: 0.5rem auto; }
  main { padding: 0.75rem; }
  main section { padding: 0.75rem; }
}
