/* Racoon Technologies — one stylesheet for the whole site.
   Indie workshop: warm paper, dark ink, one rust accent. No JS, no third parties. */

@font-face {
  font-family: "Young Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/young-serif-400.woff2") format("woff2");
}

@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("/fonts/schibsted-grotesk-var.woff2") format("woff2");
}

:root {
  --paper: #f5efe3;
  --card: #fbf8f1;
  --ink: #231d17;
  --muted: #5c5145;
  --accent: #a9431b;
  --line: #dccfb8;
  --tape: rgba(222, 204, 160, 0.72);

  --display: "Young Serif", Georgia, "Times New Roman", serif;
  --body: "Schibsted Grotesk", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;

  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --radius: 1.25rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 1.5rem;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--paper);
  background-image: radial-gradient(ellipse 80% 40rem at 70% -10rem, rgba(255, 251, 240, 0.9), transparent 70%);
  background-repeat: no-repeat;
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

main {
  flex: 1;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.1;
  margin: 0;
}

p,
ul,
ol,
dl {
  margin: 0 0 1rem;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- skip link ---------- */

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--card);
  border-radius: 0.5rem;
  font-weight: 600;
  text-decoration: none;
}

.skip:focus {
  top: 1rem;
}

/* ---------- header ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-block: 0.9rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
  flex-shrink: 0;
}

.brand img {
  width: 2.25rem;
  height: 2.25rem;
}

.wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.wordmark-top {
  font-family: var(--display);
  font-size: 1.2rem;
}

.wordmark-bottom {
  margin-top: 0.2rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.site-nav ul {
  display: flex;
  gap: clamp(0.35rem, 2.4vw, 1.5rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-block;
  padding: 0.4rem 0.3rem;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

/* ---------- shared bits ---------- */

.eyebrow,
.section-no,
.updated {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.35rem;
  background: var(--ink);
  color: var(--card);
  border: 2px solid var(--ink);
  border-radius: 0.6rem;
  box-shadow: 4px 4px 0 var(--accent);
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.button:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--accent);
}

.button:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--accent);
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding-block: clamp(3rem, 11vw, 7.5rem) clamp(3rem, 9vw, 6rem);
  overflow: hidden;
}

/* faint cutting-mat grid behind the headline */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    repeating-linear-gradient(0deg, rgba(92, 81, 69, 0.08) 0 1px, transparent 1px 32px),
    repeating-linear-gradient(90deg, rgba(92, 81, 69, 0.08) 0 1px, transparent 1px 32px);
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 30% 40%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 80% at 30% 40%, #000 20%, transparent 75%);
}

.hero-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.hero .eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.hero .eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 2px;
  background: var(--accent);
}

.hero h1 {
  max-width: 13ch;
  font-size: clamp(2.6rem, 9vw, 5.6rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
}

.hero h1 .accent {
  color: var(--accent);
}

/* hand-drawn underline */
.hero h1 .squiggle {
  padding-bottom: 0.08em;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 8' preserveAspectRatio='none'%3E%3Cpath d='M1 5.5C15 2 25 2 38 4.5S62 7 78 3.5 105 1.5 119 4' fill='none' stroke='%23a9431b' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 0.16em;
}

.lede {
  max-width: 34rem;
  margin: 1.9rem 0 2rem;
  font-size: clamp(1.1rem, 2.4vw, 1.3rem);
  line-height: 1.55;
  color: var(--muted);
}

.seal {
  display: none;
}

@media (min-width: 48rem) {
  .hero-grid {
    grid-template-columns: 1fr auto;
  }

  .seal {
    display: block;
    width: clamp(12rem, 22vw, 17rem);
    margin-right: clamp(0rem, 3vw, 3rem);
    color: var(--accent);
    transform: rotate(-9deg);
    animation: stamp 0.55s cubic-bezier(0.2, 0.9, 0.3, 1.2) 0.25s both;
  }
}

@keyframes stamp {
  from {
    opacity: 0;
    transform: rotate(-20deg) scale(1.25);
  }
  to {
    opacity: 1;
    transform: rotate(-9deg) scale(1);
  }
}

/* ---------- sections ---------- */

.section {
  padding-block: clamp(3.5rem, 9vw, 6.5rem);
  border-top: 1px solid var(--line);
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
}

.section-no {
  color: var(--accent);
  font-weight: 700;
}

.section-head h2 {
  font-size: clamp(2.1rem, 5.5vw, 3.25rem);
}

/* ---------- games ---------- */

.game {
  position: relative;
  padding: clamp(0.6rem, 1.6vw, 1rem);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 rgba(35, 29, 23, 0.04), 0 18px 40px -24px rgba(35, 29, 23, 0.35);
}

/* two bits of masking tape holding the print to the bench */
.game::before,
.game::after {
  content: "";
  position: absolute;
  top: -0.9rem;
  width: clamp(4.5rem, 12vw, 7.5rem);
  height: 1.8rem;
  background: var(--tape);
  box-shadow: 0 1px 2px rgba(35, 29, 23, 0.12);
  z-index: 1;
}

.game::before {
  left: clamp(1rem, 6vw, 3.5rem);
  transform: rotate(-4deg);
}

.game::after {
  right: clamp(1rem, 6vw, 3.5rem);
  transform: rotate(3deg);
}

.game-art img {
  width: 100%;
  aspect-ratio: 1600 / 893;
  object-fit: cover;
  border-radius: calc(var(--radius) - 0.5rem);
  background: #e8dcc4;
}

.game-body {
  display: grid;
  gap: 1.25rem;
  padding: 1rem clamp(0.4rem, 2.5vw, 1.75rem) clamp(1rem, 2.5vw, 1.75rem);
}

.game-id {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
}

/* the icon sits half on the artwork, like a sticker on the print */
.game-icon {
  position: relative;
  width: clamp(4.5rem, 12vw, 6rem);
  height: auto;
  margin-top: clamp(-4.25rem, -9vw, -3rem);
  flex-shrink: 0;
  border-radius: 22%;
  border: 4px solid var(--card);
  box-shadow: 0 8px 20px -8px rgba(35, 29, 23, 0.45);
}

.game-id h3 {
  font-size: clamp(1.75rem, 4.5vw, 2.5rem);
}

.game-genre {
  margin: 0.35rem 0 0.1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
}

.game-desc {
  max-width: 40rem;
  margin: 0;
  font-size: 1.1rem;
}

.game-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
}

