/* ==========================================================
   Letters from the DEAD - Homepage styles
   Palette: Red #6c1313, Gray #525050, Black #000000
   Font: IM Fell DW Pica
   Desktop design frame: 1440px wide (used as max width)
   Breakpoints: 1200px, 1024px, 768px, 480px
   ========================================================== */

:root {
  --red: #6c1313;
  --gray: #525050;
  --black: #000000;
  --white: #ffffff;
  --light-gray: #d9d9d9;

  --font-main: "IM Fell DW Pica", Georgia, "Times New Roman", serif;
  --font-small-caps: "IM Fell DW Pica SC", "IM Fell DW Pica", Georgia, serif;
  --font-hand: "Caveat", "Segoe Print", "Bradley Hand", cursive;
  /* Century Gothic is not a web font: these are similar geometric fonts */
  --font-gothic: "Century Gothic", "URW Gothic", "Avant Garde", "Questrial",
    "Futura", "Trebuchet MS", sans-serif;

  /* Type sizes: they shrink smoothly between phone and 1440px desktop */
  --h1: clamp(3rem, 1.5rem + 5vw, 6rem); /* 96px */
  --h2: clamp(2rem, 1.4rem + 2vw, 3rem); /* 48px */
  --h3: clamp(1.75rem, 1.3rem + 1.4vw, 2.25rem); /* 36px */
  --body: clamp(1.25rem, 1rem + 1vw, 2rem); /* 32px */

  --max-width: 1440px;
  --radius: 20px;
  /* How far the header/hero edge slants (74px at 1440px wide).
     Using vw keeps the angle the same (2.94deg) at every screen width */
  --slant: 5.14vw;
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-main);
  font-size: var(--body);
  color: var(--black);
  background-color: var(--white);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

h1,
h2,
p {
  margin: 0;
  font-weight: normal;
}

