:root {
  --cream: #faf7f2;
  --ink: #2a2520;
  --ink-soft: #5a524c;
  --muted: #8a8178;
  --line: #ddd4c9;
  --white: #ffffff;
  --on-accent: #fffaf7;
  --terracotta: #be6a48;
  --terracotta-deep: #a85a3c;
  --terracotta-hover: #b06240;
  --hover-fill: rgba(190, 106, 72, 0.05);
  --hover-fill-strong: rgba(190, 106, 72, 0.08);
  --hover-line: rgba(190, 106, 72, 0.28);
  --font-display: "Newsreader", "Times New Roman", serif;
  --font-body: "Hanken Grotesk", "Segoe UI", sans-serif;
  --radius: 10px;
}

/* Dark mode: basis #2A2520 uit het logo */
html[data-theme="dark"] {
  --cream: #2a2520;
  --ink: #faf7f2;
  --ink-soft: #d8d0c6;
  --muted: #9a9188;
  --line: #433c36;
  --white: #352f2a;
  --terracotta: #be6a48;
  --terracotta-deep: #a66348;
  --terracotta-hover: #c97858;
  --hover-fill: rgba(190, 106, 72, 0.12);
  --hover-fill-strong: rgba(190, 106, 72, 0.2);
  --hover-line: rgba(190, 106, 72, 0.42);
}

html[data-theme="dark"] body {
  color-scheme: dark;
}

html[data-theme="dark"] input:-webkit-autofill,
html[data-theme="dark"] textarea:-webkit-autofill,
html[data-theme="dark"] select:-webkit-autofill {
  -webkit-text-fill-color: var(--ink);
  caret-color: var(--ink);
  box-shadow: 0 0 0 1000px var(--white) inset;
  transition: background-color 99999s ease-out;
}

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

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

body {
  min-height: 100dvh;
  color: var(--ink);
  font-family: var(--font-body);
  background: var(--cream);
  overflow: hidden;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(22rem, 1fr);
  min-height: 100dvh;
  height: 100dvh;
}

.visual {
  position: relative;
  overflow: hidden;
  min-width: 0;
  background: color-mix(in srgb, var(--ink) 10%, var(--cream));
}

.visual-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.visual-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 72%, color-mix(in srgb, var(--cream) 20%, transparent));
}

.side {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--cream);
  border-left: 1px solid color-mix(in srgb, var(--ink) 22%, transparent);
  padding: clamp(1.75rem, 3vw, 2.5rem);
}

.legal {
  margin: 0;
  padding-top: 1rem;
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--muted);
}

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

.legal a:hover {
  color: var(--ink-soft);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.legal span {
  margin: 0 0.35rem;
}

.side-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-shrink: 0;
  width: 100%;
  min-width: 0;
}

.logo {
  display: inline-flex;
  min-width: 0;
  max-width: calc(100% - 3.25rem);
  flex: 1 1 auto;
  text-decoration: none;
  line-height: 0;
}

.logo img {
  display: block;
  width: 10.75rem;
  max-width: 100%;
  height: auto;
}

.login-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  flex: 0 0 2.15rem;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease;
}

.login-link:hover {
  color: var(--ink-soft);
  background: color-mix(in srgb, var(--ink) 5%, transparent);
}

.login-link:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 3px;
}

.side-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2.5rem;
  padding: 3rem 0 2.5rem;
}

.side-body:has(.login-form) {
  gap: 1.65rem;
}

.copy {
  display: grid;
  gap: 0.85rem;
}

.eyebrow {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--terracotta);
}

.headline {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.05rem, 2.7vw, 2.65rem);
  line-height: 1.22;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.lede {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.7;
}

.waitlist {
  display: grid;
  gap: 0.75rem;
  width: 100%;
}

.field-stage {
  position: relative;
  min-height: 3.1rem;
}

.field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.45rem;
  align-items: stretch;
}

.field-stage.is-success .field {
  display: none;
}

.success {
  display: none;
  align-items: center;
  gap: 0.75rem;
  min-height: 3.1rem;
  padding: 0.7rem 0.9rem;
  background: rgba(190, 106, 72, 0.08);
  border: 1px solid rgba(190, 106, 72, 0.22);
  border-radius: var(--radius);
  color: var(--terracotta-deep);
}

.field-stage.is-success .success {
  display: flex;
}

.success-mark {
  display: inline-flex;
  flex-shrink: 0;
  color: var(--terracotta);
}

.success-text {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink);
}

