:root {
  --forest-950: #071b17;
  --forest-900: #0b2721;
  --forest-800: #123a30;
  --forest-700: #285c48;
  --sage: #8fae79;
  --paper: #f5eedb;
  --paper-bright: #fffaf0;
  --gold: #d7a24a;
  --gold-light: #f5d99d;
  --ember: #d7733f;
  --ink: #24362e;
  --muted: #66776d;
  --line: rgba(118, 100, 67, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 100% 7%, rgba(215, 162, 74, 0.12), transparent 23%),
    var(--paper);
  font-family: "DM Sans", Arial, sans-serif;
  text-rendering: optimizeLegibility;
  isolation: isolate;
}

body::selection {
  color: #fff;
  background: var(--forest-700);
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  color: #fff;
  background: var(--forest-900);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.changelog-header {
  position: relative;
  z-index: 10;
  display: flex;
  width: min(calc(100% - 40px), 1160px);
  height: 82px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
}

.site-brand {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 11px;
  color: #fff5df;
  font-family: "MedievalSharp", Georgia, serif;
  font-size: 19px;
  text-decoration: none;
}

.site-brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 5px 9px rgba(0, 0, 0, 0.35));
}

.changelog-header nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.changelog-header nav a {
  color: rgba(255, 248, 231, 0.72);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}

.changelog-header nav a:hover,
.changelog-header nav a:focus-visible {
  color: #fff5df;
}

.changelog-header .portal-link {
  padding: 10px 13px;
  border: 1px solid rgba(245, 217, 157, 0.32);
  border-radius: 8px;
}

.changelog-hero {
  background-color: var(--forest-950);
}

body::before {
  position: absolute;
  z-index: 0;
  top: 0;
  right: 0;
  left: 0;
  height: 580px;
  content: "";
  background:
    linear-gradient(90deg, rgba(5, 24, 20, 0.97), rgba(7, 28, 23, 0.76)),
    linear-gradient(0deg, rgba(4, 20, 16, 0.94), transparent 48%),
    url("/assets/cozy-gielinor-background.png") center 45% / cover no-repeat;
  pointer-events: none;
}

.changelog-header,
main,
footer {
  position: relative;
  z-index: 1;
}

.changelog-hero {
  position: relative;
  display: grid;
  width: min(calc(100% - 40px), 1160px);
  min-height: 430px;
  overflow: hidden;
  align-items: center;
  gap: 50px;
  margin: 0 auto;
  padding: clamp(55px, 8vw, 95px);
  border: 1px solid rgba(245, 217, 157, 0.16);
  border-radius: 22px;
  color: #fff;
  background:
    radial-gradient(circle at 78% 40%, rgba(215, 162, 74, 0.12), transparent 25%),
    linear-gradient(135deg, rgba(13, 49, 40, 0.9), rgba(5, 25, 20, 0.97));
  box-shadow: 0 28px 80px rgba(2, 17, 13, 0.32);
  grid-template-columns: minmax(0, 1fr) auto;
}

.changelog-hero::after {
  position: absolute;
  right: -110px;
  bottom: -220px;
  width: 470px;
  height: 470px;
  border: 1px solid rgba(245, 217, 157, 0.1);
  border-radius: 50%;
  content: "";
  box-shadow: 0 0 0 55px rgba(245, 217, 157, 0.025), 0 0 0 110px rgba(245, 217, 157, 0.012);
}

.hero-orbit {
  display: none;
}

.hero-copy,
.current-release {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: flex;
  margin: 0 0 14px;
  align-items: center;
  gap: 9px;
  color: #b47831;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow span {
  width: 22px;
  height: 1px;
  background: currentColor;
}

.changelog-hero .eyebrow {
  color: var(--gold-light);
}

.changelog-hero h1 {
  max-width: 680px;
  margin: 0;
  color: #fff5df;
  font-family: "MedievalSharp", Georgia, serif;
  font-size: clamp(48px, 7vw, 78px);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 0.98;
}

.changelog-hero h1 em {
  color: #f0c66f;
  font-style: normal;
}

