:root {
  color-scheme: light dark;
  --paper: #f7f7f4;
  --ink: #202526;
  --muted: #6b706d;
  --green: #25796d;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }

.ambient {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  height: 100svh;
  pointer-events: none;
  color: var(--green);
  animation: fade-in 900ms ease both;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  justify-items: center;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left);
}

main {
  position: relative;
  align-self: center;
  width: min(100% - 48px, 440px);
  padding-block: clamp(24px, 6svh, 64px);
}

.studio { text-align: center; width: 100%; }
h1 { margin: 0; line-height: 0; }
.brand { position: relative; width: min(100%, 380px); margin-inline: auto; }
.studio-logo { display: block; width: 100%; height: auto; }

.logo-play {
  position: absolute;
  /* Match the approved tile's centre and bounds in the SVG viewBox. */
  left: 12.03196%;
  top: 43.75%;
  width: 17.1885%;
  height: 62.5%;
  min-width: 44px;
  min-height: 44px;
  transform: translate(-50%, -50%);
  padding: 0;
  border: 0;
  border-radius: 25%;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.logo-tile-motion { transform-box: fill-box; transform-origin: center; }

.brand { animation: arrive 380ms cubic-bezier(.2, .7, .3, 1) both; }
footer { animation: fade-in 320ms 160ms ease both; }

@keyframes arrive {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }

footer {
  position: relative;
  width: min(100% - 64px, 840px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: 12px max(24px, env(safe-area-inset-bottom));
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

footer a { min-height: 44px; display: inline-flex; align-items: center; gap: 9px; }
a:focus-visible, .logo-play:focus-visible { outline: 2px solid var(--green); outline-offset: 5px; }
a:focus-visible { border-radius: 5px; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@media (hover: hover) {
  footer a:hover { color: var(--ink); }
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #202526;
    --ink: #f7f7f4;
    --muted: #afb8b3;
    --green: #7bbfaf;
  }
}

@media (max-width: 380px) {
  main { width: calc(100% - 40px); }
  footer { width: calc(100% - 40px); }
}

@media (max-height: 540px) {
  main { padding-block: 16px; }
  .brand { width: 260px; max-width: 100%; }
  footer { padding-block: 0 max(8px, env(safe-area-inset-bottom)); }
}

@media (max-height: 420px) {
  main { padding-block: 12px; }
  .brand { width: 200px; }
}

@media (prefers-reduced-motion: reduce) {
  .brand, footer, .ambient { animation: none; }
}
