@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@500;600;700&family=Inter:wght@400;500;600&display=swap');

:root {
  --ink-bg: #14171c;
  --panel: #1b1f26;
  --paper: #f1e9d8;
  --paper-line: rgba(31, 36, 33, 0.18);
  --text-on-dark: #ece6d6;
  --text-muted: #8b93a1;
  --text-on-paper: #1f2421;
  --stamp-amber: #c9a227;
  --stamp-teal: #4c8c82;
}

/* Bez tohoto pravidla by atribut "hidden" na elementech, které mají vlastní
   pravidlo pro "display" (jako form nebo .stamp-result níže), nefungoval -
   autorské CSS by ho přebilo a element by zůstal viditelný i s "hidden". */
[hidden] {
  display: none !important;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  background: var(--ink-bg);
  background-image: radial-gradient(circle at 20% 15%, rgba(76, 140, 130, 0.08), transparent 45%),
    radial-gradient(circle at 85% 85%, rgba(201, 162, 39, 0.07), transparent 40%);
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text-on-dark);
}

.card {
  position: relative;
  width: 100%;
  max-width: 480px;
  background: var(--paper);
  color: var(--text-on-paper);
  border-radius: 4px;
  padding: 40px 36px 32px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 0, 0, 0.05);
  animation: rise 0.5s ease-out;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.postmark {
  position: absolute;
  top: -18px;
  right: 28px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid var(--stamp-teal);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  transform: rotate(8deg);
}

.postmark span {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--stamp-teal);
  text-align: center;
  line-height: 1.3;
}

.eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stamp-teal);
  margin: 0 0 10px;
}

h1 {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
  line-height: 1.25;
}

.subtitle {
  margin: 0 0 22px;
  font-size: 14.5px;
  line-height: 1.55;
  color: rgba(31, 36, 33, 0.7);
}

.divider {
  border: none;
  border-top: 1px dashed var(--paper-line);
  margin: 0 0 24px;
}

form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

label {
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(31, 36, 33, 0.55);
  margin-bottom: 7px;
}

input,
textarea {
  width: 100%;
  border: none;
  border-bottom: 1.5px solid var(--paper-line);
  background: transparent;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px;
  color: var(--text-on-paper);
  padding: 6px 2px 10px;
  resize: vertical;
  transition: border-color 0.2s ease;
}

input::placeholder,
textarea::placeholder {
  color: rgba(31, 36, 33, 0.32);
}

input:focus,
textarea:focus {
  outline: none;
  border-bottom-color: var(--stamp-teal);
}

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

button {
  margin-top: 6px;
  align-self: flex-start;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-on-paper);
  background: transparent;
  border: 1.5px solid var(--text-on-paper);
  border-radius: 3px;
  padding: 12px 22px;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.18s ease, color 0.18s ease;
}

button:hover {
  background: var(--text-on-paper);
  color: var(--paper);
}

button:active {
  transform: scale(0.96);
}

button:disabled {
  opacity: 0.55;
  cursor: default;
  transform: none;
}

.message {
  margin-top: 18px;
  font-size: 13.5px;
}

.message.error {
  color: #a8392b;
}

.stamp-result {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
  padding: 18px 0 6px;
  animation: rise 0.4s ease-out;
}

.stamp {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  border: 3px solid var(--stamp-teal);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(-9deg) scale(1);
  animation: stamp-press 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes stamp-press {
  0% {
    transform: rotate(-9deg) scale(2.1);
    opacity: 0;
  }
  60% {
    opacity: 1;
  }
  100% {
    transform: rotate(-9deg) scale(1);
    opacity: 1;
  }
}

.stamp span {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.06em;
  color: var(--stamp-teal);
}

.stamp-caption {
  font-size: 14px;
  color: rgba(31, 36, 33, 0.65);
  max-width: 320px;
  line-height: 1.5;
}

@media (prefers-reduced-motion: reduce) {
  .card,
  .stamp-result,
  .stamp {
    animation: none !important;
  }
}

@media (max-width: 420px) {
  .card {
    padding: 32px 22px 26px;
  }
  h1 {
    font-size: 22px;
  }
}
