@font-face {
  font-family: "DM Sans";
  src: url("fonts/DMSans-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("fonts/DMSans-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("fonts/Inter-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("fonts/Inter-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0d0714;
  --surface: #1a1025;
  --surface-2: #251238;
  --purple: #9536ce;
  --purple-dark: #7227c3;
  --green: #10e848;
  --green-dark: #08b938;
  --text: #f7f2fb;
  --muted: #d8c7e9;
  --paper: #fffdf8;
  --ink: #19111f;
  --line: rgba(255, 255, 255, 0.18);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: "DM Sans", Arial, sans-serif;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding: 14px clamp(18px, 5vw, 72px);
  background: rgba(13, 7, 20, 0.86);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(18px);
}

.brand img {
  display: block;
  width: min(220px, 48vw);
  height: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav a {
  min-height: 38px;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  font: 700 13px/1 "Inter", Arial, sans-serif;
  text-transform: uppercase;
}

.nav a:hover,
.nav a:focus-visible {
  border-color: rgba(16, 232, 72, 0.45);
  color: #ffffff;
  outline: none;
}

.hero {
  position: relative;
  min-height: 92vh;
  padding: 122px clamp(18px, 5vw, 72px) 68px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(13, 7, 20, 0.95) 0%, rgba(13, 7, 20, 0.8) 44%, rgba(13, 7, 20, 0.38) 100%),
    url("assets/banner-desk.png") center top / cover no-repeat,
    #edf2f3;
}

.hero__backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 16% 12%, rgba(149, 54, 206, 0.42), transparent 30%),
    linear-gradient(180deg, rgba(13, 7, 20, 0) 70%, var(--bg) 100%);
}

.hero__content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.72fr);
  gap: clamp(26px, 4vw, 68px);
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
}

.hero__copy {
  max-width: 690px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--green);
  font: 700 13px/1.2 "Inter", Arial, sans-serif;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font: 700 clamp(42px, 7vw, 86px)/0.95 "DM Sans", Arial, sans-serif;
}

.lead {
  max-width: 610px;
  margin-bottom: 26px;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.42;
}

.hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero__facts span {
  padding: 10px 13px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font: 700 13px/1.1 "Inter", Arial, sans-serif;
}

.issuer {
  width: 100%;
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(20, 10, 31, 0.88);
  box-shadow: var(--shadow);
}

.issuer__head {
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.issuer__head p {
  margin-bottom: 8px;
  color: var(--green);
  font: 700 12px/1 "Inter", Arial, sans-serif;
  text-transform: uppercase;
}

.issuer__head strong {
  display: block;
  color: #ffffff;
  font-size: 22px;
  line-height: 1.18;
}

label {
  display: block;
  margin: 16px 0 7px;
  color: #ffffff;
  font: 700 13px/1.2 "Inter", Arial, sans-serif;
}

input,
select {
  width: 100%;
  min-height: 52px;
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  outline: none;
}

select option {
  color: #181020;
}

input:focus,
select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(16, 232, 72, 0.18);
}

input::placeholder {
  color: rgba(255, 255, 255, 0.52);
}

.field-error {
  min-height: 18px;
  margin: 6px 0 0;
  color: #ffb9c1;
  font-size: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 13px 18px;
  border: 0;
  border-radius: 8px;
  font: 700 14px/1.15 "Inter", Arial, sans-serif;
  text-transform: uppercase;
  cursor: pointer;
}

.button--primary {
  width: 100%;
  margin-top: 18px;
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  color: #061408;
  box-shadow: 0 18px 42px rgba(16, 232, 72, 0.24);
}

.button--primary:hover,
.button--primary:focus-visible {
  filter: brightness(1.05);
  outline: 3px solid rgba(255, 255, 255, 0.24);
  outline-offset: 2px;
}

.issuer__note {
  margin: 13px 0 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  line-height: 1.35;
}

.ticker {
  overflow: hidden;
  border-block: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(90deg, var(--purple-dark), var(--purple));
}

.ticker__track {
  display: flex;
  width: max-content;
  min-height: 52px;
  align-items: center;
  gap: 34px;
  padding-inline: 18px;
  animation: slide 28s linear infinite;
}

.ticker__track span {
  white-space: nowrap;
  color: #ffffff;
  font: 700 13px/1 "Inter", Arial, sans-serif;
  text-transform: uppercase;
}

.ticker__track span::after {
  content: "✦";
  margin-left: 34px;
  color: var(--green);
}

@keyframes slide {
  to {
    transform: translateX(-50%);
  }
}

.certificate-section {
  padding: clamp(56px, 7vw, 96px) clamp(18px, 5vw, 72px);
}

.certificate-section {
  display: grid;
  grid-template-columns: minmax(250px, 0.35fr) minmax(0, 0.65fr);
  gap: clamp(28px, 5vw, 70px);
  align-items: start;
  max-width: 1240px;
  margin: 0 auto;
}

.section-copy h2 {
  margin-bottom: 14px;
  font: 700 clamp(30px, 4vw, 52px)/1 "DM Sans", Arial, sans-serif;
}

.section-copy p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.certificate-shell {
  min-width: 0;
}

.certificate {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 1600 / 1131;
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.certificate__template {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.certificate__student,
.certificate__date {
  position: absolute;
  z-index: 1;
  color: #111111;
  font-family: "DM Sans", Arial, sans-serif;
  line-height: 1;
  text-align: center;
}

.certificate__student {
  top: 42.7%;
  left: 19%;
  width: 63%;
  font-weight: 700;
  font-size: clamp(13px, 2.7vw, var(--name-font-size, 38px));
  white-space: nowrap;
}

.certificate__date {
  top: 69.5%;
  left: 33.2%;
  width: 19.5%;
  font-weight: 400;
  font-size: clamp(8px, 1.55vw, 22px);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.certificate-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 18px;
}

.certificate-actions .button--primary {
  margin-top: 0;
}

details {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

summary {
  min-height: 58px;
  padding: 18px 20px;
  color: #ffffff;
  font: 700 17px/1.25 "Inter", Arial, sans-serif;
  cursor: pointer;
}

details p {
  padding: 0 20px 20px;
  margin: 0;
}

@media (max-width: 920px) {
  .hero {
    min-height: auto;
    background:
      linear-gradient(180deg, rgba(13, 7, 20, 0.94) 0%, rgba(13, 7, 20, 0.82) 54%, rgba(13, 7, 20, 0.98) 100%),
      url("assets/banner-mobile.png") center top / cover no-repeat,
      #edf2f3;
  }

  .hero__content,
  .certificate-section {
    grid-template-columns: 1fr;
  }

  .hero__copy {
    padding-top: 18px;
  }

  .certificate {
    min-height: 0;
  }
}

@media (max-width: 680px) {
  .topbar {
    position: absolute;
    align-items: flex-start;
    min-height: 68px;
  }

  .nav {
    display: none;
  }

  .hero {
    padding-top: 96px;
  }

  h1 {
    font-size: 44px;
  }

  .issuer {
    padding: 20px;
  }

  .certificate-actions {
    grid-template-columns: 1fr;
  }

  .certificate-actions .button {
    width: 100%;
  }

}

@media print {
  body {
    background: #ffffff;
  }

  body * {
    visibility: hidden;
  }

  .certificate,
  .certificate * {
    visibility: visible;
  }

  .certificate {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 70.7vw;
    max-height: 100vh;
    min-height: 0;
    margin: auto;
    box-shadow: none;
    border-radius: 0;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
