/* Delphine Management — splash */

/* REM, Octavio Pardo, OFL. Self-hosted rather than pulled from Google so the
   site makes no third-party request and no visitor IP reaches Google. One
   variable file covers every weight from Thin to Black. */
@font-face {
  font-family: 'REM';
  src: url('assets/fonts/rem-latin-var.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #000;
  --paper: #fff;
  --rule: #000;
  --gutter: clamp(1.5rem, 3.5vw, 3.25rem);
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'REM', Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;

  /* full-height column: wordmark takes the space, footer sits at the base */
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: var(--gutter);
}

/* --- centred wordmark ------------------------------------------------ */

.stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wordmark {
  margin: 0;
  text-align: center;
  text-transform: uppercase;
}

.wordmark__name {
  display: block;
  font-size: clamp(2rem, 5.2vw, 3.75rem);
  font-weight: 100;
  letter-spacing: 0.015em;
  line-height: 1;
}

.wordmark__sub {
  display: block;
  margin-top: 0.5em;
  font-size: clamp(0.67rem, 1.73vw, 1.25rem);
  font-weight: 200;
  letter-spacing: 0.12em;
  /* letter-spacing adds a trailing gap after the last letter — pull it back
     so the word stays optically centred under DELPHINE */
  text-indent: 0.12em;
  line-height: 1;
}

/* --- footer ---------------------------------------------------------- */

.footer {
  padding-top: 1.1rem;
  border-top: 1px solid var(--rule);

  font-size: clamp(0.6rem, 0.85vw, 0.75rem);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.footer__contact {
  /* three columns with equal outer tracks, so the field lands on the true centre
     of the page under the wordmark. space-between would push it left, because
     the address is a wider item than the label. */
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.75rem 1.5rem;
  align-items: center;
}

.footer__email {
  justify-self: end;
  text-align: right;
  color: inherit;
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0.02em;
}

.footer__email:hover,
.footer__email:focus-visible {
  text-decoration: underline;
}

/* Below roughly 640px the label, the field and the address stop fitting on one
   line — REM sets wider than Arial, so this happens sooner than it used to. The
   contact details keep the row and the field drops underneath them. */
@media (max-width: 640px) {
  /* the wordmark owns the first screen — the contact row and the field sit below
     the fold, so the splash reads as a splash and the field stays discreet */
  .stage {
    min-height: calc(100svh - (var(--gutter) * 2));
  }

  .footer__contact {
    grid-template-columns: auto auto;
    justify-content: space-between;
    gap: 0.75rem 1rem;
  }

  .gate {
    /* placed last, or its full-width row would land between the label and the
       address and push the address onto a third row */
    order: 1;
    grid-column: 1 / -1;
    justify-self: center;
    margin-top: 3rem;
  }
}

/* --- password field -------------------------------------------------- */

.gate {
  margin: 0;
}

.gate__field {
  width: 9.5rem;
  max-width: 100%;
  padding: 0.35rem 0.95rem;
  border: 1px solid #dcdce1;
  border-radius: 999px;
  background: #f0f0f3;
  color: var(--ink);

  /* iOS restyles inputs unless told not to, and would round this its own way */
  -webkit-appearance: none;
  appearance: none;

  /* the iPhone system face, deliberately not REM — this is a control, not the
     wordmark, and San Francisco is what the field looks native in */
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.25;
  text-align: center;
  letter-spacing: normal;
}

.gate__field::placeholder {
  color: #a2a2a9;
  letter-spacing: normal;
}

.gate__field:focus {
  outline: none;
  border-color: #b2b2ba;
}

.gate__error {
  margin: 0.9rem 0 0;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', system-ui, sans-serif;
  font-size: 0.75rem;
  letter-spacing: normal;
  text-transform: none;
  text-align: center;
  color: #8c8c93;
}
