/* ==========================================================================
   AMDGS — Official Coastal Clarity Production Stylesheet
   Consultancy · Advisory · Remote Sensing · Spatial & Data Analysis · CPD
   ========================================================================== */

:root {
  --bg: #FFFFFF;
  --tint: #F4F8FB;
  --tint-strong: #E9F2F8;
  --ink: #0B1F33;
  --body: #334E68;
  --muted: #627D98;
  --blue: #0284C7;
  --blue-dark: #0369A1;
  --aqua: #06B6D4;
  --coral: #F97316;
  --line: #E1ECF4;
  --line-strong: #C9DCEB;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 4px 16px rgba(11, 31, 51, 0.05);
  --shadow-md: 0 14px 36px rgba(11, 31, 51, 0.08);
  --shadow-lg: 0 22px 54px rgba(11, 31, 51, 0.13);
  --font-display: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--body);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}
img { display: block; max-width: 100%; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 48px); }
.wrap-narrow { max-width: 960px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 48px); }

/* Navigation */
header.site-nav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-in {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-ic { width: 38px; height: 38px; flex-shrink: 0; }
.brand-ic svg { width: 100%; height: 100%; display: block; }
.brand-txt { display: flex; align-items: baseline; gap: 10px; }
.brand-txt b {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.brand-txt span {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
  border-left: 1px solid var(--line-strong);
  padding-left: 10px;
  white-space: nowrap;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active { color: var(--blue); }
.nav-btn {
  background: var(--ink);
  color: #FFFFFF !important;
  padding: 10px 20px;
  border-radius: 99px;
  font-weight: 600;
  font-size: 13.5px;
  transition: background 0.2s;
  white-space: nowrap;
}
.nav-btn:hover { background: var(--blue); }

.burger {
  display: none;
  background: #FFFFFF;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink);
  font-size: 20px;
}

/* Mobile Slide Drawer */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(11, 31, 51, 0.45);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.drawer.open { opacity: 1; pointer-events: auto; }
.drawer-panel {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: min(320px, 86vw);
  background: #FFFFFF;
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: -12px 0 40px rgba(11, 31, 51, 0.18);
}
.drawer-panel a {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 99px;
  font-weight: 600;
  font-size: 14.5px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, background 0.2s, border-color 0.2s;
}
.btn-primary {
  background: var(--blue);
  color: #FFFFFF;
  box-shadow: 0 10px 24px rgba(2, 132, 199, 0.26);
}
.btn-primary:hover { background: var(--blue-dark); transform: translateY(-1px); color: #FFFFFF; }
.btn-dark { background: var(--ink); color: #FFFFFF; }
.btn-dark:hover { background: var(--blue); color: #FFFFFF; }
.btn-ghost { background: rgba(255, 255, 255, 0.92); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink); background: #FFFFFF; }

/* Typography Helpers */
.kicker {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--blue);
  margin-bottom: 10px;
  display: block;
}
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  letter-spacing: -0.025em;
}
h2 { font-size: clamp(1.8rem, 3.1vw, 2.55rem); font-weight: 700; line-height: 1.12; }
h3 { font-size: 19px; font-weight: 700; line-height: 1.25; }
code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--tint-strong);
  color: var(--ink);
  padding: 2px 6px;
  border-radius: 5px;
}

/* Subpage Banner */
.page-hero {
  background: linear-gradient(180deg, var(--tint) 0%, #FFFFFF 100%);
  border-bottom: 1px solid var(--line);
  padding: 52px 0 44px;
}
.page-hero h1 { font-size: clamp(2rem, 4vw, 3.1rem); font-weight: 800; line-height: 1.08; max-width: 24ch; margin-bottom: 14px; }
.page-hero p.lead { font-size: 17px; color: var(--body); max-width: 68ch; }

/* Shared Cards, Tables & Interactive Details (Exercises / Educators) */
section.sec { padding: 78px 0; }
section.sec-sm { padding: 48px 0; }
.sec-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.sec-sub { max-width: 50ch; color: var(--muted); font-size: 15.5px; }

.card {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.edu-box {
  background: var(--tint);
  border: 1px solid var(--line-strong);
  border-left: 4px solid var(--blue);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin: 24px 0;
}
.meta-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 12px; }
.pill {
  background: #FFFFFF;
  border: 1px solid var(--line-strong);
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}
.table-wrap { overflow-x: auto; margin: 16px 0 22px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
table { width: 100%; border-collapse: collapse; background: #FFFFFF; font-size: 14.5px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--ink); color: #FFFFFF; font-size: 12.5px; font-weight: 600; letter-spacing: 0.03em; }
tbody tr:nth-child(even) { background: var(--tint); }

details {
  background: var(--tint);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin: 18px 0;
}
summary { cursor: pointer; font-weight: 700; color: var(--ink); }
details[open] summary { margin-bottom: 10px; }

.prose p { margin: 10px 0; max-width: 76ch; }
.prose ol, .prose ul { padding-left: 1.4em; margin: 10px 0 18px; max-width: 76ch; }
.prose li { margin: 6px 0; }
.prose h2 { font-size: 1.55rem; margin: 30px 0 10px; }
.prose a { color: var(--blue); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* Footer */
footer.site-footer {
  border-top: 1px solid var(--line);
  background: var(--tint);
  padding: 36px 0 48px;
  font-size: 13px;
  color: var(--muted);
}
.foot-in { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.foot-links { display: flex; gap: 20px; flex-wrap: wrap; font-weight: 500; color: var(--ink); }
.foot-links a:hover { color: var(--blue); }

@media (max-width: 960px) {
  .nav-links { display: none; }
  .burger { display: flex; }
  .brand-txt span { display: none; }
}
@media print {
  header.site-nav, .drawer, .btn, footer.site-footer { display: none !important; }
  body { font-size: 10.5pt; background: #FFFFFF; }
  details > * { display: block; }
}