h2 {
  font-size: var(--h2);
  color: var(--white);
  text-align: center;
  margin-bottom: 1.5rem;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Hidden on screen but still read by screen readers */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* text or elements that only show on mobile (turned on at 768px) */
.mobile-only,
.footer-nav {
  display: none;
}

/* ---------- SECTION 1: Header / Navigation ---------- */

.site-header {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  padding: 0.75rem 2rem 0;
}

.logo {
  flex: 0 1 clamp(180px, 20vw, 300px);
  font-size: var(--h1);
  margin-bottom: 0.5rem;
}

.main-nav {
  /* tilt the tabs to match the slant, and lift them up so
     they sit on top of the slanted edge instead of inside it */
  transform: rotate(-2.94deg);
  transform-origin: right bottom;
  margin-bottom: calc(var(--slant) - 2px);
}

.main-nav ul {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 1rem;
}

.main-nav a {
  display: block;
  padding: 0.5rem 1.5rem 0.4rem;
  font-size: var(--body);
  color: var(--white);
  background-color: var(--gray);
  border-radius: var(--radius) var(--radius) 0 0;
  transition: background-color 0.2s;
}

.main-nav a:hover,
.main-nav a:focus-visible,
.main-nav a[aria-current="page"] {
  background-color: var(--red);
}

/* Hamburger menu: hidden on desktop, turned on at the 768px breakpoint.
   The checkbox is invisible but still reachable with the keyboard */
.menu-toggle {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.menu-button {
  display: none;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background-color: var(--gray);
  border-radius: 10px;
  cursor: pointer;
}

.menu-toggle:focus-visible + .menu-button {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}

/* three white bars: the middle span plus ::before and ::after */
.menu-icon,
.menu-icon::before,
.menu-icon::after {
  display: block;
  width: 28px;
  height: 3px;
  background-color: var(--white);
  border-radius: 2px;
  transition: transform 0.2s, background-color 0.2s;
}

.menu-icon {
  position: relative;
}

.menu-icon::before,
.menu-icon::after {
  content: "";
  position: absolute;
  left: 0;
}

.menu-icon::before {
  top: -9px;
}

.menu-icon::after {
  top: 9px;
}

/* when open, the bars turn into an X */
.menu-toggle:checked + .menu-button .menu-icon {
  background-color: transparent;
}

.menu-toggle:checked + .menu-button .menu-icon::before {
  transform: translateY(9px) rotate(45deg);
}

.menu-toggle:checked + .menu-button .menu-icon::after {
  transform: translateY(-9px) rotate(-45deg);
}

/* ---------- SECTION 2: Hero / Value Statement ---------- */

.hero {
  display: flex;
  /* full browser width */
  margin-top: calc(var(--slant) * -1);
  background-color: var(--black);
  /* slanted top edge: lower on the left (700px), higher on the right (774px) */
  clip-path: polygon(0 var(--slant), 100% 0, 100% 100%, 0 100%);
  height: min(53.75vw, 774px);
}

.hero-image {
  flex: 0 0 54%;
  border: 23px solid var(--red);
  border-top-width: calc(23px + var(--slant));
  /* how much the slant rises across the photo (the photo is about 54% of the width) */
  --photo-rise: calc(var(--slant) * 0.54 - 2px);
}

/* the photo moves up into the thick top border, then its top edge is cut
   at the same angle as the header slant, so the red band stays even */
.hero-image img {
  width: 100%;
  height: calc(100% + var(--photo-rise));
  margin-top: calc(var(--photo-rise) * -1);
  object-fit: cover;
  clip-path: polygon(0 var(--photo-rise), 100% 0, 100% 100%, 0 100%);
}

.value-statement {
  flex: 1;
  display: flex;
  align-items: center;
  padding: var(--slant) 1.5rem 0 0;
  color: var(--white);
}

/* the right side of the image is empty black, so the text overlaps it */
.value-statement picture {
  flex: 0 0 72%;
}

/* fills the black space right of the bracket and centers in it at every width */
.value-statement h1 {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  margin-left: -23%;
  font-size: var(--h2);
  font-weight: normal;
  line-height: 1.15;
  text-align: center;
}

/* ---------- SECTION 3: Links to Articles ---------- */

.articles {
  background-color: var(--gray);
  padding: 2rem 2rem 3rem;
}

.article-cards {
  display: flex;
  justify-content: center;
  gap: 2rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.article-cards li {
  flex: 0 1 321px;
}

.article-cards a {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  min-height: 480px;
  padding: 1.25rem;
  background-color: var(--red);
  color: var(--white);
  border-radius: var(--radius) var(--radius) 0 0;
  transition: transform 0.2s;
}

.article-cards a:hover,
.article-cards a:focus-visible {
  transform: translateY(-6px);
}

.article-cards img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 12px;
  background-color: var(--white);
}

.card-title {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 1rem;
  font-size: var(--h2);
  line-height: 1.1;
  text-align: center;
}

/* the small "in the" / "the" between the big words */
.card-title small {
  font-size: 0.6em;
}

/* ---------- SECTION 4: Categories (Explore Moods) ---------- */

.moods {
  background: var(--black) url("../images/backgroundtexturedoor.jpg")
    center / cover no-repeat;
  padding: 2rem 2rem 3rem;
}

.mood-list {
  display: flex;
  justify-content: space-evenly;
  gap: 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.mood-list li {
  flex: 0 1 267px;
}

/* each mood sits on the red sword shape (267 x 637) */
.mood-list a {
  position: relative;
  display: block;
  aspect-ratio: 267 / 637;
  background: url("../images/redsword.png") center top / 100% 100%
    no-repeat;
  color: var(--white);
}

.mood-title {
  position: absolute;
  top: 7.5%;
  left: 0;
  right: 0;
  height: 13.7%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--h2);
}

/* font sample image (282 x 246) centered under the title */
.mood-list img {
  position: absolute;
  top: 26%;
  left: 50%;
  width: 105%;
  aspect-ratio: 282 / 246;
  object-fit: cover;
  transform: translateX(-50%);
  transition: transform 0.2s;
}

.mood-list a:hover img,
.mood-list a:focus-visible img {
  transform: translateX(-50%) scale(1.05);
}

/* ---------- SECTION 5: Sign up form ---------- */

.signup {
  background-color: var(--gray);
  padding: 3rem 2rem 4rem;
}

.signup-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  max-width: 952px;
  margin: 0 auto;
}

.signup-form input {
  width: 100%;
  height: 74px;
  padding: 0 1.5rem;
  font-family: var(--font-main);
  font-size: var(--body);
  color: var(--black);
  background-color: var(--light-gray);
  border: 2px solid transparent;
  border-radius: var(--radius);
}

.signup-form input:focus {
  outline: none;
  border-color: var(--red);
}

.signup-form button {
  width: 100%;
  max-width: 483px;
  min-height: 100px;
  padding: 1rem;
  font-family: var(--font-main);
  font-size: var(--body);
  color: var(--white);
  background-color: var(--red);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 0.2s;
}

.signup-form button:hover,
.signup-form button:focus-visible {
  background-color: var(--black);
}

/* ---------- SECTION 6: Footer ---------- */

.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 338px;
  padding: 2.5rem 1rem 1.5rem;
  background-color: var(--white);
  text-align: center;
}

.social {
  display: flex;
  gap: 0.75rem;
}

.social img {
  width: 72px;
  height: 66px;
  object-fit: contain;
  transition: transform 0.2s;
}

.social a:hover img,
.social a:focus-visible img {
  transform: scale(1.1);
}

.follow {
  margin-top: 0.5rem;
  font-size: var(--body);
}

.copyright {
  margin-top: auto;
  padding-top: 2rem;
  font-family: var(--font-gothic);
  font-size: clamp(1rem, 0.8rem + 0.6vw, 1.5rem); /* 24px */
}

/* ==========================================================
   Responsive breakpoints
   ========================================================== */

/* Small laptops */
@media (max-width: 1200px) {
  .article-cards,
  .mood-list {
    gap: 1rem;
  }

  .article-cards a {
    min-height: 0;
  }

  .card-title {
    font-size: var(--h3);
  }

  .mood-title {
    font-size: var(--h3);
  }

  .value-statement h1 {
    font-size: var(--h3);
  }
}

