:root {
  --ink: #0b1220;
  --muted: #5a6472;
  --paper: #ffffff;
  --border: #d7dde6;
  --accent: #0f2f57;
  --accent-soft: #e4ebf5;
  --seal: #0f3b64;
  --hero: #0b2441;
  --hero-light: #14426f;
  --gold: #c79a4b;
}

body {
  background: linear-gradient(180deg, #eef2f7 0%, #dde4f0 100%);
  color: var(--ink);
  font-family: "Manrope", "Segoe UI", sans-serif;
}

.hero-header {
  background: linear-gradient(rgba(10, 22, 38, 0.72), rgba(10, 22, 38, 0.72)),
    url("images/bappebti.jpg") center / cover no-repeat;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.hero-header::before {
  content: "";
  position: absolute;
  inset: -30% 10% auto auto;
  width: 460px;
  height: 460px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2), transparent 70%);
  opacity: 0.8;
}

.hero-header::after {
  content: "";
  position: absolute;
  inset: auto -15% -45% auto;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12), transparent 70%);
}

.hero-header .container {
  position: relative;
  z-index: 1;
}

.letter-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 24px 50px rgba(10, 27, 55, 0.2);
  position: relative;
  overflow: hidden;
}

.letter-edge {
  height: 6px;
  background: linear-gradient(90deg, var(--gold), #f5d59a, var(--accent));
  border-radius: 999px;
  margin-bottom: 1.8rem;
}

.letter-card::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid #e1e6ee;
  border-radius: 12px;
  pointer-events: none;
}

.letter-page {
  position: relative;
}

.letter-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 20% 20%, rgba(17, 52, 90, 0.06), transparent 55%),
    radial-gradient(circle at 80% 10%, rgba(17, 52, 90, 0.05), transparent 50%);
  opacity: 0.9;
  pointer-events: none;
}

.letter-page > .container {
  position: relative;
  z-index: 1;
}

.letter-title {
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  font-family: "Playfair Display", "Times New Roman", serif;
  font-size: 1.2rem;
  display: inline-block;
  padding: 10px 18px;
  border: 1px solid #d8dfe9;
  border-radius: 999px;
  background: #f8fafc;
}

.letter-title-main {
  font-family: "Playfair Display", "Times New Roman", serif;
  font-size: 1.75rem;
  font-weight: 700;
}

.seal {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.7);
  background: url("images/gg.jpg") center / cover no-repeat;
  box-shadow: 0 6px 16px rgba(2, 10, 24, 0.35);
  text-indent: -9999px;
  overflow: hidden;
}

.hero-tagline {
  max-width: 520px;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.85);
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.35);
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.3px;
}

.contact-card {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  padding: 20px 22px;
  box-shadow: 0 12px 30px rgba(2, 10, 24, 0.25);
}

.contact-card .text-uppercase {
  letter-spacing: 1px;
}

.contact-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
}

.letter-top {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.meta {
  font-size: 0.98rem;
  color: var(--muted);
}

.meta .label {
  display: inline-block;
  min-width: 86px;
  color: var(--ink);
}

.letter-body p {
  text-align: justify;
  text-indent: 32px;
  margin-bottom: 1rem;
  font-family: "Manrope", "Segoe UI", sans-serif;
}

.official-list {
  margin: 0 0 1rem 1.2rem;
  padding: 0;
}

.official-list li {
  margin-bottom: 0.4rem;
}

.letter-body ol {
  margin-left: 1.2rem;
}

.signature-space {
  height: 90px;
  background: url("images/ttd.jpg") left center / contain no-repeat;
}

footer {
  color: var(--muted);
}

@media (max-width: 576px) {
  .meta .label {
    min-width: 72px;
  }

  .letter-card {
    border-radius: 6px;
    padding: 24px !important;
  }

  .seal {
    width: 48px;
    height: 48px;
    font-size: 0.7rem;
  }

  .letter-title-main {
    font-size: 1.35rem;
  }

  .contact-card {
    padding: 16px 18px;
  }
}

@media (min-width: 992px) {
  .signature-space {
    height: 110px;
  }
}

@media print {
  body {
    background: #fff;
  }

  .letter-page::before {
    display: none;
  }

  header,
  footer {
    display: none;
  }

  .letter-card {
    box-shadow: none;
    border: none;
    padding: 0 !important;
  }

  .letter-card::before {
    display: none;
  }
}
