/* ==========================================================================
   NextNusa Ocean Technology Academy — Site Stylesheet
   Brand ref: knowledge/NextNusa_Brand_Identity_Guidelines-1.md
   Modern refresh: rounded, glass, gradient, motion — tuned for a younger audience.
   ========================================================================== */

:root {
  --nn-navy: #001D4F;
  --nn-navy-deep: #012353;
  --nn-blue: #0057AE;
  --nn-blue-mid: #0C7BCD;
  --nn-cyan: #129BEC;
  --nn-cyan-bright: #5FD9FF;
  --nn-white: #FFFFFF;
  --nn-grey-light: #F5F7FA;
  --nn-text: #1A1A1A;
  --nn-warning-bg: #FFF2CC;
  --nn-warning-text: #7F6000;
  --nn-warning-border: #BF9000;
  --nn-safety-green: #1E7A46;

  --nn-font-heading: 'Poppins', 'Inter', sans-serif;
  --nn-font-body: 'Inter', 'Open Sans', sans-serif;
  --nn-font-mono: 'JetBrains Mono', 'Courier New', monospace;

  --nn-radius: 18px;
  --nn-radius-lg: 28px;
  --nn-radius-pill: 999px;
  --nn-glow: 0 8px 24px rgba(18, 155, 236, 0.25);
  --nn-shadow: 0 4px 16px rgba(0, 29, 79, 0.08);
  --nn-shadow-hover: 0 16px 36px rgba(0, 29, 79, 0.16);
}

body {
  font-family: var(--nn-font-body);
  color: var(--nn-text);
  background: var(--nn-white);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--nn-font-heading);
  color: var(--nn-navy);
  font-weight: 700;
  letter-spacing: -0.01em;
}

a { color: var(--nn-blue); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--nn-cyan); }

.nn-mono { font-family: var(--nn-font-mono); }

/* -------------------------------------------------------------------------
   Header / Nav — glass, sticky, reactive to scroll
   ------------------------------------------------------------------------- */
.nn-header {
  background: rgba(0, 29, 79, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 1030;
  transition: box-shadow .3s ease, background .3s ease;
}
.nn-header.is-scrolled {
  background: rgba(0, 29, 79, 0.92);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}
.nn-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--nn-font-heading);
}
.nn-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.3rem;
  padding: 0.2rem 0.4rem;
  background: var(--nn-white);
  border-radius: 8px;
  box-shadow: 0 0 0 rgba(18, 155, 236, 0.5);
  transition: box-shadow .3s ease;
}
.nn-brand-mark img {
  height: 100%;
  width: auto;
  display: block;
}
.nn-brand:hover .nn-brand-mark {
  box-shadow: 0 0 18px rgba(18, 155, 236, 0.65);
}
.nn-brand-text {
  color: var(--nn-white);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}
.nn-header .nav-link {
  color: rgba(255, 255, 255, 0.75);
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  border-radius: var(--nn-radius-pill);
  transition: color .2s ease, background .2s ease;
}
.nn-header .nav-link:hover,
.nn-header .nav-link.active {
  color: var(--nn-white);
  background: rgba(18, 155, 236, 0.18);
}

.nn-lang-switch {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--nn-font-mono);
  font-size: 0.8rem;
  padding: 0.5rem 0.75rem;
}
.nn-lang-switch a {
  color: rgba(255, 255, 255, 0.55);
  font-weight: 600;
  transition: color .2s ease;
}
.nn-lang-switch a:hover,
.nn-lang-switch a.active {
  color: var(--nn-cyan);
}
.nn-lang-switch span {
  color: rgba(255, 255, 255, 0.3);
}

/* -------------------------------------------------------------------------
   Hero — telemetry/HUD style with a soft animated gradient
   ------------------------------------------------------------------------- */