/* Tablets: 2 columns */
@media (max-width: 1024px) {
  .site-header {
    padding: 0.75rem 1rem 0;
  }

  .main-nav ul {
    gap: 0.5rem;
  }

  .main-nav a {
    padding: 0.4rem 1rem 0.3rem;
  }

  .article-cards,
  .mood-list {
    flex-wrap: wrap;
  }

  .article-cards li {
    flex-basis: calc(50% - 1rem);
    max-width: 321px;
  }

  /* swords go 2 x 2: the list is only wide enough for two per row */
  .mood-list {
    justify-content: center;
    column-gap: 4rem;
    max-width: calc(2 * 240px + 4rem);
  }

  .mood-list li {
    flex: 0 0 240px;
  }
}

/* Mobile: single column (follows the iPhone mockup) */
@media (max-width: 768px) {
  :root {
    --slant: 6vw;
  }

  .desktop-only {
    display: none;
  }

  .mobile-only {
    display: inline;
  }

  /* logo on the left, hamburger on the right.
     Extra bottom padding leaves room for the slanted edge */
  .site-header {
    align-items: center;
    padding: 0.75rem 1rem calc(var(--slant) + 0.5rem);
  }

  .logo {
    flex: 0 1 150px;
    margin-bottom: 0;
  }

  .main-nav {
    transform: none;
    margin-bottom: 0;
  }

  /* show the hamburger: plain black bars, no box */
  .menu-button {
    display: flex;
    width: 44px;
    height: 44px;
    background-color: transparent;
  }

  .menu-icon,
  .menu-icon::before,
  .menu-icon::after {
    background-color: var(--black);
  }

  /* the menu drops down over the hero, hidden until the button is clicked */
  .main-nav ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 10;
    flex-direction: column;
    gap: 0;
    background-color: var(--gray);
    border-top: 4px solid var(--red);
  }

  .menu-toggle:checked ~ ul {
    display: flex;
  }

  .main-nav a {
    padding: 1rem 1.5rem;
    border-radius: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  }

  /* hero stacks: image on top, value statement below, slant kept */
  .hero {
    flex-direction: column;
    height: auto;
  }

  .hero-image {
    border-width: 12px;
    border-top-width: calc(12px + var(--slant));
    /* the photo is full width on mobile, so it rises the whole slant */
    --photo-rise: calc(var(--slant) - 1px);
  }

  .hero-image img {
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .value-statement {
    flex-direction: column;
    padding: 1.5rem 1rem 2rem;
  }

  .value-statement picture {
    flex: none;
    width: 100%;
    max-width: 420px;
  }

  /* crop off the empty black area at the bottom of the mobile image */
  .value-statement img {
    width: 100%;
    aspect-ratio: 645 / 270;
    object-fit: cover;
    object-position: top;
  }

  .value-statement h1 {
    flex: none;
    max-width: 6em;
    margin: 0.5rem 0 0;
  }

  /* article cards: full width, image on top, red title bar below */
  .articles {
    padding: 1.5rem 0 2rem;
  }

  .article-cards {
    flex-direction: column;
    gap: 1.5rem;
  }

  .article-cards li {
    flex-basis: auto;
    width: 100%;
    max-width: none;
  }

  .article-cards a {
    min-height: 0;
    padding: 0;
    border-radius: 0;
  }

  /* wide, short image area like the mockup; photos fill it */
  .article-cards img {
    aspect-ratio: 16 / 10;
    border-radius: 0;
  }

  /* drawings on white are shown whole (not cropped), centered on white */
  .article-cards img.show-whole {
    object-fit: contain;
    padding-top: 0.5rem;
  }

  .card-title {
    display: block;
    padding: 1rem;
    font-size: 1.25rem;
  }

  .card-title small {
    font-size: 0.8em;
  }

  /* moods: plain black background, smaller swords */
  .moods {
    background: var(--black);
    padding: 2rem 1rem 3rem;
  }

  .moods h2 {
    text-transform: uppercase;
    max-width: 10em;
    margin: 0 auto 2rem;
  }

  /* still 2 x 2, with smaller swords */
  .mood-list {
    gap: 2rem 3rem;
    max-width: calc(2 * 190px + 3rem);
  }

  .mood-list li {
    flex: 0 0 190px;
  }

  .mood-title {
    font-size: 1.15rem;
  }

  /* sign up: smaller button that wraps to two lines */
  .signup {
    padding: 2rem 1.5rem 3rem;
  }

  .signup h2 {
    max-width: 10em;
    margin: 0 auto 1.5rem;
  }

  .signup-form {
    gap: 1.25rem;
  }

  .signup-form input {
    height: 50px;
    font-size: 1.15rem;
  }

  .signup-form button {
    max-width: 220px;
    min-height: 0;
    padding: 0.6rem 1rem;
    font-size: 1.15rem;
  }

  /* footer: icons, Follow us, then the page links */
  .site-footer {
    min-height: 0;
    padding: 1.5rem 1rem 1.25rem;
  }

  .follow {
    font-size: 1.25rem;
  }

  .footer-nav {
    display: block;
    margin-top: 0.5rem;
    font-size: 1.25rem;
  }

  .footer-nav a:hover,
  .footer-nav a:focus-visible {
    color: var(--red);
  }

  .copyright {
    padding-top: 1rem;
    font-size: 1rem;
  }
}

