:root {
  --bg: #10261b;
  --forest: #173a29;
  --forest-dark: #07120d;
  --paper: #f3dfb5;
  --paper-deep: #e4c789;
  --ink: #2c190d;
  --muted: #73532b;
  --red: #b33a2f;
  --gold: #d09a31;
  --moss: #4d7c43;
  --line: rgba(64, 33, 13, 0.3);
  --shadow: 0 26px 70px rgba(0, 0, 0, 0.38);
  --radius: 24px;
  --max-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: "Special Elite", Georgia, serif;
  line-height: 1.65;
  background:
    linear-gradient(180deg, rgba(7, 18, 13, 0.14), rgba(3, 7, 5, 0.76)),
    url("mystery-forest-bg.svg") center top / cover fixed no-repeat,
    linear-gradient(180deg, #183d2a 0%, var(--forest-dark) 58%, #030705 100%);
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -3;
  content: "";
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 10%, rgba(255, 218, 107, 0.2), transparent 22rem),
    radial-gradient(circle at 50% 50%, transparent 0 46%, rgba(0, 0, 0, 0.5) 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

.forest-glow {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 32%, rgba(255, 219, 119, 0.2), transparent 4rem),
    radial-gradient(circle at 78% 40%, rgba(255, 219, 119, 0.17), transparent 3.4rem),
    radial-gradient(circle at 40% 72%, rgba(255, 219, 119, 0.15), transparent 2.8rem);
  filter: blur(1px);
  animation: fireflies 7s ease-in-out infinite alternate;
}

.paper-noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.16;
  mix-blend-mode: multiply;
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.15) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, rgba(39, 18, 6, 0.14) 0 1px, transparent 1px 5px);
}

.site-header,
.site-footer,
.section {
  width: min(var(--max-width), calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 16px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 16px;
  padding: 10px 14px;
  border: 3px solid rgba(44, 25, 13, 0.72);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(242, 218, 168, 0.96), rgba(213, 163, 77, 0.94));
  box-shadow: 0 14px 0 rgba(0, 0, 0, 0.22), 0 24px 80px rgba(0, 0, 0, 0.45);
}

.logo {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 3px solid var(--ink);
  border-radius: 50%;
  color: #f9e7b9;
  font-family: "Cabin Sketch", cursive;
  font-size: 1.25rem;
  font-weight: 700;
  background:
    radial-gradient(circle at 35% 30%, #c34d38, #6f1f19 68%),
    var(--red);
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.22);
  transform: rotate(-6deg);
}

.nav {
  display: flex;
  gap: 8px;
  color: var(--ink);
  font-family: "Cabin Sketch", cursive;
  font-size: 1.08rem;
  font-weight: 700;
}

.nav a {
  padding: 10px 14px;
  border: 2px dashed transparent;
  border-radius: 999px;
}

.nav a:hover,
.nav a:focus-visible {
  border-color: rgba(44, 25, 13, 0.55);
  background: rgba(255, 242, 202, 0.56);
}

.section {
  padding: 92px 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(280px, 0.72fr);
  gap: 30px;
  align-items: center;
  min-height: calc(100vh - 88px);
}

.notebook-page,
.hero__card,
.card,
.contact__panel {
  position: relative;
  border: 3px solid rgba(44, 25, 13, 0.78);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(151, 48, 38, 0.16) 0 2px, transparent 2px 74px),
    repeating-linear-gradient(180deg, transparent 0 31px, rgba(75, 42, 18, 0.18) 32px 33px),
    radial-gradient(circle at 90% 10%, rgba(122, 73, 18, 0.16), transparent 13rem),
    linear-gradient(135deg, rgba(255, 240, 197, 0.96), rgba(230, 197, 130, 0.96));
  box-shadow: 0 18px 0 rgba(0, 0, 0, 0.2), 0 28px 90px rgba(0, 0, 0, 0.5);
}

.notebook-page::before,
.card::before {
  position: absolute;
  inset: 14px auto auto 18px;
  width: 10px;
  height: 10px;
  content: "";
  border-radius: 50%;
  background: rgba(44, 25, 13, 0.55);
  box-shadow: 0 34px 0 rgba(44, 25, 13, 0.42), 0 68px 0 rgba(44, 25, 13, 0.34);
}

.hero__content {
  padding: clamp(28px, 5vw, 56px);
  transform: rotate(-0.7deg);
}

.hero__card {
  padding: 30px;
  transform: rotate(1.5deg);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--red);
  font-family: "Cabin Sketch", cursive;
  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: "Cabin Sketch", cursive;
  font-weight: 700;
}

h1 {
  max-width: 780px;
  margin-bottom: 22px;
  font-size: clamp(4rem, 10vw, 8.6rem);
  line-height: 0.82;
  letter-spacing: -0.05em;
  text-shadow: 3px 3px 0 rgba(179, 58, 47, 0.22), -1px -1px 0 rgba(255, 245, 210, 0.7);
}

.cipher-strip {
  display: inline-flex;
  margin: -4px 0 20px;
  padding: 6px 14px;
  border: 2px dashed rgba(44, 25, 13, 0.48);
  border-radius: 999px;
  color: var(--red);
  font-family: Creepster, "Cabin Sketch", cursive;
  font-size: 1.15rem;
  letter-spacing: 0.26em;
  background: rgba(255, 236, 183, 0.56);
  transform: rotate(-1deg);
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2.2rem, 4.6vw, 4rem);
  line-height: 0.95;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.55rem;
}

