/* NoSpoon Studio: a druid's notebook. Parchment, ink, tape and a hand-drawn line or two. */

:root {
  --paper: #f4ead2;
  --paper-deep: #e9d9b6;
  --ink: #2b1a0d;
  --ink-soft: #5e4a35;
  --bronze: #8a5520;
  --ember: #b8472f;
  --gold: #d99a3a;
  --photo: #fffaf0;
  --tape: rgba(236, 214, 150, 0.78);
  --shadow: rgba(43, 26, 13, 0.28);
  --rule: rgba(43, 26, 13, 0.16);
  --margin-line: rgba(184, 71, 47, 0.32);
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .17 0 0 0 0 .1 0 0 0 0 .05 0 0 0 .1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --hand-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
  --squiggle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12' preserveAspectRatio='none'%3E%3Cpath d='M2 7c20-5 34 3 52-1s30-4 48 0 34 3 50-2 30 1 46 2' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E");
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    /* The same notebook, read by the fire. */
    --paper: #1f160e;
    --paper-deep: #2b1e12;
    --ink: #f2e6cc;
    --ink-soft: #c9b593;
    --bronze: #e3a55a;
    --ember: #ff8a5d;
    --gold: #f0c477;
    --photo: #efe2c4;
    --tape: rgba(236, 214, 150, 0.5);
    --shadow: rgba(0, 0, 0, 0.6);
    --rule: rgba(242, 230, 204, 0.14);
    --margin-line: rgba(255, 138, 93, 0.25);
    --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .9 0 0 0 0 .7 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  }
}

* { box-sizing: border-box; }

html { overflow-x: clip; }

body {
  margin: 0;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    var(--noise),
    radial-gradient(circle at 8% 12%, rgba(160, 105, 40, 0.13), transparent 34%),
    radial-gradient(circle at 92% 58%, rgba(160, 105, 40, 0.1), transparent 30%),
    radial-gradient(ellipse at 50% 120%, var(--paper-deep), transparent 60%);
  background-attachment: fixed;
  font: 18px/1.65 "Nunito", system-ui, sans-serif;
  overflow-x: clip;
}

a { color: var(--bronze); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--ember); text-decoration-style: wavy; }
img, video { max-width: 100%; height: auto; }

h1, h2, h3 { font-family: "Cinzel", Georgia, serif; line-height: 1.2; letter-spacing: 0.01em; }
h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 0.3em 0 0.2em; }
h2 { font-size: clamp(1.45rem, 3.4vw, 1.9rem); margin: 2.2em 0 0.6em; }
h3 { font-size: 1.2rem; margin: 1.4em 0 0.4em; }

/* A hand-drawn line under a heading, as long as the heading. */
.scribble { width: fit-content; max-width: 100%; }
.center .scribble, .scribble.center { margin-inline: auto; }
.scribble::after {
  content: "";
  display: block;
  width: calc(100% + 0.3em);
  height: 10px;
  margin-top: 4px;
  background: var(--ember);
  -webkit-mask: var(--squiggle) center / 100% 100% no-repeat;
  mask: var(--squiggle) center / 100% 100% no-repeat;
}

.hand { font-family: "Caveat", "Comic Sans MS", cursive; }
.note {
  font-family: "Caveat", "Comic Sans MS", cursive;
  font-size: 1.6rem;
  line-height: 1.2;
  color: var(--ember);
  display: inline-block;
  transform: rotate(-2deg);
}