.nn-hero {
  position: relative;
  background: linear-gradient(120deg, var(--nn-navy) 0%, var(--nn-blue) 55%, var(--nn-cyan) 140%);
  background-size: 200% 200%;
  animation: nn-gradient-shift 14s ease infinite;
  color: var(--nn-white);
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
@keyframes nn-gradient-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.nn-hero::after {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle at 15% 20%, rgba(18, 155, 236, 0.35), transparent 40%),
    radial-gradient(circle at 85% 75%, rgba(255, 255, 255, 0.12), transparent 35%);
  pointer-events: none;
  z-index: 1;
}
.nn-hero--photo {
  background-size: cover;
  background-position: center;
  animation: none;
}
.nn-hero--photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(0, 29, 79, 0.92) 0%, rgba(0, 29, 79, 0.55) 100%);
  z-index: 1;
}
.nn-hero-inner {
  position: relative;
  z-index: 2;
  padding: 5.5rem 0 4.5rem;
}
.nn-hero-eyebrow {
  font-family: var(--nn-font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  color: var(--nn-cyan-bright);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
  text-transform: uppercase;
  display: inline-block;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.35rem 0.9rem;
  border-radius: var(--nn-radius-pill);
}
.nn-hero h1 {
  color: var(--nn-white);
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.1;
}
.nn-hero .nn-tagline {
  font-style: italic;
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.2rem;
}
.nn-hero p.lead {
  color: rgba(255, 255, 255, 0.88);
  max-width: 46rem;
}

/* HUD readout strip */
.nn-hud {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--nn-radius);
  overflow: hidden;
  margin-top: 2.5rem;
  background: rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(6px);
}
.nn-hud-item {
  flex: 1 1 150px;
  padding: 1rem 1.3rem;
  border-right: 1px solid rgba(255, 255, 255, 0.15);
  transition: background .2s ease;
}
.nn-hud-item:hover { background: rgba(18, 155, 236, 0.12); }
.nn-hud-item:last-child { border-right: none; }
.nn-hud-label {
  font-family: var(--nn-font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.55);
  display: block;
}
.nn-hud-value {
  font-family: var(--nn-font-mono);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--nn-cyan);
}

/* -------------------------------------------------------------------------
   Sections
   ------------------------------------------------------------------------- */
.nn-section { padding: 5rem 0; }
.nn-section--alt { background: var(--nn-grey-light); }
.nn-divider {
  border: none;
  border-top: 1px solid #E2E6EC;
  margin: 0;
}

/* -------------------------------------------------------------------------
   Spec-sheet cards (equipment, modules) — rounded, lifts on hover
   ------------------------------------------------------------------------- */
