/* Latin variable fonts, bundled locally. Licenses are in /fonts. */
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/cormorant-garamond-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/jost-latin.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  --background: #100f0d;
  --text: #f5e6cf;
  --muted: #c2b9aa;
  --gold: #b99b6d;
  --rule: #756954;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Jost", "Segoe UI", sans-serif;
  --panel-width: 40rem;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(ellipse at 50% 35%, #1b1812 0, var(--background) 70%);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.5;
}

main { flex: 1; display: flex; flex-direction: column; }
h1, h2, p { margin: 0; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: .3em; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--gold); outline-offset: 6px; }
img { display: block; max-width: 100%; height: auto; }

.page-width {
  width: min(85%, 82rem);
  margin-inline: auto;
}

.eyebrow {
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .3em;
  text-transform: uppercase;
}

.skip-link {
  position: absolute;
  top: .75rem;
  left: 1rem;
  z-index: 2;
  padding: .6rem 1rem;
  background: var(--text);
  color: var(--background);
  transform: translateY(-200%);
}

.skip-link:focus { transform: translateY(0); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1.1rem 2rem;
  border: 1px solid #eddbbd;
  border-radius: 3px;
  background: linear-gradient(110deg, #eedec4, #f7e5c9);
  color: var(--background);
  font: inherit;
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: .015em;
  text-align: center;
  box-shadow: inset 0 1px 0 #fff5, 0 3px 12px #0002;
  cursor: pointer;
}

.button:hover { background: #ffebcf; text-decoration: none; }
.button > span[aria-hidden] { font-size: 1.35rem; }
.button:disabled { cursor: not-allowed; }

.studio-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.25rem;
  padding: clamp(2rem, 6vh, 4rem) 1.5rem clamp(3rem, 8vh, 5rem);
  text-align: center;
}

.studio-logo {
  width: clamp(16rem, 30vw, 27rem);
  mix-blend-mode: lighten;
}

.studio-tagline {
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  letter-spacing: .16em;
  text-wrap: balance;
}

.game-banner {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 3vw, 3rem);
  padding: 2.25rem 2.5rem;
  border-block: 1px solid var(--rule);
}

.game-name {
  flex-shrink: 0;
  padding-right: clamp(1.5rem, 3vw, 3rem);
  border-right: 1px solid var(--rule);
}

.game-name .eyebrow { color: var(--muted); }
.game-name h2 {
  margin-top: .15rem;
  font: 500 clamp(3rem, 4.5vw, 4.25rem)/1 var(--serif);
  letter-spacing: -.02em;
}

.game-description {
  flex: 1;
  color: var(--muted);
  font-size: 1.2rem;
  letter-spacing: .025em;
  text-wrap: balance;
}

.game-banner .button { flex-shrink: 0; }

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 3.75rem 3rem;
  color: var(--muted);
  font-size: .9rem;
  letter-spacing: .04em;
}

.site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem 2rem; }

.playtest-header {
  display: flex;
  justify-content: flex-end;
  padding-block: 2.75rem;
}

.steam-link { border-bottom: 1px solid currentColor; padding-bottom: .25rem; }
.steam-link span { margin-left: .5rem; }
.steam-link:hover { color: var(--text); text-decoration: none; }

.playtest-scene {
  position: relative;
  isolation: isolate;
  flex: 1;
  display: grid;
  place-items: start center;
  padding: 0 1.5rem;
}

/* Local screenshots from the Harrowlands Steam gallery (app 3460400). */
.playtest-scene::before, .playtest-scene::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: 14%;
  bottom: 16%;
  width: max(0px, calc((100% - var(--panel-width)) / 2));
  background-size: auto 150%;
  background-repeat: no-repeat;
  opacity: .6;
  mask-image: linear-gradient(transparent, #000 10%, #000 90%, transparent);
}

.playtest-scene::before {
  left: 0;
  background-image: url("../images/harrowlands-settlement.jpg");
  background-position: 30% center;
}

.playtest-scene::after {
  right: 0;
  background-image: url("../images/harrowlands-wilderness.jpg");
  background-position: left 88%;
}

.claim-panel {
  --corner: 1rem;
  --frame: polygon(
    var(--corner) 0, calc(100% - var(--corner)) 0,
    calc(100% - var(--corner)) var(--corner), 100% var(--corner),
    100% calc(100% - var(--corner)), calc(100% - var(--corner)) calc(100% - var(--corner)),
    calc(100% - var(--corner)) 100%, var(--corner) 100%,
    var(--corner) calc(100% - var(--corner)), 0 calc(100% - var(--corner)),
    0 var(--corner), var(--corner) var(--corner)
  );
  position: relative;
  isolation: isolate;
  width: min(100%, var(--panel-width));
  padding: 3.5rem 3.5rem 2.75rem;
  text-align: center;
}

/* Nested silhouettes give the stepped frame a one-pixel border. */
.claim-panel::before, .claim-panel::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  clip-path: var(--frame);
  background: var(--gold);
  pointer-events: none;
}

