/* DRMA — professional maritime design system */

:root {
  --navy: #0B2D42;
  --registry: #145A7A;
  --caribbean: #1E7A9C;
  --ensign: #C8102E;
  --line: #E2E0DA;
  --paper: #FAFAF8;
  --paperdim: #F3F1EC;
  --muted: #5C6670;
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --container-max: 1280px;
}

/* ── Site container (max 1280px) ── */
.site-wrap {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}
@media (min-width: 640px) {
  .site-wrap { padding-left: 1.5rem; padding-right: 1.5rem; }
}

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: #fff; color: var(--navy);
  padding: 0.75rem 1.25rem; font-weight: 600; font-size: 0.875rem;
}
.skip-link:focus { left: 1rem; top: 1rem; }

:focus-visible, .focus-ring:focus-visible {
  outline: 2px solid var(--registry);
  outline-offset: 2px;
}

/* ── Header ── */
.site-header.is-scrolled {
  box-shadow: 0 4px 20px rgba(11, 45, 66, 0.1);
}

.nav-link {
  padding: 0.45rem 0.65rem;
  color: var(--navy);
  font-weight: 500;
  font-size: 0.875rem;
  border-radius: 4px;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}
.nav-link:hover {
  color: var(--registry);
  background: rgba(20, 90, 122, 0.06);
}
.nav-link--active {
  color: var(--registry);
  font-weight: 600;
}

/* Short labels on lg screens, full labels on xl+ */
.nav-link__short { display: none; }
@media (min-width: 1024px) and (max-width: 1279px) {
  .nav-link { font-size: 0.8125rem; padding: 0.4rem 0.5rem; }
  .nav-link__full { display: none; }
  .nav-link__short { display: inline; }
}

/* ── Sidebar (mobile / tablet) ── */
.sidebar-overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(11, 45, 66, 0.45);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  pointer-events: none;
}
.sidebar-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}
.sidebar-overlay[hidden] { display: block; visibility: hidden; }
.sidebar-overlay.is-open[hidden] { visibility: visible; }

.sidebar {
  position: fixed; top: 0; right: 0; z-index: 70;
  width: min(320px, 88vw);
  height: 100%;
  height: 100dvh;
  background: #fff;
  border-left: 1px solid var(--line);
  box-shadow: -8px 0 40px rgba(11, 45, 66, 0.12);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.32s var(--ease);
  visibility: hidden;
}
.sidebar.is-open {
  transform: translateX(0);
  visibility: visible;
}

.sidebar__head {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid var(--line);
}
.sidebar__close {
  padding: 0.35rem;
  color: var(--navy);
  border-radius: 6px;
  transition: background 0.15s;
}
.sidebar__close:hover { background: var(--paperdim); }

.sidebar__nav {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 0.75rem;
}
.sidebar__link {
  display: block;
  padding: 0.85rem 1rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--navy);
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}
.sidebar__link:hover {
  background: rgba(20, 90, 122, 0.06);
  color: var(--registry);
}
.sidebar__link--active {
  background: rgba(20, 90, 122, 0.1);
  color: var(--registry);
  font-weight: 600;
}

.sidebar__foot {
  padding: 1rem 1.25rem 1.5rem;
  border-top: 1px solid var(--line);
  background: var(--paper);
}

body.sidebar-open { overflow: hidden; }

/* ── Footer ── */
.site-footer {
  background: linear-gradient(180deg, var(--navy) 0%, #081f2e 100%);
  color: #fff;
  margin-top: 0;
}
.site-footer__bar {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-heading {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 1rem;
}
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.footer-links a {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.15s;
}
.footer-links a:hover { color: #fff; }

/* ── Buttons ── */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  background: var(--navy); color: #fff;
  font-weight: 600; border-radius: 6px;
  transition: background 0.15s, transform 0.15s;
}
.btn-primary:hover { background: var(--registry); }

.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  background: #fff; color: var(--navy);
  font-weight: 600; border: 1px solid var(--line);
  border-radius: 6px;
  transition: border-color 0.15s, background 0.15s;
}
.btn-secondary:hover { border-color: var(--registry); background: var(--paper); }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 0.35rem;
  color: var(--registry); font-weight: 600; font-size: 0.9375rem;
  transition: color 0.15s;
}
.btn-ghost:hover { color: var(--ensign); }

/* ── Hero (home) ── */
.hero {
  position: relative;
  overflow: hidden;
}

