/* Mobile-first presentation for the public banner page. */

:root {
  --color-background: #f5f8f5;
  --color-surface: #ffffff;
  --color-text: #26312a;
  --color-muted: #738078;
  --color-border: #dce5dd;
  --color-accent: #2e7d32;
  --color-accent-hover: #286f2c;
  --color-accent-active: #236127;
  --color-accent-soft: #edf6ed;
  --color-focus: #2e7d32;
  --color-toast: #2f3b33;
  --shadow-surface: 0 16px 44px rgb(48 78 55 / 8%);
  --radius-large: 24px;
  --radius-control: 14px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--color-background);
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  display: flex;
  flex-direction: column;
  color: var(--color-text);
  background: var(--color-background);
  font-family:
    Inter, Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

.banner {
  width: 100%;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px 20px;
}

.banner__content {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  padding: 38px 22px 26px;
  border: 1px solid rgb(220 229 221 / 80%);
  border-radius: var(--radius-large);
  background: var(--color-surface);
  box-shadow: var(--shadow-surface);
}

.banner__header {
  margin-bottom: 36px;
  text-align: center;
}

.banner__welcome {
  margin: 0 0 12px;
  color: var(--color-muted);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.brand {
  margin: 0;
  display: inline-flex;
  align-items: baseline;
  max-width: 100%;
  justify-content: center;
  gap: clamp(5px, 2vw, 10px);
  color: #455a64;
  font-size: clamp(2rem, 11vw, 3.75rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.045em;
  white-space: nowrap;
}

.brand > span {
  color: #2e7d32;
  font-weight: 800;
}

.brand__tagline {
  margin: 10px 0 0;
  color: var(--color-text);
  font-size: 0.8125rem;
  font-weight: 650;
  line-height: 1.5;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.banner__description {
  margin: 24px 0 0;
  color: var(--color-muted);
  font-size: 1rem;
  line-height: 1.6;
}

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

.button {
  width: 100%;
  min-height: 52px;
  padding: 14px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  cursor: pointer;
  font-weight: 650;
  line-height: 1.35;
  transition:
    background-color 150ms ease,
    border-color 150ms ease,
    color 150ms ease,
    transform 100ms ease;
}

.button--scan {
  min-height: 60px;
  border-color: #c5ddc7;
  color: var(--color-accent);
  background: var(--color-accent-soft);
  font-size: 0.9375rem;
}

.button--scan:hover {
  color: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  background: #e4f1e5;
}

.button--scan:active {
  color: var(--color-accent-active);
  border-color: var(--color-accent-active);
  background: #dcebdc;
  transform: translateY(1px);
}

.button--submit {
  color: #ffffff;
  background: var(--color-accent);
  box-shadow: 0 8px 18px rgb(46 125 50 / 18%);
}

.button--submit:hover {
  background: var(--color-accent-hover);
}

.button--submit:active {
  background: var(--color-accent-active);
  transform: translateY(1px);
}

.button:focus-visible,
.form-field__input:focus-visible,
.admin-link:focus-visible {
  outline: 3px solid rgb(46 125 50 / 30%);
  outline-offset: 3px;
}

.form-field {
  display: flex;
  flex-direction: column;
}

.form-field__label {
  margin-bottom: 8px;
  font-size: 0.875rem;
  font-weight: 650;
}

.form-field__input {
  width: 100%;
  min-height: 52px;
  padding: 13px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-control);
  color: var(--color-text);
  background: var(--color-surface);
  font-size: 1rem;
  line-height: 1.5;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease;
}

.form-field__input:hover {
  border-color: #aebfb0;
}

.form-field__input:focus {
  border-color: var(--color-focus);
}

.form-field__input::placeholder {
  color: #97a199;
}

.form-field__hint {
  margin: 8px 2px 0;
  color: var(--color-muted);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.form-field__error {
  min-height: 1.25rem;
  margin: 6px 2px 0;
  color: #b42318;
  font-size: 0.8125rem;
  line-height: 1.5;
}

.admin-link {
  align-self: center;
  margin-top: 26px;
  padding: 6px;
  color: #8b958e;
  font-size: 0.8125rem;
  line-height: 1.4;
  text-underline-offset: 3px;
}

.admin-link:hover {
  color: var(--color-text);
}

.admin-link:active {
  color: var(--color-accent-active);
}

.page-footer {
  width: 100%;
  padding: 8px 16px 20px;
  color: #a0aaa3;
  text-align: center;
}

.page-footer small {
  font-size: 0.75rem;
}

.toast {
  position: fixed;
  z-index: 10;
  right: 16px;
  bottom: 16px;
  left: 16px;
  max-width: 440px;
  margin: 0 auto;
  padding: 14px 16px;
  border-radius: 10px;
  color: #ffffff;
  background: var(--color-toast);
  box-shadow: 0 10px 30px rgb(41 39 37 / 22%);
  font-size: 0.875rem;
  line-height: 1.5;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 600px) {
  .banner {
    padding: 56px 24px 28px;
  }

  .banner__content {
    padding: 52px 44px 36px;
  }

  .page-footer {
    padding-bottom: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .button,
  .form-field__input,
  .toast {
    transition: none;
  }
}
