@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("assets/fonts/AtkinsonHyperlegible-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("assets/fonts/AtkinsonHyperlegible-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #241c35;
  --paper: #fff7e8;
  --mint: #4be0b4;
  --violet: #6a42df;
  --coral: #e94d55;
  --gold: #ffc857;
  --blue: #1d7db1;
  --white: #fffdf8;
  --line: rgba(36, 28, 53, 0.14);
  --shadow: 0 24px 60px rgba(36, 28, 53, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  color: var(--ink);
  font-family: "Atkinson Hyperlegible", Georgia, serif;
  background: var(--paper);
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(rgba(36, 28, 53, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36, 28, 53, 0.045) 1px, transparent 1px),
    linear-gradient(130deg, #fff7e8 0%, #eaf7ff 46%, #fff5d4 100%);
  background-size: 42px 42px, 42px 42px, auto;
}

a {
  color: var(--violet);
  text-decoration-thickness: 0.12em;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--coral);
}

a:focus-visible {
  outline: 4px solid var(--gold);
  outline-offset: 5px;
  border-radius: 8px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10;
  padding: 10px 14px;
  color: var(--ink);
  background: var(--gold);
  border-radius: 999px;
  transform: translateY(-160%);
  transition: transform 180ms ease;
}

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

.site-header,
.site-footer {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 0;
}

.brand,
nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  color: var(--ink);
  background: var(--gold);
  border: 3px solid var(--white);
  border-radius: 14px;
  box-shadow: 0 8px 18px rgba(36, 28, 53, 0.18);
  transform: rotate(-6deg);
}

nav a {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

nav a[aria-current="page"] {
  color: var(--violet);
}

.hero,
.facts,
.document {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.78fr);
  gap: clamp(32px, 7vw, 92px);
  align-items: center;
  min-height: calc(100vh - 172px);
  padding: 44px 0 72px;
}

.hero-copy {
  animation: rise 520ms ease both;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--blue);
  font-size: clamp(0.92rem, 1.4vw, 1.05rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 820px;
  margin-bottom: 24px;
  font-size: clamp(3.4rem, 8vw, 7.5rem);
  line-height: 0.9;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
}

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

.lede {
  max-width: 690px;
  color: rgba(36, 28, 53, 0.78);
  font-size: clamp(1.18rem, 2vw, 1.48rem);
  line-height: 1.48;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 54px;
  padding: 14px 22px;
  color: var(--white);
  font-weight: 700;
  text-decoration: none;
  background: var(--violet);
  border-radius: 16px;
  box-shadow: 0 14px 28px rgba(106, 66, 223, 0.28);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.button:hover {
  color: var(--white);
  transform: translateY(-2px) rotate(-1deg);
  box-shadow: 0 18px 34px rgba(106, 66, 223, 0.34);
}

.text-link {
  font-weight: 700;
}

.lab-board {
  position: relative;
  min-height: 420px;
  animation: float-in 600ms ease 120ms both;
}

.lab-board::before {
  position: absolute;
  inset: 44px 10px 28px 24px;
  content: "";
  background: rgba(255, 253, 248, 0.76);
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 34px;
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

.tile {
  position: absolute;
  display: grid;
  width: clamp(98px, 12vw, 142px);
  aspect-ratio: 1;
  place-items: center;
  color: var(--ink);
  font-size: clamp(2.9rem, 6vw, 5rem);
  font-weight: 700;
  border: 4px solid var(--white);
  border-radius: 28px;
  box-shadow: 0 16px 24px rgba(36, 28, 53, 0.18);
}

.tile-gold {
  top: 46px;
  left: 24px;
  background: var(--gold);
  transform: rotate(-10deg);
}

.tile-mint {
  top: 130px;
  right: 36px;
  background: var(--mint);
  transform: rotate(8deg);
}

.tile-coral {
  bottom: 46px;
  left: 34%;
  background: var(--coral);
  transform: rotate(-2deg);
}

.scribble {
  position: absolute;
  right: 18px;
  bottom: 132px;
  padding: 12px 16px;
  color: var(--ink);
  font-weight: 700;
  background: var(--white);
  border: 2px dashed var(--line);
  border-radius: 18px;
  transform: rotate(-5deg);
}

.facts {
  padding: 28px 0 86px;
}

.fact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.fact-grid article,
.note-panel {
  padding: 24px;
  background: rgba(255, 253, 248, 0.82);
  border: 2px solid rgba(255, 255, 255, 0.84);
  border-radius: 22px;
  box-shadow: 0 10px 28px rgba(36, 28, 53, 0.08);
}

.fact-grid p,
.document p,
.document li {
  color: rgba(36, 28, 53, 0.76);
  line-height: 1.58;
}

.document {
  max-width: 850px;
  padding: 54px 0 78px;
}

.document h1 {
  font-size: clamp(3rem, 7vw, 5.5rem);
}

.document section {
  margin-top: 34px;
}

.note-panel ul {
  padding-left: 1.2rem;
  margin: 0;
}

.updated {
  margin-top: 44px;
  font-weight: 700;
}

.post-meta {
  margin: 0 0 14px;
  color: var(--blue);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.post section p,
.post section li {
  font-size: 1.18rem;
  line-height: 1.68;
}

.blog-list {
  display: grid;
  gap: 18px;
  margin-top: 12px;
}

.post-card {
  display: block;
  padding: 26px 28px;
  color: var(--ink);
  text-decoration: none;
  background: rgba(255, 253, 248, 0.82);
  border: 2px solid rgba(255, 255, 255, 0.84);
  border-radius: 22px;
  box-shadow: 0 10px 28px rgba(36, 28, 53, 0.08);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.post-card:hover {
  color: var(--ink);
  transform: translateY(-3px) rotate(-0.4deg);
  box-shadow: 0 18px 36px rgba(36, 28, 53, 0.14);
}

.post-card h2 {
  margin-bottom: 10px;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.post-card p {
  margin: 0;
}

.legend {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.legend li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.legend-dot {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 5px;
  border: 3px solid var(--white);
  border-radius: 999px;
  box-shadow: 0 4px 10px rgba(36, 28, 53, 0.18);
}

.legend-dot.is-new {
  background: rgba(36, 28, 53, 0.18);
}

.legend-dot.is-warming {
  background: var(--gold);
}

.legend-dot.is-fix {
  background: var(--coral);
}

.legend-dot.is-mastered {
  background: var(--mint);
}

.legend strong {
  display: block;
}

.post-nav {
  margin-top: 48px;
  padding-top: 24px;
  font-weight: 700;
  border-top: 2px solid var(--line);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px 0 36px;
  border-top: 2px solid var(--line);
}

.site-footer p {
  margin: 0;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float-in {
  from {
    opacity: 0;
    transform: translateY(28px) rotate(1deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotate(0);
  }
}

@media (max-width: 780px) {
  .site-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 24px;
  }

  .lab-board {
    min-height: 330px;
  }

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
