/* A white page with the words in one grey, darker under the pointer. Plain Inter capitals, the big words in its light weight. */

@font-face {
  font-family: "Inter";
  src: url("assets/inter-300.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("assets/inter-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

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

:root {
  --page: #fff;
  --ink: #b3b3b3;
  /* What is secondary is the same ink, fainter. */
  --faint: #b3b3b3;
  /* What a word turns to under the pointer: the same grey, darker. */
  --hover: #6b6b6b;
  --text: "Inter", system-ui, sans-serif;
}

html,
body {
  margin: 0;
  background: var(--page);
}

body {
  color: var(--ink);
  font-family: var(--text);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Page frame */

.root {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 16px;
  /* The load animation starts rows 24px lower; without this the footer pokes
     below the screen for a moment and the scrollbar flashes. */
  overflow: clip;
}

.main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 520px;
  min-height: 100vh;
  min-height: 100dvh;
}

/* Load animation: fade in and rise, one row after another */

@keyframes appear {
  from {
    opacity: 0;
    translate: 0 24px;
  }
}

.door,
.footer,
.policy {
  animation: appear 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
  animation-delay: var(--delay, 0.3s);
}

/* The doors, one under another in the middle of the screen. */

.links {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 2.2vh, 24px);
  width: 100%;
  padding: clamp(20px, 5vh, 56px) 0 clamp(40px, 9vh, 96px);
}

.door {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: max-content;
  max-width: 100%;
  color: var(--ink);
  text-align: center;
}
.links > :nth-child(1) { --delay: 0.12s; }
.links > :nth-child(2) { --delay: 0.18s; }
.links > :nth-child(3) { --delay: 0.24s; }
.links > :nth-child(4) { --delay: 0.3s; }
.links > :nth-child(5) .door { --delay: 0.36s; }

/* The word itself, in capitals. */
.name {
  display: block;
  font-size: clamp(32px, 9.5vw, 46px);
  /* Thin: in capitals the regular weight looks heavy. */
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: 0;
  text-transform: uppercase;
  transition: color 0.25s ease;
}

/* A pointer darkens the word. On a phone a tap counts as hover until the next tap
   elsewhere, so the colour applies only to a real pointer; keyboards get it on focus. */
@media (hover: hover) {
  a.door:hover .name,
  .toggle:hover .name {
    color: var(--hover);
  }
}
a.door:focus-visible .name,
.toggle:focus-visible .name {
  color: var(--hover);
}
a.door:focus-visible,
.toggle:focus-visible {
  outline: none;
}

/* SOCIAL drops its list below itself, over empty space, so nothing else moves. */
.social {
  position: relative;
}
.toggle {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  cursor: pointer;
}

/* The names of the networks: one per line, from the left edge of SOCIAL. */
.networks {
  position: absolute;
  top: 100%;
  left: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
  line-height: 1.2;
  text-transform: uppercase;
  opacity: 0;
  visibility: hidden;
  translate: 0 -6px;
  transition:
    opacity 0.3s ease,
    translate 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
    visibility 0s linear 0.4s;
}
.toggle[aria-expanded="true"] + .networks {
  opacity: 1;
  visibility: visible;
  translate: 0 0;
  transition:
    opacity 0.3s ease,
    translate 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
    visibility 0s;
}
.networks a {
  display: block;
  padding: 2px 0;
  transition: color 0.25s ease;
}
@media (hover: hover) {
  .networks a:hover {
    color: var(--hover);
  }
}
.networks a:focus-visible {
  color: var(--hover);
  outline: none;
}

/* Footer */

/* Footer: the same grey as the words, darker under the pointer. */
.footer {
  --delay: 0.6s;
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
  margin-bottom: 7px;
  padding: 15px 0;
  color: var(--faint);
  font-size: 15px;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: pre;
}
.footer p {
  margin: 0;
}
.footer a {
  transition: color 0.25s ease;
}
@media (hover: hover) {
  .footer a:hover {
    color: var(--hover);
  }
}
.footer a:focus-visible {
  color: var(--hover);
  outline: none;
}

/* Privacy page */

.policy {
  --delay: 0.2s;
  width: 100%;
  margin: auto 0;
  padding: 40px 0;
  font-size: 14px;
  line-height: 1.45;
}
.policy h1,
.policy h2 {
  margin: 0;
  font-weight: 400;
  text-transform: uppercase;
}
.policy h1 {
  margin-bottom: 24px;
  font-size: 28px;
  line-height: 1.1;
  text-align: center;
}
.policy h2 {
  font-size: 15px;
  line-height: 1.2;
}
.policy p {
  margin: 4px 0 0;
  color: var(--faint);
}
.policy section + section {
  margin-top: 20px;
}

@media (max-width: 809.98px) {
  .main.text {
    max-width: none;
    padding: 84px 4px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .door,
  .footer,
  .policy {
    animation: none;
  }
  .name,
  .networks {
    transition: none;
  }
}
