/* Haags Vertaler — green & yellow (Den Haag city colors), responsive */

:root {
  /* Green — primary */
  --green-50:  #f0fdf4;
  --green-100: #dcfce7;
  --green-200: #bbf7d0;
  --green-300: #86efac;
  --green-400: #4ade80;
  --green-500: #22c55e;
  --green-600: #16a34a;
  --green-700: #15803d;
  --green-800: #166534;
  --green-900: #14532d;

  /* Yellow — accent */
  --yellow-50:  #fefce8;
  --yellow-100: #fef9c3;
  --yellow-200: #fef08a;
  --yellow-300: #fde047;
  --yellow-400: #facc15;
  --yellow-500: #eab308;
  --yellow-600: #ca8a04;
  --yellow-700: #a16207;

  /* Neutral ink */
  --ink-50:  #fafaf9;
  --ink-100: #f4f4f2;
  --ink-200: #e7e5e0;
  --ink-300: #d4d2cc;
  --ink-500: #78756f;
  --ink-700: #3f3d3a;
  --ink-900: #1c1b18;

  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(20, 83, 45, 0.06), 0 1px 1px rgba(20, 83, 45, 0.04);
  --shadow-md: 0 4px 12px rgba(20, 83, 45, 0.10), 0 2px 4px rgba(20, 83, 45, 0.06);
  --shadow-lg: 0 18px 48px rgba(20, 83, 45, 0.14);
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--ink-50);
  color: var(--ink-900);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 8px;
  background: var(--green-600);
  color: white;
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 100;
  transition: top 0.15s ease;
}
.skip-link:focus {
  top: 8px;
}

/* Hero */
.hero {
  background:
    radial-gradient(1200px 400px at 80% -50%, var(--yellow-100), transparent 60%),
    radial-gradient(900px 300px at 10% 10%, var(--green-100), transparent 65%),
    linear-gradient(180deg, var(--yellow-50), var(--green-50));
  padding: 48px 24px 36px;
  text-align: center;
  border-bottom: 1px solid var(--ink-200);
}
.hero-inner { max-width: 880px; margin: 0 auto; }

h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3rem);
  margin: 0 0 8px;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.logo {
  font-size: 1em;
  filter: saturate(1.1);
}
.title { color: var(--ink-900); }
.hero h1 .logo + .title::before {
  content: "";
}

.tagline {
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  color: var(--green-700);
  font-weight: 600;
  margin: 0 0 6px;
}
.subtitle {
  color: var(--ink-500);
  margin: 0 auto;
  max-width: 60ch;
  font-size: 0.95rem;
}
.subtitle a {
  color: var(--green-700);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.subtitle a:hover { color: var(--green-600); }

/* Layout */
.layout {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  max-width: 1100px;
  margin: 32px auto 0;
  padding: 0 24px;
  align-items: stretch;
}
.arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--green-500);
  font-weight: 300;
  user-select: none;
}
@media (max-width: 800px) {
  .layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .arrow {
    transform: rotate(90deg);
    height: 32px;
    font-size: 1.5rem;
  }
}

/* Card */
.card {
  background: white;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  min-height: 360px;
}
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
}
.card-head h2 {
  font-family: var(--font-display);
  margin: 0;
  font-size: 1.25rem;
  color: var(--ink-900);
  letter-spacing: -0.01em;
}
.counter {
  font-size: 0.8rem;
  color: var(--ink-500);
  font-variant-numeric: tabular-nums;
}

/* Textareas */
textarea {
  flex: 1;
  width: 100%;
  border: 1px solid var(--ink-200);
  border-radius: 10px;
  padding: 14px 16px;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.55;
  resize: vertical;
  min-height: 240px;
  background: var(--ink-50);
  color: var(--ink-900);
  transition: border-color 0.15s ease, background 0.15s ease;
}
textarea:focus {
  outline: none;
  border-color: var(--green-500);
  background: white;
  box-shadow: 0 0 0 3px var(--yellow-100);
}
textarea[readonly] {
  background: linear-gradient(180deg, var(--yellow-50), white 40%);
  cursor: default;
}

/* Actions */
.actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.btn {
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.12s ease, transform 0.05s ease, box-shadow 0.12s ease;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible {
  outline: 2px solid var(--green-600);
  outline-offset: 2px;
}
.btn.primary {
  background: var(--green-600);
  color: white;
  border-color: var(--green-600);
  box-shadow: var(--shadow-sm);
}
.btn.primary:hover {
  background: var(--green-600);
  border-color: var(--green-600);
}
.btn.ghost {
  background: white;
  color: var(--ink-700);
  border-color: var(--ink-200);
}
.btn.ghost:hover {
  background: var(--ink-100);
  border-color: var(--ink-300);
}

/* Examples */
.examples {
  max-width: 1100px;
  margin: 24px auto;
  padding: 20px;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  font: inherit;
  font-size: 0.85rem;
  background: var(--yellow-50);
  border: 1px solid var(--green-300);
  color: var(--green-700);
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.chip:hover {
  background: var(--yellow-100);
  border-color: var(--green-500);
}
.chip:focus-visible {
  outline: 2px solid var(--green-600);
  outline-offset: 2px;
}

/* Footer */
.footer {
  text-align: center;
  padding: 32px 24px 48px;
  color: var(--ink-500);
  font-size: 0.85rem;
  max-width: 880px;
  margin: 0 auto;
}
.footer a {
  color: var(--green-700);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer p { margin: 0; }

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink-900);
  color: white;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 0.9rem;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 1000;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Selection */
::selection {
  background: var(--green-300);
  color: var(--ink-900);
}

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