:root {
  --maroon: #8B1A1A;
  --maroon-dark: #5c0f0f;
  --maroon-light: #b52424;
  --gold: #C9A84C;
  --gold-light: #e8c96d;
  --gold-pale: #f5e8c0;
  --cream: #faf7f2;
  --white: #ffffff;
  --text: #1a1212;
  --text-muted: #7a6e6e;
  --border: #e8ddd4;
  --success: #2d7a4f;
}

    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

    html { scroll-behavior: smooth; }

    body {
      font-family: 'DM Sans', sans-serif;
      background: var(--cream);
      color: var(--text);
      overflow-x: hidden;
    }

/* ============================
   HEADER
============================ */
.header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(250, 247, 242, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1300px;
  margin: auto;
  height: 80px;
  padding: 0 22px;

  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ============================
   LOGO
============================ */
.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-width: 0;
}

.logo-img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: white;
  padding: 3px;
  flex-shrink: 0;
}

.logo-texts {
  display: flex;
  flex-direction: column;
}

.logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--maroon);
  letter-spacing: 2px;
  line-height: 1;
}

.full-name {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-top: 2px;
}

/* ============================
   NAVIGATION
============================ */
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.nav-links li a {
  text-decoration: none;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 40px;
  transition: .25s ease;
  display: block;
}

.nav-links li a:hover {
  background: var(--maroon);
  color: white;
}

/* ============================
   MENU BUTTON
============================ */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 30px;
  color: var(--maroon);
  cursor: pointer;
}

/* ============================
   MOBILE
============================ */
@media (max-width: 768px) {

  .header-inner {
    height: 72px;
    padding: 0 16px;
  }

  .logo-img {
    width: 42px;
    height: 42px;
  }

  .logo-text {
    font-size: 18px;
  }

  .full-name {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .nav {
    position: absolute;
    top: 72px;
    left: 0;
    width: 100%;
    background: white;

    border-bottom: 1px solid var(--border);

    max-height: 0;
    overflow: hidden;

    transition: max-height .35s ease;
  }

  .nav.active {
    max-height: 400px;
  }

  .nav-links {
    flex-direction: column;
    width: 100%;
    padding: 16px;
    gap: 10px;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links li a {
    width: 100%;
    text-align: center;
    background: #f7f7f7;
    border-radius: 12px;
    padding: 14px;
  }

  .nav-links li a:hover {
    background: var(--maroon);
  }
}
/* ============================
   PAGE HERO BAND
============================ */
.page-hero {
  background: linear-gradient(120deg, var(--maroon-dark) 0%, var(--maroon) 60%, #a52828 100%);
  padding: 64px 48px;
  position: relative; overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute; top: -100px; right: -100px;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: rgba(201,168,76,0.07); pointer-events: none;
}

.page-hero::after {
  content: "";
  position: absolute; bottom: -80px; left: 20%;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: rgba(255,255,255,0.03); pointer-events: none;
}

.page-hero-inner {
  max-width: 860px; margin: 0 auto; position: relative; z-index: 1;
  text-align: center;
  animation: fadeUp 0.8s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(201,168,76,0.15);
  border: 1px solid rgba(201,168,76,0.35);
  border-radius: 40px; padding: 5px 16px;
  font-size: 11px; font-weight: 700;
  color: var(--gold-light); letter-spacing: 2.5px;
  text-transform: uppercase; margin-bottom: 20px;
}

.hero-eyebrow::before {
  content: ""; width: 6px; height: 6px;
  background: var(--gold); border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.6); }
}

.page-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: 48px; font-weight: 800;
  color: white; line-height: 1.1;
  letter-spacing: -0.5px; margin-bottom: 14px;
}

.page-hero-theme {
  font-style: italic; font-size: 15px;
  color: var(--gold-light); opacity: 0.9;
  line-height: 1.6; margin-bottom: 20px;
  font-weight: 300;
}

