/* Vibe Directing certificate pages (landing, form, sent) and the diploma.
   Ported from the HUVA-Certificate-Handoff design. Everything is prefixed
   vc- (pages) or scoped to .cert-dip (the diploma) so the legacy
   styles.css rules loaded by base.html can't reach in. The diploma part is
   also loaded by the admin review screen and the verify page. */

.vc-page, .cert-dip {
  --vc-ink: #000000;
  --vc-paper: #ffffff;
  --vc-mist: #f4f4f1;
  --vc-section: #edecf1;
  --vc-line: #d7d9db;
  --vc-yellow: #e9ef00;
  --vc-blue: #1200ff;
  --vc-blue-deep: #0c00cc;
  --vc-muted: rgba(0, 0, 0, 0.56);
  --vc-err: #c4122f;
  --vc-display: 'Archivo Expanded', 'Archivo', 'Noto Sans Armenian', 'Arial Black', sans-serif;
  --vc-ui: 'Archivo', 'Noto Sans Armenian', -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --vc-body: 'Montserrat', 'Noto Sans Armenian', -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --vc-serif: 'Playfair Display', 'Noto Serif Armenian', Georgia, serif;
  --vc-shadow: 0 8px 16px rgba(138, 129, 141, 0.20);
  --vc-shadow-lg: 0 24px 60px rgba(40, 30, 60, 0.18);
  --vc-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

.vc-page { background: var(--vc-paper); color: var(--vc-ink); font-family: var(--vc-body); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
.vc-page *, .cert-dip * { box-sizing: border-box; }
.vc-page h1, .vc-page h2, .vc-page h3 { margin: 0; text-wrap: balance; }
.vc-page p { margin: 0; }
.vc-page button, .vc-page input, .vc-page textarea { font: inherit; color: inherit; }
.vc-page :focus-visible { outline: 3px solid var(--vc-blue); outline-offset: 3px; }
.vc-wrap { max-width: 1120px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.vc-spacer { height: 92px; }
@media (max-width: 900px) { .vc-spacer { height: 84px; } }
.vc-eyebrow { font-family: var(--vc-ui); font-weight: 700; font-size: 12px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--vc-blue); }
.vc-page em.vc-serif { font-family: var(--vc-serif); font-style: italic; font-weight: 500; letter-spacing: -0.01em; }

/* Buttons */
.vc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: 999px; padding: 17px 30px; font-family: var(--vc-ui); font-weight: 700; font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; text-decoration: none; transition: transform .15s var(--vc-ease), background .15s var(--vc-ease); }
.vc-btn:hover { transform: translateY(-2px); }
.vc-btn-blue { background: var(--vc-blue); color: var(--vc-paper); }
.vc-btn-blue:hover { background: var(--vc-blue-deep); color: var(--vc-paper); }
.vc-btn-ghost { background: transparent; color: var(--vc-ink); box-shadow: inset 0 0 0 2px var(--vc-ink); }
.vc-btn-yellow { background: var(--vc-yellow); color: var(--vc-ink); }
.vc-back { display: inline-flex; align-items: center; gap: 8px; font-family: var(--vc-ui); font-weight: 600; font-size: 14px; color: var(--vc-muted); text-decoration: none; }
.vc-back:hover { color: var(--vc-ink); }

/* Landing hero */
.vc-hero { background: linear-gradient(180deg, var(--vc-paper) 0%, var(--vc-mist) 100%); padding-block: clamp(40px, 7vw, 96px) clamp(56px, 8vw, 110px); overflow: hidden; }
.vc-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.vc-hero-copy { display: flex; flex-direction: column; gap: 26px; align-items: flex-start; min-width: 0; }
.vc-hero h1 { font-family: var(--vc-ui); font-weight: 800; font-size: clamp(38px, 5.6vw, 76px); letter-spacing: -0.04em; line-height: 1; }
.vc-hero h1 em.vc-serif { display: block; color: var(--vc-blue); letter-spacing: -0.03em; }
html[lang="hy"] .vc-hero h1 { font-size: clamp(32px, 4.6vw, 62px); letter-spacing: -0.02em; line-height: 1.08; }
.vc-highlight { background: var(--vc-yellow); border-radius: 12px; padding: 14px 22px; }
.vc-highlight p { font-family: var(--vc-ui); font-weight: 800; font-size: clamp(14px, 1.4vw, 17px); text-transform: uppercase; letter-spacing: 0.04em; }
.vc-lead { font-size: clamp(16px, 1.5vw, 18px); color: var(--vc-muted); max-width: 46ch; }
.vc-cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.vc-hero-sheet { position: relative; min-width: 0; }
.vc-hero-sheet .cert-dip { transform: rotate(-3deg); box-shadow: var(--vc-shadow-lg); }
.vc-sample-tag { position: absolute; top: -14px; right: 6%; z-index: 2; transform: rotate(4deg); background: var(--vc-ink); color: var(--vc-yellow); font-family: var(--vc-ui); font-weight: 700; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; border-radius: 999px; padding: 8px 14px; }

/* Sections */
.vc-band { padding-block: clamp(56px, 8vw, 100px); }
.vc-band-grey { background: var(--vc-section); }
.vc-band-head { display: flex; flex-direction: column; gap: 14px; margin-bottom: 40px; max-width: 640px; }
.vc-band-head h2 { font-family: var(--vc-display); font-weight: 700; font-size: clamp(26px, 3.4vw, 42px); letter-spacing: -0.04em; line-height: 1.04; text-transform: uppercase; }
html[lang="hy"] .vc-band-head h2 { letter-spacing: -0.01em; }
.vc-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; list-style: none; margin: 0; padding: 0; }
.vc-step { background: var(--vc-paper); border-radius: 24px; padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.vc-step-n { width: 44px; height: 44px; border-radius: 50%; background: var(--vc-yellow); display: grid; place-items: center; font-family: var(--vc-display); font-weight: 800; font-size: 18px; }
.vc-step h3 { font-family: var(--vc-ui); font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }
.vc-step p { color: var(--vc-muted); font-size: 15px; }
.vc-req { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.vc-req-card { border: 2px solid var(--vc-ink); border-radius: 24px; padding: 26px; display: flex; flex-direction: column; gap: 10px; }
.vc-req-card .vc-qty { font-family: var(--vc-display); font-weight: 800; font-size: 30px; letter-spacing: -0.04em; }
.vc-req-card h3 { font-family: var(--vc-ui); font-weight: 800; font-size: 18px; }
.vc-req-card p { color: var(--vc-muted); font-size: 15px; }
.vc-chip { align-self: flex-start; font-family: var(--vc-ui); font-weight: 700; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; border-radius: 999px; padding: 5px 10px; background: var(--vc-ink); color: var(--vc-yellow); }
.vc-faq { display: grid; gap: 12px; max-width: 760px; }
.vc-faq details { background: var(--vc-paper); border-radius: 20px; padding: 20px 24px; }
.vc-faq summary { cursor: pointer; font-family: var(--vc-ui); font-weight: 700; font-size: 17px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.vc-faq summary::-webkit-details-marker { display: none; }
.vc-faq summary::after { content: "+"; font-weight: 800; color: var(--vc-blue); }
.vc-faq details[open] summary::after { content: "\2212"; }
.vc-faq details p { color: var(--vc-muted); margin-top: 10px; }
.vc-cta-band { background: var(--vc-blue); color: var(--vc-paper); padding-block: clamp(56px, 8vw, 100px); text-align: center; }
.vc-cta-band .vc-wrap { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.vc-cta-band .vc-eyebrow { color: var(--vc-yellow); }
.vc-cta-band h2 { font-family: var(--vc-display); font-weight: 700; font-size: clamp(28px, 4vw, 52px); letter-spacing: -0.045em; text-transform: uppercase; line-height: 1; max-width: 16ch; }
html[lang="hy"] .vc-cta-band h2 { letter-spacing: -0.01em; }
.vc-cta-band p { color: rgba(255, 255, 255, .78); max-width: 44ch; }
.vc-disclaimer { padding-block: 32px 48px; border-top: 1px solid var(--vc-line); }
.vc-disclaimer p { color: var(--vc-muted); font-size: 13px; max-width: 70ch; }

/* Form */
.vc-form-top { padding-block: clamp(28px, 4vw, 48px) 28px; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.vc-form-top h1 { font-family: var(--vc-ui); font-weight: 800; font-size: clamp(32px, 4.4vw, 56px); letter-spacing: -0.04em; line-height: 1.02; }
html[lang="hy"] .vc-form-top h1 { letter-spacing: -0.015em; line-height: 1.1; }
.vc-form-top .vc-lead { max-width: 52ch; }
.vc-form-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: start; padding-bottom: 96px; }
.vc-fsec { background: var(--vc-paper); border: 1px solid var(--vc-line); border-radius: 28px; padding: clamp(20px, 3vw, 32px); display: flex; flex-direction: column; gap: 20px; }
.vc-fsec + .vc-fsec { margin-top: 20px; }
.vc-fsec-head { display: flex; align-items: baseline; gap: 14px; }
.vc-fsec-head .vc-n { font-family: var(--vc-display); font-weight: 800; font-size: 14px; color: var(--vc-blue); }
.vc-fsec-head h2 { font-family: var(--vc-ui); font-weight: 800; font-size: 22px; letter-spacing: -0.02em; }
.vc-fsec-help { font-size: 14px; color: var(--vc-muted); margin-top: -8px; }
.vc-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.vc-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.vc-field.vc-full { grid-column: 1 / -1; }
.vc-field label { font-family: var(--vc-ui); font-weight: 700; font-size: 14px; }
.vc-opt { font-weight: 500; color: var(--vc-muted); }
.vc-help { font-size: 13px; color: var(--vc-muted); }
.vc-input { width: 100%; background: var(--vc-mist); border: 2px solid transparent; border-radius: 14px; padding: 13px 16px; font-size: 16px; outline: none; transition: border-color .15s; }
.vc-input:focus { border-color: var(--vc-blue); background: var(--vc-paper); }
.vc-input[readonly] { background: var(--vc-section); color: var(--vc-muted); font-weight: 600; cursor: default; }
.vc-input[readonly]:focus { border-color: transparent; background: var(--vc-section); }
textarea.vc-input { min-height: 120px; resize: vertical; line-height: 1.5; }
.vc-field.vc-bad .vc-input { border-color: var(--vc-err); }
.vc-err { font-size: 13px; color: var(--vc-err); font-weight: 600; }
.vc-err:empty { display: none; }
.vc-count { font-size: 12px; color: var(--vc-muted); align-self: flex-end; font-variant-numeric: tabular-nums; }
.vc-links { display: grid; gap: 14px; }
.vc-link-row { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 6px 14px; align-items: center; }
.vc-link-row label { font-family: var(--vc-ui); font-weight: 700; font-size: 14px; }
.vc-link-row .vc-err { grid-column: 2; }
.vc-link-row.vc-bad .vc-input { border-color: var(--vc-err); }
.vc-check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; cursor: pointer; }
.vc-check input { width: 22px; height: 22px; accent-color: var(--vc-blue); flex: none; margin-top: 1px; }
.vc-check.vc-bad span { color: var(--vc-err); }
.vc-check small { display: block; color: var(--vc-muted); font-size: 13px; }
.vc-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.vc-note { border-left: 4px solid var(--vc-blue); background: var(--vc-mist); border-radius: 0 16px 16px 0; padding: 16px 20px; max-width: 640px; }
.vc-note span { font-family: var(--vc-ui); font-weight: 700; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--vc-blue); }
.vc-note p { margin-top: 6px; white-space: pre-line; }

.vc-aside { position: sticky; top: 104px; background: var(--vc-ink); color: var(--vc-paper); border-radius: 28px; padding: 26px; display: flex; flex-direction: column; gap: 18px; }
.vc-aside h3 { font-family: var(--vc-ui); font-weight: 800; font-size: 18px; }
.vc-aside ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.vc-aside li { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; color: rgba(255, 255, 255, .75); }
.vc-aside li b { font-family: var(--vc-ui); font-weight: 700; color: rgba(255, 255, 255, .45); font-variant-numeric: tabular-nums; }
.vc-aside li.vc-ok { color: var(--vc-paper); }
.vc-aside li.vc-ok b { color: var(--vc-yellow); }
.vc-aside .vc-btn { width: 100%; }
.vc-aside .vc-small { font-size: 12px; color: rgba(255, 255, 255, .55); }
.vc-form-error { background: rgba(196, 18, 47, 0.18); color: #ffb3c0; border-radius: 12px; padding: 10px 12px; font-size: 13px; font-weight: 600; }
.vc-form-error:empty { display: none; }

/* Notice (duplicate submission, expired link) */
.vc-notice { padding-block: clamp(32px, 6vw, 72px) 120px; }
.vc-notice-card { max-width: 640px; display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.vc-notice-card h1 { font-family: var(--vc-ui); font-weight: 800; font-size: clamp(30px, 4vw, 48px); letter-spacing: -0.03em; line-height: 1.05; }

/* Sent */
.vc-sent { padding-block: clamp(48px, 8vw, 110px) 120px; }
.vc-sent-card { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 26px; align-items: flex-start; }
.vc-tick { width: 72px; height: 72px; border-radius: 50%; background: var(--vc-yellow); display: grid; place-items: center; }
.vc-sent h1 { font-family: var(--vc-ui); font-weight: 800; font-size: clamp(36px, 5vw, 64px); letter-spacing: -0.04em; line-height: 1; }
.vc-sent h1 em.vc-serif { color: var(--vc-blue); }
.vc-receipt { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: baseline; background: var(--vc-mist); border-radius: 16px; padding: 16px 20px; width: 100%; }
.vc-receipt span { font-size: 13px; color: var(--vc-muted); }
.vc-receipt b { font-family: var(--vc-display); font-weight: 800; font-size: 20px; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; }
.vc-track { list-style: none; margin: 0; padding: 0; display: grid; width: 100%; }
.vc-track li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 16px; padding-bottom: 22px; position: relative; }
.vc-track li:not(:last-child)::before { content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--vc-line); }
.vc-dot { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--vc-line); background: var(--vc-paper); display: grid; place-items: center; font-size: 13px; font-weight: 800; }
.vc-track li.vc-done .vc-dot { background: var(--vc-ink); border-color: var(--vc-ink); color: var(--vc-yellow); }
.vc-track li.vc-now .vc-dot { border-color: var(--vc-blue); box-shadow: 0 0 0 5px rgba(18, 0, 255, .12); }
.vc-track b { font-family: var(--vc-ui); font-weight: 800; font-size: 16px; display: block; }
.vc-track span { font-size: 14px; color: var(--vc-muted); }

@media (max-width: 900px) {
  .vc-hero-grid { grid-template-columns: minmax(0, 1fr); }
  .vc-hero-sheet { padding-inline: 8px; }
  .vc-steps, .vc-req { grid-template-columns: minmax(0, 1fr); }
  .vc-form-grid { grid-template-columns: minmax(0, 1fr); }
  .vc-aside { position: static; }
}
@media (max-width: 560px) {
  .vc-fields { grid-template-columns: minmax(0, 1fr); }
  .vc-link-row { grid-template-columns: minmax(0, 1fr); }
  .vc-link-row .vc-err { grid-column: 1; }
  .vc-btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .vc-page * { transition: none !important; } }

/* ── The diploma: everything inside scales with the sheet width (cqw).
   Mirrors certificate_pdf.py; change both together. ── */
.cert-dip { container-type: inline-size; width: 100%; max-width: 100%; aspect-ratio: 297 / 210; background: var(--vc-paper); color: var(--vc-ink); position: relative; overflow: hidden; border-radius: 6px; font-family: var(--vc-body); line-height: 1.55; }
.cert-dip p { margin: 0; }
.cert-dip .dp { position: absolute; inset: 0; display: grid; grid-template-columns: 27% 1fr; }
.cert-dip .dp-side { background: var(--vc-yellow); position: relative; overflow: hidden; }
.cert-dip .dp-bigmark { position: absolute; width: 44cqw; height: auto; left: -15cqw; bottom: -12cqw; opacity: 0.94; }
.cert-dip .dp-vert { position: absolute; left: 3.2cqw; top: 3.6cqw; writing-mode: vertical-rl; transform: rotate(180deg); font-family: var(--vc-display); font-weight: 800; font-size: 1.2cqw; letter-spacing: 0.22em; text-transform: uppercase; white-space: nowrap; }
.cert-dip .dp-main { padding: 4.4cqw 5cqw 4cqw 8.6cqw; display: flex; flex-direction: column; min-width: 0; position: relative; }
.cert-dip .dp-main::after { content: ""; position: absolute; inset: 2.2cqw; border: 0.12cqw solid var(--vc-ink); pointer-events: none; }
.cert-dip .dp-top { display: flex; justify-content: space-between; align-items: center; gap: 2cqw; }
.cert-dip .dp-logo { height: 2.5cqw; width: auto; display: block; }
.cert-dip .dp-no { font-family: var(--vc-ui); font-weight: 700; font-size: 1.15cqw; letter-spacing: 0.12em; color: var(--vc-muted); font-variant-numeric: tabular-nums; }
.cert-dip .dp-body { margin-top: auto; margin-bottom: auto; display: flex; flex-direction: column; gap: 1.5cqw; }
.cert-dip .dp-kicker { font-family: var(--vc-ui); font-weight: 800; font-size: 1.45cqw; letter-spacing: 0.28em; text-transform: uppercase; color: var(--vc-blue); }
.cert-dip .dp-certifies { font-size: 1.55cqw; color: var(--vc-muted); }
.cert-dip .dp-name { font-family: var(--vc-serif); font-weight: 500; font-size: 6.2cqw; line-height: 1; letter-spacing: -0.02em; padding-bottom: 1.4cqw; border-bottom: 0.12cqw solid var(--vc-ink); overflow-wrap: anywhere; }
.cert-dip .dp-text { font-size: 1.5cqw; line-height: 1.5; max-width: 50ch; }
.cert-dip .dp-cred { align-self: flex-start; background: var(--vc-blue); color: var(--vc-paper); font-family: var(--vc-display); font-weight: 800; font-size: 1.4cqw; letter-spacing: 0.08em; text-transform: uppercase; border-radius: 99cqw; padding: 1cqw 2cqw; }
.cert-dip .dp-foot { display: grid; grid-template-columns: 1fr 1.4fr 1.2fr; gap: 2.4cqw; align-items: end; }
.cert-dip .dp-lbl { font-family: var(--vc-ui); font-weight: 700; font-size: 0.95cqw; letter-spacing: 0.16em; text-transform: uppercase; color: var(--vc-muted); }
.cert-dip .dp-val { font-family: var(--vc-ui); font-weight: 700; font-size: 1.35cqw; margin-top: 0.4cqw; overflow-wrap: anywhere; }
.cert-dip .dp-sig { display: flex; flex-direction: column; }
.cert-dip .dp-ink { height: 5cqw; display: flex; align-items: flex-end; justify-content: flex-start; padding-bottom: 0.3cqw; }
.cert-dip .dp-ink svg { height: 4.6cqw; width: auto; display: block; }
.cert-dip .dp-ink:has(img) { height: auto; }
.cert-dip .dp-ink img { height: 7.5cqw; max-width: 100%; width: auto; object-fit: contain; object-position: left bottom; display: block; }
.cert-dip .dp-rule { border-top: 0.12cqw solid var(--vc-ink); padding-top: 0.6cqw; }
.cert-dip .dp-seal { position: absolute; left: calc(27% - 7cqw); bottom: 7cqw; width: 14cqw; height: 14cqw; z-index: 2; }
.cert-dip .dp-seal svg { width: 100%; height: 100%; display: block; }
