:root {
  --olive: #77784f;
  --sage: #b4b978;
  --cream: #f2ead7;
  --cream-deep: #e7dbbd;
  --ink: #17160f;
  --gold: #e4cb50;
  --rust: #c86429;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--olive);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--olive);
  font-family: "Times New Roman", "Noto Serif TC", "PMingLiU", serif;
}

a {
  color: inherit;
}

.farewell-page {
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  background: var(--olive);
}

.camp-header {
  position: relative;
  z-index: 5;
  min-height: 4.25rem;
  padding: 0.65rem clamp(1.25rem, 3vw, 2.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 2px solid rgba(23, 22, 15, 0.18);
  background: var(--sage);
}

.camp-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  text-decoration: none;
  font-size: clamp(1rem, 2vw, 1.5rem);
  font-weight: 700;
  letter-spacing: 0.015em;
}

.camp-brand img {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 50%;
  object-fit: cover;
  filter: sepia(0.2) saturate(0.8);
}

.header-badge {
  padding: 0.65rem 1rem;
  border: 2px solid var(--ink);
  background: transparent;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  white-space: nowrap;
  box-shadow: 3px 3px 0 rgba(23, 22, 15, 0.12);
}

.farewell-stage {
  isolation: isolate;
  position: relative;
  min-height: calc(100svh - 4.25rem);
  padding: clamp(2rem, 4.5vw, 4.5rem);
  display: grid;
  place-items: center;
  background-image: url("./assets/camp-background.png");
  background-position: center top;
  background-size: cover;
  background-repeat: repeat;
}

.farewell-stage::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: radial-gradient(
    circle at center,
    rgba(119, 120, 79, 0.03) 0 28%,
    rgba(76, 76, 43, 0.18) 100%
  );
}

.announcement-card {
  width: min(100%, 70rem);
  border: 3px solid var(--ink);
  background: var(--cream);
  box-shadow: 12px 12px 0 rgba(35, 29, 9, 0.36);
}

.announcement-card__topline {
  min-height: 3rem;
  padding: 0.75rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 2px solid var(--ink);
  background: var(--cream-deep);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.announcement-card__topline span:last-child {
  color: #6a6c3e;
}

.announcement-card__content {
  padding: clamp(1.5rem, 4vw, 3.5rem);
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(18rem, 0.72fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
}

.section-label {
  margin: 0 0 1.15rem;
  color: #6d7046;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

h1 {
  margin: 0;
  max-width: 9em;
  font-size: clamp(3.4rem, 7vw, 7rem);
  line-height: 0.9;
  letter-spacing: -0.07em;
  font-weight: 700;
}

h1::after {
  content: "";
  display: block;
  width: min(100%, 5.4em);
  height: 0.12em;
  margin: 0.28em 0 0.32em;
  background: var(--gold);
  box-shadow: 0.16em 0.12em 0 var(--rust);
}

.shutdown-reason {
  margin: 0;
  font-size: clamp(1.15rem, 1.8vw, 1.45rem);
  line-height: 1.65;
  font-weight: 700;
}

.course-message {
  max-width: 38rem;
  margin: 0.8rem 0 0;
  font-size: 0.96rem;
  line-height: 1.75;
}

.resource-link {
  margin-top: 1.35rem;
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 2px solid var(--ink);
  background: var(--sage);
  font-size: 0.82rem;
  line-height: 1.45;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.resource-link strong {
  white-space: nowrap;
}

.resource-link:hover,
.resource-link:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--ink);
  outline: none;
}

.offline-board {
  position: relative;
  border: 2px solid var(--ink);
  background: var(--olive);
  box-shadow: 7px 7px 0 var(--gold);
}

.offline-board__title {
  min-height: 2.7rem;
  padding: 0 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--ink);
  background: var(--sage);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.offline-board__body {
  position: relative;
  min-height: 23rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  overflow: hidden;
  color: var(--cream);
}

.status-kicker {
  margin: 0;
  color: var(--gold);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.status-word {
  position: relative;
  z-index: 2;
  margin: 0.45rem 0 1.5rem;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: clamp(2.6rem, 5vw, 4.3rem);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.08em;
}

.status-details {
  position: relative;
  z-index: 2;
  width: min(100%, 18rem);
  margin: 0;
  border-top: 1px solid rgba(242, 234, 215, 0.4);
}

.status-details > div {
  padding: 0.65rem 0;
  display: grid;
  grid-template-columns: 5.4rem 1fr;
  gap: 0.8rem;
  border-bottom: 1px solid rgba(242, 234, 215, 0.4);
  font-size: 0.82rem;
}

.status-details dt {
  color: #d4d0b9;
}

.status-details dd {
  margin: 0;
  font-weight: 700;
}

.status-dot {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  margin-right: 0.4rem;
  background: var(--rust);
  box-shadow: 0 0 0 3px rgba(200, 100, 41, 0.2);
}

.coding-horse {
  position: absolute;
  z-index: 1;
  width: 15.5rem;
  max-width: 70%;
  right: -2.5rem;
  bottom: -2.5rem;
  image-rendering: pixelated;
  opacity: 0.8;
}

.announcement-card__footer {
  padding: 1rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 2px solid var(--ink);
  background: var(--sage);
  font-size: 0.85rem;
  font-weight: 700;
}

.announcement-card__footer p {
  margin: 0;
}

@media (max-width: 840px) {
  .farewell-stage {
    padding: 2.5rem 1.4rem;
  }

  .announcement-card__content {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .offline-board {
    width: min(100%, 30rem);
  }

  .announcement-card__footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .camp-header {
    min-height: 3.8rem;
    padding: 0.55rem 0.9rem;
  }

  .camp-brand {
    gap: 0.55rem;
    font-size: 0.9rem;
  }

  .camp-brand img {
    width: 1.8rem;
    height: 1.8rem;
  }

  .header-badge {
    padding: 0.5rem 0.65rem;
    font-size: 0.64rem;
    letter-spacing: 0.04em;
  }

  .farewell-stage {
    min-height: calc(100svh - 3.8rem);
    padding: 1.5rem 0.85rem 2rem;
  }

  .announcement-card {
    box-shadow: 7px 7px 0 rgba(35, 29, 9, 0.36);
  }

  .announcement-card__topline {
    padding: 0.7rem 0.85rem;
    font-size: 0.55rem;
  }

  .announcement-card__content {
    padding: 1.6rem 1.15rem;
  }

  h1 {
    font-size: clamp(3.15rem, 18vw, 4.6rem);
  }

  .resource-link {
    align-items: flex-start;
    flex-direction: column;
  }

  .offline-board__body {
    min-height: 20rem;
  }

  .coding-horse {
    width: 13rem;
    right: -2rem;
  }

  .announcement-card__footer {
    padding: 0.85rem;
    font-size: 0.75rem;
    line-height: 1.5;
  }
}

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