@font-face {
  font-family: "Roboto";
  src: url("/site/fonts/Roboto.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Augustus";
  src: url("/site/fonts/Augustus.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --background: #071027;
  --panel: rgb(10 22 48 / 86%);
  --panel-strong: rgb(8 17 37 / 94%);
  --line: rgb(181 211 255 / 22%);
  --text: #f3f7ff;
  --soft: #c9d8ef;
  --muted: #96a9c7;
  --gold: #ffd983;
  --gold-strong: #ffbd45;
  --ice: #9adfff;
  --danger: #ff8b91;
  font-family: "Roboto", "Noto Sans", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 280px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background: var(--background);
  line-height: 1.6;
}

a {
  color: var(--gold);
  text-underline-offset: .2em;
}

a:hover {
  color: #fff0bd;
}

button,
input {
  font: inherit;
}

button,
.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: .65rem 1rem;
  border: 1px solid rgb(255 217 131 / 48%);
  border-radius: .6rem;
  color: #15100a;
  background: linear-gradient(180deg, #ffe8ad, #e9b956);
  box-shadow: 0 .45rem 1.4rem rgb(0 0 0 / 24%);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

button:hover,
.button:hover {
  color: #15100a;
  filter: brightness(1.08);
}

button.secondary,
.button.secondary {
  border-color: var(--line);
  color: var(--text);
  background: rgb(130 168 224 / 12%);
}

button.danger {
  border-color: rgb(255 139 145 / 50%);
  color: #2b0709;
  background: var(--danger);
}

input {
  min-height: 44px;
  padding: .55rem .7rem;
  border: 1px solid var(--line);
  border-radius: .45rem;
  outline: none;
  color: var(--text);
  background: rgb(3 10 24 / 85%);
}

input:focus-visible,
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

#sky {
  position: fixed;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  background: var(--background);
}

.page-shell::before,
.admin-shell::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background: radial-gradient(circle at 50% 42%, transparent 12%, rgb(2 7 18 / 12%) 55%, rgb(2 6 16 / 68%) 100%);
  content: "";
  pointer-events: none;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: .75rem;
  left: .75rem;
  padding: .65rem 1rem;
  transform: translateY(-150%);
  border-radius: .4rem;
  color: #071027;
  background: var(--gold);
  font-weight: 700;
}

.skip-link:focus {
  transform: none;
}

.language-nav {
  position: relative;
  z-index: 5;
  display: flex;
  max-width: 1180px;
  margin: 0 auto;
  padding: 1rem clamp(1rem, 3vw, 2rem);
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .25rem;
}

.language-nav a {
  padding: .2rem .45rem;
  border-radius: 999px;
  color: var(--soft);
  font-size: .78rem;
  text-decoration: none;
}

.language-nav a[aria-current="page"] {
  color: #171007;
  background: var(--gold);
  font-weight: 700;
}

.hero {
  display: grid;
  min-height: min(850px, calc(100vh - 4rem));
  max-width: 1050px;
  margin: 0 auto;
  padding: clamp(3rem, 10vh, 8rem) 1.25rem 6rem;
  place-content: center;
  justify-items: center;
  text-align: center;
}

.eyebrow,
.section-kicker {
  margin: 0 0 1rem;
  color: var(--ice);
  font-size: clamp(.8rem, 1.8vw, 1rem);
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.logo-mark {
  display: flex;
  margin-bottom: .6rem;
  flex-direction: column;
  font-size: clamp(2.8rem, 7vw, 5.7rem);
  line-height: .82;
  filter: drop-shadow(0 0 1rem rgb(255 213 117 / 30%));
}

.logo-mark.small {
  width: max-content;
  margin: 1.5rem auto .25rem;
  font-size: 3rem;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

.hero h1 {
  margin: 0;
  color: #eef6ff;
  font-family: "Augustus", "Roboto", sans-serif;
  font-size: clamp(4rem, 13vw, 9.8rem);
  font-weight: 400;
  letter-spacing: -.02em;
  line-height: .92;
  text-shadow: 0 .1rem 0 #aab8c2, 0 .45rem 2.5rem rgb(2 7 18 / 72%);
}

.tagline {
  max-width: 780px;
  margin: 1.5rem 0 .75rem;
  color: #edf5ff;
  font-size: clamp(1.25rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.25;
  text-wrap: balance;
}

.intro {
  max-width: 710px;
  margin: 0;
  color: var(--soft);
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.scroll-cue {
  margin-top: 4rem;
  animation: snow-cue 2.4s ease-in-out infinite;
  font-size: 1.8rem;
}

main,
footer {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

main {
  display: grid;
  gap: 2rem;
  padding-bottom: 4rem;
}

.panel,
.feature-card,
.admin-card {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgb(14 30 62 / 91%), rgb(7 17 39 / 89%));
  box-shadow: 0 1.25rem 4rem rgb(1 5 15 / 34%), inset 0 1px rgb(255 255 255 / 4%);
  backdrop-filter: blur(13px);
}

.panel {
  padding: clamp(1.35rem, 4vw, 3rem);
  border-radius: 1.2rem;
}

.journey {
  display: grid;
  align-items: center;
  gap: 2rem;
  grid-template-columns: 1.2fr .8fr;
}

.panel h2,
.section-block > h2,
.admin-card h1 {
  margin: 0 0 .8rem;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.15;
  text-wrap: balance;
}

.panel p {
  color: var(--soft);
}

.emoji-dialogue {
  display: grid;
  padding: 1rem;
  align-items: center;
  gap: .75rem;
  grid-template-columns: auto 1fr;
  font-size: clamp(1.2rem, 3vw, 2rem);
}

.emoji-dialogue b {
  padding: .6rem .85rem;
  border: 1px solid rgb(154 223 255 / 24%);
  border-radius: 1.1rem 1.1rem 1.1rem .2rem;
  color: var(--text);
  background: rgb(154 223 255 / 8%);
  font-weight: 400;
}

.section-block {
  padding: clamp(1rem, 3vw, 2rem) 0;
}

.section-block > h2 {
  margin-bottom: 1.4rem;
  text-align: center;
}

.feature-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(6, 1fr);
}

.feature-card {
  padding: 1.5rem;
  border-radius: 1rem;
  grid-column: span 2;
}

.feature-card:nth-child(4) {
  grid-column: 2 / span 2;
}

.feature-card h3 {
  margin: .7rem 0 .35rem;
  font-size: 1.25rem;
}

.feature-card p,
.credit-card p {
  margin: 0;
  color: var(--soft);
}

.feature-emoji {
  min-height: 2.8rem;
  font-size: 2rem;
}

.access-line {
  margin: 1.25rem auto 0;
  color: var(--soft);
  text-align: center;
}

.source-note {
  color: var(--muted) !important;
  font-size: .9rem;
}

.release-list {
  display: grid;
  margin-top: 1.5rem;
  gap: .65rem;
}

.release {
  border: 1px solid var(--line);
  border-radius: .7rem;
  background: rgb(2 10 27 / 42%);
}

.release summary {
  display: flex;
  padding: .85rem 1rem;
  justify-content: space-between;
  gap: 1rem;
  color: var(--text);
  cursor: pointer;
  font-weight: 750;
}

.release summary::marker {
  color: var(--gold);
}

.release time {
  color: var(--muted);
  font-weight: 400;
}

.release ul {
  margin: 0;
  padding: 0 1.2rem 1rem 2.2rem;
  color: var(--soft);
}

.release li {
  margin: .35rem 0;
}

.latest {
  margin-right: .65rem;
  padding: .15rem .45rem;
  border-radius: 999px;
  color: #211707;
  background: var(--gold);
  font-size: .72rem;
  text-transform: uppercase;
}

.project-credit {
  margin: 1.5rem 0;
  padding: 1rem 1.15rem;
  border-left: 3px solid var(--gold);
  background: rgb(255 217 131 / 6%);
}

.project-credit h3,
.project-credit p {
  margin: 0;
}

.credits-grid {
  display: grid;
  gap: .8rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}

.credit-card {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: .7rem;
  background: rgb(2 10 27 / 38%);
}

.credit-card h3 {
  margin: 0 0 .65rem;
  color: var(--gold);
}

.credit-card dl {
  display: grid;
  margin: 0 0 .65rem;
  gap: .2rem .6rem;
  grid-template-columns: auto 1fr;
  font-size: .9rem;
}

.credit-card dt {
  color: var(--muted);
  font-weight: 700;
}

.credit-card dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.api-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
}

footer {
  display: flex;
  padding: 1.5rem 0 3rem;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: .9rem;
}

.admin-body {
  display: grid;
  place-items: center;
}

.admin-shell {
  width: min(1200px, calc(100% - 2rem));
  margin: 0 auto;
  padding-bottom: 3rem;
}

.admin-shell .language-nav {
  padding-right: 0;
  padding-left: 0;
}

.admin-card {
  padding: clamp(1.25rem, 4vw, 2.5rem);
  border-radius: 1rem;
}

.login-card {
  width: min(520px, 100%);
  margin: clamp(2rem, 10vh, 7rem) auto;
  text-align: center;
}

.login-card form {
  display: grid;
  margin-top: 1.25rem;
  gap: .65rem;
  text-align: left;
}

.admin-heading,
.version-form {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.admin-heading h1 {
  margin-top: .5rem;
}

.version-form {
  padding: 1rem 0;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.admin-actions {
  display: grid;
  margin-top: 1.5rem;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.admin-actions button {
  width: 100%;
  min-height: 110px;
  flex-direction: column;
  gap: .4rem;
}

.admin-actions button span {
  font-size: 2rem;
}

.admin-message {
  padding: .65rem .8rem;
  border: 1px solid rgb(154 223 255 / 35%);
  border-radius: .45rem;
  color: var(--soft);
  background: rgb(154 223 255 / 7%);
}

.admin-message.error {
  border-color: rgb(255 139 145 / 45%);
  color: #ffd4d7;
  background: rgb(255 139 145 / 8%);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: .7rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--gold);
}

.row-actions {
  display: flex;
  gap: .35rem;
}

.row-actions button {
  min-width: 40px;
  min-height: 40px;
  padding: .35rem;
}

@keyframes snow-cue {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: .5; }
  50% { transform: translateY(.8rem) rotate(45deg); opacity: 1; }
}

@media (max-width: 760px) {
  .journey {
    grid-template-columns: 1fr;
  }

  .feature-card,
  .feature-card:nth-child(4) {
    grid-column: span 3;
  }

  .api-panel,
  footer {
    align-items: stretch;
    flex-direction: column;
  }

  .api-panel .button {
    flex: 1;
  }
}

@media (max-width: 480px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .feature-card,
  .feature-card:nth-child(4) {
    grid-column: 1;
  }

  .release summary,
  .admin-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .language-nav {
    justify-content: center;
  }
}

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