/* Studio Směr — coming soon. Exact brand-manual colours (studio-smer: src/styles/global.css).
 * Only Bitcount Single ships as a font (OFL); the logo's wordmark is outlined in index.html because
 * the web licences of AV Estiana / Rinter are not sorted yet. Zero JavaScript. */

@font-face {
  font-family: 'Bitcount Single';
  src: url('/fonts/bitcount-single.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-text: 'Bitcount Single', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --lavender-light: #e2def2;
  --anthracite: #242325;
  --purple: #3f346f;
  --olive: #b1bd47;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);

  /* Logo width: fits the viewport width AND height (lockup is 0.907× as tall as wide, plus the
     protective zone and the note below). */
  --logo-w: min(78vw, 34rem, calc((100svh - 13rem) / 1.2));
  /* Protective zone from the manual = the size of the four-point star (~0.29 of the lockup width). */
  --zone: calc(var(--logo-w) * 0.29);

  color-scheme: light;
}

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--lavender-light);
  color: var(--anthracite);
  font-family: var(--font-text);
}

::selection {
  background: var(--olive);
  color: var(--anthracite);
}

main {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--zone);
  padding: 3rem 1.5rem;
  text-align: center;
}

h1 {
  margin: 0;
  line-height: 0;
}

.logo {
  display: block;
  width: var(--logo-w);
  height: auto;
  aspect-ratio: 3058 / 2774;
}

.note {
  margin: 0;
  /* Dotted faces need size: below ~22 px the dots merge into streaks on 1× screens. */
  /* Keep Bitcount's default round dots (ELSH 0, as in the brand manual; 50+ turns them square). */
  font-size: clamp(1.375rem, 1rem + 1.2vw, 2rem);
  line-height: 1.5;
}

/* The e-mail stands on its own line, so it needs no underline; olive marks it on hover/focus. */
.note a {
  color: inherit;
  text-decoration: none;
  border-radius: 0.125em;
  transition: background-color 160ms var(--ease-out-expo);
}

.note a:hover {
  background-color: var(--olive);
}

.note a:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 3px;
}

/* The one motion moment: the symbol swings in like a compass needle and settles on its direction.
   It starts visible (only rotated), so nothing is hidden before the animation runs. */
@media (prefers-reduced-motion: no-preference) {
  .needle {
    transform-box: fill-box;
    transform-origin: 50% 50%;
    animation: settle 2.2s 0.15s both;
  }
}

@keyframes settle {
  0% {
    transform: rotate(-34deg);
    animation-timing-function: cubic-bezier(0.3, 0, 0.2, 1);
  }
  42% {
    transform: rotate(8deg);
    animation-timing-function: cubic-bezier(0.45, 0, 0.3, 1);
  }
  66% {
    transform: rotate(-2.6deg);
    animation-timing-function: cubic-bezier(0.45, 0, 0.3, 1);
  }
  84% {
    transform: rotate(0.8deg);
    animation-timing-function: cubic-bezier(0.45, 0, 0.3, 1);
  }
  100% {
    transform: rotate(0deg);
  }
}
