@import url("https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700;800&family=Libre+Baskerville:wght@400;700&display=swap");

/* =========================================================
   ROOT
========================================================= */

:root {
  --background: #05060a;
  --background-deep: #020307;

  --panel: rgba(18, 18, 25, 0.94);
  --panel-light: rgba(32, 30, 38, 0.92);

  --cream: #f5ead0;
  --cream-muted: rgba(245, 234, 208, 0.72);

  --gold: #d8a64b;
  --gold-light: #f4deaa;
  --gold-dark: #7b4b16;

  --red: #9d3028;
  --blue: #2d65a5;
  --green: #39825c;
  --purple: #7042a0;

  --content-width: 1460px;
}

/* =========================================================
   RESET
========================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;

  margin: 0;

  overflow-x: hidden;

  color: var(--cream);

  background:
    radial-gradient(
      circle at 15% 6%,
      rgba(108, 56, 164, 0.2),
      transparent 38rem
    ),
    radial-gradient(
      circle at 88% 20%,
      rgba(173, 74, 30, 0.15),
      transparent 34rem
    ),
    linear-gradient(
      180deg,
      #0a0b11,
      var(--background) 45%,
      var(--background-deep)
    );

  font-family:
    "Libre Baskerville",
    Georgia,
    serif;
}

img {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

/* =========================================================
   ATMOSPHERE
========================================================= */

.atmosphere {
  position: fixed;
  z-index: -10;

  inset: 0;

  overflow: hidden;
  pointer-events: none;
}

.atmosphere__purple,
.atmosphere__ember,
.atmosphere__green {
  position: absolute;

  width: 58vw;
  height: 58vw;

  border-radius: 50%;

  opacity: 0.15;

  filter: blur(115px);

  animation:
    atmospheric-drift
    24s
    ease-in-out
    infinite
    alternate;
}

.atmosphere__purple {
  top: -28vw;
  left: -18vw;

  background: #7440b2;
}

.atmosphere__ember {
  right: -25vw;
  bottom: -34vw;

  background: #a34d22;

  animation-delay: -8s;
}

.atmosphere__green {
  top: 30%;
  right: 12%;

  width: 35vw;
  height: 35vw;

  background: #286b4e;

  animation-delay: -14s;
}

.embers {
  position: absolute;

  inset: 0;
}

.embers span {
  position: absolute;

  bottom: -20px;

  width: 4px;
  height: 4px;

  border-radius: 50%;

  opacity: 0;

  background: #ffc568;

  box-shadow:
    0 0 8px rgba(255, 194, 103, 0.9),
    0 0 18px rgba(255, 126, 33, 0.45);

  animation:
    ember-rise
    18s
    linear
    infinite;
}

.embers span:nth-child(1) {
  left: 6%;
  animation-delay: -2s;
}

.embers span:nth-child(2) {
  left: 15%;
  animation-delay: -8s;
}

.embers span:nth-child(3) {
  left: 25%;
  animation-delay: -12s;
}

.embers span:nth-child(4) {
  left: 34%;
  animation-delay: -4s;
}

.embers span:nth-child(5) {
  left: 45%;
  animation-delay: -15s;
}

.embers span:nth-child(6) {
  left: 57%;
  animation-delay: -7s;
}

.embers span:nth-child(7) {
  left: 68%;
  animation-delay: -10s;
}

.embers span:nth-child(8) {
  left: 78%;
  animation-delay: -1s;
}

.embers span:nth-child(9) {
  left: 88%;
  animation-delay: -13s;
}

.embers span:nth-child(10) {
  left: 96%;
  animation-delay: -6s;
}

/* =========================================================
   HEADER
========================================================= */

.site-header {
  position: sticky;
  z-index: 200;
  top: 0;

  display: grid;

  grid-template-columns:
    minmax(250px, 1fr)
    auto
    minmax(250px, 1fr);

  align-items: center;

  gap: 28px;

  min-height: 76px;

  padding:
    10px
    clamp(18px, 3vw, 48px);

  border-bottom:
    1px solid
    rgba(216, 166, 75, 0.22);

  background:
    linear-gradient(
      180deg,
      rgba(10, 10, 14, 0.97),
      rgba(7, 8, 12, 0.88)
    );

  box-shadow:
    0 9px 28px
    rgba(0, 0, 0, 0.42);

  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;

  align-items: center;

  gap: 13px;
}