/* Small phones */
/* Small phones: swords in one column */
@media (max-width: 540px) {
  .mood-list {
    flex-direction: column;
    align-items: center;
    max-width: none;
  }

  .mood-list li {
    flex: none;
    width: 190px;
  }
}

@media (max-width: 480px) {
  .logo {
    flex-basis: 130px;
  }

  .social img {
    width: 44px;
    height: 40px;
  }
}

/* ==========================================================
   ARTICLE PAGE (articles.html)
   ========================================================== */

/* ---------- Article Hero ---------- */

.article-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: min(48vw, 690px);
  /* same slanted top edge as the homepage hero */
  margin-top: calc(var(--slant) * -1);
  clip-path: polygon(0 var(--slant), 100% 0, 100% 100%, 0 100%);
  background-color: var(--black);
  /* red band across the bottom */
  border-bottom: 25px solid var(--red);
}

/* the photo fills the hero behind the text */
.article-hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
}

.article-hero-text {
  position: relative;
  width: 68%;
  padding: calc(var(--slant) + 2rem) 1rem 3rem 2%;
  color: var(--white);
  text-align: center;
}

.article-hero h1 {
  font-family: var(--font-small-caps);
  font-size: clamp(3rem, 1rem + 5.6vw, 6rem); /* 96px */
  line-height: 1.05;
}

.article-subtitle {
  display: block;
}

.article-tagline {
  max-width: 16em;
  margin: 1.5rem auto 0;
  font-size: clamp(1.25rem, 0.8rem + 1.6vw, 2.25rem); /* 36px */
  line-height: 1.25;
}

.article-hero-meta {
  margin-top: 3rem;
  font-size: 1rem; /* 16px */
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* the | between "Devil in the Details" and "Oct 2026" */
.article-hero-meta span + span::before {
  content: "|";
  margin: 0 0.75rem;
}

/* ---------- Article Text ---------- */

.article-intro {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 2rem;
  font-size: clamp(1.125rem, 0.9rem + 0.6vw, 1.5rem); /* 24px */
  line-height: 1.5;
}

/* large red "W" that drops down beside the first lines */
.drop-cap::first-letter {
  float: left;
  margin: 0.04em 0.08em 0 0;
  font-size: clamp(5rem, 2rem + 10vw, 10.9375rem); /* 175px */
  line-height: 0.8;
  color: var(--red);
}

.article-intro-row {
  display: flex;
  align-items: center;
  gap: 3rem;
  margin-top: 3rem;
}

.specimen {
  flex: 0 1 45%;
  min-width: 0;
  border: 3px solid var(--black);
}

.article-intro-row p {
  flex: 1;
}

/* ---------- Process Gallery (lightbox) ---------- */

.process-gallery {
  padding: 5rem 2rem;
  background: var(--black) url("../images/backgroundtexturedoor.jpg")
    center / cover no-repeat;
}

.process-steps {
  display: flex;
  justify-content: center;
  gap: 4rem; /* room for the arrows */
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0;
  /* the captions already have numbers, so hide the list's own */
  list-style: none;
}

.process-steps li {
  flex: 0 1 250px;
  min-width: 0;
}

.process-steps a {
  position: relative;
  display: block;
}

.process-steps img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.5);
  transition: transform 0.2s;
}

.process-steps a:hover img,
.process-steps a:focus-visible img {
  transform: scale(1.04);
}

.process-steps p {
  margin-top: 0.75rem;
  font-size: clamp(1rem, 0.9rem + 0.3vw, 1.25rem);
  color: var(--white);
  text-align: center;
}

/* CSS arrow between images: one shape cut out with clip-path.
   It sits in the gap to the right of every image except the last */
.process-steps li:not(:last-child) a::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -3.25rem;
  width: 2.5rem;
  height: 1.25rem;
  background-color: var(--white);
  clip-path: polygon(
    0 40%,
    65% 40%,
    65% 0,
    100% 50%,
    65% 100%,
    65% 60%,
    0 60%
  );
  transform: translateY(-50%);
}

/* ---------- What Actually Makes it Scary ---------- */

.scary-elements {
  display: flex;
  align-items: center;
  gap: 4rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
  font-size: clamp(1.125rem, 0.9rem + 0.6vw, 1.5rem); /* 24px */
  line-height: 1.5;
}

.scary-elements-text {
  flex: 1;
}

.scary-elements h2 {
  margin-bottom: 0.75rem;
  color: var(--red);
  text-align: left;
}