.hero-copy > p:last-child {
  max-width: 590px;
  margin: 25px 0 0;
  color: rgba(235, 242, 224, 0.65);
  font-size: 14px;
  line-height: 1.75;
}

.current-release {
  display: grid;
  min-width: 190px;
  min-height: 190px;
  place-content: center;
  border: 1px solid rgba(245, 217, 157, 0.24);
  border-radius: 50%;
  text-align: center;
  background: rgba(255, 249, 232, 0.04);
  box-shadow: inset 0 0 0 15px rgba(245, 217, 157, 0.025);
}

.current-release small,
.current-release span {
  color: rgba(239, 239, 217, 0.52);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.current-release strong {
  margin: 5px 0 8px;
  color: #f5d99d;
  font-family: "MedievalSharp", Georgia, serif;
  font-size: 43px;
  font-weight: 400;
}

.version-policy,
.release-section {
  width: min(calc(100% - 40px), 1060px);
  margin: 0 auto;
}

.version-policy {
  display: grid;
  gap: clamp(36px, 7vw, 80px);
  padding: 110px 0 100px;
  grid-template-columns: minmax(230px, 0.52fr) minmax(0, 1fr);
}

.version-policy h2,
.release-heading h2 {
  margin: 0;
  color: #2d4738;
  font-family: "MedievalSharp", Georgia, serif;
  font-size: clamp(34px, 5vw, 51px);
  font-weight: 400;
  line-height: 1.08;
}

.policy-grid {
  display: grid;
  gap: 10px;
}

.policy-grid article {
  display: grid;
  align-items: start;
  gap: 4px 16px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 250, 240, 0.68);
  grid-template-columns: 70px minmax(0, 1fr);
}

.policy-grid article > span {
  padding-top: 2px;
  color: #ad7130;
  font-family: "MedievalSharp", Georgia, serif;
  font-size: 15px;
  grid-row: 1 / span 2;
}

.policy-grid h3 {
  margin: 0;
  color: #3a5143;
  font-size: 12px;
}

.policy-grid p {
  margin: 0;
  color: #77837b;
  font-size: 10px;
  line-height: 1.55;
}

.release-section {
  padding: 20px 0 120px;
}

.release-heading {
  max-width: 670px;
  margin-bottom: 55px;
}

