/* Human Agent Interface — Coming-Soon Landingpage
   Papierartig / E-Ink: warmes Weiß, schwarze Tinte, sparsames Grün, sehr sparsames Rot. */

:root {
  --paper: #fbf7ef;
  --paper-deep: #f4ede0;
  --ink: #1a1a17;
  --ink-soft: #4a4a42;
  --line: #d9d1c0;
  --accent: #2f6f4f;      /* grün — Tutor-Hinweise */
  --accent-soft: #e3efe6;
  --danger: #a03a2e;      /* rot — sehr sparsam */
  --focus: #2f6f4f;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --hand: "Segoe Print", "Bradley Hand", "Comic Sans MS", "Apple Chancery", "Caveat", cursive;

  --maxw: 46rem;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  line-height: 1.6;
  font-size: 1.05rem;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.brand-mark {
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  background: var(--accent);
  flex: 0 0 auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  font-family: var(--sans);
  font-size: 0.9rem;
}

.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.site-nav a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.lang-switch {
  display: inline-flex;
  gap: 0.35rem;
  font-family: var(--sans);
}

.lang-btn {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.8rem;
  padding: 0.25rem 0.6rem;
  border-radius: 0.4rem;
  cursor: pointer;
}

.lang-btn.is-active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.lang-btn:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* Hero */
.hero {
  padding: 3.5rem 0 3rem;
}

.eyebrow {
  margin: 0 0 0.75rem;
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(2rem, 6vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  font-weight: 600;
}

.lede {
  margin: 0 0 1.25rem;
  font-size: 1.2rem;
  color: var(--ink);
  max-width: 36rem;
}

.trust-line {
  margin: 0 0 2rem;
  font-family: var(--sans);
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--ink-soft);
}

/* Form */
.waitlist-form {
  max-width: 34rem;
  display: grid;
  gap: 1.25rem;
  position: relative;
  padding: 1.5rem;
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  box-shadow: 0 1px 2px rgba(26, 26, 23, 0.05), 0 6px 20px rgba(26, 26, 23, 0.04);
}

.form-body {
  display: grid;
  gap: 1.1rem;
}

.field {
  display: grid;
  gap: 0.45rem;
}

.field legend {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  padding: 0;
}

/* E-Mail-Pill: Eingabe und Submit in einer Zeile */
.field-email .field-label {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-soft);
}

.email-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fffdf8;
}

.email-pill:focus-within {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-color: var(--focus);
}

.email-pill.has-error {
  border-color: var(--danger);
}

.email-pill input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  font-family: var(--sans);
  font-size: 1rem;
  padding: 0.55rem 0.75rem;
  color: var(--ink);
  outline: none;
}

.email-pill input::placeholder {
  color: var(--ink-soft);
  opacity: 0.75;
}

.btn-submit {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.55rem 1.2rem;
  border: none;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s ease;
}

.btn-submit:hover:not(:disabled) {
  opacity: 0.88;
}

.btn-submit:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.btn-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Gestylte Checkboxen (native Inputs bleiben fokussier- und bedienbar) */
.checkbox-label {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--ink-soft);
  cursor: pointer;
}

.checkbox-label input:focus-visible + .checkbox-box {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.checkbox-box {
  flex: 0 0 auto;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.1rem;
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  background: #fffdf8;
  position: relative;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.checkbox-label input:checked + .checkbox-box {
  background: var(--accent);
  border-color: var(--accent);
}

.checkbox-label input:checked + .checkbox-box::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid #fffdf8;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-text {
  display: grid;
  gap: 0.15rem;
}

/* Consent-Text enthält Inline-HTML (Link). Grid würde Link und Punkt
   in eigene Zeilen legen. */
.checkbox-text:not(:has(.checkbox-title)) {
  display: block;
}

.checkbox-title {
  color: var(--ink);
}

.checkbox-hint {
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--ink-soft);
}

.checkbox-label a {
  color: var(--accent);
}

/* Rolle als Chips / Segmented Control */
.field-role {
  border: none;
  padding: 0;
  margin: 0;
}

.role-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-family: var(--sans);
  font-size: 0.9rem;
}

.chip {
  position: relative;
  cursor: pointer;
}

