/* ── Fonts ──────────────────────────────────────────────────────────────── */

@font-face {
  font-family: 'Inter Tight';
  src: url('/assets/fonts/InterTight-VariableFont_wght.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter Tight';
  src: url('/assets/fonts/InterTight-Italic-VariableFont_wght.woff2') format('woff2');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('/assets/fonts/JetBrainsMono-VariableFont_wght.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('/assets/fonts/JetBrainsMono-Italic-VariableFont_wght.woff2') format('woff2');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg:           #0a0a0b;
  --ink:          #f2f1ee;
  --ink-dim:      #a7a6a1;
  --ink-dimmer:   #6a6966;
  --line:         rgba(242,241,238,0.08);
  --line-strong:  rgba(242,241,238,0.16);
  --accent:       #d67200;
  --accent-soft:  rgba(214,114,0,0.15);
  --danger:       oklch(0.72 0.16 25);
  --success:      oklch(0.78 0.14 155);

  /* Spacing: slope = Δrem / 1120 (viewport 320 → 1440) */
  --pad-x:     clamp(1.6rem, 2.14vw + 0.9rem, 4rem);    /* 16px → 40px */
  --pad-y:     clamp(1.6rem, 1.07vw + 1.3rem, 2.8rem);  /* 16px → 28px */
  --gap-form:  clamp(3.2rem, 2.14vw + 2.5rem, 5.6rem);  /* 32px → 56px */
}

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

html {
  font-size: 62.5%; /* 1rem = 10px */
}

html, body { margin: 0; padding: 0; }

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter Tight', -apple-system, sans-serif;
  font-feature-settings: "ss01","cv11";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

/* ── Hintergrund: Glow + Vignette + Grain ── */

.bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
}
.bg::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(242,106,26,0.10), transparent 60%),
    radial-gradient(ellipse 120% 80% at 50% 120%, oklch(0.4 0.05 260 / 0.08), transparent 60%);
}
.bg::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 140% 100% at 50% 50%, transparent 40%, rgba(0,0,0,0.6) 100%);
  mix-blend-mode: multiply;
}
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  opacity: 0.5; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0.08 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ── Shell ── */

.shell {
  position: relative; z-index: 2;
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

/* ── Header ── */

header {
  padding: var(--pad-y) var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex; align-items: flex-end;
  gap: clamp(0.8rem, 0.54vw + 0.6rem, 1.4rem);               /* 8px → 14px */
}
.brand-logo {
  height: clamp(4rem, 2.14vw + 3.3rem, 6.4rem);               /* 40px → 64px */
  width: auto; display: block;
}
.brand-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(1.4rem, 0.36vw + 1.3rem, 1.8rem);          /* 14px → 18px */
  font-weight: 300;
  color: var(--ink-dim);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding-left: clamp(0.8rem, 0.54vw + 0.6rem, 1.4rem);       /* 8px → 14px */
  border-left: 1px solid var(--line);
}
.live-indicator {
  display: inline-flex; align-items: center;
  gap: clamp(0.6rem, 0.36vw + 0.5rem, 1rem);                  /* 6px → 10px */
  padding: clamp(0.5rem, 0.27vw + 0.4rem, 0.8rem) clamp(0.8rem, 0.54vw + 0.6rem, 1.4rem);
  background: rgba(255,59,48,0.12);
  border: 1px solid rgba(255,59,48,0.35);
  border-radius: 10rem;
  font-family: 'Inter Tight', sans-serif;
  font-weight: 700;
  font-size: clamp(0.9rem, 0.18vw + 0.8rem, 1.1rem);          /* 9px → 11px */
  letter-spacing: 0.18em; text-transform: uppercase;
  color: #ff5a4d;
  white-space: nowrap;
}
.live-dot {
  width: clamp(0.6rem, 0.27vw + 0.5rem, 0.9rem);              /* 6px → 9px */
  height: clamp(0.6rem, 0.27vw + 0.5rem, 0.9rem);
  border-radius: 50%;
  background: #ff3b30;
  flex-shrink: 0;
  animation: pulse 1.4s cubic-bezier(0.4,0,0.6,1) infinite;
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 1rem rgba(255,59,48,0.8), 0 0 0 0 rgba(255,59,48,0.7); }
  50%      { box-shadow: 0 0 1.4rem rgba(255,59,48,1), 0 0 0 1.2rem rgba(255,59,48,0); }
}

/* ── Main ── */

main {
  display: grid;
  place-items: center;
  padding: var(--pad-x);
}
.hero {
  width: 100%; max-width: 64rem; text-align: center;
}
h1 {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 500;
  font-size: clamp(2.8rem, 3.93vw + 1.5rem, 7.2rem);          /* 28px → 72px */
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin: 0 0 clamp(1.4rem, 0.54vw + 1.2rem, 2rem);           /* 14px → 20px */
  text-wrap: balance;
}
h1 em {
  font-style: italic; font-weight: 400;
  color: var(--accent);
}
.lede {
  font-size: clamp(1.4rem, 0.27vw + 1.3rem, 1.7rem);          /* 14px → 17px */
  line-height: 1.55;
  color: var(--ink-dim);
  max-width: 44rem;
  margin: 0 auto var(--gap-form);
  text-wrap: pretty;
}

/* ── Form ── */