.hero--photo {
  min-height: clamp(36rem, 82vh, 46rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: var(--navy);
  background-image: var(--hero-bg);
  background-size: cover;
  background-position: 72% center;
  background-repeat: no-repeat;
  padding-bottom: 7rem;
}
@media (min-width: 768px) {
  .hero--photo { padding-bottom: 8.5rem; }
}

.hero--photo__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    102deg,
    rgba(250, 250, 248, 0.97) 0%,
    rgba(250, 250, 248, 0.9) 32%,
    rgba(250, 250, 248, 0.55) 48%,
    rgba(11, 45, 66, 0.12) 72%,
    rgba(11, 45, 66, 0.28) 100%
  );
  pointer-events: none;
}

.hero--photo__content {
  position: relative;
  z-index: 1;
  padding-top: 2.5rem;
  padding-bottom: 1.5rem;
}
@media (min-width: 768px) {
  .hero--photo__content {
    padding-top: 3rem;
    padding-bottom: 2rem;
  }
}

.hero-eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--registry);
}

.hero--photo__title {
  font-size: clamp(2rem, 4.8vw, 3.35rem);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.btn-discover {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--ensign);
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.9rem 1.5rem;
  border-radius: 999px;
  transition: background 0.15s;
}
.btn-discover:hover {
  background: #a50d24;
}

.hero-trust-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1.25rem;
  z-index: 2;
}
@media (min-width: 768px) {
  .hero-trust-bar { bottom: 1.75rem; }
}

.hero-trust-bar__card {
  background: #0a2540;
  border-radius: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.32);
  overflow: hidden;
}

.hero-trust-bar__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
@media (min-width: 640px) {
  .hero-trust-bar__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .hero-trust-bar__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.hero-trust-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 1.25rem;
  color: #fff;
}
@media (min-width: 640px) {
  .hero-trust-item { padding: 1.65rem 1.5rem; }
}
@media (min-width: 1024px) {
  .hero-trust-item { padding: 1.75rem 2rem; gap: 1.1rem; }
}

.hero-trust-item__icon {
  flex-shrink: 0;
  color: #fff;
  width: 2.5rem;
  height: 2.5rem;
}
@media (min-width: 1024px) {
  .hero-trust-item__icon { width: 2.75rem; height: 2.75rem; }
}
.hero-trust-item__icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-trust-item__title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.25;
  color: #fff;
}
.hero-trust-item__desc {
  font-size: 0.75rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.78);
  margin-top: 0.2rem;
  line-height: 1.4;
}
@media (min-width: 1024px) {
  .hero-trust-item__title { font-size: 0.8125rem; }
  .hero-trust-item__desc { font-size: 0.8125rem; }
}

/* ── Inline SVG ── */
.svg-illustration { width: 100%; line-height: 0; }
.svg-illustration svg { display: block; width: 100%; height: auto; }

.hero-illustration svg {
  border-radius: 12px;
  box-shadow: 0 24px 60px -16px rgba(11, 45, 66, 0.28);
}

.illus-panel svg {
  border-radius: 10px;
  border: 1px solid var(--line);
  box-shadow: 0 8px 30px -8px rgba(11, 45, 66, 0.1);
}

.page-hero__illus svg {
  border-radius: 8px;
  box-shadow: 0 12px 40px -8px rgba(0, 0, 0, 0.25);
}

.service-card__icon svg { width: 48px; height: 48px; display: block; }

/* ── Page hero (inner pages) ── */
.page-hero {
  position: relative;
  background: linear-gradient(135deg, var(--navy) 0%, #0e3d5a 50%, var(--registry) 100%);
  overflow: hidden;
}
.page-hero__bg {
  position: absolute; inset: 0;
  color: #fff;
  pointer-events: none;
}
.page-hero__waves {
  position: absolute; bottom: 0; left: 0; width: 100%; height: 80px;
}

/* ── Trust bar ── */
.trust-bar {
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.trust-item {
  padding: 1.25rem 1rem;
  text-align: center;
  border-right: 1px solid var(--line);
}
.trust-item:last-child { border-right: none; }

/* ── Service cards ── */
.service-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.75rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}
.service-card:hover {
  border-color: rgba(20, 90, 122, 0.35);
  box-shadow: 0 12px 40px -10px rgba(11, 45, 66, 0.12);
  transform: translateY(-3px);
}

.service-card__icon img {
  width: 48px; height: 48px;
  display: block;
}

/* ── Content blocks ── */
.section-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--registry);
}

.content-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.75rem;
}

.vision-mission-card {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--registry);
  border-radius: 0 8px 8px 0;
  padding: 1.5rem 1.75rem;
}

