@font-face {
  font-family: "Satoshi";
  src: url("fonts/Satoshi-Variable.woff2") format("woff2"),
       url("fonts/Satoshi-Variable.woff") format("woff");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* FIBRAIZ palette */
  --milk: #fbf7f4;
  --oat: #e5ded2;
  --taupe: #a39382;
  --mocha: #685d54;
  --charcoal: #232323;
  --ink: #141414;

  --pad: clamp(20px, 4vw, 56px);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

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

html { height: 100%; -webkit-text-size-adjust: 100%; }

body {
  min-height: 100%;
  color: var(--milk);
  font-family: "Satoshi", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background:
    radial-gradient(ellipse 80% 70% at 50% 48%, #2b2826 0%, #1d1c1b 45%, var(--ink) 100%);
  background-color: var(--ink);
  overflow-x: hidden;
}

/* fine dot grid, like the reference */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(229, 222, 210, .22) 1px, transparent 1.3px);
  background-size: 26px 26px;
  background-position: center;
  opacity: .55;
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 50% 50%, transparent 20%, #000 75%);
          mask-image: radial-gradient(ellipse 75% 70% at 50% 50%, transparent 20%, #000 75%);
}

#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  display: block;
  pointer-events: none;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 40% 22% at 50% 50%, rgba(20, 20, 20, .38) 0%, rgba(20, 20, 20, 0) 100%),
    radial-gradient(ellipse 90% 85% at 50% 50%, transparent 55%, rgba(0, 0, 0, .6) 100%);
}

/* ---------- layout ---------- */
.page {
  position: relative;
  z-index: 3;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto 1fr;
  justify-items: center;
  padding:
    max(var(--pad), env(safe-area-inset-top))
    max(var(--pad), env(safe-area-inset-right))
    max(var(--pad), env(safe-area-inset-bottom))
    max(var(--pad), env(safe-area-inset-left));
  text-align: center;
}

/* logo stays centred, Login sits in the right column */
.top {
  align-self: start;
  justify-self: stretch;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}

.brand {
  grid-column: 2;
  display: block;
  width: clamp(124px, 13vw, 184px);
  height: auto;
}

.login {
  grid-column: 3;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: .55em;
  min-height: 40px;
  padding: 0 1.15em;
  border-radius: 999px;
  border: 1px solid rgba(229, 222, 210, .28);
  background: rgba(35, 35, 35, .35);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  color: var(--oat);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none;
  transition: border-color .25s var(--ease), background-color .25s var(--ease), color .25s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.login span { margin-right: -.2em; }
.login svg { width: 15px; height: 15px; flex: none; }
.login:hover {
  color: var(--milk);
  border-color: rgba(229, 222, 210, .6);
  background: rgba(163, 147, 130, .18);
}
.login:focus-visible { outline: 2px solid var(--oat); outline-offset: 3px; }

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-block: clamp(28px, 6vh, 64px);
}

.lead {
  font-size: clamp(.72rem, 1vw, .86rem);
  font-weight: 500;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--taupe);
  margin-right: -.32em; /* optical centering for tracking */
}

.title {
  margin-top: clamp(14px, 2.2vh, 24px);
  font-size: clamp(2.4rem, 7vw, 6.6rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: .2em;
  margin-right: -.2em;
  text-transform: uppercase;
  color: var(--milk);
  text-shadow: 0 6px 40px rgba(0, 0, 0, .55);
}
.title span { display: inline-block; }

.btn {
  margin-top: clamp(30px, 5.5vh, 56px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .8em;
  min-height: 52px;
  padding: 0 2.2em;
  border-radius: 999px;
  background: var(--taupe);
  color: #1b1917;
  font: inherit;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 14px 40px -14px rgba(163, 147, 130, .7), inset 0 0 0 1px rgba(255, 255, 255, .08);
  transition: background-color .3s var(--ease), transform .3s var(--ease), box-shadow .3s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn span { margin-right: -.2em; }
.btn svg { width: 18px; height: 18px; flex: none; }

.btn:hover {
  background: var(--oat);
  transform: translateY(-2px);
  box-shadow: 0 20px 50px -16px rgba(229, 222, 210, .55);
}
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 2px solid var(--oat); outline-offset: 4px; }

.mail {
  margin-top: 18px;
  padding: 6px 4px;
  font-size: clamp(.9rem, 1.1vw, 1rem);
  letter-spacing: .06em;
  color: var(--oat);
  opacity: .72;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: opacity .25s var(--ease), border-color .25s var(--ease);
}
.mail:hover { opacity: 1; border-color: rgba(229, 222, 210, .5); }
.mail:focus-visible { outline: 2px solid var(--oat); outline-offset: 4px; border-radius: 4px; }

.foot {
  align-self: end;
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--mocha);
}

/* ---------- entrance ---------- */
/* "backwards" fill: hidden during the delay, then released so hover transforms still work */
.top, .lead, .title, .btn, .mail, .foot {
  animation: rise 1.1s var(--ease) backwards;
}
.top   { animation-delay: .2s; }
.lead  { animation-delay: 1.1s; }
.title { animation-delay: 1.3s; }
.btn   { animation-delay: 1.6s; }
.mail  { animation-delay: 1.75s; }
.foot  { animation-delay: 1.9s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- tablet ---------- */
@media (max-width: 1024px) {
  .title { font-size: clamp(2.4rem, 8vw, 5.4rem); }
}

/* ---------- phone ---------- */
@media (max-width: 600px) {
  .title {
    font-size: clamp(2.6rem, 15.5vw, 4.4rem);
    letter-spacing: .14em;
    margin-right: -.14em;
    line-height: 1.04;
  }
  .title span { display: block; }
  .lead { letter-spacing: .26em; margin-right: -.26em; }
  .btn { width: min(100%, 300px); }
}

/* very narrow phones: Login collapses to a round lock icon so it never touches the logo */
@media (max-width: 360px) {
  .login { width: 40px; padding: 0; justify-content: center; }
  .login span { display: none; }
}

/* short landscape phones */
@media (max-height: 520px) and (orientation: landscape) {
  .hero { padding-block: 16px; }
  .title { font-size: clamp(2rem, 7vw, 3.4rem); }
  .title span { display: inline-block; }
  .btn { margin-top: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .top, .lead, .title, .btn, .mail, .foot { animation: none; opacity: 1; }
  .btn, .mail { transition: none; }
}