.nn-card {
  background: var(--nn-white);
  border: 1px solid #E9ECF2;
  border-radius: var(--nn-radius);
  padding: 1.75rem;
  height: 100%;
  box-shadow: var(--nn-shadow);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.nn-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--nn-shadow-hover);
  border-color: rgba(18, 155, 236, 0.35);
}
.nn-card h5 { margin-bottom: 0.5rem; }
.nn-card--media {
  padding: 0;
  overflow: hidden;
}
.nn-card--media img {
  display: block;
  border-radius: var(--nn-radius) var(--nn-radius) 0 0;
}
.nn-card--media .nn-card-body { padding: 1.5rem; }
.nn-card .nn-card-meta {
  font-family: var(--nn-font-mono);
  font-size: 0.75rem;
  color: var(--nn-blue-mid);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Module card w/ level badge */
.nn-module {
  border: 1px solid #E9ECF2;
  border-radius: var(--nn-radius);
  padding: 1.4rem 1.6rem;
  margin-bottom: 1rem;
  background: var(--nn-white);
  box-shadow: var(--nn-shadow);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.nn-module:hover {
  transform: translateY(-4px);
  box-shadow: var(--nn-shadow-hover);
  border-color: rgba(18, 155, 236, 0.3);
}
.nn-module-num {
  font-family: var(--nn-font-mono);
  color: var(--nn-blue-mid);
  font-size: 0.85rem;
}

/* Level badges — Navy -> Cyan progression, pill-shaped */
.nn-badge-level {
  display: inline-block;
  font-family: var(--nn-font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--nn-white);
  padding: 0.4rem 1rem;
  border-radius: var(--nn-radius-pill);
  text-transform: uppercase;
}
.nn-badge-level--1 { background: var(--nn-navy); }
.nn-badge-level--2 { background: var(--nn-navy-deep); }
.nn-badge-level--3 { background: var(--nn-blue); }
.nn-badge-level--4 { background: linear-gradient(135deg, var(--nn-blue-mid), var(--nn-cyan)); box-shadow: var(--nn-glow); }

/* -------------------------------------------------------------------------
   Warning / IMCA-aligned notice box — colors are brand-locked, keep as-is
   ------------------------------------------------------------------------- */
.nn-warning-box {
  background: var(--nn-warning-bg);
  border: 1px solid var(--nn-warning-border);
  color: var(--nn-warning-text);
  border-radius: var(--nn-radius);
  padding: 1.25rem 1.5rem;
  font-size: 0.95rem;
}
.nn-warning-box strong { color: var(--nn-warning-text); }

/* -------------------------------------------------------------------------
   Info box — neutral educational callout (distinct from the amber IMCA
   warning box, which stays reserved for compliance disclaimers only)
   ------------------------------------------------------------------------- */
.nn-info-box {
  background: rgba(18, 155, 236, 0.08);
  border: 1px solid rgba(18, 155, 236, 0.3);
  border-left: 4px solid var(--nn-cyan);
  border-radius: var(--nn-radius);
  padding: 1.5rem 1.75rem;
}
.nn-info-box h5 { color: var(--nn-navy); }
.nn-info-box a { color: var(--nn-blue); }
.nn-info-box a:hover { color: var(--nn-cyan); }

/* -------------------------------------------------------------------------
   Buttons — pill-shaped, gradient, glow on hover
   ------------------------------------------------------------------------- */
.btn-nn-primary {
  background: linear-gradient(135deg, var(--nn-navy), var(--nn-blue));
  border: none;
  color: var(--nn-white);
  font-weight: 600;
  padding: 0.75rem 1.75rem;
  border-radius: var(--nn-radius-pill);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn-nn-primary:hover {
  background: linear-gradient(135deg, var(--nn-blue), var(--nn-cyan));
  color: var(--nn-white);
  transform: translateY(-2px);
  box-shadow: var(--nn-glow);
}
.btn-nn-outline {
  background: transparent;
  border: 1.5px solid var(--nn-navy);
  color: var(--nn-navy);
  font-weight: 600;
  padding: 0.75rem 1.75rem;
  border-radius: var(--nn-radius-pill);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}
.btn-nn-outline:hover {
  background: var(--nn-cyan);
  border-color: var(--nn-cyan);
  color: var(--nn-white);
  transform: translateY(-2px);
  box-shadow: var(--nn-glow);
}

/* -------------------------------------------------------------------------
   Closing quote — centered sign-off line, used at the bottom of a page
   ------------------------------------------------------------------------- */
.nn-closing-quote {
  font-family: var(--nn-font-heading);
  font-style: italic;
  font-size: clamp(1.15rem, 2.4vw, 1.5rem);
  color: var(--nn-navy);
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}

/* -------------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------------- */
.nn-footer {
  background: var(--nn-navy);
  color: rgba(255, 255, 255, 0.8);
  padding: 3.5rem 0 1.5rem;
  margin-top: 2rem;
}
.nn-footer-heading {
  color: var(--nn-white);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}
.nn-footer-links a { color: rgba(255, 255, 255, 0.75); }
.nn-footer-links li { margin-bottom: 0.5rem; }
.nn-footer-tagline { font-style: italic; color: rgba(255, 255, 255, 0.6); }
.nn-footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
}

/* -------------------------------------------------------------------------
   Table (spec-sheet style)
   ------------------------------------------------------------------------- */
.nn-table {
  border-radius: var(--nn-radius);
  overflow: hidden;
}
.nn-table th {
  font-family: var(--nn-font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--nn-blue-mid);
  background: var(--nn-grey-light);
  border-bottom: 2px solid #E2E6EC;
}
.nn-table td, .nn-table th { vertical-align: middle; padding: 0.9rem 1.1rem; }

/* -------------------------------------------------------------------------
   Scroll-reveal — subtle fade + rise, applied via main.js
   ------------------------------------------------------------------------- */
.nn-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}
.nn-reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* -------------------------------------------------------------------------
   Responsive tuning — phones & small/medium tablets (below Bootstrap's "md")
   Layout already stacks via the Bootstrap grid; this trims the desktop-sized
   spacing and rebalances a few custom components (HUD strip, cards) so they
   read as "designed for mobile", not just "not broken on mobile".
   ------------------------------------------------------------------------- */
@media (max-width: 767.98px) {
  /* Bootstrap's default .container gutter (12px each side) reads as text
     sitting right on the screen edge on a phone — give it real breathing room.
     (Declared after .nn-hero-inner's own padding below so it wins on the
     shared left/right properties — same specificity, later source order.) */
  .nn-section { padding: 3rem 0; }
  .nn-hero-inner { padding-top: 3.5rem; padding-bottom: 3rem; }
  .container, .nn-hero-inner { padding-left: 1.25rem; padding-right: 1.25rem; }

  .nn-hero h1 { font-size: clamp(1.6rem, 8vw, 2.4rem); }
  .nn-hero-eyebrow { font-size: 0.7rem; padding: 0.3rem 0.75rem; }
  .nn-hero .nn-tagline { font-size: 1.05rem; }
  .nn-hero p.lead { font-size: 1rem; }

  .nn-hud { margin-top: 1.75rem; }
  .nn-hud-item { flex: 1 1 50%; padding: 0.85rem 1.1rem; }
  .nn-hud-value { font-size: 1.2rem; }

  .nn-card, .nn-module { padding: 1.35rem; }
  .nn-card--media .nn-card-body { padding: 1.25rem; }

  .btn-nn-primary, .btn-nn-outline { padding: 0.7rem 1.4rem; }

  .nn-footer { padding: 2.5rem 0 1.25rem; }
  .nn-footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* Very small phones — collapse the HUD strip to one reading column */
@media (max-width: 420px) {
  .nn-hud-item { flex: 1 1 100%; border-right: none; border-bottom: 1px solid rgba(255, 255, 255, 0.15); }
  .nn-hud-item:last-child { border-bottom: none; }
}