form {
  max-width: 44rem; margin: 0 auto; text-align: left;
}
.field-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(1rem, 0.09vw + 1rem, 1.1rem);              /* 10px → 11px */
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-dim);
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: clamp(0.8rem, 0.36vw + 0.7rem, 1.2rem);      /* 8px → 12px */
}
.field-label .hint {
  color: var(--ink-dimmer); text-transform: none;
  letter-spacing: 0.08em; font-size: 1.05rem;
}
.input-wrap {
  position: relative; display: flex; align-items: center;
  border: 1px solid var(--line-strong);
  background: rgba(242,241,238,0.02);
  border-radius: 0.2rem;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.input-wrap:hover        { border-color: rgba(242,241,238,0.24); }
.input-wrap:focus-within { border-color: var(--accent); background: rgba(242,241,238,0.04); box-shadow: 0 0 0 0.4rem var(--accent-soft); }
.input-wrap.error        { border-color: var(--danger); box-shadow: 0 0 0 0.4rem oklch(0.72 0.16 25 / 0.15); animation: shake 0.4s cubic-bezier(.36,.07,.19,.97); }

@keyframes shake {
  10%,90%     { transform: translateX(-0.1rem); }
  20%,80%     { transform: translateX(0.2rem); }
  30%,50%,70% { transform: translateX(-0.4rem); }
  40%,60%     { transform: translateX(0.4rem); }
}

.lock-icon {
  width: 1.8rem; height: 1.8rem;
  margin-left: clamp(1.2rem, 0.54vw + 1rem, 1.8rem);          /* 12px → 18px */
  flex-shrink: 0;
  color: var(--ink-dimmer);
  transition: color 0.2s;
}
.input-wrap:focus-within .lock-icon { color: var(--accent); }
.input-wrap.error .lock-icon        { color: var(--danger); }

input[type="password"],
input[type="text"] {
  flex: 1; background: transparent; border: 0; outline: 0;
  padding: clamp(1.2rem, 0.71vw + 1rem, 2rem) clamp(1rem, 0.54vw + 0.8rem, 1.6rem);
  color: var(--ink);
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(1.3rem, 0.27vw + 1.2rem, 1.6rem);          /* 13px → 16px */
  letter-spacing: 0.08em;
}
input::placeholder { color: var(--ink-dimmer); letter-spacing: 0.08em; }

input:-webkit-autofill,
input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 100px #1a1a1c inset;
  -webkit-text-fill-color: var(--ink);
  caret-color: var(--ink);
}

.reveal {
  background: transparent; border: 0;
  color: var(--ink-dimmer); cursor: pointer;
  padding: 0 clamp(1.2rem, 0.54vw + 1rem, 1.8rem);            /* 12px → 18px */
  display: flex; align-items: center;
  transition: color 0.15s;
}
.reveal svg   { width: 1.8rem; height: 1.8rem; display: block; }
.reveal:hover { color: var(--ink); }

button[type="submit"] {
  width: 100%;
  margin-top: clamp(0.8rem, 0.54vw + 0.6rem, 1.4rem);         /* 8px → 14px */
  padding: clamp(1.4rem, 0.54vw + 1.2rem, 2rem);              /* 14px → 20px */
  background: var(--ink); color: var(--bg);
  border: 0; border-radius: 0.2rem;
  font-family: 'Inter Tight', sans-serif;
  font-weight: 600; font-size: 1.4rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, transform 0.08s;
  display: flex; align-items: center; justify-content: center; gap: 1.2rem;
}
button[type="submit"]:hover  { background: var(--accent); }
button[type="submit"]:active { transform: translateY(1px); }
.arrow { transition: transform 0.2s; }
button[type="submit"]:hover .arrow { transform: translateX(0.4rem); }

.message {
  min-height: 2rem; margin-top: 1.4rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.2rem; letter-spacing: 0.04em;
  color: var(--ink-dimmer);
  display: flex; align-items: center; gap: 0.8rem;
}
.message.error { color: var(--danger); }
.message .dot  { width: 0.4rem; height: 0.4rem; border-radius: 50%; background: currentColor; }

/* ── Footer ── */

footer {
  padding: var(--pad-y) var(--pad-x);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1.2rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(0.9rem, 0.18vw + 0.8rem, 1.1rem);          /* 9px → 11px */
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-dimmer);
  border-top: 1px solid var(--line);
}
footer a       { color: var(--ink-dim); text-decoration: none; transition: color 0.15s; }
footer a:hover { color: var(--ink); }
.foot-group    { display: flex; gap: clamp(1.2rem, 1.43vw + 0.7rem, 2.8rem); align-items: center; flex-wrap: wrap; } /* 12px → 28px */
.foot-sep      { opacity: 0.5; }

/* ── Entry Animationen ── */

.hero > * {
  opacity: 0; transform: translateY(1.2rem);
  animation: rise 0.7s cubic-bezier(.2,.7,.2,1) forwards;
}
.hero > *:nth-child(1) { animation-delay: 0.05s; }
.hero > *:nth-child(2) { animation-delay: 0.15s; }
.hero > *:nth-child(3) { animation-delay: 0.25s; }
@keyframes rise { to { opacity: 1; transform: none; } }

header, footer { opacity: 0; animation: fade 0.8s 0.1s forwards; }
@keyframes fade { to { opacity: 1; } }

/* ── Responsive (Layout-Änderungen) ── */

@media (max-width: 480px) {
  .brand-sub  { display: none; }
  footer      { justify-content: center; text-align: center; }
  .foot-group { justify-content: center; }
}
