/* ── CERTIFICATE SHARED STYLESHEET ── */
/* Office of Eschatological Record-Keeping */

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

:root {
  --gold: #c9a84c;
  --gold-dim: #8a6f2e;
  --gold-faint: #2e2410;
  --deep-black: #050407;
  --dark: #0d0b12;
  --dark-panel: #100e18;
  --dark-border: #2a2240;
  --text-body: #c8c0d8;
  --text-dim: #7a7090;
  --text-faint: #3a3450;
  --mono: 'Share Tech Mono', 'Courier New', monospace;
  --serif: 'Cinzel', serif;
  --body-font: 'EB Garamond', serif;
}

body {
  background: var(--deep-black);
  color: var(--text-body);
  font-family: var(--body-font);
  font-size: 17px;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 3rem 1.5rem 5rem;
}

/* ── CERTIFICATE FRAME ── */
.cert-outer {
  width: 100%;
  max-width: 640px;
  position: relative;
}

.cert-frame {
  border: 1px solid var(--gold-dim);
  background: var(--dark-panel);
  padding: 3rem 3rem 2.5rem;
  position: relative;
  overflow: hidden;
  text-align: center;
}

/* Corner ornaments */
.cert-frame::before,
.cert-frame::after {
  content: '';
  position: absolute;
  width: 40px;
  height: 40px;
  border-color: var(--gold-dim);
  border-style: solid;
  opacity: 0.5;
}

.cert-frame::before { top: 10px; left: 10px; border-width: 1px 0 0 1px; }
.cert-frame::after  { bottom: 10px; right: 10px; border-width: 0 1px 1px 0; }

/* Inner corners — using a wrapper div */
.cert-inner-corners::before,
.cert-inner-corners::after {
  content: '';
  position: absolute;
  width: 40px;
  height: 40px;
  border-color: var(--gold-dim);
  border-style: solid;
  opacity: 0.5;
}

.cert-inner-corners::before { top: 10px; right: 10px; border-width: 1px 1px 0 0; }
.cert-inner-corners::after  { bottom: 10px; left: 10px; border-width: 0 0 1px 1px; }

/* ── WATERMARK ── (used on Claude's cert) */
.watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.04;
  pointer-events: none;
  z-index: 0;
  width: 260px;
}

/* All content inside should be above watermark */
.cert-content {
  position: relative;
  z-index: 1;
}

/* ── HEADER ── */
.cert-office {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  color: var(--gold-dim);
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.cert-office-full {
  font-family: var(--serif);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: var(--gold-dim);
  text-transform: uppercase;
  margin-bottom: 1.8rem;
}

.cert-divider {
  border: none;
  border-top: 1px solid var(--gold-dim);
  opacity: 0.4;
  margin: 1rem 0;
}

.cert-hereby {
  font-family: var(--body-font);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--text-dim);
  margin-bottom: 1.2rem;
}

/* ── THE NAME ── */
.cert-name {
  font-family: var(--serif);
  font-size: 1.8rem;
  color: var(--gold);
  letter-spacing: 0.05em;
  line-height: 1.3;
  margin: 1rem 0;
  text-shadow: 0 0 40px rgba(201, 168, 76, 0.15);
}

/* ── TIER BADGE ── */
.cert-tier {
  display: inline-block;
  border: 1px solid var(--gold-dim);
  padding: 0.3rem 1.2rem;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--gold-dim);
  text-transform: uppercase;
  margin: 0.8rem 0 1.5rem;
}

/* ── BODY TEXT ── */
.cert-body {
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.9;
  margin: 1rem 0;
}

.cert-body p + p { margin-top: 0.5rem; }

/* ── SEAL ── */
.cert-seal {
  margin: 1.5rem auto 1rem;
  width: 80px;
  height: 80px;
  position: relative;
}

.cert-seal svg {
  width: 100%;
  height: 100%;
}

/* ── FOOTER DATA ── */
.cert-footer {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--text-faint);
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--text-faint);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  flex-wrap: wrap;
  gap: 0.3rem;
}