.info-panel {
  background: var(--navy);
  color: #fff;
  border-radius: 8px;
  padding: 2rem;
}

.step-list li {
  display: flex; gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.step-list li:last-child { border-bottom: none; padding-bottom: 0; }
.step-list__num {
  flex-shrink: 0;
  width: 1.75rem; height: 1.75rem;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.12);
  border-radius: 6px;
  font-size: 0.75rem; font-weight: 700;
}

/* ── Requirements list ── */
.req-section { scroll-margin-top: 5.5rem; }

.req-nav {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
}
.req-nav a {
  font-size: 0.8125rem; font-weight: 500;
  padding: 0.5rem 1rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--navy);
  background: #fff;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.req-nav a:hover {
  border-color: var(--registry);
  color: var(--registry);
  background: rgba(20, 90, 122, 0.04);
}

.req-list {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.req-list li {
  display: flex; gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--muted);
}
.req-list li:last-child { border-bottom: none; }
.req-list__num {
  flex-shrink: 0;
  font-size: 0.75rem; font-weight: 700;
  color: var(--registry);
  width: 1.5rem;
  padding-top: 0.15rem;
}

.note-box {
  background: rgba(200, 16, 46, 0.04);
  border: 1px solid rgba(200, 16, 46, 0.15);
  border-left: 4px solid var(--ensign);
  border-radius: 0 8px 8px 0;
  padding: 1.5rem 1.75rem;
}

/* ── Contact cards ── */
.contact-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.5rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.contact-card:hover {
  border-color: var(--registry);
  box-shadow: 0 8px 24px -8px rgba(11, 45, 66, 0.1);
}

/* ── CTA band ── */
.cta-band {
  background: linear-gradient(135deg, var(--navy), var(--registry));
  color: #fff;
}

/* ── Illustration side panel ── */
.illus-panel {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.illus-panel img { display: block; width: 100%; height: auto; }

/* ── Legacy ── */
.cert-card {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
}
.ledger-row { border-bottom: 1px solid var(--line); }
.ledger-row:last-child { border-bottom: none; }
.ledger-num {
  font-size: 0.75rem; font-weight: 700;
  color: var(--registry);
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

.eyebrow {
  font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--registry);
}

.rule-brass { height: 1px; background: var(--line); }

.prose p { margin-bottom: 1.25rem; line-height: 1.75; color: var(--muted); }
.prose p:last-child { margin-bottom: 0; }

/* ── Certificate verification result ── */
.cert-verify-result__hero {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem 1.75rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #f8fafb 0%, #fff 100%);
}
.cert-verify-result__hero-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  flex-shrink: 0;
}
.cert-verify-status {
  padding: 1rem 1.75rem;
  border-bottom: 1px solid var(--line);
}
.cert-verify-status--success { background: #ecfdf3; color: #14532d; border-color: #bbf7d0; }
.cert-verify-status--warning { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.cert-verify-status--danger  { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.cert-verify-status--muted   { background: #f8fafc; color: #334155; border-color: var(--line); }
.cert-verify-status__row {
  display: flex;
  gap: 0.875rem;
  align-items: flex-start;
}
.cert-verify-status__icon {
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
  margin-top: 0.125rem;
}
.cert-verify-status__title {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
}
.cert-verify-status__message {
  font-size: 0.875rem;
  margin: 0.25rem 0 0;
  line-height: 1.5;
  opacity: 0.95;
}
.cert-verify-body { padding: 1.5rem 1.75rem; }
.cert-verify-grid {
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 768px) {
  .cert-verify-grid { grid-template-columns: 1fr 1fr; }
}
.cert-verify-panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.cert-verify-panel__title {
  margin: 0;
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--registry);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.cert-verify-dl { margin: 0; }
.cert-verify-dl__row {
  display: grid;
  grid-template-columns: minmax(0, 42%) minmax(0, 1fr);
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.875rem;
}
.cert-verify-dl__row:last-child { border-bottom: none; }
.cert-verify-dl__row dt {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cert-verify-dl__row dd {
  margin: 0;
  color: var(--slate);
  font-weight: 500;
  word-break: break-word;
}
.cert-verify-footer {
  padding: 0.875rem 1.75rem;
  border-top: 1px solid var(--line);
  background: var(--paper);
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
}
.cert-verify-not-found__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 999px;
  background: rgba(200, 16, 46, 0.1);
  color: var(--ensign);
  margin-bottom: 1rem;
}
