/*
 * The gate page, on its own. Nothing here may come from the site's build output, which stays
 * locked, so the site's colours are restated from tailwind.config.mjs and its two faces are copied
 * in beside this file (latin subset, which covers å, ä and ö).
 */
@font-face {
  font-family: 'Inter';
  font-weight: 400;
  font-display: swap;
  src: url('/las-upp/inter-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-weight: 600;
  font-display: swap;
  src: url('/las-upp/inter-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'DM Serif Display';
  font-weight: 400;
  font-display: swap;
  src: url('/las-upp/dm-serif-display-latin-400-normal.woff2') format('woff2');
}

:root {
  --ground: #f7f6f4;
  --raised: #fafaf8;
  --border: #d9d6d0;
  --text: #2c2c2a;
  --muted: #5f5d59;
  --brand: #204234;
  --brand-hover: #162d23;
  --brand-ink: #ffffff;
  --brand-soft: #c4ded3;
  --focus: #2e6b52;
  --error: #a3281c;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --ground: #0f1f18;
    --raised: #162d23;
    --border: #2e6b52;
    --text: #f2f8f5;
    --muted: #c4ded3;
    --brand: #08120e;
    --brand-hover: #43a37b;
    --brand-ink: #f2f8f5;
    --brand-soft: #9cc9b6;
    --focus: #6bbd9b;
    --error: #ff9b8f;
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --ground: #0f1f18;
  --raised: #162d23;
  --border: #2e6b52;
  --text: #f2f8f5;
  --muted: #c4ded3;
  --brand: #08120e;
  --brand-hover: #43a37b;
  --brand-ink: #f2f8f5;
  --brand-soft: #9cc9b6;
  --focus: #6bbd9b;
  --error: #ff9b8f;
  color-scheme: dark;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: var(--ground);
  color: var(--text);
  font-family:
    'Inter',
    system-ui,
    -apple-system,
    sans-serif;
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.gate {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  min-height: 100vh;
  min-height: 100dvh;
}

.brand {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 3rem clamp(1.5rem, 5vw, 4rem);
  background: var(--brand);
  color: var(--brand-ink);
}

.brand img {
  border-radius: 14px;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.18);
}

.wordmark {
  margin: 0.5rem 0 0;
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(2.25rem, 4vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.tagline {
  margin: 0;
  max-width: 28ch;
  color: var(--brand-soft);
}

.entry {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem clamp(1.5rem, 6vw, 5rem);
  max-width: 34rem;
}

h1 {
  margin: 0 0 0.75rem;
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 400;
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.lede {
  margin: 0 0 2rem;
  color: var(--muted);
  max-width: 40ch;
}

form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

label {
  font-weight: 600;
  font-size: 0.875rem;
}

input {
  font: inherit;
  color: var(--text);
  background: var(--raised);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 0.875rem;
  width: 100%;
}

input[aria-invalid='true'] {
  border-color: var(--error);
}

input:focus-visible,
button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

button {
  margin-top: 0.75rem;
  align-self: flex-start;
  font: inherit;
  font-weight: 600;
  color: #ffffff;
  background: #204234;
  border: 0;
  border-radius: 8px;
  padding: 0.75rem 1.75rem;
  cursor: pointer;
}

button:hover {
  background: #162d23;
}

.error {
  margin: 0.25rem 0 0;
  color: var(--error);
  font-size: 0.875rem;
}

@media (max-width: 720px) {
  .gate {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  .brand {
    padding: 2rem 1.25rem 1.75rem;
  }

  .entry {
    justify-content: flex-start;
    padding: 2rem 1.25rem 3rem;
  }

  button {
    align-self: stretch;
  }
}