.chip span {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fffdf8;
  color: var(--ink-soft);
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.chip:hover span {
  border-color: var(--accent);
}

.chip input:checked + span {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--ink);
}

.chip input:focus-visible + span {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* Fehler inline */
.field-error {
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--danger);
  margin: 0;
}

.form-status {
  font-family: var(--sans);
  font-size: 0.95rem;
  margin: 0;
}

.form-status.is-error {
  color: var(--danger);
}

/* Erfolgszustand */
.form-success {
  text-align: center;
  padding: 1.25rem 0.5rem;
  animation: form-success-in 0.35s ease;
}

.form-success-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--accent-soft);
  margin-bottom: 0.9rem;
}

.form-success-mark::after {
  content: "";
  display: block;
  width: 0.72rem;
  height: 1.2rem;
  border: solid var(--accent);
  border-width: 0 0.22rem 0.22rem 0;
  transform: rotate(45deg) translate(-0.08rem, -0.08rem);
}

.form-success-text {
  margin: 0;
  font-size: 1.05rem;
  color: var(--ink);
}

.waitlist-form.is-success .form-body {
  display: none;
}

@keyframes form-success-in {
  from {
    opacity: 0;
    transform: scale(0.98) translateY(3px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Honeypot — für Menschen unsichtbar (kein Horizontalskrollen) */
.hp-field {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Visuell versteckte Native-Controls (Checkbox/Radio) — bleiben fokussierbar */
.sr-control {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Video */
.video-section {
  padding: 2.5rem 0;
  border-top: 1px solid var(--line);
}

.product-video {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  overflow: hidden;
}

.product-video video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--paper-deep);
  display: block;
}

.video-note {
  position: absolute;
  left: 50%;
  bottom: 3.6rem;
  transform: translateX(-50%);
  margin: 0;
  max-width: calc(100% - 2rem);
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--ink-soft);
  text-align: center;
  padding: 0.35rem 0.85rem;
  border-radius: 0.35rem;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  pointer-events: none;
}

/* Das Overlay bleibt sichtbar, bis eine echte product.mp4 Metadaten lädt
   (siehe app.js) bzw. ein YouTube-Embed aktiv ist. */
.video-note.is-hidden,
.product-video--embed .video-note {
  display: none;
}

.product-video--embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* Mini-Beispiel */
.example-section {
  padding: 2.5rem 0;
  border-top: 1px solid var(--line);
}

.example-scene {
  margin: 1.25rem 0 0;
}

.example-paper {
  position: relative;
  padding: 1.75rem 1.5rem 1.75rem;
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  background-color: #fffdf8;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 2.4rem,
    var(--line) 2.4rem,
    var(--line) calc(2.4rem + 1px)
  );
}

.example-line {
  position: relative;
  margin: 0;
  font-family: var(--hand);
  font-size: 1.55rem;
  line-height: 1.6;
  color: var(--ink);
}

.example-line--wrong {
  color: var(--ink);
}

.example-mistake {
  position: relative;
  display: inline-block;
}

.example-dot {
  position: absolute;
  left: 50%;
  bottom: -0.12em;
  transform: translateX(-50%);
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--danger);
}

.example-hint {
  position: relative;
  margin: 1.5rem 0 0;
  padding: 0.4rem 0 0.4rem 1rem;
  font-family: var(--hand);
  font-size: 1.15rem;
  line-height: 1.5;
  color: var(--accent);
}

.example-hint-bar {
  position: absolute;
  left: 0;
  top: 0.1rem;
  bottom: 0.1rem;
  width: 3px;
  border-radius: 2px;
  background: var(--accent);
}

.example-caption {
  margin: 0.9rem 0 0;
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--ink-soft);
}

/* Steps */
.steps-section {
  padding: 2.5rem 0;
  border-top: 1px solid var(--line);
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.5rem;
}

.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 1rem;
}

.step-num {
  grid-row: span 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--accent);
}

.step h3 {
  margin: 0;
  font-size: 1.15rem;
}

.step p {
  margin: 0.2rem 0 0;
  color: var(--ink-soft);
}

/* Vergleich: reMarkable vs. iPad-Tutor */
.compare-section {
  padding: 2.5rem 0;
  border-top: 1px solid var(--line);
}