.page-hero-meta {
  display: flex; align-items: center; justify-content: center; gap: 32px;
  flex-wrap: wrap; margin-top: 24px; padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.meta-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: rgba(255,255,255,0.75); font-weight: 400;
}

.meta-item svg {
  width: 15px; height: 15px; stroke: var(--gold);
  fill: none; stroke-width: 2; flex-shrink: 0;
}

/* ============================
   MAIN CONTAINER
============================ */
.container {
  max-width: 860px; margin: 48px auto 80px;
  padding: 0 24px;
}

/* Scale card */
.scale-card {
  background: white;
  border: 1px solid var(--border);
  border-left: 4px solid var(--gold);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 40px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.scale-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 16px; color: var(--maroon);
  font-weight: 700; margin-bottom: 12px;
  letter-spacing: 0.3px;
  border: none; padding: 0; margin-top: 0;
}

.scale-items {
  display: flex; flex-wrap: wrap; gap: 10px;
}

.scale-badge {
  display: flex; align-items: center; gap: 8px;
  background: #faf7f2;
  border: 1px solid var(--border);
  border-radius: 8px; padding: 7px 14px;
  font-size: 12px; font-weight: 500; color: #555;
}

.scale-badge .num {
  font-family: 'DM Mono', monospace;
  font-size: 15px; font-weight: 700;
  color: var(--maroon); min-width: 16px;
}

/* Instructions */
.instructions-box {
  background: rgba(201,168,76,0.07);
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: 12px; padding: 20px 24px;
  margin-bottom: 40px;
  font-size: 13px; line-height: 1.8; color: #555;
}

.instructions-box strong { color: var(--maroon); }

/* ============================
   FORM SECTIONS
============================ */
.form-section {
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-bottom: 28px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0,0,0,0.04);
  animation: fadeUp 0.5s ease both;
}

.form-section:nth-child(2) { animation-delay: 0.1s; }
.form-section:nth-child(3) { animation-delay: 0.2s; }
.form-section:nth-child(4) { animation-delay: 0.3s; }

.section-header {
  background: linear-gradient(90deg, var(--maroon), var(--maroon-light));
  padding: 16px 28px;
  display: flex; align-items: center; gap: 12px;
}

.section-num {
  width: 28px; height: 28px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%; display: flex;
  align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: white;
  flex-shrink: 0;
}

.section-header h3 {
  font-family: 'Playfair Display', serif;
  font-size: 17px; font-weight: 700;
  color: white; letter-spacing: 0.3px;
  border: none; padding: 0; margin: 0;
}

.section-body { padding: 28px; }

/* Field label */
.field-label {
  font-size: 12px; font-weight: 700;
  color: var(--maroon); text-transform: uppercase;
  letter-spacing: 1.5px; margin-bottom: 10px;
  margin-top: 22px; display: block;
}

.field-label:first-child { margin-top: 0; }

/* Text inputs */
input[type="text"],
input[type="email"],
textarea {
  width: 100%; padding: 13px 16px;
  border: 1.5px solid #e5ddd4;
  border-radius: 8px; background: white;
  font-size: 13.5px; font-family: 'DM Sans', sans-serif;
  color: var(--text); transition: all 0.2s ease;
  outline: none;
}

input:focus, textarea:focus {
  border-color: var(--maroon);
  box-shadow: 0 0 0 3px rgba(139,26,26,0.08);
}

input::placeholder, textarea::placeholder { color: #bbb; }

textarea { min-height: 100px; resize: vertical; }

/* Checkbox grid */
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
}

.check-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border: 1.5px solid #e5ddd4;
  border-radius: 8px; cursor: pointer;
  transition: all 0.2s ease;
  font-size: 13px; color: #555;
  user-select: none;
}

.check-item:hover { border-color: var(--gold); background: rgba(201,168,76,0.05); }

.check-item input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--maroon);
  flex-shrink: 0; cursor: pointer;
  margin: 0; padding: 0; border: none;
}

