/* ==========================================================================
   Core Components: Fluid Island Nav, Mobile Overlay, Double-Bezel Cards,
   Button-in-Button CTAs, Native <dialog> PDA Modal, Global Maritime Footer
   ========================================================================== */

/* ---------- 1. Fluid Island Floating Navbar ---------- */
.nav-wrap {
  position: fixed;
  top: 16px;
  left: 0;
  right: 0;
  z-index: var(--z-nav);
  padding-inline: var(--gutter);
  pointer-events: none;
}

.island-nav {
  pointer-events: auto;
  max-width: 1200px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 10px 8px 18px;
  border-radius: var(--radius-pill);
  background: rgba(6, 13, 33, 0.78);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-island);
  color: var(--ink-light);
  transition:
    background-color var(--dur-med) var(--ease-fluid),
    transform var(--dur-med) var(--ease-fluid);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-lockup__logo {
  height: 28px;
  width: auto;
}

.brand-lockup__text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-lockup__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  color: var(--ink-light);
}

.brand-lockup__sub {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-gold);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ink-light-body);
  transition:
    color var(--dur-fast) var(--ease-fluid),
    background-color var(--dur-fast) var(--ease-fluid);
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.nav-links a[aria-current="page"] {
  box-shadow: inset 0 0 0 1px rgba(254, 178, 30, 0.35);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ops-clock-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-light-body);
  white-space: nowrap;
}

.ops-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--status-live);
  box-shadow: 0 0 10px var(--status-live);
}

/* Morphing 2-Line Hamburger */
.nav-burger {
  display: none;
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--navy-hairline);
  background: rgba(255, 255, 255, 0.06);
  align-items: center;
  justify-content: center;
  padding: 0;
}

.nav-burger__line {
  position: absolute;
  width: 18px;
  height: 1.5px;
  background: #ffffff;
  border-radius: 2px;
  transition: transform var(--dur-med) var(--ease-fluid);
}

.nav-burger__line:first-child { transform: translateY(-3.5px); }
.nav-burger__line:last-child { transform: translateY(3.5px); }

.nav-burger[aria-expanded="true"] .nav-burger__line:first-child {
  transform: translateY(0) rotate(45deg);
}

.nav-burger[aria-expanded="true"] .nav-burger__line:last-child {
  transform: translateY(0) rotate(-45deg);
}

/* Full-Screen Staggered-Reveal Mobile Glass Overlay */
.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: var(--z-drawer);
  background: rgba(6, 13, 33, 0.92);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  color: var(--ink-light);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 96px var(--gutter) 36px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity var(--dur-med) var(--ease-fluid),
    visibility var(--dur-med) var(--ease-fluid);
}

.mobile-drawer.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mobile-drawer__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-drawer__list li {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity var(--dur-med) var(--ease-fluid),
    transform var(--dur-med) var(--ease-fluid);
}

.mobile-drawer.is-open .mobile-drawer__list li {
  opacity: 1;
  transform: translateY(0);
}

.mobile-drawer.is-open .mobile-drawer__list li:nth-child(1) { transition-delay: 70ms; }
.mobile-drawer.is-open .mobile-drawer__list li:nth-child(2) { transition-delay: 120ms; }
.mobile-drawer.is-open .mobile-drawer__list li:nth-child(3) { transition-delay: 170ms; }
.mobile-drawer.is-open .mobile-drawer__list li:nth-child(4) { transition-delay: 220ms; }
.mobile-drawer.is-open .mobile-drawer__list li:nth-child(5) { transition-delay: 270ms; }

.mobile-drawer__list a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--navy-hairline);
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 7vw, 2.5rem);
  font-weight: 700;
}

.mobile-drawer__list a span {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--brand-gold);
}

.mobile-drawer__foot {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

@media (max-width: 1024px) {
  .ops-clock-pill {
    display: none;
  }
}

@media (max-width: 860px) {
  .nav-links,
  .nav-cta-desktop {
    display: none;
  }
  .nav-burger {
    display: inline-flex;
  }
}

/* ---------- 2. Button-in-Button CTA Architecture ---------- */
.btn-island {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 6px 6px 6px 22px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: var(--text-sm);
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition:
    transform var(--dur-fast) var(--ease-fluid),
    background-color var(--dur-fast) var(--ease-fluid),
    border-color var(--dur-fast) var(--ease-fluid),
    box-shadow var(--dur-fast) var(--ease-fluid);
}

.btn-island:active {
  transform: scale(0.98);
}

.btn-icon-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform var(--dur-med) var(--ease-fluid);
}

.btn-island:hover .btn-icon-circle {
  transform: translate(2px, -2px) scale(1.06);
}

.btn-island--gold {
  background: var(--brand-gold);
  color: var(--navy-abyss);
  box-shadow: 0 12px 30px -12px rgba(254, 178, 30, 0.55);
}

.btn-island--gold:hover {
  background: #ffbf3f;
}

.btn-island--gold .btn-icon-circle {
  background: rgba(6, 13, 33, 0.14);
  color: var(--navy-abyss);
}

.btn-island--cobalt {
  background: var(--brand-cobalt);
  color: #ffffff;
  box-shadow: var(--shadow-glow-cobalt);
}

.btn-island--cobalt:hover {
  background: var(--brand-cobalt-mid);
}

.btn-island--cobalt .btn-icon-circle {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.btn-island--ghost {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.btn-island--ghost:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.34);
}

.btn-island--ghost .btn-icon-circle {
  background: rgba(255, 255, 255, 0.12);
  color: var(--brand-gold);
}