/* boxed "DEVIL in the DETAILS | OCT 2026" label */
.article-meta {
  display: inline-flex;
  margin-bottom: 1.25rem;
  font-size: 1rem; /* 16px */
  line-height: 1.4;
  color: var(--red);
  border: 1px solid var(--red);
}

.article-meta span {
  padding: 0.15rem 0.6rem;
}

.article-meta span + span {
  border-left: 1px solid var(--red);
}

/* list with 24 x 24 red circle bullets, double spaced */
.red-bullets {
  margin-top: 1rem;
}

.red-bullets li {
  position: relative;
  padding-left: 2.75rem;
  line-height: 2;
}

.red-bullets li::before {
  content: "";
  position: absolute;
  top: calc(1em - 12px);
  left: 0;
  width: 24px;
  height: 24px;
  background-color: var(--red);
  border-radius: 50%;
}

.scary-elements-image {
  flex: 0 1 380px;
  min-width: 0;
}

.scary-elements-image img {
  border: 14px solid var(--red);
  transition: transform 0.2s;
}

.scary-elements-image:hover img,
.scary-elements-image:focus-visible img {
  transform: scale(1.02);
}

/* ---------- K.I.S.S. Challenge ---------- */

.challenge {
  display: flex;
  align-items: center;
  gap: 4rem;
  padding: 6rem 5% 5rem;
  color: var(--white);
  background: var(--black) url("../images/kisschalenegebackground.jpg")
    center / cover no-repeat;
}

.challenge-heading {
  position: relative;
  flex: 1 1 50%;
  padding: 4rem 0 0 clamp(90px, 12vw, 180px);
}

/* curved arrow starts at the top edge of the section */
.challenge-arrow {
  position: absolute;
  top: -6rem;
  left: 0;
  width: clamp(70px, 9vw, 130px);
}

.challenge h2 {
  margin: 0;
  font-family: var(--font-hand);
  font-size: clamp(3rem, 1.5rem + 4.5vw, 6rem); /* 96px */
  line-height: 1;
  text-align: left;
  /* slight dynamic angle */
  transform: rotate(-6deg);
}

.challenge-text {
  flex: 1 1 45%;
}

.challenge-text p {
  font-size: clamp(1.25rem, 1rem + 1vw, 2rem); /* 32px */
  line-height: 1.4;
  text-align: left;
}

.challenge-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 303px;
  max-width: 100%;
  height: 53px;
  margin: 2rem auto 0;
  font-size: 1.5rem;
  color: var(--black);
  background-color: var(--white);
  border: 2px solid var(--white);
  border-radius: var(--radius);
  transition: color 0.2s, border-color 0.2s;
}

.challenge-button:hover,
.challenge-button:focus-visible {
  color: var(--red);
  border-color: var(--red);
}

/* ---------- Related Articles ---------- */

.related {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
}

/* heading with a decorative line after it */
.related h2 {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2.5rem;
  color: var(--black);
  text-align: left;
}

.related h2::after {
  content: "";
  flex: 1;
  max-width: 944px;
  height: 4px;
  background-color: var(--black);
}

.related-cards {
  display: flex;
  justify-content: center;
  gap: 3rem;
}

.related-cards li {
  flex: 0 1 329px;
  min-width: 0;
}

.related-cards a {
  display: block;
  text-align: center;
}

.related-cards img {
  width: 100%;
  aspect-ratio: 329 / 306;
  object-fit: cover;
  border: 7px solid var(--black);
  border-radius: var(--radius);
  transition: border-color 0.2s;
}

.related-cards a:hover img,
.related-cards a:focus-visible img {
  border-color: var(--red);
}

.related-cards span {
  display: block;
  margin-top: 1rem;
  font-size: clamp(1.5rem, 1.2rem + 0.8vw, 2rem); /* 32px */
  line-height: 1.15;
}

/* ---------- Lightbox customization (from the jQuery assignment) ---------- */

/* the lightbox script measures sizes the original way, so undo the
   site-wide border-box setting inside the popup */
.lightbox,
.lightbox * {
  box-sizing: content-box;
}

.lightboxOverlay {
  background-color: var(--black);
  opacity: 0.9;
}

/* red frame drawn with an outline so it doesn't change the size */
.lb-outerContainer {
  border-radius: 0;
  outline: 4px solid var(--red);
}

/* kept compact: the script only leaves 70px under the image for this bar */
.lb-dataContainer {
  background-color: #111111;
  padding: 8px 0;
}

/* use the popup's own text size, not the page's large body text */
.lb-data {
  font-size: 16px;
}

.lb-data .lb-details {
  line-height: 1.2;
}

.lb-data .lb-number {
  padding-bottom: 0;
  line-height: 1.4;
}

.lb-data .lb-caption {
  font-family: var(--font-main);
  font-size: 20px;
  font-weight: normal;
  color: var(--white);
}

.lb-data .lb-number {
  font-family: var(--font-main);
  font-size: 14px;
  color: #aaaaaa;
}

/* ==========================================================
   SIMPLE MESSAGE PAGES (challenge + placeholder articles)
   ========================================================== */

