:root {
  color-scheme: dark;
  font-family: system-ui, sans-serif;
  color: #f7f4ec;
  background: #111623;
  --halo: #1d2739;
  --frame: #48556b;
  --scene: #202b42;
  --shadow: #080b145c;
  --line: #394354;
  --muted: #bac5d7;
  --gold: #f7c674;
}
:root[data-theme="day"] {
  color-scheme: light;
  color: #242323;
  background: #f8f6f1;
  --halo: #e7eef4;
  --line: #c9c4ba;
  --muted: #4b4d51;
  --gold: #a32129;
  --frame: #a7b3b8;
  --scene: #c9e6f4;
  --shadow: #263d5729;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: radial-gradient(ellipse at 68% 50%, var(--halo), transparent 70%);
}
.page {
  width: min(91%, 90rem);
  margin: auto;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
.masthead {
  min-height: 5.7rem;
  display: flex;
  gap: .75rem;
  align-items: center;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
}
.theme-toggle {
  margin-inline-start: auto;
  display: inline-flex;
  align-items: center;
  gap: .15rem;
  padding: .2rem;
  min-height: 2.75rem;
  border: 1px solid var(--frame);
  border-radius: 2rem;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: 650 .875rem system-ui, sans-serif;
}
.theme-toggle[hidden] { display: none; }
.theme-toggle span { padding: .44rem .66rem; border-radius: 2rem; }
.theme-toggle:hover { border-color: var(--gold); }
.theme-toggle:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.theme-toggle[aria-pressed="false"] .theme-toggle-day,
.theme-toggle[aria-pressed="true"] .theme-toggle-night {
  background: var(--gold);
  color: #fff;
}
.theme-toggle[aria-pressed="true"] .theme-toggle-night { color: #222126; }
.crest {
  display: block;
  width: 3.25rem;
  height: 3.25rem;
  object-fit: contain;
}
main {
  display: grid;
  grid-template-columns: minmax(0, .74fr) minmax(0, 1.26fr);
  align-items: center;
  gap: clamp(2rem, 4vw, 4.5rem);
  padding-block: clamp(2rem, 6vw, 6.5rem);
  flex: 1;
}
.intro::before {
  content: '';
  display: block;
  width: 2.85rem;
  height: .22rem;
  background: var(--gold);
  margin-bottom: 1.55rem;
}
h1 {
  margin: 0;
  line-height: .99;
  font-size: clamp(2.4rem, 4.4vw, 4.65rem);
  font-weight: 830;
  letter-spacing: -.073em;
}
h1 span { display: block; color: var(--gold); }
.intro p {
  margin: 1.5rem 0 0;
  max-width: 29ch;
  font-size: clamp(1.05rem, 1.38vw, 1.25rem);
  line-height: 1.6;
  color: var(--muted);
}
.action {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--frame);
  border-radius: .75rem;
  background: var(--scene);
  box-shadow: 0 1.5rem 4rem var(--shadow);
}
canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 25 / 16;
  background: var(--scene);
}
footer {
  padding-block: 1.3rem;
  border-top: 1px solid var(--line);
  font-size: .9rem;
  color: var(--muted);
}
@media (max-width: 900px) {
  main { grid-template-columns: minmax(0, 1fr); align-content: center; }
  .action { width: 100%; }
  h1 { font-size: clamp(2rem, 9.5vw, 4.65rem); }
  .masthead { min-height: 4.4rem; }
}