.brand__logo {
  width: 54px;
  height: 54px;

  object-fit: contain;
}

.brand__text {
  display: flex;
  flex-direction: column;
}

.brand__text strong {
  color: var(--gold-light);

  font-family:
    "Cinzel",
    Georgia,
    serif;

  font-size: 1.1rem;
}

.brand__text small {
  margin-top: 4px;

  color:
    rgba(245, 231, 201, 0.57);

  font-size: 0.64rem;
}

.main-nav {
  display: flex;

  justify-content: center;

  gap:
    clamp(
      18px,
      2.2vw,
      34px
    );
}

.main-nav a {
  position: relative;

  padding: 10px 1px;

  color: #efd79e;

  font-family:
    "Cinzel",
    Georgia,
    serif;

  font-size: 0.68rem;
  font-weight: 700;

  white-space: nowrap;
}

.main-nav a::after {
  position: absolute;

  right: 50%;
  bottom: 1px;
  left: 50%;

  height: 1px;

  content: "";

  background: var(--gold);

  transition:
    right 0.2s ease,
    left 0.2s ease;
}

.main-nav a:hover::after,
.main-nav a:focus-visible::after,
.main-nav a[aria-current="page"]::after {
  right: 0;
  left: 0;
}

/* =========================================================
   AUTH
========================================================= */

.auth-actions {
  display: flex;

  align-items: center;
  justify-content: flex-end;

  gap: 10px;

  justify-self: end;
}

