:root {
  --green: #123f35;
  --green-deep: #0b3028;
  --cream: #f7f0df;
  --gold: #ead7a7;
  --coral: #df795b;
  --ink: #16352f;
  --muted: #5d6f69;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font: 17px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: inherit; }

.topbar,
main,
footer {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0;
}

.brand { font-family: Georgia, serif; font-size: 21px; font-weight: 700; text-decoration: none; }
.back { color: var(--muted); text-underline-offset: 4px; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, .88fr);
  align-items: center;
  gap: clamp(34px, 6vw, 82px);
  min-height: 690px;
  padding: 54px 0 80px;
}

.eyebrow {
  margin: 0 0 10px;
  color: #a44d38;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

h1, h2 { margin: 0; font-family: Georgia, serif; font-weight: 600; line-height: 1.06; }
h1 { max-width: 680px; font-size: clamp(48px, 6.3vw, 88px); }
h2 { font-size: clamp(34px, 4vw, 54px); }
.lead { max-width: 680px; margin: 26px 0; font-size: 20px; }
.benefits { display: grid; gap: 10px; max-width: 700px; padding-left: 22px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 13px 22px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}
.button-primary { color: white; background: var(--coral); }
.button-secondary { color: white; background: var(--green); }

.certificate {
  padding: 10px;
  border-radius: 32px;
  background: var(--gold);
  box-shadow: 0 26px 60px rgba(11, 48, 40, .18);
  transform: rotate(1deg);
}

.certificate-inner {
  min-height: 560px;
  padding: clamp(30px, 5vw, 58px);
  border: 1px solid rgba(234, 215, 167, .72);
  border-radius: 23px;
  color: white;
  background: var(--green);
}

.certificate-kicker { margin: 0 0 24px; color: #f0b28f; font-size: 13px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.certificate-brand { margin: 0; font: 600 clamp(42px, 5vw, 66px)/.95 Georgia, serif; }
.certificate-rule { width: 74px; height: 1px; margin: 34px 0; background: var(--gold); }
.certificate-label { margin: 0 0 6px; color: #c9ddd5; font-size: 14px; }
.certificate-product { min-height: 76px; margin: 0; font: 500 clamp(26px, 3.2vw, 38px)/1.18 Georgia, serif; }
.certificate-code { margin: 34px 0 22px; padding: 18px; border-radius: 16px; color: var(--green); background: var(--cream); text-align: center; }
.certificate-code span { display: block; margin-bottom: 5px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.certificate-code strong { white-space: nowrap; font-size: clamp(13px, 1.55vw, 19px); letter-spacing: .035em; }
.certificate-note { margin: 0; color: #c9ddd5; font-size: 12px; word-break: break-word; }

.panel {
  display: grid;
  grid-template-columns: minmax(260px, .75fr) minmax(300px, 1fr);
  gap: 40px 70px;
  margin-bottom: 32px;
  padding: clamp(28px, 5vw, 62px);
  border: 1px solid #d8c89c;
  border-radius: 30px;
  background: rgba(255, 255, 255, .42);
}

.stack { display: grid; gap: 10px; align-content: start; }
.stack + .stack { grid-column: 2; }
label { font-weight: 750; }
input { width: 100%; min-height: 52px; padding: 12px 15px; border: 1px solid #a9b8b2; border-radius: 13px; background: white; font: inherit; }
input:focus { outline: 3px solid rgba(223, 121, 91, .25); border-color: var(--coral); }
.status { grid-column: 1 / -1; margin: 0; min-height: 26px; font-weight: 700; }
.status.is-error { color: #a43328; }
.status.is-success { color: #176343; }
.certificate-list { display: grid; gap: 14px; }
.certificate-row { padding: 18px; border-radius: 18px; background: white; box-shadow: 0 8px 24px rgba(18, 63, 53, .07); }
.certificate-row h3 { margin: 0 0 6px; font: 600 23px/1.2 Georgia, serif; }
.certificate-row p { margin: 4px 0; color: var(--muted); }
.certificate-row button { margin-top: 10px; }
.muted { color: var(--muted); }

footer { display: flex; flex-wrap: wrap; gap: 18px 28px; padding: 40px 0 60px; color: var(--muted); }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; padding-top: 30px; }
  .certificate { max-width: 570px; }
  .panel { grid-template-columns: 1fr; }
  .stack + .stack { grid-column: auto; }
}

@media (max-width: 520px) {
  .topbar, main, footer { width: min(100% - 24px, 1180px); }
  .topbar { align-items: flex-start; }
  .hero { min-height: auto; }
  h1 { font-size: 43px; }
  .lead { font-size: 18px; }
  .certificate-inner { min-height: 500px; padding: 28px 22px; }
  .certificate-product { min-height: 92px; }
  .panel { gap: 25px; padding: 25px 20px; border-radius: 22px; }
}

@media print {
  body * { visibility: hidden; }
  .certificate, .certificate * { visibility: visible; }
  .certificate { position: absolute; inset: 20mm; box-shadow: none; transform: none; }
}
