:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --ink: #1a1d23;
  --muted: #5c6470;
  --line: #e2e5eb;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: #eff4ff;
  --ok: #0f766e;
  --ok-bg: #e6f7f5;
  --danger: #b42318;
  --shadow: 0 8px 28px rgba(26, 29, 35, 0.08);
  --radius: 14px;
  --font: Georgia, "Times New Roman", Times, serif;
  --font-ui: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-ui);
  color: var(--ink);
  background:
    radial-gradient(1100px 480px at 8% -12%, #dbe7ff 0%, transparent 55%),
    radial-gradient(900px 420px at 100% 0%, #e8eef8 0%, transparent 50%),
    linear-gradient(180deg, #eef1f6 0%, var(--bg) 40%);
  line-height: 1.5;
}

img {
  max-width: 100%;
  display: block;
}

button,
input {
  font: inherit;
}

.container {
  width: min(1100px, calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  padding: 2.5rem 0 1.5rem;
}

.brand {
  margin: 0;
  font-family: var(--font);
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.tagline {
  margin: 0.6rem 0 0;
  color: var(--muted);
  max-width: 36ch;
}

.status {
  margin: 1rem 0 1.5rem;
  padding: 0.9rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
}

.status[hidden],
.status.is-empty {
  display: none;
}

.status.is-error {
  color: var(--danger);
  border-color: #f3c1bd;
  background: #fff5f4;
}

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  padding-bottom: 3rem;
}

@media (min-width: 768px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  animation: rise 0.45s ease both;
}

.card:nth-child(2) {
  animation-delay: 0.08s;
}

.card:nth-child(3) {
  animation-delay: 0.16s;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card__media {
  aspect-ratio: 16 / 10;
  background: #dfe3ea;
  overflow: hidden;
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card:hover .card__media img {
  transform: scale(1.03);
}

.card__body {
  padding: 1.15rem 1.2rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  flex: 1;
}

.card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.card__title {
  margin: 0;
  font-family: var(--font);
  font-size: 1.35rem;
  line-height: 1.2;
}

.badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.55rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background: var(--ok-bg);
  color: var(--ok);
}

.card__desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.card__prices {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.2rem;
}

.card__price {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
}

.card__price span {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.15rem;
}

.card__price--buy {
  color: var(--accent);
}

.card__actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
  margin-top: auto;
  padding-top: 0.5rem;
}

@media (min-width: 420px) {
  .card__actions {
    grid-template-columns: 1fr 1fr;
  }
}

.btn {
  appearance: none;
  border: none;
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  cursor: pointer;
  font-weight: 700;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--accent);
  color: #fff;
}

.btn--primary:hover {
  background: var(--accent-hover);
}

.btn--secondary {
  background: var(--ink);
  color: #fff;
}

.btn--secondary:hover {
  background: #2c3340;
}

.btn--ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
}

.btn--ghost:hover {
  background: var(--bg);
  color: var(--ink);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.25rem 0 2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer p {
  margin: 0;
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: end center;
  padding: 1rem;
}

@media (min-width: 640px) {
  .modal {
    place-items: center;
  }
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 18, 22, 0.55);
  backdrop-filter: blur(2px);
  animation: fade 0.2s ease;
}

.modal__dialog {
  position: relative;
  width: min(440px, 100%);
  background: var(--surface);
  border-radius: 16px 16px 12px 12px;
  padding: 1.35rem 1.25rem 1.25rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  animation: pop 0.25s ease;
}

@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal__close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
  display: grid;
  place-items: center;
}

.modal__close:hover {
  background: var(--line);
}

.modal__title {
  margin: 0 2rem 0.35rem 0;
  font-family: var(--font);
  font-size: 1.4rem;
}

.modal__subtitle {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.form-fields {
  display: grid;
  gap: 0.85rem;
}

.form-fields label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.form-fields input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  background: #fff;
  color: var(--ink);
}

.form-fields input:focus {
  outline: 2px solid color-mix(in srgb, var(--accent) 45%, white);
  border-color: var(--accent);
}

.form-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-top: 0.4rem;
}

.form-actions--single {
  grid-template-columns: 1fr;
  margin-top: 1rem;
}

.form-success {
  padding: 0.9rem 1rem;
  border-radius: 10px;
  background: var(--ok-bg);
  color: var(--ok);
  font-weight: 600;
}

.form-fields input[readonly] {
  background: var(--bg);
  color: var(--ink);
}

.form-error {
  padding: 0.9rem 1rem;
  border-radius: 10px;
  background: #fff5f4;
  color: var(--danger);
  font-weight: 600;
}

.netlify-template,
.hidden-field {
  display: none !important;
}
