/*
Theme Name: OHR tijdelijk
Template: blankslate
Description: Tijdelijke aanmeldpagina voor OHR presents: bewegende blauwe rook en een inschrijfveld. Blijft actief tot het thema ohr klaar is.
Author: Studio Studio
Author URI: https://studiostudio.be
Version: 1.0
Text Domain: ohr-tijdelijk
*/

:root {
  --silver: #c9cdd3;
  --silver-dim: rgba(201, 205, 211, .55);
  --black: #000;
  --type: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mark: "gamay-condensed", "Helvetica Neue", Helvetica, Arial, sans-serif; /* Adobe Fonts, Gamay Cond ExtraBold */
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: var(--black); }
body {
  color: var(--silver);
  font-family: var(--type);
  -webkit-font-smoothing: antialiased;
}
/* The page never scrolls. */
html:has(body.home), body.home { overflow: hidden; overscroll-behavior: none; }

/* BlankSlate's "Skip to the content" link: hidden until it gets keyboard focus. */
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
}
.screen-reader-text:focus {
  clip-path: none;
  width: auto; height: auto;
  margin: 0;
  top: 1rem; left: 1rem;
  padding: .5rem .8rem;
  background: var(--black);
  color: var(--silver);
  z-index: 10;
}

/* Smoke: WebGL canvas (main.js). Without WebGL this static gradient stays. */
#smoke {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  display: block;
  background:
    radial-gradient(60% 50% at 25% 70%, #0b2a75 0%, transparent 70%),
    radial-gradient(50% 40% at 75% 25%, #082060 0%, transparent 70%),
    #000;
}

main {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: max(2rem, env(safe-area-inset-top)) max(2rem, env(safe-area-inset-right))
           max(2rem, env(safe-area-inset-bottom)) max(2rem, env(safe-area-inset-left));
}
.center {
  width: min(100%, 26rem);
  text-align: center;
}

h1 {
  font-family: var(--mark);
  font-weight: 800;
  font-size: min(18vw, 24vh, 10rem); /* also fits short screens (phone held sideways) */
  letter-spacing: .02em;
  line-height: .9;
  margin-right: -.02em; /* optical centring of tracked caps */
}
.presents {
  display: block;
  font-family: var(--type);
  font-weight: 400;
  line-height: 1;
  font-size: .8rem;
  letter-spacing: .4em;
  margin-top: .9rem;
  margin-right: -.4em;
  text-transform: lowercase;
  color: var(--silver-dim);
}

form {
  margin-top: 3.5rem;
  display: flex;
  border-bottom: 1px solid var(--silver-dim);
  transition: border-color .3s;
}
form:focus-within { border-color: var(--silver); }
input[type=email] {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: var(--silver);
  font: inherit;
  font-size: 1rem;
  padding: .8rem 0;
  outline: none;
}
input[type=email]::placeholder { color: var(--silver-dim); }
button {
  background: transparent;
  border: 0;
  color: var(--silver);
  font: inherit;
  font-size: 1rem;
  padding: .8rem 0 .8rem 1rem;
  cursor: pointer;
}
button:disabled { opacity: .4; cursor: default; }
button:focus-visible, input:focus-visible { outline: 1px solid var(--silver); outline-offset: 4px; }

.hp { position: absolute; left: -5000px; } /* honeypot and hidden label */

/* What the address is used for and whom to ask (GDPR): small, under the field. */
.note {
  margin-top: .4rem;
  font-size: .72rem;
  line-height: 1.5;
  color: var(--silver-dim);
}
.note a { color: inherit; }

.status {
  min-height: 1.4em;
  margin-top: 1rem;
  font-size: .85rem;
  color: var(--silver-dim);
}

/* ------------------------------------------------------------------
   ARRIVAL
   On load the word OHR comes into focus out of the smoke, then
   "presents", then the field. Only when a script set html.intro
   (functions.php); without JavaScript everything is simply there.
   main.js starts it once the Gamay font is ready, so the word never
   appears in the fallback font first.
   ------------------------------------------------------------------ */
@keyframes ohr-focus {
  from { opacity: 0; filter: blur(18px); }
  to   { opacity: 1; filter: blur(0); }
}
@keyframes ohr-appear {
  from { opacity: 0; }
  to   { opacity: 1; }
}
html.intro h1,
html.intro .presents,
html.intro #signup,
html.intro .status,
html.intro .note { opacity: 0; }

html.intro-go h1       { animation: ohr-focus 1.6s cubic-bezier(.16, 1, .3, 1) .1s both; }
html.intro-go .presents { animation: ohr-appear 1.2s cubic-bezier(.16, 1, .3, 1) .8s both; }
html.intro-go #signup,
html.intro-go .status,
html.intro-go .note     { animation: ohr-appear 1.2s cubic-bezier(.16, 1, .3, 1) 1.3s both; }

@media (prefers-reduced-motion: reduce) {
  html.intro-go h1        { animation: ohr-appear .6s ease-out both; }
  html.intro-go .presents { animation: ohr-appear .5s ease-out .3s both; }
  html.intro-go #signup,
  html.intro-go .status,
  html.intro-go .note     { animation: ohr-appear .5s ease-out .5s both; }
}
