/* ===========================================================
   AI Budapest — Tanúsítvány rendszer
   Brand: Renaissance Futurism · Playfair Display + Inter
   =========================================================== */

:root {
  --dark-950: #0a0a0a;
  --dark-900: #0f0f0f;
  --dark-800: #121212;
  --dark-700: #1a1a1a;

  --cream:    #F5F0E8;
  --cream-70: rgba(245, 240, 232, 0.70);
  --cream-50: rgba(245, 240, 232, 0.50);
  --cream-30: rgba(245, 240, 232, 0.30);
  --cream-15: rgba(245, 240, 232, 0.15);
  --cream-08: rgba(245, 240, 232, 0.08);

  --orange: #E85D24;
  --blue:   #3B9FD8;
  --green:  #4ADE80;
  --mauve:  #C4A7E7;

  --display: 'Playfair Display', Georgia, serif;
  --body: 'Inter', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--dark-950);
  color: var(--cream);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

/* ---------- Page shell ---------- */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  gap: 28px;
}

.wordmark {
  font-family: var(--body);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: var(--cream-70);
}
.wordmark b { color: var(--orange); font-weight: 700; }

/* ---------- Verify strip (above the certificate) ---------- */
.verify-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  border: 1px solid var(--cream-15);
  border-radius: 999px;
  background: var(--dark-900);
  font-size: 0.85rem;
  color: var(--cream-70);
}
.verify-strip .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.15);
}
.verify-strip.invalid .dot { background: var(--orange); box-shadow: 0 0 0 4px rgba(232,93,36,.15); }
.verify-strip b { color: var(--cream); font-weight: 600; }

/* ===========================================================
   THE CERTIFICATE
   =========================================================== */
.cert {
  position: relative;
  width: min(1120px, 96vw);
  aspect-ratio: 1.414 / 1;           /* A4 landscape feel */
  background: var(--dark-900);
  border: 1px solid var(--cream-15);
  border-radius: 16px;
  padding: clamp(28px, 4.4vw, 64px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Inner double-rule frame */
.cert::before {
  content: "";
  position: absolute;
  inset: clamp(16px, 2.2vw, 30px);
  border: 1px solid var(--cream-15);
  border-radius: 8px;
  pointer-events: none;
}

/* Faint vertical line texture (brand "energy/live" pattern), very subtle */
.cert-texture {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    90deg,
    var(--cream-08) 0, var(--cream-08) 1px,
    transparent 1px, transparent 26px
  );
  opacity: 0.5;
  mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
  pointer-events: none;
}

/* Corner ornaments */
.corner {
  position: absolute;
  width: 22px; height: 22px;
  border-color: var(--orange);
  opacity: 0.9;
}
.corner.tl { top: clamp(16px,2.2vw,30px); left: clamp(16px,2.2vw,30px); border-top: 2px solid; border-left: 2px solid; border-top-left-radius: 6px; }
.corner.tr { top: clamp(16px,2.2vw,30px); right: clamp(16px,2.2vw,30px); border-top: 2px solid; border-right: 2px solid; border-top-right-radius: 6px; }
.corner.bl { bottom: clamp(16px,2.2vw,30px); left: clamp(16px,2.2vw,30px); border-bottom: 2px solid; border-left: 2px solid; border-bottom-left-radius: 6px; }
.corner.br { bottom: clamp(16px,2.2vw,30px); right: clamp(16px,2.2vw,30px); border-bottom: 2px solid; border-right: 2px solid; border-bottom-right-radius: 6px; }

.cert-inner {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Header row */
.cert-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.cert-head .brand {
  font-family: var(--body);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: clamp(0.62rem, 1.1vw, 0.8rem);
  color: var(--cream-70);
}
.cert-head .brand b { color: var(--orange); font-weight: 700; }
.cert-head .verified-tag {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: clamp(0.6rem, 1vw, 0.74rem);
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--cream-70);
  border: 1px solid var(--cream-15);
  border-radius: 999px;
  padding: 6px 12px;
}
.cert-head .verified-tag svg { width: 13px; height: 13px; }

/* Body — centered */
.cert-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: clamp(8px, 1.4vw, 16px);
}
.eyebrow {
  font-family: var(--body);
  font-weight: 500;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  font-size: clamp(0.62rem, 1.15vw, 0.82rem);
  color: var(--orange);
  padding-left: 0.42em;
}
.cert-lead {
  font-size: clamp(0.8rem, 1.35vw, 1rem);
  color: var(--cream-50);
}
.recipient {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.4rem, 6.2vw, 4.6rem);
  line-height: 1.02;
  color: var(--cream);
}
.recipient .il { font-style: italic; }   /* AIB signature: dőlt első betű */

.cert-sub {
  font-size: clamp(0.82rem, 1.35vw, 1.02rem);
  color: var(--cream-70);
  max-width: 62ch;
}
.program {
  font-family: var(--display);
  font-weight: 500;
  font-style: italic;
  font-size: clamp(1.25rem, 3vw, 2.1rem);
  line-height: 1.15;
  color: var(--cream);
}
.cert-desc {
  font-size: clamp(0.76rem, 1.25vw, 0.96rem);
  line-height: 1.6;
  color: var(--cream-70);
  max-width: 68ch;
}

