/* Studio page: an evening sky over soft hills on top, calm daylight below. */

/* Outfit, hosted on the site (static files from the Google Fonts download).
   Only the weights the page uses: 400 text, 500 the "believe" lines, 600 headings and buttons */
@font-face {
  font-family: "Outfit";
  src: url("../fonts/static/Outfit-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Outfit";
  src: url("../fonts/static/Outfit-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Outfit";
  src: url("../fonts/static/Outfit-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --day: #f4f6f1;
  --mist: #e7eeea;
  --ink: #22313a;
  --ink-soft: #3a4952;
  --muted: #56636b;
  --link: #2b6578;
  --sun: #e3a33a;
  --night-ink: #fff7ea;
  --night-soft: #cdd0e6;
  --gold: #ffd27a;
  --line: rgba(34, 49, 58, 0.14);

  /* the page is in English, Outfit covers it; the system font is only a fallback */
  --font: "Outfit", system-ui, sans-serif;

  --scene-h: clamp(260px, 37vw, 660px); /* height of the hills at the bottom of the sky */
  color-scheme: light;
}

/* base */
* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--day);
  color: var(--ink);
  font: 18px/1.65 var(--font);
}

@media (max-width: 600px) {
  body { font-size: 17px; }
}

img, svg { display: block; }

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

a:hover {
  color: var(--ink);
  text-decoration-color: var(--sun);
  text-decoration-thickness: 2px;
}

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

.skip {
  position: absolute;
  top: 8px;
  left: -999px;
  z-index: 10;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
}

.skip:focus { left: 12px; }

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
}

@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
}

h1, h2, h3 {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.15;
}

p { margin: 0 0 1em; }

/* hero: an evening sky over soft hills */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(180deg, #141a33 0%, #1d2547 40%, #343b69 72%, #575683 100%);
}

/* stars: two still layers with different tile sizes, fading out toward the warm horizon */
.stars {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-repeat: repeat;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 45%, transparent 85%);
  mask-image: linear-gradient(180deg, #000 0%, #000 45%, transparent 85%);
}

.stars--far {
  background-image: url("../img/studio/stars-far.svg");
  background-size: 640px 480px;
}

.stars--near {
  background-image: url("../img/studio/stars-near.svg");
  background-size: 1130px 700px;
  background-position: 210px 40px;
}

/* header, on top of the sky */
.top {
  position: relative;
  z-index: 2;
  padding: 18px 0;
}

.top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--night-ink);
  font-size: 1.2rem;
  font-weight: 600;
  text-decoration: none;
}

.brand svg {
  flex: none;
  width: 32px;
  height: 32px;
}

.top nav {
  display: flex;
  gap: 24px;
  white-space: nowrap;
}

.top nav a {
  color: var(--night-soft);
  text-decoration: none;
}

.top nav a:hover {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 2px;
}

.hero :focus-visible { outline-color: var(--gold); }

@media (max-width: 560px) {
  .top nav .nav-about { display: none; }

  .top nav {
    gap: 16px;
    font-size: 0.95rem;
  }

  .brand {
    gap: 8px;
    font-size: 1.05rem;
  }

  .brand svg {
    width: 28px;
    height: 28px;
  }
}

.statement {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 24px calc(var(--scene-h) * 0.7);
  text-align: center;
}