.stamp {
  display: inline-block;
  margin: 0;
  padding: 0.45rem 0.8rem;
  border: 2px solid var(--accent);
  border-radius: 0.4rem;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transform: rotate(-2deg);
}

.small-link {
  font-size: 0.95rem;
  font-weight: 600;
}

@media (min-width: 56rem) {
  .game-body {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    column-gap: 3rem;
    align-items: end;
  }

  .game-id,
  .game-desc {
    grid-column: 1;
  }

  .game-meta {
    grid-column: 2;
    grid-row: 1 / span 2;
    flex-direction: column;
    align-items: flex-end;
    align-self: end;
  }
}

.more {
  margin: 2rem 0 0;
  padding: 1.1rem 1.25rem;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-align: center;
}

/* ---------- about ---------- */

.about-grid {
  display: grid;
  gap: 2.5rem;
}

.about-text p {
  max-width: 38rem;
  font-size: clamp(1.1rem, 2.2vw, 1.25rem);
}

.about-text p:first-child {
  font-family: var(--display);
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  line-height: 1.35;
}

.points {
  margin: 0;
  padding: 0;
  list-style: none;
}

.points li {
  display: flex;
  gap: 0.9rem;
  align-items: baseline;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
  font-weight: 600;
  font-size: 1.1rem;
}

.points li:last-child {
  border-bottom: 1px solid var(--line);
}

/* small rust diamond, like a workshop tag */
.points li::before {
  content: "";
  flex-shrink: 0;
  width: 0.55rem;
  height: 0.55rem;
  background: var(--accent);
  transform: translateY(-0.1rem) rotate(45deg);
}

@media (min-width: 56rem) {
  .about-grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
    column-gap: 4rem;
    align-items: start;
  }
}

/* ---------- contact ---------- */

.contact-line {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  color: var(--muted);
}

.contact-email {
  display: inline-block;
  font-family: var(--display);
  font-size: clamp(1.25rem, 5.4vw, 3rem);
  line-height: 1.2;
  overflow-wrap: anywhere;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}

.contact-email:hover {
  text-decoration-thickness: 3px;
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--muted);
}

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-block: 1.5rem;
}

.foot p {
  margin: 0;
}

.foot ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.foot a {
  display: inline-block;
  padding-block: 0.2rem;
  color: var(--ink);
  font-weight: 600;
}

.foot a:hover {
  color: var(--accent);
}

/* ---------- text pages (legal, privacy, 404) ---------- */

.page {
  padding-block: clamp(2.5rem, 8vw, 5rem);
}

.prose {
  max-width: 44rem;
}

.prose h1 {
  font-size: clamp(2.2rem, 7vw, 3.5rem);
  margin-bottom: 0.75rem;
}

.prose h2 {
  margin: 2.5rem 0 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: clamp(1.3rem, 3.2vw, 1.6rem);
}

.prose ul {
  padding-left: 1.25rem;
}

.prose li {
  margin-bottom: 0.5rem;
}

.prose .note {
  margin-bottom: 1.75rem;
  padding: 0.9rem 1.1rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 0.5rem;
}

.prose .version {
  color: var(--muted);
  font-size: 0.95rem;
}

.prose .back {
  margin-top: 2.5rem;
  font-weight: 600;
}

.facts {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0.6rem 1.5rem;
  margin: 1.75rem 0 0;
  padding: 1.25rem 1.4rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.facts dt {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 0.2rem;
}

.facts dd {
  margin: 0;
  font-weight: 600;
}

@media (max-width: 30rem) {
  .facts {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.15rem;
  }

  .facts dd {
    margin-bottom: 0.7rem;
  }
}

.lost h1 {
  font-size: clamp(2.2rem, 7vw, 3.5rem);
  margin-bottom: 1.25rem;
}

/* ---------- small screens ---------- */

@media (max-width: 25rem) {
  .brand img {
    width: 1.9rem;
    height: 1.9rem;
  }

  .brand {
    gap: 0.45rem;
  }

  .wordmark-top {
    font-size: 1.05rem;
  }

  .wordmark-bottom {
    font-size: 0.55rem;
    letter-spacing: 0.12em;
  }

  .site-nav a {
    font-size: 0.875rem;
    padding-inline: 0.2rem;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