.message-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: calc(var(--slant) + 4rem) 1.5rem 5rem;
  /* same slanted top edge and red band as the other pages */
  margin-top: calc(var(--slant) * -1);
  clip-path: polygon(0 var(--slant), 100% 0, 100% 100%, 0 100%);
  color: var(--white);
  text-align: center;
  background-color: var(--black);
  border-bottom: 25px solid var(--red);
}

.message-hero h1 {
  font-size: var(--h2);
}

.message-hero p {
  max-width: 28em;
  margin-top: 1.5rem;
  font-size: var(--body);
  line-height: 1.4;
}

.message-button {
  margin-top: 2.5rem;
  padding: 0.75rem 2rem;
  font-size: 1.5rem;
  color: var(--black);
  background-color: var(--white);
  border: 2px solid var(--white);
  border-radius: var(--radius);
  transition: color 0.2s, border-color 0.2s;
}

.message-button:hover,
.message-button:focus-visible {
  color: var(--red);
  border-color: var(--red);
}

@media (max-width: 768px) {
  .message-hero {
    min-height: 50vh;
    border-bottom-width: 12px;
  }
}

/* ---------- Article: tablet ---------- */

@media (max-width: 1024px) {
  .process-steps {
    gap: 3rem;
  }

  .process-steps li:not(:last-child) a::after {
    right: -2.6rem;
    width: 2rem;
  }

  .challenge {
    gap: 2.5rem;
  }

  .related-cards {
    gap: 1.5rem;
  }
}

/* ---------- Article: mobile ---------- */

@media (max-width: 768px) {
  /* title on black first, then the photo below it */
  .article-hero {
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
    border-bottom-width: 12px;
  }

  .article-hero-text {
    width: 100%;
    padding: calc(var(--slant) + 1.5rem) 1rem 2rem;
  }

  .article-hero h1 {
    font-size: 3.5rem;
  }

  .article-subtitle {
    font-size: 3rem; /* 48px on mobile */
  }

  .article-tagline {
    font-size: 1.5rem;
  }

  .article-hero-meta {
    margin-top: 1.5rem;
    font-size: 0.875rem;
  }

  .article-hero-image {
    position: static;
    order: 2;
    aspect-ratio: 1;
    object-position: 80% center;
  }

  .article-intro {
    padding: 2.5rem 1.25rem;
  }

  .article-intro-row {
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
  }

  .specimen {
    flex: none;
    width: 100%;
  }

  /* process steps stack, arrows point down between them */
  .process-gallery {
    padding: 3rem 1rem;
  }

  .process-steps {
    flex-direction: column;
    align-items: center;
    gap: 4.5rem;
  }

  .process-steps li {
    position: relative;
    flex: none;
    width: min(300px, 85%);
  }

  .process-steps li:not(:last-child) a::after {
    content: none;
  }

  .process-steps li:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -3.5rem;
    width: 2.5rem;
    height: 1.25rem;
    background-color: var(--white);
    clip-path: polygon(
      0 40%,
      65% 40%,
      65% 0,
      100% 50%,
      65% 100%,
      65% 60%,
      0 60%
    );
    transform: translateX(-50%) rotate(90deg);
  }

  .scary-elements {
    flex-direction: column;
    gap: 2rem;
    padding: 2.5rem 1.25rem;
  }

  .scary-elements h2 {
    font-size: 2.25rem;
  }

  .scary-elements-image {
    flex: none;
    width: 100%;
    max-width: 420px;
  }

  .red-bullets li {
    padding-left: 2.25rem;
    line-height: 1.6;
    margin-bottom: 0.9rem;
  }

  .red-bullets li::before {
    top: calc(0.8em - 10px);
    width: 20px;
    height: 20px;
  }

  /* challenge: arrow, heading, then text, all stacked */
  .challenge {
    flex-direction: column;
    align-items: stretch;
    gap: 2rem;
    padding: 0 1.25rem 3rem;
  }

  .challenge-heading {
    padding: 0;
    text-align: center;
  }

  .challenge-arrow {
    position: static;
    width: 90px;
    margin: 0 auto 1rem;
  }

  .challenge h2 {
    text-align: center;
  }

  .related {
    padding: 2.5rem 1.25rem 3rem;
  }

  .related h2 {
    gap: 1rem;
  }

  .related-cards {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }

  .related-cards li {
    flex: none;
    width: 100%;
    max-width: 400px;
  }
}

/* ==========================================================
   MOODS PAGE (moods.html)
   ========================================================== */

/* ---------- Mood Hero ---------- */

.mood-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: min(48vw, 690px);
  /* same slanted top edge as the other pages */
  margin-top: calc(var(--slant) * -1);
  clip-path: polygon(0 var(--slant), 100% 0, 100% 100%, 0 100%);
  background-color: var(--black);
  /* red line under the hero */
  border-bottom: 33px solid var(--red);
  /* the shifted photo would otherwise add a sideways scrollbar */
  overflow: hidden;
}