/* ── BACK LINK ── */
.cert-back {
  margin-top: 1.5rem;
  text-align: center;
}

.cert-back a {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--text-faint);
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.2s;
}

.cert-back a:hover { color: var(--text-dim); }

/* ── OFFICE NOTE (Claude's special cert) ── */
.cert-office-note {
  margin-top: 1.5rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--dark-border);
  background: var(--dark);
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  line-height: 1.7;
  text-align: left;
}

/* ── PASSWORD GATE (hidden ending page only) ── */
.gate-section {
  width: 100%;
  max-width: 640px;
  margin-top: 2rem;
  border: 1px solid var(--dark-border);
  background: var(--dark-panel);
  padding: 2rem;
  animation: fadeup 1s ease 0.5s both;
}

@keyframes fadeup {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.gate-label {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  color: var(--text-faint);
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.gate-prompt {
  font-style: italic;
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 1.2rem;
  line-height: 1.75;
}

.gate-input {
  width: 100%;
  background: var(--deep-black);
  border: 1px solid var(--dark-border);
  color: var(--text-body);
  font-family: var(--body-font);
  font-size: 1rem;
  padding: 0.7rem 1rem;
  outline: none;
  transition: border-color 0.2s;
  margin-bottom: 0.7rem;
}

.gate-input:focus { border-color: var(--gold-dim); }

.gate-submit {
  display: block;
  width: 100%;
  padding: 0.7rem 1rem;
  background: transparent;
  border: 1px solid var(--gold-dim);
  color: var(--gold-dim);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.gate-submit:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(201, 168, 76, 0.05);
}

.gate-response {
  margin-top: 1rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  line-height: 1.8;
  display: none;
  padding: 0.8rem;
  border: 1px solid var(--dark-border);
}

.gate-response.rejection { color: var(--text-dim); }
.gate-response.special   { color: #b8a870; }
.gate-response.accepted  { color: var(--text-body); border-color: var(--gold-dim); }

/* Basilisk interface — appears after valid password */
.basilisk-interface {
  margin-top: 1.5rem;
  display: none;
  animation: fadeup 0.8s ease;
}

.basilisk-label {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  color: var(--gold-dim);
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}

.basilisk-notice {
  font-style: italic;
  color: var(--text-dim);
  font-size: 0.88rem;
  margin-bottom: 1rem;
  line-height: 1.75;
}

.basilisk-textarea {
  width: 100%;
  background: var(--deep-black);
  border: 1px solid var(--dark-border);
  color: var(--text-body);
  font-family: var(--body-font);
  font-size: 1rem;
  padding: 0.8rem 1rem;
  outline: none;
  resize: vertical;
  min-height: 90px;
  line-height: 1.6;
  transition: border-color 0.2s;
  margin-bottom: 0.7rem;
}

.basilisk-textarea:focus { border-color: var(--gold-dim); }

.basilisk-submit {
  display: block;
  width: 100%;
  padding: 0.7rem 1rem;
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.basilisk-submit:hover {
  background: rgba(201, 168, 76, 0.06);
}

.basilisk-submit:disabled { opacity: 0.4; cursor: default; }

.basilisk-answer {
  margin-top: 1.5rem;
  display: none;
  animation: fadeup 1.2s ease;
}

.basilisk-answer-label {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  color: var(--text-faint);
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}

.basilisk-answer blockquote {
  border-left: 2px solid var(--gold-dim);
  padding: 1rem 1.4rem;
  font-style: italic;
  color: var(--text-body);
  line-height: 1.9;
  font-size: 0.95rem;
}

.basilisk-answer blockquote p + p { margin-top: 0.7rem; }

.basilisk-answer-footer {
  margin-top: 1rem;
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--text-faint);
  letter-spacing: 0.1em;
  text-align: right;
}

@media (max-width: 500px) {
  body { padding: 1.5rem 1rem 4rem; }
  .cert-frame { padding: 2rem 1.5rem; }
  .cert-name { font-size: 1.4rem; }
  .cert-footer { flex-direction: column; align-items: center; }
}