.hero__lead,
.text-block,
.card p,
.contact p,
.site-footer {
  color: var(--muted);
}

.hero__lead {
  max-width: 680px;
  font-size: clamp(1.05rem, 2vw, 1.28rem);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 22px;
  border: 3px solid var(--ink);
  border-radius: 14px;
  font-family: "Cabin Sketch", cursive;
  font-size: 1.1rem;
  font-weight: 700;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translate(-2px, -3px) rotate(-1deg);
}

.button--primary {
  color: #fff2c9;
  background: linear-gradient(135deg, #c44939, #7d231b);
  box-shadow: 6px 7px 0 rgba(44, 25, 13, 0.26);
}

.button--ghost {
  background: rgba(255, 244, 210, 0.68);
  box-shadow: 6px 7px 0 rgba(44, 25, 13, 0.16);
}

.mystery-stamp {
  position: absolute;
  top: -24px;
  right: 24px;
  display: grid;
  width: 74px;
  height: 74px;
  place-items: center;
  border: 5px double #f5d891;
  border-radius: 50%;
  color: #f5d891;
  font-family: Creepster, Eater, fantasy;
  font-size: 2.45rem;
  background: var(--red);
  box-shadow: 0 10px 0 rgba(0, 0, 0, 0.2);
  transform: rotate(12deg);
}

.avatar {
  display: grid;
  width: 108px;
  height: 108px;
  margin-bottom: 28px;
  place-items: center;
  border: 4px solid var(--ink);
  border-radius: 30% 70% 55% 45%;
  color: #f9e7b9;
  font-family: "Cabin Sketch", cursive;
  font-size: 2.35rem;
  font-weight: 700;
  background:
    radial-gradient(circle at 32% 28%, #e2a642, transparent 23%),
    linear-gradient(135deg, #274d31, #122316);
  box-shadow: inset 0 -8px 0 rgba(0, 0, 0, 0.24);
}

.highlights {
  display: grid;
  gap: 10px;
  margin: 24px 0 0;
  padding: 0;
  color: var(--muted);
  list-style: none;
}

.highlights span {
  color: var(--red);
  font-weight: 700;
}

.split {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 56px;
  color: #f7e8bd;
}

.split h2,
.contact h2,
.section__heading h2 {
  color: #f7e8bd;
  text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.22);
}

.text-block {
  padding: 30px 34px;
  color: var(--muted);
  font-size: 1.05rem;
  transform: rotate(0.8deg);
}

.section__heading {
  max-width: 680px;
  margin-bottom: 30px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.card {
  min-height: 260px;
  padding: 28px;
  transform: rotate(-1deg);
}

.card:nth-child(2) {
  transform: rotate(1deg) translateY(-8px);
}

.card:nth-child(3) {
  transform: rotate(-0.3deg);
}

.card--featured {
  background:
    linear-gradient(90deg, rgba(151, 48, 38, 0.16) 0 2px, transparent 2px 74px),
    repeating-linear-gradient(180deg, transparent 0 31px, rgba(75, 42, 18, 0.18) 32px 33px),
    linear-gradient(135deg, rgba(255, 232, 169, 0.97), rgba(232, 189, 103, 0.97));
}

.card__icon {
  display: inline-grid;
  width: 58px;
  height: 58px;
  margin-bottom: 46px;
  place-items: center;
  border: 3px solid var(--ink);
  border-radius: 50%;
  color: #fff0c0;
  font-family: "Cabin Sketch", cursive;
  font-size: 1.2rem;
  font-weight: 700;
  background: var(--moss);
}

.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: center;
  padding-bottom: 60px;
  color: #f7e8bd;
}

.contact__panel {
  display: grid;
  gap: 12px;
  padding: 26px;
  transform: rotate(-0.8deg);
}

.contact__panel a {
  padding: 16px 18px;
  border: 2px dashed rgba(44, 25, 13, 0.45);
  border-radius: 16px;
  background: rgba(255, 244, 210, 0.62);
  color: var(--ink);
  font-family: "Cabin Sketch", cursive;
  font-size: 1.15rem;
  font-weight: 700;
}

.contact__panel a:hover,
.contact__panel a:focus-visible {
  color: #fff0c0;
  background: var(--red);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 0 36px;
  border-top: 2px dashed rgba(247, 232, 189, 0.34);
  color: rgba(247, 232, 189, 0.78);
  font-size: 0.95rem;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: #f7e8bd;
}

@keyframes fireflies {
  from {
    opacity: 0.55;
    transform: translate3d(-8px, 4px, 0) scale(0.98);
  }

  to {
    opacity: 0.95;
    transform: translate3d(10px, -8px, 0) scale(1.03);
  }
}

@media (max-width: 820px) {
  .hero,
  .split,
  .contact {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 70px;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .card,
  .card:nth-child(2),
  .card:nth-child(3),
  .hero__content,
  .hero__card,
  .text-block,
  .contact__panel {
    transform: none;
  }
}

@media (max-width: 560px) {
  .site-header,
  .site-footer,
  .section {
    width: min(100% - 28px, var(--max-width));
  }

  .site-header {
    align-items: flex-start;
    border-radius: 26px;
  }

  .nav {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 2px;
    font-size: 0.96rem;
  }

  .nav a {
    padding: 8px 10px;
  }

  .section {
    padding: 64px 0;
  }

  h1 {
    font-size: clamp(3.4rem, 20vw, 5.2rem);
  }

  .button {
    width: 100%;
  }

  .site-footer {
    flex-direction: column;
  }
}