.check-item.checked {
  border-color: var(--maroon);
  background: rgba(139,26,26,0.04);
  color: var(--maroon); font-weight: 500;
}

/* ============================
   RATING QUESTIONS
============================ */
.rating-block {
  padding: 18px 0;
  border-bottom: 1px solid #f0ebe4;
}

.rating-block:last-child { border-bottom: none; padding-bottom: 0; }

.rating-question {
  font-size: 14px; font-weight: 500;
  color: var(--text); margin-bottom: 14px;
  line-height: 1.5;
}

.rating-question span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px;
  background: var(--gold-pale); border-radius: 50%;
  font-size: 11px; font-weight: 700;
  color: var(--maroon); margin-right: 8px; flex-shrink: 0;
}

.rating-row {
  display: flex; gap: 10px; flex-wrap: wrap;
}

.rating-option {
  flex: 1; min-width: 70px;
}

.rating-option input[type="radio"] { display: none; }

.rating-option label {
  display: flex; flex-direction: column; align-items: center;
  gap: 4px; padding: 10px 8px;
  border: 1.5px solid #e5ddd4;
  border-radius: 10px; cursor: pointer;
  transition: all 0.2s ease; font-size: 11px;
  color: #888; text-align: center; line-height: 1.3;
  background: white;
}

.rating-option label .score {
  font-family: 'DM Mono', monospace;
  font-size: 18px; font-weight: 700;
  color: #bbb; line-height: 1;
  transition: all 0.2s ease;
}

.rating-option input:checked + label {
  border-color: var(--maroon);
  background: linear-gradient(135deg, rgba(139,26,26,0.06), rgba(201,168,76,0.06));
  color: var(--maroon);
}

.rating-option input:checked + label .score {
  color: var(--maroon);
}

.rating-option label:hover {
  border-color: var(--gold);
  background: rgba(201,168,76,0.05);
}

.rating-option label:hover .score { color: var(--gold); }

/* ============================
   EMAIL CERTIFICATE SECTION
============================ */
.cert-section {
  background: linear-gradient(135deg, var(--maroon-dark), var(--maroon));
  border-radius: 16px; padding: 32px 28px;
  margin-top: 8px; position: relative; overflow: hidden;
  box-shadow: 0 8px 32px rgba(139,26,26,0.2);
}

.cert-section::before {
  content: "";
  position: absolute; top: -60px; right: -60px;
  width: 200px; height: 200px; border-radius: 50%;
  background: rgba(201,168,76,0.08); pointer-events: none;
}

.cert-section::after {
  content: "";
  position: absolute; bottom: -40px; left: -40px;
  width: 150px; height: 150px; border-radius: 50%;
  background: rgba(255,255,255,0.03); pointer-events: none;
}

.cert-header {
  display: flex; align-items: flex-start; gap: 16px;
  margin-bottom: 24px; position: relative; z-index: 1;
}

.cert-icon {
  width: 48px; height: 48px; flex-shrink: 0;
  background: rgba(201,168,76,0.2);
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
}

.cert-icon svg {
  width: 24px; height: 24px;
  stroke: var(--gold-light); fill: none; stroke-width: 1.5;
}

.cert-header-text h4 {
  font-family: 'Playfair Display', serif;
  font-size: 20px; font-weight: 700;
  color: white; margin-bottom: 4px;
}

.cert-header-text p {
  font-size: 13px; color: rgba(255,255,255,0.65);
  line-height: 1.5;
}

.cert-fields { position: relative; z-index: 1; }

.cert-field-label {
  font-size: 11px; font-weight: 700;
  color: var(--gold); letter-spacing: 2px;
  text-transform: uppercase; margin-bottom: 8px;
  display: block;
}

.cert-input {
  width: 100%; padding: 13px 16px;
  border: 1.5px solid rgba(201,168,76,0.25);
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  font-size: 13.5px; font-family: 'DM Sans', sans-serif;
  color: white; outline: none;
  transition: all 0.2s ease; margin-bottom: 16px;
}

