@font-face {
  font-family: "Cinzel";
  src: url("assets/cinzel.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}

:root {
  --walnut: #2a1a12;
  --bark: #22140e;
  --oak: #7a4a2a;
  --oak-dark: #5c3620;
  --amber: #f2a93b;
  --ember: #ffd27a;
  --gold: #d9a24a;
  --maple: #a63a1f;
  --pine: #13291e;
  --moss: #4f5a2a;
  --parchment: #ecdcbc;
  --ink: #2a1a12;
  --ink-soft: #5a4232;
  --night: #020a26;

  --display: "Cinzel", "Trajan Pro", Georgia, serif;
  --body: "Alegreya Sans", "Segoe UI", system-ui, sans-serif;

  --gutter: clamp(16px, 5vw, 64px);
  --measure: 34rem;
  --wide: 72rem;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--walnut);
  color: var(--parchment);
  font: 400 1.1875rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}

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

p { margin: 0 0 1em; }

a { color: inherit; }

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

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

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 10;
  padding: .5rem 1rem;
  background: var(--amber);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  border-radius: 6px;
}
.skip:focus { top: 16px; }

.btn {
  display: inline-block;
  padding: .7em 1.4em;
  border-radius: 999px;
  font: 700 1.0625rem/1.2 var(--body);
  text-decoration: none;
  background: var(--amber);
  color: var(--ink);
  box-shadow: 0 6px 18px -6px rgba(242, 169, 59, .7);
  transition: background-color .15s ease, box-shadow .2s ease;
}
.btn:hover {
  background: var(--ember);
  box-shadow: 0 0 32px 2px rgba(255, 210, 122, .45);
}

/* Hero: dusk over the treeline, a lantern on the branch ---------------- */

.hero {
  position: relative;
  min-height: max(680px, 100svh);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  isolation: isolate;
}

.hero__sky {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: #6b2f2a url("assets/forest.svg") center bottom / cover no-repeat;
}