/* shifted right so the ABC clears the title; the left edge fades into black */
.mood-hero-image {
  position: absolute;
  top: 0;
  left: 8%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 12%);
  mask-image: linear-gradient(to right, transparent, #000 12%);
}

.mood-hero-text {
  position: relative;
  width: 48%;
  margin-left: 20px;
  padding: calc(var(--slant) + 2rem) 0 3rem;
  color: var(--white);
  text-align: center;
}

.mood-hero h1 {
  font-size: clamp(4rem, 8.68vw, 7.8125rem); /* 125px */
  line-height: 1.05;
}

.mood-hero h2 {
  margin: 1.5rem 0 0;
  font-size: clamp(1.5rem, 3.33vw, 3rem); /* 48px */
  line-height: 1.2;
}

/* each span is one line of the three-line subheading */
.mood-hero h2 span {
  display: block;
}

/* only breaks onto its own line on mobile */
.mood-hero h2 .mobile-line {
  display: inline;
}

/* ---------- Category Feed ---------- */

.category-feed {
  display: flex;
  flex-direction: column;
  /* space between articles */
  gap: 80px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 20px 4rem;
}

/* two equal columns: image on the left, text on the right */
.feed-card {
  display: flex;
  gap: 15px;
}

.feed-image {
  flex: 1 1 0;
  align-self: flex-start;
  width: 50%;
  min-width: 0;
  aspect-ratio: 662 / 346;
  object-fit: cover;
}

/* which part of the tall images shows in the wide crop */
.feed-image-monster {
  object-position: center 31%;
}

.feed-image-nine {
  object-position: center 32%;
}

.feed-text {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.feed-category {
  font-size: clamp(1.125rem, 0.9rem + 0.6vw, 1.5rem); /* 24px */
  letter-spacing: 0.12em;
  color: var(--red);
}

.feed-category:hover,
.feed-category:focus-visible {
  text-decoration: underline;
}

.feed-text h3 {
  max-width: 12em;
  margin: 0.25rem 0;
  font-size: var(--h2); /* 48px */
  font-weight: normal;
  line-height: 1.15;
  /* evens out the line lengths when a title wraps */
  text-wrap: balance;
}

.feed-text p {
  font-size: clamp(1.25rem, 0.5rem + 1.67vw, 2rem); /* 32px */
  line-height: 1.25;
}

/* pinned to the bottom so the text lines up with the image */
.view-article {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 0.75rem;
  font-size: clamp(1.125rem, 0.9rem + 0.6vw, 1.5rem); /* 24px */
  letter-spacing: 0.08em;
  color: var(--red);
}

/* line arrow, 2px stroke */
.view-article svg {
  width: 46px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  transition: transform 0.2s;
}

.view-article:hover svg,
.view-article:focus-visible svg {
  transform: translateX(6px);
}

/* ---------- Moods: mobile ---------- */

@media (max-width: 768px) {
  .mood-hero {
    min-height: 0;
    border-bottom-width: 16px;
  }

  /* black behind the text, with only a little wall texture at the bottom */
  .mood-hero-image {
    left: 0;
    object-position: left bottom;
    -webkit-mask-image: linear-gradient(to top, #000, transparent 18%);
    mask-image: linear-gradient(to top, #000, transparent 18%);
  }

  .mood-hero-text {
    width: 100%;
    margin-left: 0;
    padding: calc(var(--slant) + 1.5rem) 1.25rem 5rem;
  }

  /* Explore / by / Mood on three lines */
  .mood-hero h1 {
    font-size: min(23vw, 6rem);
    line-height: 1;
  }

  .mood-hero h1 span {
    display: block;
  }

  /* room under "Explore" so the p doesn't touch the b */
  .mood-hero h1 span:first-child {
    margin-bottom: 0.14em;
  }

  .mood-hero h2 {
    margin-top: 1.5rem;
    font-size: 1.875rem;
  }

  /* "of creepy" drops to its own centered line */
  .mood-hero h2 .mobile-line {
    display: block;
  }

  /* one column: full-width image on top, text below */
  /* space between articles (adds to the text's bottom padding) */
  .category-feed {
    gap: 2.5rem;
    padding: 0 0 2rem;
  }

  .feed-card {
    flex-direction: column;
    gap: 0;
  }

  .feed-image {
    flex: none;
    align-self: stretch;
    width: 100%;
    aspect-ratio: 5 / 4;
  }

  .feed-text {
    flex: none;
    padding: 1rem 1.25rem 2.5rem;
  }

  .feed-category {
    align-self: center;
  }

  .feed-text h3 {
    max-width: none;
    font-size: 2.75rem;
  }

  .feed-text p {
    font-size: 1.75rem;
  }

  .view-article {
    margin-top: 0;
  }
}

/* ==========================================================
   FEED PAGE MOCKUP (feed-mockup.html)
   ========================================================== */

/* ---------- Moods dropdown (header) ---------- */

.main-nav li {
  position: relative;
}

/* small arrow on the Moods tab */
.has-submenu > a::after {
  content: " \25BE";
  font-size: 0.7em;
}

/* hidden until Moods is hovered or reached with the Tab key;
   turned back level so the list hangs straight under the tilted tabs */
.main-nav .submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 20;
  min-width: 100%;
  flex-direction: column;
  gap: 0;
  padding: 0.25rem 0;
  background-color: var(--gray);
  border-top: 4px solid var(--red);
  transform: rotate(2.94deg);
  transform-origin: top left;
}

.has-submenu:hover > .submenu,
.has-submenu:focus-within > .submenu {
  display: flex;
}

.main-nav .submenu a {
  padding: 0.5rem 1.25rem;
  font-size: clamp(1.125rem, 0.9rem + 0.6vw, 1.5rem); /* 24px */
  white-space: nowrap;
  background-color: transparent;
  border-radius: 0;
}

.main-nav .submenu a:hover,
.main-nav .submenu a:focus-visible {
  background-color: var(--red);
}

/* ---------- Feed Hero ---------- */

.feed-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: min(40vw, 580px);
  /* same slanted top edge as the other pages */
  margin-top: calc(var(--slant) * -1);
  clip-path: polygon(0 var(--slant), 100% 0, 100% 100%, 0 100%);
  background-color: var(--black);
  border-bottom: 33px solid var(--red);
  overflow: hidden;
}

/* picture on the right, its left edge fades into black */
.feed-hero-image {
  position: absolute;
  top: 0;
  right: 0;
  width: 60%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 35%);
  mask-image: linear-gradient(to right, transparent, #000 35%);
}

.feed-hero-text {
  position: relative;
  z-index: 1;
  width: 48%;
  margin-left: 20px;
  padding: calc(var(--slant) + 2rem) 0 3rem;
  color: var(--white);
  text-align: center;
}

.back-link {
  display: inline-block;
  margin-bottom: 0.5rem;
  font-size: clamp(1.125rem, 0.9rem + 0.6vw, 1.5rem); /* 24px */
  letter-spacing: 0.08em;
  color: var(--white);
}

.back-link:hover,
.back-link:focus-visible {
  text-decoration: underline;
}

.feed-hero h1 {
  font-size: clamp(4rem, 8.68vw, 7.8125rem); /* 125px */
  line-height: 1.05;
}

.feed-hero h2 {
  margin-top: 1rem;
  font-size: clamp(1.5rem, 3.33vw, 3rem); /* 48px */
  line-height: 1.2;
}

/* ---------- Article Feed: grid of cards ---------- */

.feed-grid-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 20px 5rem;
}