.cert-input::placeholder { color: rgba(255,255,255,0.35); }

.cert-input:focus {
  border-color: var(--gold);
  background: rgba(255,255,255,0.12);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.15);
}

.cert-note {
  font-size: 12px; color: rgba(255,255,255,0.5);
  line-height: 1.6; margin-bottom: 0;
  padding: 12px 14px;
  background: rgba(0,0,0,0.15);
  border-radius: 8px;
  border-left: 3px solid var(--gold);
}

/* ============================
   SUBMIT AREA
============================ */
.submit-area {
  margin-top: 32px; text-align: center;
}

.btn-submit {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--maroon);
  color: white; border: none;
  padding: 18px 52px; border-radius: 8px;
  font-size: 14px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  cursor: pointer; font-family: 'DM Sans', sans-serif;
  box-shadow: 0 8px 28px rgba(139,26,26,0.25);
  transition: all 0.3s ease; position: relative;
}

.btn-submit:hover {
  background: var(--maroon-dark);
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(139,26,26,0.3);
}

.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-submit svg {
  width: 18px; height: 18px;
  stroke: currentColor; fill: none; stroke-width: 2;
}

.submit-note {
  margin-top: 14px;
  font-size: 12px; color: var(--text-muted);
}

/* ============================
   SUCCESS TOAST
============================ */
.toast {
  position: fixed; bottom: 32px; right: 32px;
  background: white;
  border: 1px solid var(--border);
  border-left: 4px solid var(--success);
  border-radius: 12px; padding: 18px 24px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.12);
  display: flex; align-items: flex-start; gap: 14px;
  max-width: 380px; z-index: 9999;
  transform: translateX(120%);
  transition: transform 0.45s cubic-bezier(0.23, 1, 0.32, 1);
}

.toast.show { transform: translateX(0); }

.toast-icon {
  width: 36px; height: 36px; flex-shrink: 0;
  background: rgba(45,122,79,0.1); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

.toast-icon svg {
  width: 18px; height: 18px;
  stroke: var(--success); fill: none; stroke-width: 2.5;
}

.toast-body h4 {
  font-size: 14px; font-weight: 700;
  color: var(--text); margin-bottom: 3px;
}

.toast-body p { font-size: 12px; color: var(--text-muted); line-height: 1.5; }

/* ============================
   PROGRESS BAR
============================ */
.progress-bar-wrap {
  height: 3px; background: var(--border);
  position: sticky; top: 80px; z-index: 800;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--maroon), var(--gold));
  width: 0%;
  transition: width 0.3s ease;
}

/* ============================
   RESPONSIVE
============================ */
@media (max-width: 768px) {
  .page-hero { padding: 48px 24px; }
  .page-hero h1 { font-size: 32px; }
  .page-hero-meta { gap: 16px; }
  .container { margin: 32px auto 60px; }
  .section-body { padding: 20px; }
  .checkbox-grid { grid-template-columns: 1fr 1fr; }
  .rating-row { gap: 6px; }
  .rating-option label { padding: 8px 4px; }
  .rating-option label .score { font-size: 15px; }
  .full-name { display: none; }
  .btn-submit { padding: 16px 36px; }
}

@media (max-width: 480px) {
  .checkbox-grid { grid-template-columns: 1fr; }
  .scale-items { flex-direction: column; }
  .page-hero h1 { font-size: 26px; }
}

