:root {
  --navy: #07261a;
  --navy-soft: #0b3a26;
  --blue: #0b7a3a;
  --blue-dark: #08502a;
  --cyan: #34d399;
  --ink: #0f172a;
  --muted: #5f6b7a;
  --surface: #eef8f1;
  --white: #ffffff;
  --line: #cfe9d6;
  --success: #0e7a4a;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
  --shadow: 0 12px 30px rgba(7, 38, 26, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--surface);
  color: var(--ink);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 56px 20px 64px;
  text-align: center;
  color: var(--white);
  background:
    radial-gradient(circle at 18% 15%, rgba(52, 211, 153, 0.2), transparent 38%),
    radial-gradient(circle at 85% 85%, rgba(11, 122, 58, 0.35), transparent 42%),
    linear-gradient(135deg, var(--navy) 0%, var(--blue-dark) 100%);
  border-bottom: 6px solid var(--cyan);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(52, 211, 153, 0.25);
}

.hero::before {
  width: 320px;
  height: 320px;
  top: -160px;
  left: -80px;
}

.hero::after {
  width: 240px;
  height: 240px;
  bottom: -140px;
  right: -60px;
}

.hero__eyebrow {
  position: relative;
  margin: 0 0 14px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--cyan);
}

.hero__title {
  position: relative;
  margin: 0;
  font-size: clamp(3rem, 10vw, 6rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.03em;
  text-shadow: 0 8px 30px rgba(0, 0, 0, 0.28);
}

.hero__title span {
  color: var(--cyan);
}

.hero__subtitle {
  position: relative;
  margin: 20px auto 0;
  max-width: 560px;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--white);
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 48px 20px 64px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.toolbar__title {
  margin: 0;
  font-size: 1.7rem;
  letter-spacing: -0.02em;
}

.toolbar__hint {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.counter {
  margin: 0;
  padding: 9px 18px;
  border: 1px solid rgba(52, 211, 153, 0.55);
  border-radius: 999px;
  background: var(--navy);
  color: var(--white);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 24px;
}

.card {
  position: relative;
  padding: 14px;
  border: 2px solid var(--line);
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow);
  cursor: pointer;
  text-align: left;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: #a7d8b6;
  box-shadow: 0 18px 36px rgba(7, 38, 26, 0.16);
}

.card:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

.card--selected {
  border-color: var(--blue);
  background: #e4f6ea;
  box-shadow: 0 16px 34px rgba(11, 122, 58, 0.24);
}

.card--selected:hover {
  box-shadow: 0 20px 40px rgba(11, 122, 58, 0.28);
}

.card__media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  margin-bottom: 16px;
  border-radius: 12px;
  background: #e6f5ec;
}

.card__photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.card:hover .card__photo {
  transform: scale(1.035);
}

.card--selected .card__media {
  background: #d4efdd;
}

.card__name {
  margin: 0 0 8px;
  min-height: 2.6em;
  font-size: 1.02rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.card__prices {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  margin: 0;
}

.card__price {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--blue);
  font-variant-numeric: tabular-nums;
}

.card--selected .card__price {
  color: var(--blue-dark);
}

.card__old {
  font-size: 0.9rem;
  color: var(--muted);
}

.card__note {
  margin: 6px 0 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #0a7a3c;
}

.card__check {
  position: absolute;
  top: -12px;
  right: -10px;
  display: none;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 3px solid var(--white);
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  font-weight: 900;
  box-shadow: 0 4px 12px rgba(11, 122, 58, 0.35);
}

.card--selected .card__check {
  display: flex;
}

.actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin-top: 44px;
}

.submit {
  width: min(100%, 460px);
  padding: 16px 34px;
  border: 1px solid var(--blue-dark);
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  color: var(--white);
  font: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(11, 122, 58, 0.3);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.submit:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow: 0 16px 32px rgba(11, 122, 58, 0.36);
}

.submit:active {
  transform: translateY(1px);
  box-shadow: 0 6px 14px rgba(11, 122, 58, 0.3);
}

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

.message {
  width: min(100%, 620px);
  padding: 18px 22px;
  border: 1px solid transparent;
  border-radius: 14px;
  text-align: center;
  animation: pop 0.25s ease;
}

.message--error {
  border-color: #e5a6ae;
  background: #ffe3e7;
  color: #8f1728;
}

.message--success {
  border-color: #9fd8bd;
  background: #e7f7ee;
  color: #0a5c38;
}

.message__title {
  margin: 0;
  font-weight: 700;
}

.message__subtitle {
  margin: 6px 0 0;
  font-size: 1.25rem;
  font-weight: 900;
}

@keyframes pop {
  from {
    transform: scale(0.96);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.footer {
  padding: 28px 20px 40px;
  border-top: 1px solid var(--line);
  background: var(--white);
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

.footer__note {
  margin: 0 auto;
  max-width: 720px;
  line-height: 1.6;
}

.credits {
  max-width: 780px;
  margin: 14px auto 0;
  font-size: 0.8rem;
}

.credits summary {
  cursor: pointer;
  color: var(--navy-soft);
  font-weight: 700;
}

.credits summary:hover {
  color: var(--blue);
}

.credits ul {
  margin: 12px 0 0;
  padding-left: 20px;
  text-align: left;
  line-height: 1.7;
}

.credits li {
  margin-bottom: 2px;
}

.credits a {
  color: var(--blue-dark);
}

.credits a:hover {
  color: var(--blue);
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

@media (max-width: 560px) {
  .hero {
    padding: 40px 16px 46px;
  }

  .container {
    padding: 32px 16px 48px;
  }

  .toolbar {
    align-items: flex-start;
  }

  .grid {
    gap: 16px;
  }

  .actions {
    margin-top: 32px;
  }

  .credits {
    font-size: 0.76rem;
  }
}