.statement h1 {
  color: var(--night-ink);
  font-size: clamp(2.2rem, 5.2vw, 3.9rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.statement p {
  max-width: 33em;
  margin: 22px auto 0;
  color: var(--night-soft);
  font-size: clamp(1.05rem, 1.7vw, 1.25rem);
  text-wrap: pretty;
}

.statement a { color: var(--gold); }

@media (max-width: 600px) {
  .statement { padding: 24px 16px calc(var(--scene-h) * 0.72); }
}

.scene {
  position: absolute;
  bottom: -1px;
  left: 0;
  z-index: 0;
  width: 100%;
  height: var(--scene-h);
}

/* the only motion on the page: the last light warms up behind the hills, then one shooting star */
.scene .glow { animation: glow 2.6s ease-out 0.2s both; }

.scene .shooting {
  opacity: 0;
  animation: shoot 1.3s cubic-bezier(0.25, 0.1, 0.25, 1) 1.8s;
}

@keyframes glow {
  from { opacity: 0.3; }
  to   { opacity: 1; }
}

@keyframes shoot {
  0%   { opacity: 0; transform: translateX(-120px); }
  25%  { opacity: 1; }
  100% { opacity: 0; transform: translateX(260px); }
}

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

  .scene .glow,
  .scene .shooting {
    animation: none;
  }
}

/* text sections */
.section { padding: 72px 0; }
.section + .section { padding-top: 8px; }

@media (max-width: 600px) {
  .section { padding: 56px 0; }
}

.section h2 {
  margin-bottom: 20px;
  font-size: clamp(1.75rem, 3.4vw, 2.3rem);
}

.col { max-width: 36rem; }
.col p { color: var(--ink-soft); }

/* what matters */
.cares {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px 52px;
  max-width: 54rem;
  margin-top: 6px;
}

.cares h3 {
  margin-bottom: 6px;
  font-size: 1.25rem;
}

.cares p {
  margin: 0;
  color: var(--ink-soft);
}

@media (max-width: 720px) {
  .cares {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* what I believe: a calm band in a slightly darker tone */
.section.believe {
  padding: 80px 0;
  background: var(--mist);
}

.believe p {
  max-width: 32em;
  color: var(--ink);
  font-size: clamp(1.18rem, 2.1vw, 1.45rem);
  font-weight: 500;
  line-height: 1.55;
}

.believe p:last-child { margin-bottom: 0; }

.section.believe + .section { padding-top: 72px; }

/* the first game */
.game {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  max-width: 46rem;
}

.game img {
  width: 76px;
  height: 76px;
  border-radius: 20px;
  box-shadow: 0 10px 22px -12px rgba(34, 49, 58, 0.45), 0 0 0 1px rgba(34, 49, 58, 0.06);
}

.game h2 { margin-bottom: 12px; }
.game p { color: var(--ink-soft); }

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 26px;
  margin-top: 6px;
}

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.btn:hover {
  background: #31444f;
  color: #fff;
  text-decoration: none;
}

@media (max-width: 520px) {
  .game {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .game img {
    width: 64px;
    height: 64px;
    border-radius: 16px;
  }
}

/* contact */
.contact .mail {
  display: inline-block;
  margin: 4px 0 6px;
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* social links as icons (files in assets/img/social/); the network name stays in the link for screen readers and search */
.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin: 18px 0 0 -9px;
  padding: 0;
  list-style: none;
}

.socials a {
  display: block;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  overflow: hidden;
  white-space: nowrap;
  text-indent: 100%;
  color: transparent;
  background: center / 24px 24px no-repeat;
  opacity: 0.72;
  transition: opacity 0.15s ease, background-color 0.15s ease;
}

.socials a:hover,
.socials a:focus-visible {
  opacity: 1;
  background-color: var(--mist);
}

.socials a[href*="youtube.com"] { background-image: url("../img/social/youtube.svg"); }
.socials a[href*="tiktok.com"] { background-image: url("../img/social/tiktok.svg"); }
.socials a[href*="instagram.com"] { background-image: url("../img/social/instagram.svg"); }
.socials a[href*="reddit.com"] { background-image: url("../img/social/reddit.svg"); }
.socials a:is([href*="discord.gg"], [href*="discord.com"]) { background-image: url("../img/social/discord.svg"); }
.socials a[href*="facebook.com"] { background-image: url("../img/social/facebook.svg"); }
.socials a[href*="pinterest."] { background-image: url("../img/social/pinterest.svg"); }

/* footer */
.foot {
  margin-top: 24px;
  padding: 26px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}

.foot .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 24px;
}

.foot p { margin: 0; }

/* 404 page */
.lost {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.lost .statement { flex: 1; }
.lost .statement p a { font-weight: 600; }