.doodle { width: 3rem; height: auto; color: var(--ember); filter: url(#rough); flex: none; }

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

.top {
  max-width: 1040px;
  margin: 0 auto;
  padding: 18px 16px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand .sticker {
  width: 58px; height: 58px;
  border-radius: 8px;
  transform: rotate(-6deg);
  box-shadow: 0 3px 8px -2px var(--shadow);
  transition: transform 0.25s;
}
.brand:hover .sticker { transform: rotate(4deg) scale(1.06); }

nav { display: flex; flex-wrap: wrap; gap: 4px 14px; font-family: "Caveat", cursive; font-size: 1.55rem; }
nav a { color: var(--ink); text-decoration: none; padding: 0 0.35em; border: 2px solid transparent; border-radius: var(--hand-radius); }
nav a:hover { color: var(--ember); }
nav a[aria-current="page"] { border-color: var(--ember); }
@media (max-width: 480px) {
  nav { gap: 2px 4px; font-size: 1.35rem; margin-left: -0.35em; }
}

/* ------------------------------------------------------------ the sheet */

.sheet {
  max-width: 1040px;
  margin: 0 auto;
  padding: 8px 16px 48px;
}

@media (min-width: 900px) {
  /* The notebook's red margin line. */
  .sheet { padding-left: 72px; padding-right: 32px; background: linear-gradient(var(--margin-line), var(--margin-line)) 44px 0 / 2px 100% no-repeat; }
}

.lede { font-size: 1.2rem; max-width: 38em; }
.narrow { max-width: 42em; }

/* ------------------------------------------------------------ photos, tape */

.photo {
  position: relative;
  margin: 28px 6px 18px;
  padding: 10px 10px 8px;
  background: var(--photo);
  box-shadow: 0 10px 18px -10px var(--shadow), 0 1px 3px var(--shadow);
  transform: rotate(var(--tilt, -1.5deg));
}
.photo img, .photo video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: #1a120b; }
.photo figcaption {
  font-family: "Caveat", cursive;
  font-size: 1.45rem;
  line-height: 1.2;
  color: #5e4a35;
  text-align: center;
  padding-top: 6px;
}

/* A strip of tape with torn ends. */
.photo::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: -14px;
  left: 50%;
  width: 118px;
  height: 30px;
  background: var(--tape);
  transform: translateX(-50%) rotate(calc(var(--tilt, -1.5deg) * -2));
  clip-path: polygon(0 8%, 6% 0, 12% 10%, 20% 2%, 30% 8%, 42% 0, 55% 7%, 68% 1%, 80% 9%, 90% 0, 100% 6%, 98% 100%, 88% 92%, 76% 100%, 64% 93%, 50% 100%, 38% 92%, 26% 100%, 14% 93%, 4% 100%);
}

@media (max-width: 640px) {
  .photo { transform: rotate(calc(var(--tilt, -1.5deg) * 0.4)); margin-inline: 4px; }
}

/* ------------------------------------------------------------ buttons, stamp */

.btn {
  display: inline-block;
  padding: 0.2em 0.9em;
  border: 2.5px solid var(--ink);
  border-radius: var(--hand-radius);
  font-family: "Caveat", cursive;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.15s;
}
.btn:hover { color: var(--ember); border-color: var(--ember); transform: rotate(-2deg); text-decoration: none; }

.stamp {
  display: inline-block;
  margin: 12px 0;
  padding: 0.35em 0.9em 0.3em;
  border: 3px double var(--ember);
  border-radius: 6px;
  color: var(--ember);
  font-family: "Cinzel", serif;
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  transform: rotate(-5deg);
  opacity: 0.88;
}
.stamp small { font-size: 0.7em; letter-spacing: 0.08em; }

.play-badge img { width: 220px; height: auto; display: block; }

/* ------------------------------------------------------------ home */

.hello { display: grid; gap: 8px 40px; align-items: center; }
.hello .big-sticker {
  width: min(260px, 70vw);
  justify-self: center;
  border-radius: 14px;
  transform: rotate(4deg);
  box-shadow: 0 14px 24px -12px var(--shadow);
}
@media (min-width: 760px) { .hello { grid-template-columns: 1fr auto; } }

.game-card { display: grid; gap: 0 40px; align-items: center; margin-top: 24px; }
.game-card .game-logo { width: min(420px, 100%); height: auto; display: block; margin: 8px 0; filter: drop-shadow(0 4px 6px var(--shadow)); }
@media (min-width: 860px) { .game-card { grid-template-columns: 1fr 1fr; } }

.more { display: inline-flex; align-items: center; gap: 6px; }
.more .doodle { width: 4.2rem; transform: rotate(8deg); }

/* ------------------------------------------------------------ Samonios page */

.game-hero { text-align: center; }
.game-hero .game-logo { width: min(640px, 100%); height: auto; filter: drop-shadow(0 6px 8px var(--shadow)); margin-top: 12px; }
.game-hero .tagline { font-family: "Caveat", cursive; font-size: clamp(1.7rem, 4vw, 2.3rem); color: var(--ember); line-height: 1.15; margin: 0; transform: rotate(-1.5deg); }
.game-hero .photo { max-width: 860px; margin-inline: auto; }
.facts { font-family: "Caveat", cursive; font-size: 1.45rem; color: var(--ink-soft); }

.story { max-width: 40em; margin: 0 auto; font-size: 1.12rem; }
.story p:first-child::first-letter {
  float: left;
  font-family: "Cinzel", serif;
  font-weight: 700;
  font-size: 3.4em;
  line-height: 0.85;
  padding: 0.06em 0.1em 0 0;
  color: var(--bronze);
}

.feature { display: grid; gap: 0 48px; align-items: center; margin: 32px 0; }
.feature ul { padding-left: 1.1em; }
.feature li { margin: 0.35em 0; }
.feature li::marker { content: "✦  "; color: var(--ember); }
@media (min-width: 860px) {
  .feature { grid-template-columns: 1fr 1fr; }
  .feature:nth-of-type(even) .feature-text { order: 2; }
}

.gallery { display: grid; gap: 8px 32px; }
@media (min-width: 700px) { .gallery { grid-template-columns: 1fr 1fr; } }

.trailer { max-width: 860px; margin: 0 auto; }

.faq dt { font-weight: 800; margin-top: 1em; }
.faq dt::before { content: "Q. "; font-family: "Caveat", cursive; font-size: 1.4em; color: var(--ember); }
.faq dd { margin: 0.2em 0 0 0; }

.center { text-align: center; }

/* ------------------------------------------------------------ news, pages */

.posts { list-style: none; padding: 0; }
.posts li { margin: 0 0 22px; padding-bottom: 18px; border-bottom: 1.5px dashed var(--rule); }
.posts .date, .post .date { font-family: "Caveat", cursive; font-size: 1.35rem; color: var(--ember); }
.posts h3 { margin: 0.1em 0 0.2em; }
.posts h3 a { color: var(--ink); text-decoration: none; }
.posts h3 a:hover { color: var(--ember); }
.posts p { margin: 0; }

.prose { max-width: 42em; }
.prose h2 { font-size: 1.3rem; margin-top: 1.8em; }

.facts-table { border-collapse: collapse; margin: 8px 0 16px; }
.facts-table th { text-align: left; padding: 6px 24px 6px 0; font-family: "Caveat", cursive; font-size: 1.35rem; font-weight: 700; color: var(--ember); vertical-align: top; }
.facts-table td { padding: 6px 0; border-bottom: 1px dashed var(--rule); }

.logos { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }
.logos img { height: 120px; width: auto; border-radius: 10px; }

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

.foot {
  max-width: 1040px;
  margin: 0 auto;
  padding: 24px 16px 40px;
  text-align: center;
  font-size: 0.95rem;
  color: var(--ink-soft);
  border-top: 2px dashed var(--rule);
}
.foot p { margin: 0.3em 0; }
.foot-flame { width: 1.8rem; color: var(--gold); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