.input-shell {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.2rem;
  min-width: 0;
  padding: 0.2rem 0.55rem 0.2rem 0.45rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-shell:focus-within {
  border-color: rgba(190, 106, 72, 0.55);
  box-shadow: 0 0 0 3px rgba(190, 106, 72, 0.12);
}

.mail-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  color: var(--muted);
  cursor: text;
  flex-shrink: 0;
}

.input-shell:focus-within .mail-label {
  color: var(--terracotta);
}

.mail-icon {
  display: block;
  width: 1.25rem;
  height: 1.25rem;
}

input[type="email"] {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: 500 0.95rem/1.2 var(--font-body);
  padding: 0.7rem 0.35rem 0.7rem 0;
}

input[type="email"]::placeholder {
  color: var(--muted);
}

button {
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
  padding: 0.85rem 1rem;
  background: var(--terracotta);
  color: #fffaf7;
  font: 600 0.92rem/1.2 var(--font-body);
  transition: background 0.2s ease, transform 0.2s ease;
}

button:hover:not(:disabled) {
  background: var(--terracotta-hover);
}

button:active:not(:disabled) {
  transform: translateY(1px);
}

button:disabled {
  opacity: 0.7;
  cursor: wait;
}

button:focus-visible,
.mail-label:focus-visible,
.logo:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.status {
  min-height: 1.35rem;
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--ink-soft);
}

.status.is-success {
  color: var(--terracotta-deep);
}

.status.is-error {
  color: #a14a3c;
}

.impersonation-banner {
  display: grid;
  gap: 0.75rem;
  margin: 0 0 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(190, 106, 72, 0.35);
  border-radius: var(--radius);
  background: rgba(190, 106, 72, 0.08);
}

.impersonation-banner[hidden] {
  display: none;
}

.impersonation-banner p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--ink-soft);
}

.impersonation-banner button {
  width: 100%;
}

.hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (max-width: 960px) {
  body {
    overflow: auto;
  }

  .layout {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(40vh, 46vh) auto;
    height: auto;
    min-height: 100dvh;
  }

  .visual {
    min-height: 40vh;
  }

  .visual-shade {
    background: linear-gradient(180deg, transparent 55%, color-mix(in srgb, var(--cream) 55%, transparent));
  }

  .side {
    border-left: 0;
    border-top: 1px solid color-mix(in srgb, var(--ink) 22%, transparent);
    min-height: auto;
    padding: 1.75rem 1.5rem 2.25rem;
  }

  .side-body {
    padding: 2rem 0 0.5rem;
    gap: 2rem;
  }

  .copy {
    gap: 1rem;
  }

  .headline {
    font-size: clamp(2.2rem, 8vw, 2.8rem);
  }

  .field {
    grid-template-columns: 1fr;
  }

  button {
    width: 100%;
  }
}

.doc-page {
  overflow: auto;
  background: var(--cream);
}

.doc {
  width: min(40rem, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 2.5rem 0 4rem;
}

.doc .logo {
  display: inline-flex;
  flex: none;
  max-width: 100%;
  margin-bottom: 2.5rem;
}

.doc h1 {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 4vw, 2.6rem);
  line-height: 1.15;
}

.doc p {
  margin: 0 0 1rem;
  color: var(--ink-soft);
  font-size: 1.02rem;
  line-height: 1.7;
}

.doc a {
  color: var(--terracotta);
}

.login-form {
  display: grid;
  gap: 0.45rem;
  width: 100%;
}

.login-form .field-label {
  margin-top: 0.55rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.login-form .field-label:first-of-type,
.login-form .password-row:first-of-type {
  margin-top: 0;
}

.password-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.55rem;
}

.password-row .field-label {
  margin-top: 0;
}

.forgot-link {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}

.forgot-link:hover {
  color: var(--terracotta);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.input-shell.has-toggle {
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding-right: 0.25rem;
}

button.toggle-password {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  font: inherit;
  cursor: pointer;
}

button.toggle-password:hover:not(:disabled),
button.toggle-password:active:not(:disabled) {
  color: var(--ink-soft);
  background: transparent;
  transform: none;
}

button.toggle-password:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 2px;
}

button.toggle-password .eye-icon[hidden] {
  display: none;
}

.login-form .input-shell input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: 500 0.95rem/1.2 var(--font-body);
  padding: 0.7rem 0.35rem 0.7rem 0;
}

.login-form > button[type="submit"] {
  margin-top: 0.65rem;
  width: 100%;
}

.signup-hint {
  margin: 1rem 0 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.signup-hint a {
  color: var(--terracotta);
  font-weight: 600;
  text-decoration: none;
}

.signup-hint a:hover {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.login-link.is-active {
  color: var(--ink-soft);
  background: color-mix(in srgb, var(--ink) 5%, transparent);
}