.auth-button {
  min-width: 88px;
  min-height: 40px;

  padding:
    9px
    14px;

  border:
    1px solid
    rgba(216, 166, 75, 0.42);

  border-radius: 7px;

  color: var(--gold-light);

  background:
    linear-gradient(
      180deg,
      #2d1d11,
      #0e0d10
    );

  font-family:
    "Cinzel",
    Georgia,
    serif;

  font-size: 0.66rem;
  font-weight: 700;

  cursor: pointer;

  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.auth-button--primary {
  color: #271405;

  background:
    linear-gradient(
      180deg,
      #f1d076,
      #b97823
    );
}

.auth-button:hover,
.auth-button:focus-visible {
  border-color: var(--gold-light);

  box-shadow:
    0 0 14px
    rgba(216, 166, 75, 0.3);

  outline: none;

  transform: translateY(-2px);
}

/* =========================================================
   HERO
========================================================= */

.hero {
  display: grid;

  grid-template-columns:
    minmax(480px, 0.95fr)
    minmax(0, 1.05fr);

  align-items: center;

  gap:
    clamp(
      38px,
      6vw,
      90px
    );

  width:
    min(
      calc(100% - 48px),
      var(--content-width)
    );

  min-height:
    calc(100svh - 76px);

  margin: 0 auto;

  padding:
    clamp(20px, 3vw, 42px)
    0;
}

.hero__image-wrap {
  position: relative;

  display: grid;

  place-items: center;

  align-self: stretch;

  min-height: 620px;
}

.hero__image {
  position: relative;
  z-index: 2;

  width:
    min(
      100%,
      700px
    );

  max-height:
    calc(100svh - 110px);

  object-fit: contain;

  filter:
    drop-shadow(
      0 28px 48px
      rgba(0, 0, 0, 0.6)
    );

  animation:
    tippy-float
    7s
    ease-in-out
    infinite;
}

.hero__glow {
  position: absolute;

  width: 420px;
  height: 420px;

  border-radius: 50%;

  background:
    radial-gradient(
      circle,
      rgba(66, 157, 100, 0.24),
      rgba(116, 57, 173, 0.16) 48%,
      transparent 72%
    );

  filter: blur(28px);
}

.hero__content {
  max-width: 680px;
}

.eyebrow {
  margin:
    0
    0
    14px;

  color: var(--gold);

  font-family:
    "Cinzel",
    Georgia,
    serif;

  font-size: 0.7rem;
  font-weight: 700;

  letter-spacing: 0.18em;

  text-transform: uppercase;
}

.hero h1,
.section-heading h2,
.panel-heading h3 {
  font-family:
    "Cinzel",
    Georgia,
    serif;
}

.hero h1 {
  margin: 0;

  color: #fff1cc;

  font-size:
    clamp(
      3.6rem,
      5.3vw,
      6.2rem
    );

  line-height: 0.94;

  letter-spacing: -0.045em;

  text-wrap: balance;
}

.hero h1 span {
  display: block;
}

.hero h1 span:last-child {
  color: var(--gold-light);
}

.hero__dnd-logo {
  width:
    min(
      100%,
      360px
    );

  max-height: 115px;

  margin-top: 24px;

  object-fit: contain;
  object-position: left center;

  filter:
    drop-shadow(
      0 10px 18px
      rgba(0, 0, 0, 0.5)
    );
}

.hero__description {
  max-width: 650px;

  margin:
    25px
    0
    0;

  color: var(--cream-muted);

  font-size: 1.02rem;
  line-height: 1.82;
}

.greeting {
  margin:
    18px
    0
    0;

  color: var(--gold-light);

  font-family:
    "Cinzel",
    Georgia,
    serif;

  font-size: 0.88rem;
}

.greeting:empty {
  display: none;
}

.hero__buttons {
  display: flex;
  flex-wrap: wrap;

  gap: 14px;

  margin-top: 29px;
}

.hero__jump {
  display: inline-flex;

  margin-top: 28px;

  color: #dcb66a;

  font-family:
    "Cinzel",
    Georgia,
    serif;

  font-size: 0.7rem;
  font-weight: 700;

  letter-spacing: 0.08em;
}

.hero__jump::after {
  margin-left: 9px;

  content: "↓";
}

/* =========================================================
   FANTASY BUTTONS
========================================================= */

.fantasy-button {
  display: inline-flex;

  align-items: center;
  justify-content: center;

  min-width: 205px;
  min-height: 52px;

  padding:
    13px
    20px;

  border:
    1px solid
    rgba(238, 194, 109, 0.5);

  border-radius: 8px;

  color: #f9e5b7;

  font-family:
    "Cinzel",
    Georgia,
    serif;

  font-size: 0.69rem;
  font-weight: 700;

  text-align: center;

  cursor: pointer;

  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.fantasy-button--gold {
  color: #281606;

  background:
    linear-gradient(
      180deg,
      #e2ae4e,
      #925b1c
    );
}

.fantasy-button--red {
  background:
    linear-gradient(
      180deg,
      #923329,
      #4c1210
    );
}

.fantasy-button--blue {
  background:
    linear-gradient(
      180deg,
      #2f6599,
      #112a48
    );
}

.fantasy-button:hover,
.fantasy-button:focus-visible {
  border-color: var(--gold-light);

  box-shadow:
    0 0 18px
    rgba(218, 167, 77, 0.32),
    0 12px 24px
    rgba(0, 0, 0, 0.38);

  outline: none;

  transform: translateY(-4px);
}

/* =========================================================
   GENERATOR
========================================================= */

.generator {
  position: relative;

  width:
    min(
      calc(100% - 48px),
      var(--content-width)
    );

  margin: 0 auto;

  padding:
    90px
    0
    115px;
}

.generator::before {
  position: absolute;

  top: 0;
  left: 50%;

  width:
    min(
      900px,
      80%
    );

  height: 1px;

  content: "";

  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(222, 171, 77, 0.7),
      transparent
    );

  transform: translateX(-50%);
}

.section-heading {
  max-width: 860px;

  margin:
    0
    auto
    42px;

  text-align: center;
}

.section-heading h2 {
  margin: 0;

  color: var(--gold-light);

  font-size:
    clamp(
      2.4rem,
      4.8vw,
      4.7rem
    );

  line-height: 1.05;

  letter-spacing: -0.035em;

  text-wrap: balance;
}

.section-heading > p:last-child {
  max-width: 720px;

  margin:
    17px
    auto
    0;

  color: var(--cream-muted);

  line-height: 1.75;
}

.generator-layout {
  display: grid;

  grid-template-columns:
    minmax(0, 1.05fr)
    minmax(420px, 0.95fr);

  align-items: start;

  gap: 24px;
}

.category-panel,
.result-panel {
  padding:
    clamp(
      24px,
      3vw,
      36px
    );

  border:
    1px solid
    rgba(226, 180, 92, 0.22);

  border-radius: 16px;

  background:
    linear-gradient(
      145deg,
      rgba(31, 30, 38, 0.96),
      rgba(9, 10, 14, 0.98)
    );

  box-shadow:
    0 26px 58px
    rgba(0, 0, 0, 0.5);
}

.panel-heading {
  margin-bottom: 24px;
}

.panel-heading h3 {
  margin: 0;

  color: var(--gold-light);

  font-size:
    clamp(
      1.7rem,
      2.8vw,
      2.6rem
    );
}

.category-grid {
  display: grid;

  grid-template-columns:
    repeat(
      2,
      minmax(0, 1fr)
    );

  gap: 14px;
}

.category-option {
  display: block;

  cursor: pointer;
}

.category-option input {
  position: absolute;

  width: 1px;
  height: 1px;

  overflow: hidden;

  opacity: 0;
}

.category-card {
  position: relative;

  display: grid;

  grid-template-columns:
    74px
    minmax(0, 1fr);

  align-items: center;

  gap: 15px;

  min-height: 140px;

  padding: 17px;

  border:
    1px solid
    rgba(231, 189, 106, 0.18);

  border-radius: 11px;

  background:
    linear-gradient(
      145deg,
      rgba(38, 37, 46, 0.9),
      rgba(12, 12, 17, 0.97)
    );

  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.category-card__image {
  display: grid;

  place-items: center;

  width: 70px;
  height: 70px;

  border:
    1px solid
    rgba(226, 182, 95, 0.3);

  border-radius: 50%;

  background:
    radial-gradient(
      circle,
      rgba(255, 255, 255, 0.09),
      rgba(15, 15, 21, 0.8)
    );
}

.category-card__image img {
  width: 52px;
  height: 52px;

  object-fit: contain;
}

.category-card__text {
  display: flex;
  flex-direction: column;
}

.category-card__text strong {
  color: #f5dda7;

  font-family:
    "Cinzel",
    Georgia,
    serif;

  font-size: 0.82rem;
  line-height: 1.35;
}

.category-card__text small {
  margin-top: 7px;

  color: var(--cream-muted);

  font-size: 0.68rem;
  line-height: 1.5;
}

.category-card__check {
  position: absolute;

  top: 9px;
  right: 11px;

  color: transparent;

  font-size: 1rem;

  transition:
    color 0.2s ease,
    text-shadow 0.2s ease;
}

.category-card--purple {
  box-shadow:
    inset 3px 0 0
    rgba(112, 66, 160, 0.7);
}

.category-card--green {
  box-shadow:
    inset 3px 0 0
    rgba(57, 130, 92, 0.7);
}

.category-card--blue {
  box-shadow:
    inset 3px 0 0
    rgba(45, 101, 165, 0.7);
}

.category-card--red {
  box-shadow:
    inset 3px 0 0
    rgba(157, 48, 40, 0.7);
}

.category-option:hover .category-card {
  border-color:
    rgba(239, 203, 132, 0.46);

  transform: translateY(-4px);
}

.category-option input:focus-visible + .category-card {
  border-color: var(--gold-light);

  outline:
    2px solid
    rgba(216, 166, 75, 0.5);

  outline-offset: 2px;
}

.category-option input:checked + .category-card {
  border-color: var(--gold-light);

  box-shadow:
    inset 0 0 0 1px
    rgba(245, 222, 171, 0.12),
    0 0 22px
    rgba(216, 166, 75, 0.25);

  transform: translateY(-4px);
}

.category-option input:checked
+ .category-card
.category-card__check {
  color: var(--gold-light);

  text-shadow:
    0 0 10px
    rgba(232, 185, 92, 0.8);
}

/* =========================================================
   RESULT CARD
========================================================= */

.result-panel {
  position: sticky;

  top: 100px;
}

.trinket-card {
  position: relative;

  display: flex;
  flex-direction: column;

  align-items: center;
  justify-content: center;

  min-height: 390px;

  padding:
    48px
    38px
    34px;

  overflow: hidden;

  border:
    1px solid
    rgba(150, 102, 45, 0.55);

  border-radius: 10px;

  color: #211308;

  text-align: center;

  background:
    radial-gradient(
      circle at 50% 32%,
      rgba(255, 249, 213, 0.9),
      transparent 58%
    ),
    linear-gradient(
      135deg,
      #ddc28a,
      #f1dfad 45%,
      #c9a86c
    );

  box-shadow:
    inset 0 0 35px
    rgba(91, 53, 17, 0.27),
    0 18px 38px
    rgba(0, 0, 0, 0.45);
}

.trinket-card::before,
.trinket-card::after {
  position: absolute;

  content: "";

  pointer-events: none;
}

.trinket-card::before {
  inset: 12px;

  border:
    1px solid
    rgba(105, 61, 20, 0.42);

  border-radius: 6px;
}

.trinket-card::after {
  inset:
    22px
    24px;

  opacity: 0.25;

  background:
    repeating-linear-gradient(
      0deg,
      transparent 0 9px,
      rgba(91, 54, 20, 0.08) 10px
    );
}

.trinket-card > * {
  position: relative;
  z-index: 2;
}

.trinket-card__rune {
  display: grid;

  place-items: center;

  width: 58px;
  height: 58px;

  margin-bottom: 20px;

  border:
    1px solid
    rgba(91, 50, 15, 0.5);

  border-radius: 50%;

  color: #70421b;

  font-size: 1.6rem;

  background:
    rgba(255, 244, 201, 0.4);

  box-shadow:
    0 0 18px
    rgba(108, 66, 25, 0.2);
}

.trinket-card__category {
  margin: 0;

  color: #5d3514;

  font-family:
    "Cinzel",
    Georgia,
    serif;

  font-size:
    clamp(
      1.15rem,
      2vw,
      1.6rem
    );

  font-weight: 700;
}

.trinket-card__description {
  max-width: 560px;

  margin:
    18px
    0
    0;

  color: #251409;

  font-size:
    clamp(
      1rem,
      1.5vw,
      1.2rem
    );

  line-height: 1.75;
}

.trinket-card__value {
  margin:
    20px
    0
    0;

  color: #794718;

  font-family:
    "Cinzel",
    Georgia,
    serif;

  font-size: 0.95rem;
  font-weight: 700;
}

.trinket-card__divider {
  width:
    min(
      280px,
      75%
    );

  height: 1px;

  margin:
    25px
    0
    17px;

  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(105, 61, 20, 0.7),
      transparent
    );
}

.trinket-card__remaining {
  margin: 0;

  color: #65401f;

  font-size: 0.74rem;
  font-weight: 700;
}

.generator-actions {
  display: flex;

  justify-content: center;

  gap: 12px;

  margin-top: 22px;
}

.generator-actions .fantasy-button {
  min-width: 0;

  flex: 1;
}

.generator-message {
  min-height: 24px;

  margin:
    17px
    0
    0;

  color: #e9c578;

  font-size: 0.8rem;

  text-align: center;
}

/* =========================================================
   RELATED TOOLS
========================================================= */

.related-tools {
  padding:
    88px
    24px
    110px;

  background:
    linear-gradient(
      180deg,
      transparent,
      rgba(255, 255, 255, 0.018),
      transparent
    );
}

.related-grid {
  display: grid;

  grid-template-columns:
    repeat(
      3,
      minmax(0, 1fr)
    );

  gap: 16px;

  width:
    min(
      100%,
      1120px
    );

  margin: 0 auto;
}

.related-card {
  display: grid;

  grid-template-columns:
    58px
    minmax(0, 1fr);

  align-items: center;

  gap: 16px;

  min-height: 112px;

  padding:
    20px
    22px;

  border:
    1px solid
    rgba(223, 175, 87, 0.2);

  border-radius: 10px;

  background:
    linear-gradient(
      135deg,
      rgba(30, 30, 38, 0.94),
      rgba(10, 10, 15, 0.97)
    );

  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.related-card > span {
  display: grid;

  place-items: center;

  width: 54px;
  height: 54px;

  border:
    1px solid
    rgba(218, 169, 75, 0.4);

  border-radius: 50%;

  color: var(--gold-light);

  font-size: 1.4rem;

  background:
    radial-gradient(
      circle,
      rgba(162, 85, 202, 0.2),
      rgba(20, 17, 26, 0.8)
    );
}

.related-card div {
  display: flex;
  flex-direction: column;
}

.related-card strong {
  color: #f5dda7;

  font-family:
    "Cinzel",
    Georgia,
    serif;

  font-size: 0.84rem;
}

.related-card small {
  margin-top: 7px;

  color: var(--cream-muted);

  font-size: 0.7rem;
  line-height: 1.5;
}

.related-card:hover,
.related-card:focus-visible {
  border-color:
    rgba(238, 198, 120, 0.5);

  box-shadow:
    0 18px 35px
    rgba(0, 0, 0, 0.45);

  outline: none;

  transform: translateY(-5px);
}

.related-card--red {
  box-shadow:
    inset 3px 0 0
    rgba(157, 48, 40, 0.7);
}

.related-card--purple {
  box-shadow:
    inset 3px 0 0
    rgba(112, 66, 160, 0.7);
}

.related-card--blue {
  box-shadow:
    inset 3px 0 0
    rgba(45, 101, 165, 0.7);
}

/* =========================================================
   FOOTER
========================================================= */

.site-footer {
  display: grid;

  grid-template-columns:
    minmax(230px, 1fr)
    auto
    minmax(260px, 1fr);

  align-items: center;

  gap: 28px;

  width:
    min(
      calc(100% - 48px),
      var(--content-width)
    );

  margin: 0 auto;

  padding:
    28px
    0
    42px;

  border-top:
    1px solid
    rgba(224, 174, 83, 0.2);

  color:
    rgba(245, 231, 202, 0.55);

  font-size: 0.66rem;
}

.site-footer__brand {
  display: flex;

  align-items: center;

  gap: 11px;
}

.site-footer__brand img {
  width: 45px;
  height: 45px;

  object-fit: contain;
}

.site-footer__brand div {
  display: flex;
  flex-direction: column;
}

.site-footer__brand strong {
  color: var(--gold-light);

  font-family:
    "Cinzel",
    Georgia,
    serif;

  font-size: 0.84rem;
}

.site-footer__brand span {
  margin-top: 4px;

  font-size: 0.59rem;
}

.site-footer nav {
  display: flex;

  justify-content: center;

  gap: 20px;
}

.site-footer nav a {
  color: #ddb66a;

  font-family:
    "Cinzel",
    Georgia,
    serif;

  font-size: 0.62rem;
}

.site-footer__legal {
  text-align: right;
}

.site-footer__legal p {
  margin:
    3px
    0;

  line-height: 1.5;
}

.overlay {
  z-index: 999;
}

.modal {
  z-index: 1000;
}

/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1120px) {
  .site-header {
    grid-template-columns:
      minmax(220px, 1fr)
      auto;
  }

  .main-nav {
    display: none;
  }

  .hero {
    grid-template-columns:
      minmax(390px, 45%)
      minmax(0, 55%);
  }

  .generator-layout {
    grid-template-columns: 1fr;
  }

  .result-panel {
    position: relative;
    top: auto;
  }

  .site-footer {
    grid-template-columns:
      1fr
      auto;
  }

  .site-footer__legal {
    grid-column:
      1
      /
      -1;

    text-align: center;
  }
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns:
      minmax(300px, 42%)
      minmax(0, 58%);

    width:
      min(
        calc(100% - 32px),
        var(--content-width)
      );
  }

  .hero__image-wrap {
    min-height: 520px;
  }

  .hero h1 {
    font-size:
      clamp(
        3rem,
        7vw,
        4.5rem
      );
  }

  .category-grid {
    grid-template-columns: 1fr;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   PHONE
========================================================= */

@media (max-width: 700px) {
  body {
    min-width: 0;
  }

  .site-header {
    position: relative;

    display: flex;
    flex-direction: column;

    min-height: 0;

    gap: 10px;

    padding:
      10px
      14px
      12px;
  }

  .brand {
    justify-content: center;

    width: 100%;
  }

  .brand__logo {
    width: 46px;
    height: 46px;
  }

  .brand__text strong {
    font-size: 1rem;
  }

  .brand__text small {
    display: none;
  }

  .auth-actions {
    justify-content: center;

    width: 100%;
  }

  .auth-button {
    min-width: 80px;

    padding:
      8px
      11px;

    font-size: 0.64rem;
  }

  .hero {
    display: flex;
    flex-direction: column;

    width: 100%;
    min-height: 0;

    gap: 0;

    padding: 0;
  }

  .hero__image-wrap {
    width: 100%;
    min-height: 0;
    height:
      clamp(
        390px,
        112vw,
        540px
      );

    overflow: hidden;
  }

  .hero__image {
    width: 100%;
    height: 100%;
    max-height: none;

    object-fit: contain;
    object-position: center bottom;

    animation: none;
  }

  .hero__glow {
    width: 280px;
    height: 280px;
  }

  .hero__content {
    width: 100%;
    max-width: none;

    padding:
      28px
      18px
      54px;

    text-align: center;

    background:
      radial-gradient(
        circle at 50% 0,
        rgba(105, 50, 155, 0.18),
        transparent 62%
      ),
      linear-gradient(
        180deg,
        #05060a,
        rgba(5, 6, 10, 0.94)
      );
  }

  .hero h1 {
    font-size:
      clamp(
        2.65rem,
        12vw,
        4rem
      );

    line-height: 0.98;
  }

  .hero__dnd-logo {
    margin-inline: auto;

    object-position: center;
  }

  .hero__description {
    margin-inline: auto;

    font-size: 0.9rem;
    line-height: 1.68;
  }

  .hero__buttons {
    display: grid;

    grid-template-columns: 1fr;

    width:
      min(
        100%,
        360px
      );

    margin:
      26px
      auto
      0;
  }

  .fantasy-button {
    width: 100%;
    min-width: 0;
  }

  .generator {
    width:
      calc(100% - 20px);

    padding:
      68px
      0
      80px;
  }

  .section-heading {
    margin-bottom: 29px;

    padding:
      0
      8px;
  }

  .section-heading h2 {
    font-size:
      clamp(
        2rem,
        9.5vw,
        3.2rem
      );
  }

  .section-heading > p:last-child {
    font-size: 0.86rem;
    line-height: 1.62;
  }

  .category-panel,
  .result-panel {
    padding:
      22px
      15px;

    border-radius: 12px;
  }

  .category-card {
    grid-template-columns:
      62px
      minmax(0, 1fr);

    min-height: 120px;

    padding: 14px;
  }

  .category-card__image {
    width: 58px;
    height: 58px;
  }

  .category-card__image img {
    width: 43px;
    height: 43px;
  }

  .trinket-card {
    min-height: 350px;

    padding:
      42px
      24px
      28px;
  }

  .generator-actions {
    flex-direction: column;
  }

  .related-tools {
    padding:
      68px
      10px
      82px;
  }

  .site-footer {
    display: flex;
    flex-direction: column;

    width:
      calc(100% - 24px);

    gap: 18px;

    padding:
      24px
      0
      32px;

    text-align: center;
  }

  .site-footer__brand {
    justify-content: center;
  }

  .site-footer nav {
    flex-wrap: wrap;

    gap:
      10px
      18px;
  }

  .site-footer__legal {
    text-align: center;
  }

  .embers span:nth-child(even) {
    display: none;
  }
}

/* =========================================================
   SMALL PHONE
========================================================= */

@media (max-width: 430px) {
  .auth-actions {
    flex-wrap: wrap;
  }

  .hero__image-wrap {
    height:
      clamp(
        340px,
        118vw,
        460px
      );
  }

  .hero__content {
    padding:
      24px
      14px
      46px;
  }

  .category-card__text strong {
    font-size: 0.76rem;
  }

  .category-card__text small {
    font-size: 0.64rem;
  }

  .related-card {
    grid-template-columns:
      50px
      minmax(0, 1fr);

    padding:
      17px
      15px;
  }

  .related-card > span {
    width: 47px;
    height: 47px;
  }
}

/* =========================================================
   ANIMATIONS
========================================================= */

@keyframes atmospheric-drift {
  from {
    transform:
      translate3d(
        -4%,
        -2%,
        0
      )
      scale(0.95);
  }

  to {
    transform:
      translate3d(
        5%,
        6%,
        0
      )
      scale(1.08);
  }
}

@keyframes ember-rise {
  0% {
    opacity: 0;

    transform:
      translateY(0)
      scale(0.5);
  }

  15% {
    opacity: 1;
  }

  100% {
    opacity: 0;

    transform:
      translate3d(
        28px,
        -105vh,
        0
      )
      scale(1.2);
  }
}

@keyframes tippy-float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-9px);
  }
}

/* =========================================================
   ACCESSIBILITY
========================================================= */

@media (hover: none) {
  .fantasy-button:hover,
  .category-option:hover .category-card,
  .related-card:hover,
  .auth-button:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration:
      1ms !important;

    animation-iteration-count:
      1 !important;

    scroll-behavior:
      auto !important;

    transition-duration:
      1ms !important;
  }
}