/* ── TOAST ── */
.toast{position:fixed;bottom:1.5rem;left:50%;transform:translateX(-50%) translateY(80px);background:var(--navy);color:#fff;padding:.65rem 1.4rem;border-radius:8px;font-size:.88rem;font-weight:500;z-index:9999;opacity:0;transition:all .3s;pointer-events:none;}
.toast.show{opacity:1;transform:translateX(-50%) translateY(0);}
.toast.error{background:var(--error);}
<div id="toast" class="toast"></div>

/* ══════════════════════════════════════════
   CERTIFICATE GENERATOR SECTION
══════════════════════════════════════════ */
.cert-section{max-width:760px;margin:0 auto 4rem;background:#fff;border-radius:20px;box-shadow:var(--shadow);overflow:hidden;}
.cert-section-header{background:linear-gradient(135deg,var(--navy),var(--navy-mid));color:#fff;padding:2rem;text-align:center;border-bottom:3px solid var(--gold);}
.cert-section-header h2{font-family:'Playfair Display',serif;font-size:1.5rem;font-weight:800;margin-bottom:.4rem;}
.cert-section-header p{opacity:.75;font-size:.88rem;}
.cert-body{padding:2rem;}

/* Certificate type grid */
.cert-types{display:grid;grid-template-columns:1fr 1fr;gap:1rem;margin-bottom:1.8rem;}
@media(max-width:520px){.cert-types{grid-template-columns:1fr;}}
.cert-type-card{border:2px solid var(--border);border-radius:12px;padding:1.2rem;cursor:pointer;transition:all .25s;text-align:center;position:relative;}
.cert-type-card:hover{border-color:var(--gold-light);background:rgba(201,151,58,.04);}
.cert-type-card.selected{border-color:var(--gold);background:rgba(201,151,58,.08);box-shadow:0 0 0 3px rgba(201,151,58,.2);}
.cert-type-card input[type=radio]{position:absolute;opacity:0;pointer-events:none;}
.cert-type-icon{font-size:2rem;margin-bottom:.5rem;}
.cert-type-name{font-weight:700;font-size:.9rem;color:var(--navy);}
.cert-type-desc{font-size:.75rem;color:var(--muted);margin-top:.25rem;line-height:1.4;}
.cert-check{position:absolute;top:.6rem;right:.6rem;width:20px;height:20px;border-radius:50%;border:2px solid var(--border);background:#fff;display:flex;align-items:center;justify-content:center;font-size:.6rem;transition:all .2s;}
.cert-type-card.selected .cert-check{background:var(--gold);border-color:var(--gold);color:#fff;}

/* Ref ID input */
.cert-ref-group{display:flex;gap:.75rem;align-items:flex-end;flex-wrap:wrap;}
.cert-ref-group .field{flex:1;min-width:200px;}
.cert-ref-group .btn{white-space:nowrap;padding:.7rem 1.5rem;}

/* Cert result */
.cert-result{display:none;margin-top:1.5rem;border:1px solid var(--border);border-radius:12px;overflow:hidden;}
.cert-result.show{display:block;}
.cert-result-header{padding:.9rem 1.2rem;background:var(--cream);display:flex;align-items:center;gap:.6rem;border-bottom:1px solid var(--border);}
.cert-result-header .status-dot{width:10px;height:10px;border-radius:50%;background:var(--success);}
.cert-result-header span{font-weight:600;font-size:.88rem;color:var(--navy);}
.cert-preview{padding:1.5rem;text-align:center;}
.cert-preview-badge{font-family:'Playfair Display',serif;font-size:.9rem;color:var(--muted);margin-bottom.5rem;}
.cert-download-btn{display:inline-flex;align-items:center;gap:.5rem;margin-top:1rem;background:var(--gold);color:var(--navy);padding:.7rem 1.6rem;border-radius:8px;font-weight:700;font-size:.9rem;cursor:pointer;border:none;transition:all .2s;}
.cert-download-btn:hover{background:var(--gold-light);transform:translateY(-1px);}
.cert-invalid{padding:1.2rem;text-align:center;color:var(--error);font-size:.88rem;font-weight:600;}
/* ── FOOTER ── */
footer {
  background: var(--maroon-dark);
  color: rgba(255,255,255,.5);
  text-align: center;
  padding: 1.4rem;
  font-size: .78rem;
  border-top: 3px solid var(--gold);
}
footer span { color: var(--gold-light); font-weight: 500; }