.btn-island--light {
  background: var(--daylight-surface);
  border-color: var(--daylight-hairline-strong);
  color: var(--ink-dark);
}

.btn-island--light:hover {
  border-color: var(--brand-cobalt);
  color: var(--brand-cobalt);
}

.btn-island--light .btn-icon-circle {
  background: rgba(0, 20, 167, 0.08);
  color: var(--brand-cobalt);
}

/* ---------- 3. Double-Bezel (Doppelrand) Nested Architecture ---------- */
.bezel-shell {
  padding: var(--bezel-pad);
  border-radius: var(--radius-outer);
  background: var(--daylight-shell);
  border: 1px solid var(--daylight-hairline);
  transition:
    transform var(--dur-med) var(--ease-fluid),
    border-color var(--dur-med) var(--ease-fluid);
}

.bezel-core {
  height: 100%;
  border-radius: var(--radius-inner);
  background: var(--daylight-surface);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: var(--shadow-daylight), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  overflow: hidden;
}

.bezel-shell--interactive:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 20, 167, 0.24);
}

.bezel-shell--dark {
  padding: var(--bezel-pad);
  border-radius: var(--radius-outer);
  background: var(--navy-shell);
  border: 1px solid var(--navy-hairline);
  transition:
    transform var(--dur-med) var(--ease-fluid),
    border-color var(--dur-med) var(--ease-fluid);
}

.bezel-core--dark {
  height: 100%;
  border-radius: var(--radius-inner);
  background: var(--navy-surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.bezel-shell--dark.bezel-shell--interactive:hover {
  transform: translateY(-4px);
  border-color: rgba(254, 178, 30, 0.4);
}

/* ---------- 4. Native <dialog> Global Quick PDA Dispatch Modal ---------- */
dialog#pda-dialog {
  width: min(680px, calc(100vw - 24px));
  max-height: min(90dvh, 840px);
  padding: 0;
  border: 0;
  border-radius: var(--radius-outer);
  background: transparent;
  color: var(--ink-light);
  overflow: visible;
}

dialog#pda-dialog:modal {
  overscroll-behavior: contain;
}

dialog#pda-dialog::backdrop {
  background: rgba(4, 9, 24, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
  overscroll-behavior: contain;
}

.pda-modal__shell {
  padding: 7px;
  border-radius: var(--radius-outer);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 36px 90px -20px rgba(0, 0, 0, 0.72);
}

.pda-modal__core {
  max-height: calc(min(90dvh, 840px) - 16px);
  overflow-y: auto;
  border-radius: var(--radius-inner);
  background: var(--navy-deep);
  padding: clamp(1.25rem, 3vw, 2rem);
}

.pda-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--navy-hairline);
}

.pda-modal__title {
  font-size: clamp(1.35rem, 2.6vw, 1.75rem);
  margin-top: 8px;
}

.pda-close-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--navy-hairline);
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background-color var(--dur-fast) var(--ease-fluid);
}

.pda-close-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}

.pda-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.pda-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pda-field--full {
  grid-column: 1 / -1;
}

.pda-field label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-light-muted);
}

.pda-field input,
.pda-field select,
.pda-field textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: 14px;
  border: 1px solid var(--navy-hairline);
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  font-size: var(--text-sm);
  transition: border-color var(--dur-fast) var(--ease-fluid);
}

.pda-field select option {
  background: var(--navy-deep);
  color: #ffffff;
}

.pda-field input:focus,
.pda-field select:focus,
.pda-field textarea:focus {
  outline: none;
  border-color: var(--brand-gold);
}

.pda-brief-box {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(0, 20, 167, 0.18);
  border: 1px solid rgba(52, 84, 255, 0.35);
}

.pda-brief-box__label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-gold);
  margin-bottom: 6px;
}

.pda-brief-box pre {
  margin: 0;
  white-space: pre-wrap;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--ink-light-body);
}

.pda-modal__actions {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 640px) {
  .pda-form-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- 5. Closing Dispatch Banner & Global Maritime Footer ---------- */
.dispatch-banner {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-inner);
  padding: clamp(2.5rem, 5vw, 4.5rem);
  background:
    radial-gradient(circle at 85% 15%, rgba(0, 20, 167, 0.55), transparent 52%),
    radial-gradient(circle at 12% 90%, rgba(254, 178, 30, 0.16), transparent 44%),
    var(--navy-surface);
  color: var(--ink-light);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.dispatch-banner__copy {
  max-width: 620px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.dispatch-banner__copy h2 {
  font-size: var(--text-3xl);
}

.dispatch-banner__copy p {
  color: var(--ink-light-body);
}

.dispatch-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.site-footer {
  background: var(--navy-abyss);
  color: var(--ink-light);
  border-top: 1px solid var(--navy-hairline);
  padding-top: clamp(4rem, 7vw, 6rem);
  padding-bottom: 2.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: clamp(2rem, 4vw, 3.5rem);
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--navy-hairline);
}

.footer-brand p {
  margin-top: 16px;
  color: var(--ink-light-muted);
  font-size: var(--text-sm);
  max-width: 36ch;
}

.footer-motto {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand-gold);
}

.footer-col h3 {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-gold);
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: var(--text-sm);
  color: var(--ink-light-body);
}

.footer-col a:hover {
  color: var(--brand-gold);
}

.footer-bottom {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: var(--text-xs);
  color: var(--ink-light-muted);
}

@media (max-width: 960px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