.nav {
  padding: 1.25rem var(--gutter);
}
.nav ul {
  display: flex;
  gap: clamp(1rem, 3vw, 2.25rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav a {
  font-weight: 500;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
}
.nav a:hover { border-color: var(--amber); }

.hero__copy {
  padding: clamp(1rem, 5vh, 3rem) var(--gutter) 7rem;
  max-width: 40rem;
}
.hero h1 img {
  display: block;
  width: clamp(220px, 30vw, 360px);
  filter: drop-shadow(0 18px 30px rgba(20, 8, 4, .55));
}
.hero__copy p {
  max-width: 22rem;
  margin: 1.75rem 0 2rem;
  font-size: clamp(1.25rem, 2.2vw, 1.5rem);
  line-height: 1.4;
  text-shadow: 0 1px 12px rgba(42, 26, 18, .7);
}

.lantern {
  position: absolute;
  z-index: -1;
  top: 0;
  right: 0;
  width: clamp(240px, 34vw, 500px);
  height: auto;
  transform-origin: 57.5% 14%;
  animation: sway 7s ease-in-out infinite;
}
.lantern__glow { animation: glow 4.5s ease-in-out infinite; transform-origin: 230px 330px; }
.lantern__light { opacity: .35; animation: flicker 3.2s steps(1) infinite; }

@keyframes sway {
  0%, 100% { transform: rotate(-1.4deg); }
  50% { transform: rotate(1.4deg); }
}
@keyframes glow {
  0%, 100% { opacity: .85; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.06); }
}
@keyframes flicker {
  0% { opacity: .35; } 18% { opacity: .5; } 22% { opacity: .3; }
  60% { opacity: .45; } 64% { opacity: .32; } 90% { opacity: .5; }
}

/* A handful of maple and oak leaves drifting down */
.leaves span {
  position: absolute;
  z-index: -1;
  top: -40px;
  width: 18px;
  height: 18px;
  background: var(--maple);
  border-radius: 0 70% 0 70%;
  opacity: 0;
  animation: fall 14s linear infinite;
}
.leaves span:nth-child(1) { left: 58%; animation-delay: 0s; }
.leaves span:nth-child(2) { left: 72%; animation-delay: 3s; background: #c0662a; width: 14px; height: 14px; }
.leaves span:nth-child(3) { left: 86%; animation-delay: 6.5s; background: #d18a2c; }
.leaves span:nth-child(4) { left: 44%; animation-delay: 9s; background: #8c4a1c; width: 12px; height: 12px; }
.leaves span:nth-child(5) { left: 93%; animation-delay: 11s; width: 15px; height: 15px; }
.leaves span:nth-child(6) { left: 66%; animation-delay: 7.8s; background: #d18a2c; width: 11px; height: 11px; }
.leaves span:nth-child(7) { left: 30%; animation-delay: 4.6s; background: #c0662a; }

@keyframes fall {
  0%   { opacity: 0; transform: translate(0, 0) rotate(0); }
  8%   { opacity: .95; }
  50%  { transform: translate(-60px, 50vh) rotate(220deg); }
  85%  { opacity: .9; }
  100% { opacity: 0; transform: translate(20px, 100vh) rotate(420deg); }
}

/* Spellpower: a framed painting and a pinned notice on an oak wall ------- */

.board {
  padding: clamp(4rem, 10vw, 7.5rem) var(--gutter);
  background-color: var(--oak);
  background-image:
    url("assets/grain.svg"),
    repeating-linear-gradient(90deg,
      transparent 0 calc(25% - 3px),
      rgba(34, 20, 14, .55) calc(25% - 3px) 25%),
    linear-gradient(90deg, #7a4a2a, #85522e 30%, #6f4226 55%, #80502c 80%, #744628);
  box-shadow: inset 0 14px 24px -12px rgba(0, 0, 0, .6), inset 0 -14px 24px -12px rgba(0, 0, 0, .6);
}

.board__inner {
  max-width: var(--wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  align-items: center;
  gap: clamp(2.5rem, 6vw, 5rem);
}

.frame {
  margin: 0;
  justify-self: center;
  width: min(100%, 420px);
  padding: 18px;
  border-radius: 4px;
  background:
    url("assets/grain.svg"),
    linear-gradient(135deg, #4a2c1a, #2e1a10 45%, #432716);
  box-shadow:
    inset 0 0 0 2px rgba(217, 162, 74, .55),
    inset 0 0 0 8px #2a1a12,
    0 24px 40px -18px rgba(10, 4, 2, .85);
  transform: rotate(.8deg);
}
.frame__art {
  position: relative;
  aspect-ratio: 2 / 3;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 16% 8% 0;
  background: var(--night) url("assets/spellpower-art.webp") center / cover no-repeat;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .6), inset 0 0 40px rgba(0, 0, 0, .55);
}
.frame__logo {
  width: 100%;
  filter: drop-shadow(0 0 14px rgba(120, 190, 255, .55));
}

.notice {
  position: relative;
  max-width: var(--measure);
  padding: clamp(2rem, 5vw, 3.25rem);
  color: var(--ink);
  border-radius: 3px;
  transform: rotate(-.8deg);
  background-color: var(--parchment);
  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(255, 255, 255, .35), transparent 60%),
    radial-gradient(ellipse at 100% 100%, rgba(122, 74, 42, .18), transparent 55%);
  box-shadow: 0 18px 40px -16px rgba(20, 10, 5, .75);
}
.notice__pin {
  position: absolute;
  top: 14px;
  left: 50%;
  width: 16px;
  height: 16px;
  margin-left: -8px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #e0663f, var(--maple) 60%, #5e1f10);
  box-shadow: 0 3px 4px rgba(0, 0, 0, .35);
}
.notice__kicker {
  margin: .5rem 0 .25rem;
  font-style: italic;
  color: var(--ink-soft);
}
.notice__title {
  font-size: clamp(2.5rem, 6vw, 3.75rem);
  color: var(--maple);
}
.notice__status {
  margin: .5rem 0 1.25rem;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--moss);
}
.notice__steps {
  margin: 1.5rem 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.notice__steps li {
  position: relative;
  padding-left: 2.6rem;
  margin-bottom: .9rem;
  counter-increment: step;
}
.notice__steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: .05em;
  width: 1.75rem;
  height: 1.75rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--pine);
  color: var(--gold);
  font: 700 .95rem/1 var(--display);
}
.notice__terms {
  margin: 1.5rem 0 0;
  padding-top: 1rem;
  border-top: 1px dashed rgba(42, 26, 18, .35);
  color: var(--ink-soft);
}

/* Studio: the deep green of the badge ----------------------------------- */

.studio {
  padding: clamp(4rem, 10vw, 7rem) var(--gutter);
  background: var(--pine);
  border-top: 6px solid var(--bark);
}
.studio__inner {
  max-width: var(--wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: clamp(1.5rem, 5vw, 4rem);
}
.studio h2 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  color: var(--gold);
}
.studio__body { max-width: var(--measure); }
.studio__lede {
  font-size: clamp(1.4rem, 2.6vw, 1.7rem);
  line-height: 1.4;
  margin-bottom: 1.5rem;
}
.studio__body p:not(.studio__lede) { color: #cfd3bd; }

/* Footer: the floorboards ---------------------------------------------- */

.footer {
  padding: clamp(3.5rem, 8vw, 5rem) var(--gutter) 2rem;
  background-color: var(--oak-dark);
  background-image:
    url("assets/grain.svg"),
    repeating-linear-gradient(90deg,
      transparent 0 calc(25% - 3px),
      rgba(26, 15, 10, .6) calc(25% - 3px) 25%);
  border-top: 6px solid var(--bark);
}
.footer__inner {
  max-width: var(--wide);
  margin: 0 auto;
}
.footer h2 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  margin-bottom: .75rem;
}
.footer__mail {
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  font-weight: 500;
  color: var(--ember);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
  overflow-wrap: anywhere;
}
.footer__mail:hover { color: var(--amber); }
.footer__legal {
  margin: 3.5rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(236, 220, 188, .2);
  font-size: .95rem;
  color: #cbb592;
}

/* Coming-soon placeholder: the hero on its own -------------------------- */

.hero--soon { justify-content: center; }
.hero--soon .hero__copy { padding-top: 3rem; padding-bottom: 5rem; }
.hero__copy .soon__game {
  max-width: 26rem;
  margin: 0 0 1.5rem;
  padding: 1.1rem 1.25rem 1.2rem;
  border-radius: 10px;
  background: rgba(2, 10, 38, .72);
  box-shadow: inset 0 0 0 1px rgba(150, 200, 255, .25), 0 12px 30px -14px rgba(0, 0, 0, .8);
  color: #dbe9ff;
  font-size: 1.15rem;
  text-shadow: none;
}
.soon__game img {
  display: block;
  width: min(100%, 240px);
  margin-bottom: .6rem;
  filter: drop-shadow(0 0 10px rgba(120, 190, 255, .5));
}
.hero__copy .soon__contact {
  margin: 0;
  font-size: 1.1rem;
}
.soon__contact a {
  color: var(--ember);
  font-weight: 500;
  text-underline-offset: 4px;
}

/* Small screens ---------------------------------------------------------- */

@media (max-width: 760px) {
  .lantern { width: 52vw; right: -6vw; top: 30px; }
  .hero__copy { margin-top: auto; padding-bottom: 4rem; }
  .hero h1 img { width: min(58vw, 260px); }
  .board__inner,
  .studio__inner { grid-template-columns: 1fr; }
  .frame { width: min(100%, 320px); }
  .notice { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .lantern, .lantern__glow, .lantern__light { animation: none; }
  .leaves { display: none; }
  .btn { transition: none; }
}