.claim-panel::after {
  inset: 1px;
  background: radial-gradient(ellipse at 50% 0, #191610, var(--background) 75%);
}

.claim-panel .eyebrow {
  margin-bottom: 1.5rem;
  color: var(--gold);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: .35em;
}

.claim-panel h1 {
  font: 500 clamp(3.5rem, 5.5vw, 5rem)/.94 var(--serif);
  letter-spacing: -.025em;
}

.claim-description {
  max-width: 29ch;
  margin-block: 1.75rem 2rem;
  margin-inline: auto;
  color: #e0d2bc;
  font-size: clamp(1.1rem, 1.6vw, 1.25rem);
  line-height: 1.55;
  letter-spacing: .015em;
  text-wrap: balance;
}

.claim-description--wide { max-width: none; }

.claim-action { padding-block: 2rem; border-block: 1px solid var(--rule); }
.claim-action .button { width: 100%; gap: 1.25rem; font-size: 1.25rem; }
.claim-action .button--outline {
  margin-top: 1rem;
  padding: .85rem 1rem;
  border-color: var(--gold);
  background: transparent;
  color: var(--text);
  box-shadow: inset 0 0 0 3px var(--background), inset 0 0 0 4px var(--rule);
}
.claim-action .button--outline:hover { background: #b99b6d14; border-color: var(--text); }
.claim-action .button--outline .steam-icon { width: 1.8rem; height: 1.8rem; }
.auth-result { margin-bottom: 1.5rem; padding: 1rem; border: 1px solid var(--gold); }
.auth-result--sold-out { border-color: #b77936; background: #332414; color: #f2c078; }
.discord-icon { width: 1.4em; height: 1.4em; flex-shrink: 0; fill: currentColor; }
.playtest-key {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1.75rem 1rem;
  border: 1px solid #eddbbd;
  border-radius: 3px;
  background: var(--text);
  color: var(--background);
  overflow-wrap: anywhere;
}
.playtest-key code {
  flex: 1;
  min-width: 0;
  font: 500 clamp(1.1rem, 2.3vw, 1.45rem)/1.6 ui-monospace, "Cascadia Mono", Consolas, monospace;
  user-select: all;
}
.copy-control { position: relative; flex-shrink: 0; line-height: 0; }
.copy-key {
  width: 2.25rem;
  height: 2.25rem;
  padding: .375rem;
  border: 1px solid #100f0d55;
  border-radius: 3px;
  background: transparent;
  color: inherit;
  font: 500 .85rem var(--sans);
  cursor: pointer;
}
.copy-key:hover { background: #100f0d0d; border-color: var(--background); }
.copy-key:focus-visible { outline-color: var(--background); outline-offset: 3px; }
.copy-key:disabled { cursor: wait; }
.copy-key svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.5; vertical-align: middle; }
.copy-status { position: absolute; top: calc(100% + .2rem); left: 50%; transform: translateX(-50%); font-size: .7rem; line-height: 1; white-space: nowrap; }
.copy-error:not(:empty) { margin-top: .75rem; color: var(--muted); font-size: .9rem; }
.claim-panel--result h1 { font-size: clamp(3rem, 4.8vw, 4rem); line-height: .98; }
.claim-panel--result .claim-description { color: var(--muted); font-size: 1.15rem; margin-block: 1.25rem 1.75rem; }
.claim-panel--result .claim-action { padding-block: 1.5rem 0; border-bottom: 0; }
.key-label { margin-bottom: .75rem; color: var(--muted); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; }
.sign-out { margin-top: 2rem; padding: .5rem; border: 0; background: none; color: var(--muted); font: inherit; font-size: .9rem; text-decoration: underline; text-underline-offset: .25em; cursor: pointer; }
.claim-note { margin-top: 1.5rem; color: var(--muted); font-size: 1rem; text-wrap: balance; }
.playtest-accent { color: var(--gold); }
.claim-privacy { margin-top: 1rem; color: var(--muted); font-size: .85rem; line-height: 1.6; }
.claim-privacy a { text-decoration: underline; text-underline-offset: .2em; }
.steam-icon { width: 2.75rem; height: 2.75rem; flex-shrink: 0; }

.claim-steps {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.claim-steps li {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
  font-size: .9rem;
  line-height: 1.4;
}

.claim-steps li + li::before {
  content: "→" / "";
  position: absolute;
  top: .5rem;
  left: -1rem;
  color: var(--gold);
  font-size: 1.25rem;
}

.claim-steps svg {
  width: 2.25rem;
  height: 2.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 70rem) {
  .game-banner { flex-wrap: wrap; padding-inline: 0; }
  .game-banner .button { margin-left: auto; }
}

@media (max-width: 40rem) {
  .page-width { width: calc(100% - 3rem); }
  .studio-logo { width: min(72vw, 22rem); }
  .studio-tagline { max-width: 20rem; }
  .game-banner { flex-direction: column; align-items: flex-start; gap: 1.5rem; padding-block: 2rem; }
  .game-name { border: 0; padding: 0; }
  .game-banner .button { width: 100%; }
  .site-footer { flex-direction: column; padding-block: 2.5rem 2rem; text-align: center; }
  .playtest-header { padding-block: 1.5rem 2.5rem; }
  .playtest-scene { padding-inline: 1.5rem; }
  .playtest-scene::before, .playtest-scene::after { display: none; }
  .claim-panel { --corner: .65rem; padding: 2.5rem 1.25rem 2rem; }
  .claim-panel h1 { font-size: clamp(2.75rem, 14.5vw, 3.5rem); }
  .claim-panel--result h1 { font-size: clamp(2.75rem, 12vw, 3.5rem); }
  .claim-panel .eyebrow { font-size: .9rem; }
  .playtest-key { padding-inline: .75rem; }
  .claim-action .button { gap: .75rem; padding-inline: .5rem; font-size: 1.05rem; }
  .claim-action .steam-icon { width: 2.25rem; height: 2.25rem; }
  .claim-note { font-size: .9rem; }
  .claim-steps { gap: .75rem; }
  .claim-steps li { font-size: .8rem; }
  .claim-steps li + li::before { left: -.9rem; }
}