.release-heading > p:last-child {
  max-width: 600px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.release-list {
  position: relative;
  display: grid;
  gap: 14px;
}

.release-list::before {
  position: absolute;
  top: 30px;
  bottom: 30px;
  left: 129px;
  width: 1px;
  content: "";
  background: linear-gradient(transparent, rgba(139, 111, 62, 0.25) 5%, rgba(139, 111, 62, 0.25) 95%, transparent);
}

.release-card {
  position: relative;
  display: grid;
  gap: 44px;
  padding: clamp(28px, 5vw, 48px);
  border: 1px solid rgba(114, 102, 74, 0.18);
  border-radius: 16px;
  background: rgba(255, 251, 242, 0.77);
  box-shadow: 0 12px 35px rgba(75, 70, 51, 0.055);
  grid-template-columns: 105px minmax(0, 1fr);
}

.release-card::before {
  position: absolute;
  z-index: 1;
  top: 53px;
  left: 124px;
  width: 9px;
  height: 9px;
  border: 3px solid var(--paper);
  border-radius: 50%;
  content: "";
  background: #bc833d;
  box-shadow: 0 0 0 1px rgba(138, 103, 55, 0.2);
}

.release-current {
  border-color: rgba(174, 122, 48, 0.38);
  background:
    radial-gradient(circle at 100% 0, rgba(222, 175, 87, 0.13), transparent 32%),
    rgba(255, 251, 240, 0.92);
}

.release-origin {
  background:
    linear-gradient(145deg, rgba(18, 58, 48, 0.98), rgba(7, 29, 24, 0.98));
}

.release-origin::before {
  border-color: var(--forest-900);
  background: #efc66f;
}

.release-meta {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.release-version {
  color: #a56828;
  font-family: "MedievalSharp", Georgia, serif;
  font-size: 22px;
}

.release-meta time {
  color: #8c968e;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.45;
  text-transform: uppercase;
}

.release-copy {
  padding-left: 6px;
}

.release-type {
  display: inline-flex;
  margin: 0 0 9px;
  padding: 5px 7px;
  border-radius: 5px;
  color: #6a754f;
  background: #edf1df;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.release-type-fix {
  color: #9a622d;
  background: #f5e7cf;
}

.release-copy h3 {
  margin: 0;
  color: #334c3c;
  font-family: "MedievalSharp", Georgia, serif;
  font-size: clamp(24px, 4vw, 31px);
  font-weight: 400;
  line-height: 1.16;
}

.release-copy > p:not(.release-type) {
  margin: 13px 0 0;
  color: #68786e;
  font-size: 12px;
  line-height: 1.7;
}

.release-copy ul {
  display: grid;
  gap: 9px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.release-copy li {
  position: relative;
  padding-left: 18px;
  color: #5d6f64;
  font-size: 11px;
  line-height: 1.65;
}

.release-copy li::before {
  position: absolute;
  top: 0.68em;
  left: 0;
  width: 6px;
  height: 6px;
  border: 1px solid #c59148;
  border-radius: 50%;
  content: "";
}

.release-origin .release-version,
.release-origin .release-copy h3 {
  color: #fff1d5;
}

.release-origin .release-meta time,
.release-origin .release-copy > p:not(.release-type),
.release-origin .release-copy li {
  color: rgba(229, 239, 220, 0.58);
}

.release-origin .release-type {
  color: #efd39c;
  background: rgba(245, 217, 157, 0.1);
}

footer {
  display: grid;
  align-items: center;
  gap: 22px;
  padding: 45px max(24px, calc((100vw - 1060px) / 2));
  color: rgba(234, 240, 222, 0.58);
  background: #061a16;
  grid-template-columns: 1fr auto;
}

.footer-brand img {
  width: 38px;
  height: 38px;
}

.footer-brand {
  font-size: 16px;
}

footer p {
  margin: 0;
  font-family: "MedievalSharp", Georgia, serif;
  font-size: 13px;
}

footer small {
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  color: rgba(234, 240, 222, 0.3);
  font-size: 8px;
  grid-column: 1 / -1;
}

a:focus-visible {
  outline: 2px solid #f2c96f;
  outline-offset: 4px;
}

@media (max-width: 760px) {
  .changelog-header {
    height: 72px;
  }

  .site-brand span {
    display: none;
  }

  .site-brand img {
    width: 39px;
    height: 39px;
  }

  .changelog-header nav {
    gap: 12px;
  }

  .changelog-header nav > a:first-child {
    display: none;
  }

  .changelog-hero {
    min-height: 500px;
    align-content: center;
    padding: 44px 30px;
    grid-template-columns: 1fr;
  }

  .current-release {
    min-width: 0;
    min-height: 0;
    width: max-content;
    padding: 14px 18px;
    border-radius: 11px;
    place-content: start;
    text-align: left;
  }

  .current-release strong {
    margin: 3px 0 6px;
    font-size: 31px;
  }

  .version-policy {
    padding: 85px 0 80px;
    grid-template-columns: 1fr;
  }

  .release-list::before {
    display: none;
  }

  .release-card {
    gap: 22px;
    grid-template-columns: 1fr;
  }

  .release-card::before {
    display: none;
  }

  .release-meta {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
  }

  .release-copy {
    padding-left: 0;
  }

  footer {
    justify-items: center;
    text-align: center;
    grid-template-columns: 1fr;
  }

  footer small {
    grid-column: auto;
  }
}

@media (max-width: 440px) {
  .changelog-header,
  .changelog-hero,
  .version-policy,
  .release-section {
    width: calc(100% - 24px);
  }

  .changelog-header .portal-link {
    padding: 9px 10px;
  }

  .changelog-hero {
    min-height: 470px;
    padding: 38px 24px;
  }

  .policy-grid article {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .release-card {
    padding: 25px 22px;
  }

  .release-meta {
    display: grid;
    gap: 3px;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
