/* Shadeburst Games site. Plain CSS, system fonts, no external requests.
   Studio colours: navy #0b1020 background, coral #E85D4E (the "GAMES" in the logo),
   and the six logo dots. The Paddlesong page (body.ps) swaps in the palette of the
   game's first level (docs/design/04-design-system.md: light sans, uppercase titles
   with wide spacing, lowercase subtitles, calm motion). */

:root {
  color-scheme: dark;
  --bg: #0b1020;
  --bg-raise: #121a30;
  --line: #26304a;
  --text: #ece8de;
  --muted: #b9b4a8;
  --soft: #8f97aa;
  --accent: #e85d4e;
  --link: #8ec8e6;
  --focus: #ffb880;
  --dot1: #e85d4e;
  --dot2: #e7b86d;
  --dot3: #6db5e6;
  --dot4: #6ed58c;
  --dot5: #ae7be6;
  --dot6: #f3964a;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --light: "Segoe UI Light", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --wrap: 44rem;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--sans);
}

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

a { color: var(--link); text-underline-offset: .18em; }
a:hover { color: #b8dcef; }

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

h1, h2, h3 { line-height: 1.25; color: #f6f2e8; }
h2 { font-size: 1.3rem; font-weight: 600; margin: 2.4rem 0 .6rem; }
h3 { font-size: 1.08rem; font-weight: 600; margin: 0 0 .4rem; }
p, li { color: var(--muted); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }

/* Language blocks: with JS, only the chosen language shows. Without JS, all show. */
html[data-lang="en"] .l:not([lang="en"]),
html[data-lang="es"] .l:not([lang="es"]),
html[data-lang="ca"] .l:not([lang="ca"]) { display: none !important; }

.skip {
  position: absolute; left: .75rem; top: -4rem;
  background: var(--bg-raise); color: var(--text);
  padding: .5rem .8rem; border-radius: 6px; z-index: 10;
}
.skip:focus { top: .75rem; }

/* Header */
.site-head { border-bottom: 1px solid var(--line); }
.site-head .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; padding-top: .8rem; padding-bottom: .8rem;
}
.brand {
  display: inline-flex; align-items: center; gap: .6rem;
  color: var(--text); text-decoration: none; font-weight: 600; letter-spacing: .02em;
}
.brand img { width: 34px; height: auto; }
.brand:hover { color: #fff; }

.langs { display: flex; gap: .35rem; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.langs a {
  display: inline-block; padding: .3rem .75rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg-raise);
  color: var(--text); text-decoration: none; font-size: .9rem;
}
.langs a:hover { border-color: #3a4566; }
.langs a[aria-current="true"] { background: #2a334d; border-color: #4a5680; }

/* Dots: the six colours of the studio logo, used as a quiet divider. */
.dots { display: flex; gap: .55rem; margin: 0; padding: 0; list-style: none; }
.dots span { width: .55rem; height: .55rem; border-radius: 50%; display: block; }
.dots span:nth-child(1) { background: var(--dot1); }
.dots span:nth-child(2) { background: var(--dot2); }
.dots span:nth-child(3) { background: var(--dot3); }
.dots span:nth-child(4) { background: var(--dot4); }
.dots span:nth-child(5) { background: var(--dot5); }
.dots span:nth-child(6) { background: var(--dot6); }

/* Home */
.hero { text-align: center; padding: 3rem 0 1rem; }
.hero .logo { width: min(15rem, 62vw); margin: 0 auto 1.6rem; }
.hero h1 {
  /* Visually hidden: the logo carries the studio name; the heading stays for structure. */
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.hero .about { max-width: 34rem; margin: 0 auto; font-size: 1.05rem; }
.hero .dots { justify-content: center; margin: 2rem 0 0; }

.games { display: grid; gap: 1rem; margin: 2.5rem 0 0; padding: 0; list-style: none; }
.card {
  background: var(--bg-raise); border: 1px solid var(--line); border-radius: 14px;
  padding: 1.4rem 1.4rem 1.2rem;
}
.card h3 { font-size: 1.35rem; margin: .15rem 0 .5rem; }
.card p { margin: .4rem 0; }
.card .links { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin-top: .9rem; }
.kicker {
  font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--dot2); margin: 0;
}
.card.ps-card { border-color: #1f4a52; background: linear-gradient(160deg, #0b1d2a 0%, #0a1424 70%); }
.card.ps-card .kicker { color: #8cebdb; }
.card.ps-card h3 { font-family: var(--light); font-weight: 300; letter-spacing: .22em; text-transform: uppercase; }

.contact { margin: 3rem 0 0; }

/* Footer */
.site-foot { border-top: 1px solid var(--line); margin-top: 4rem; }
.site-foot .wrap { padding-top: 1.4rem; padding-bottom: 2.2rem; font-size: .92rem; }
.site-foot p { color: var(--soft); margin: .3rem 0; }

/* Buttons and placeholders */
.btns { display: flex; flex-wrap: wrap; gap: .7rem; justify-content: center; margin: 1.6rem 0 0; padding: 0; list-style: none; }
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .7rem 1.15rem; border-radius: 10px; font-size: .98rem; line-height: 1.2;
  border: 1px solid var(--line); background: var(--bg-raise); color: var(--text); text-decoration: none;
}
.btn.is-soon {
  /* Placeholder: looks inactive, but the text keeps readable contrast. */
  border-style: dashed; background: transparent; color: #b4bcc4; cursor: default;
}
.btn.is-soon small { font-size: .78rem; color: #93a0a8; letter-spacing: .04em; }

.frame {
  aspect-ratio: 16 / 9; width: 100%;
  display: grid; place-items: center; text-align: center;
  border: 1px dashed #2b4d58; border-radius: 14px;
  background: radial-gradient(ellipse at 50% 60%, #0a2a36 0%, #04121b 70%);
  color: #a7bcc2; font-size: .95rem; padding: 1rem;
}

.box {
  border: 1px solid var(--line); border-radius: 14px; background: var(--bg-raise);
  padding: 1.2rem 1.3rem; margin-top: 1rem;
}
.box p { margin: .3rem 0; }

/* Paddlesong page: palette of the first level (deep sea at first light) */
body.ps {
  --bg: #03101a;
  --bg-raise: #071c28;
  --line: #15333f;
  --text: #e6f2ef;
  --muted: #b3c6c7;
  --soft: #8ba3a8;
  --link: #8cebdb;
  --accent: #8cebdb;
  --warm: #ffb880;
  background:
    radial-gradient(ellipse 90% 55% at 50% 0%, #0a2e3b 0%, rgba(3, 16, 26, 0) 70%),
    var(--bg);
  background-repeat: no-repeat;
}
body.ps a:hover { color: #c3f5ec; }

.ps-hero { text-align: center; padding: 3.2rem 0 1.5rem; }
.ps-title {
  font-family: var(--light); font-weight: 300;
  font-size: clamp(2.1rem, 9vw, 4.4rem);
  letter-spacing: .3em; text-transform: uppercase;
  margin: 0 0 .9rem; padding-left: .3em; /* balances the trailing letter-spacing */
  color: #e9fbf7;
  text-shadow: 0 0 28px rgba(140, 235, 219, .22);
}
.ps-tagline { font-size: clamp(1.1rem, 3.6vw, 1.35rem); color: var(--text); margin: 0; }
.ps-status {
  display: inline-block; margin: 1.3rem 0 0; padding: .3rem .85rem; border-radius: 999px;
  border: 1px solid #2a5560; color: var(--warm); font-size: .9rem; letter-spacing: .03em;
}

/* A quiet court: two paddles, a net and the ball. Decorative only. */
.court {
  position: relative; height: 5.5rem; width: calc(100% - 4rem); max-width: 26rem; margin: 2.2rem auto 0;
}
.court::before { /* net */
  content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 0;
  border-left: 2px dashed rgba(140, 235, 219, .28);
}
.court .pad {
  position: absolute; top: 50%; width: 5px; height: 2.6rem; margin-top: -1.3rem;
  border-radius: 3px; background: #c7fff2; box-shadow: 0 0 12px rgba(199, 255, 242, .35);
}
.court .pad.left { left: 0; margin-top: -1.9rem; }
.court .pad.right { right: 0; }
.court .ball {
  position: absolute; right: 1.6rem; top: 50%; width: 11px; height: 11px; margin-top: -5.5px; border-radius: 50%;
  background: #fff7e6; box-shadow: 0 0 14px rgba(255, 184, 128, .65);
}
.court .ring { /* the note just played where the ball touched the right paddle */
  position: absolute; right: -23px; top: 50%;
  width: 46px; height: 46px; margin-top: -23px; border-radius: 50%;
  border: 1px solid rgba(255, 184, 128, .45); opacity: .7;
}
@media (prefers-reduced-motion: no-preference) {
  .court .ring { animation: ring 2s ease-in-out infinite; }
  @keyframes ring {
    0% { transform: scale(.35); opacity: .75; }
    60%, 100% { transform: scale(1.25); opacity: 0; }
  }
}

.ps-main section { margin-top: 2.6rem; }
.ps-main h2 {
  font-family: var(--light); font-weight: 300; letter-spacing: .12em; text-transform: uppercase;
  font-size: 1.15rem; color: #d9f6f0; margin: 0 0 .7rem;
}
.lead { font-size: 1.1rem; color: var(--text); }
.ps-main ul { padding-left: 1.2rem; }
.ps-main li { margin: .35rem 0; }
.ps-main li strong { color: var(--text); font-weight: 600; }
.ps-main .levels { list-style: none; padding: 0; }
.ps-main .levels li { padding-left: 1rem; border-left: 2px solid #1d4450; margin: .9rem 0; }
.headphones { color: var(--warm); }
.craft { font-size: 1.05rem; color: var(--text); border-left: 2px solid var(--warm); padding-left: 1rem; margin: 0; }

/* 404 */
.lost { text-align: center; padding: 4rem 0 2rem; }
.lost img { width: 7rem; margin: 0 auto 1.6rem; }
.lost h1 { font-family: var(--light); font-weight: 300; letter-spacing: .12em; font-size: 1.8rem; margin: 0 0 .6rem; }
.lost .dots { justify-content: center; margin-top: 2rem; }

@media (max-width: 30rem) {
  body { font-size: 16px; }
  .card { padding: 1.15rem 1.1rem 1rem; }
  .btn { width: 100%; justify-content: center; }
  .btns li { width: 100%; }
}
.btns.start { justify-content: flex-start; margin-top: 1rem; }