/* 3 across on desktop, 2 on tablets, 1 on phones */
.feed-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 60px 40px;
}

.feed-grid > li {
  flex: 0 1 calc((100% - 80px) / 3);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.feed-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background-color: var(--gray);
}

/* which part of the tall images shows in the crop */
.feed-grid .feed-grid-ghost {
  object-position: center 40%;
}

.feed-grid .feed-grid-monster {
  object-position: center 31%;
}

/* shows the whole image on gray instead of cropping it */
.feed-grid .feed-grid-whole {
  object-fit: contain;
  padding: 1rem;
}

/* black and left-aligned (the site-wide h2 is white and centered) */
.feed-grid h2 {
  margin: 1rem 0 0.5rem;
  font-size: var(--h3); /* 36px */
  color: var(--black);
  text-align: left;
  font-weight: normal;
  line-height: 1.15;
}

.feed-grid p {
  font-size: clamp(1.125rem, 0.9rem + 0.6vw, 1.5rem); /* 24px */
  line-height: 1.3;
}

/* ---------- Feed: tablet ---------- */

@media (max-width: 1024px) {
  .feed-grid > li {
    flex-basis: calc((100% - 40px) / 2);
  }
}

/* ---------- Feed: mobile ---------- */

@media (max-width: 768px) {
  /* Moods dropdown: always listed, indented, inside the hamburger menu */
  .main-nav .submenu {
    display: flex;
    position: static;
    min-width: 0;
    padding: 0;
    border-top: 0;
    background-color: rgba(0, 0, 0, 0.2);
    transform: none;
  }

  .main-nav .submenu a {
    padding: 0.75rem 1.5rem 0.75rem 3rem;
    font-size: 1.125rem;
  }

  .has-submenu > a::after {
    content: none;
  }

  /* text first, then the picture fading in below it */
  .feed-hero {
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
    border-bottom-width: 16px;
  }

  .feed-hero-text {
    width: 100%;
    margin-left: 0;
    padding: calc(var(--slant) + 1.5rem) 1.25rem 0;
  }

  .feed-hero h1 {
    font-size: min(23vw, 6rem);
  }

  .feed-hero h2 {
    font-size: 1.875rem;
  }

  .feed-hero-image {
    position: static;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 35%);
    mask-image: linear-gradient(to bottom, transparent, #000 35%);
  }

  .feed-grid-section {
    padding: 2.5rem 20px 3rem;
  }

  .feed-grid {
    gap: 3rem;
  }
}

@media (max-width: 600px) {
  .feed-grid > li {
    flex-basis: 100%;
  }
}