/* Footer row */
.cert-foot {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 16px;
  padding-top: clamp(12px, 2vw, 22px);
  border-top: 1px solid var(--cream-15);
  margin-top: clamp(8px, 1.6vw, 16px);
}
.foot-block { display: flex; flex-direction: column; gap: 3px; }
.foot-block .label {
  font-size: clamp(0.56rem, 0.95vw, 0.66rem);
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--cream-50);
}
.foot-block .value {
  font-size: clamp(0.78rem, 1.2vw, 0.98rem);
  color: var(--cream);
  font-weight: 500;
}
.foot-block .value.mono {
  font-family: 'SFMono-Regular', ui-monospace, 'Menlo', monospace;
  letter-spacing: 0.02em;
  font-size: clamp(0.72rem, 1.1vw, 0.9rem);
  color: var(--orange);
}
.foot-block.right { text-align: right; align-items: flex-end; }
.signature {
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(1.1rem, 2.1vw, 1.6rem);
  color: var(--cream);
  line-height: 1;
  margin-bottom: 2px;
}

/* Seal */
.seal {
  width: clamp(64px, 8.5vw, 104px);
  height: clamp(64px, 8.5vw, 104px);
  border-radius: 50%;
  border: 2px solid var(--orange);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  position: relative;
  color: var(--cream);
  gap: 2px;
}
.seal::before {
  content: "";
  position: absolute; inset: 5px;
  border: 1px solid var(--cream-30);
  border-radius: 50%;
}
.seal .s-top {
  font-size: clamp(0.5rem, 0.85vw, 0.62rem);
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--cream-70);
}
.seal .s-main {
  font-family: var(--display);
  font-size: clamp(0.95rem, 1.7vw, 1.35rem);
  font-weight: 600;
  color: var(--orange);
  line-height: 1;
}
.seal .s-bot {
  font-size: clamp(0.42rem, 0.72vw, 0.52rem);
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--cream-50);
}

/* ---------- Actions under the cert ---------- */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 12px 22px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.btn:hover { transform: translateY(-3px); }
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: #d24e17; }
.btn-ghost { background: transparent; color: var(--cream); border-color: var(--cream-15); }
.btn-ghost:hover { border-color: var(--cream-30); background: var(--cream-08); }
.btn svg { width: 16px; height: 16px; }
.btn-linkedin { background: #0A66C2; color: #fff; }
.btn-linkedin:hover { background: #095aad; }

.note {
  font-size: 0.8rem;
  color: var(--cream-50);
  text-align: center;
  max-width: 46ch;
  line-height: 1.5;
}

/* ---------- Not-found state ---------- */
.notfound {
  width: min(560px, 92vw);
  text-align: center;
  border: 1px solid var(--cream-15);
  border-radius: 16px;
  background: var(--dark-900);
  padding: 48px 32px;
}
.notfound h1 { font-family: var(--display); font-weight: 500; font-size: 2rem; margin-bottom: 12px; }
.notfound p { color: var(--cream-70); line-height: 1.6; }

/* ---------- Verify home (index) ---------- */
.home {
  width: min(560px, 92vw);
  text-align: center;
}
.home h1 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.05;
  margin-bottom: 14px;
}
.home h1 .il { font-style: italic; }
.home p { color: var(--cream-70); line-height: 1.65; margin-bottom: 28px; }
.home .field {
  display: flex; gap: 10px; margin-bottom: 16px;
}
.home input {
  flex: 1;
  background: var(--dark-800);
  border: 1px solid var(--cream-15);
  border-radius: 10px;
  padding: 14px 16px;
  color: var(--cream);
  font-family: var(--body);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}
.home input:focus { outline: none; border-color: var(--orange); }
.home input::placeholder { color: var(--cream-30); }

/* ===========================================================
   PRINT — clean light version for framing
   =========================================================== */
@media print {
  @page { size: A4 landscape; margin: 0; }
  body { background: #fff; }
  .page { padding: 0; min-height: auto; }
  .verify-strip, .actions, .note, .wordmark { display: none !important; }
  .cert {
    width: 100%;
    height: 100vh;
    border: none;
    border-radius: 0;
    background: #fffdf9;
    color: #1a1a1a;
  }
  .cert::before { border-color: #d8cdba; }
  .cert-texture { opacity: 0.28; }
  .recipient, .program, .signature, .foot-block .value, .cert-head .brand { color: #1a1a1a !important; }
  .cert-sub, .cert-desc, .cert-lead, .cert-head .brand b { color: #45403a !important; }
  .foot-block .value.mono, .seal .s-main, .eyebrow, .cert-head .brand b { color: #C24E17 !important; }
  .cert-foot, .cert::before, .verified-tag { border-color: #d8cdba !important; }
  .corner { opacity: 1; }
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .cert { aspect-ratio: auto; }
  .cert-foot { grid-template-columns: 1fr; text-align: center; justify-items: center; gap: 20px; }
  .foot-block.right { text-align: center; align-items: center; }
  .cert-body { gap: 14px; padding: 12px 0; }
}