.compare-intro {
  margin: 0 0 1.5rem;
  color: var(--ink-soft);
  max-width: 36rem;
}

.compare-scroll {
  overflow-x: auto;
}

.compare-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 34rem;
  font-family: var(--sans);
  font-size: 0.9rem;
}

.compare-table th,
.compare-table td {
  text-align: left;
  vertical-align: top;
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--line);
}

.compare-table thead th {
  font-weight: 600;
  color: var(--ink);
}

.compare-table thead th:nth-child(3) {
  color: var(--accent);
}

.compare-table tbody th {
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.compare-table td {
  color: var(--ink-soft);
}

.compare-table td:last-child {
  color: var(--ink);
}

.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td {
  border-bottom: none;
}

/* Benefits */
.benefits-section {
  padding: 2.5rem 0;
  border-top: 1px solid var(--line);
}

.benefits {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.7rem;
}

.benefits li {
  position: relative;
  padding-left: 1.6rem;
  color: var(--ink);
}

.benefits li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.85rem;
  height: 2px;
  background: var(--accent);
}

/* FAQ */
.faq-section {
  padding: 2.5rem 0;
  border-top: 1px solid var(--line);
}

.faq-list {
  display: grid;
  gap: 0.75rem;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: #fffdf8;
}

.faq-item summary {
  cursor: pointer;
  padding: 0.9rem 1rem;
  font-weight: 600;
  font-size: 1.05rem;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  float: right;
  color: var(--accent);
  font-family: var(--sans);
}

.faq-item[open] summary::after {
  content: "\2212";
}

.faq-item p {
  margin: 0;
  padding: 0 1rem 1rem;
  color: var(--ink-soft);
}

/* Zweiter CTA */
.cta-section {
  padding: 3rem 0;
  border-top: 1px solid var(--line);
  text-align: center;
}

.cta-section h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 4vw, 2rem);
}

.cta-body {
  margin: 0 auto 1.5rem;
  max-width: 34rem;
  color: var(--ink-soft);
}

.btn-cta {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 600;
  padding: 0.8rem 1.4rem;
  border-radius: 0.4rem;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.btn-cta:hover {
  opacity: 0.88;
}

.btn-cta:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0 2.5rem;
  margin-top: 1rem;
}

.footer-inner {
  display: grid;
  gap: 0.75rem;
}

.footer-brand {
  margin: 0;
  font-weight: 600;
}

.footer-nav {
  display: flex;
  gap: 1.5rem;
  font-family: var(--sans);
  font-size: 0.9rem;
}

.footer-nav a {
  color: var(--accent);
  text-decoration: none;
}

.footer-nav a:hover {
  text-decoration: underline;
}

.footer-domain {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* Legal pages */
.legal {
  padding: 3rem 0 4rem;
}

.legal h1 {
  font-size: clamp(1.8rem, 5vw, 2.4rem);
}

.legal h2 {
  font-size: 1.25rem;
  margin-top: 2rem;
}

.legal .placeholder {
  background: var(--paper-deep);
  border: 1px dashed var(--line);
  padding: 0.1rem 0.4rem;
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.legal p,
.legal li {
  color: var(--ink-soft);
}

.legal a {
  color: var(--accent);
}

.legal .legal-note {
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  margin-top: 2rem;
  padding-top: 1rem;
}

/* Accessibility: skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.5rem 1rem;
  z-index: 10;
}

.skip-link:focus {
  left: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Mobile */
@media (max-width: 560px) {
  .email-pill {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    padding: 0.75rem;
    border-radius: 0.85rem;
  }

  .email-pill input {
    border: 1px solid var(--line);
    border-radius: 0.5rem;
    background: #fffdf8;
    padding: 0.6rem 0.75rem;
  }

  .email-pill input:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 1px;
  }

  .btn-submit {
    width: 100%;
    border-radius: 0.5rem;
    padding: 0.7rem 1rem;
  }
}

@media (max-width: 720px) {
  .header-inner {
    flex-wrap: wrap;
  }
  .site-nav {
    order: 3;
    width: 100%;
    gap: 1rem;
    padding: 0.25rem 0 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 480px) {
  .brand-name {
    font-size: 0.85rem;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
