/* ============================================================
   geo-dashboard.com — main.css
   Design system: Cool sky blue · Deep ocean · Midnight navy ·
                  Crisp mango · Glowing tangerine
   ============================================================ */

/* ── Custom Properties ─────────────────────────────────────── */
:root {
  --color-sky-blue:    #5BC8F5;
  --color-ocean:       #0E7EA4;
  --color-navy:        #0D2B45;
  --color-mango:       #FFD166;
  --color-tangerine:   #FF7C35;

  /* Derived / UI colours */
  --color-bg:          #F4F9FC;
  --color-surface:     #FFFFFF;
  --color-border:      #C7E5F0;
  --color-text:        #1A2E3B;
  --color-text-muted:  #4E7089;
  --color-link:        var(--color-ocean);
  --color-link-hover:  var(--color-tangerine);
  --color-code-bg:     #EBF6FB;
  --color-code-border: #B2DAE9;

  /* Layout */
  --header-height: 68px;
  --content-max:   1440px;
  --content-pad:   clamp(1rem, 4vw, 3rem);
  --radius:        8px;
  --radius-lg:     14px;

  /* Typography */
  --font-sans: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'Fira Code', 'Cascadia Code', 'Consolas', monospace;

  /* Shadows */
  --shadow-sm: 0 1px 4px rgba(13,43,69,.08);
  --shadow-md: 0 4px 16px rgba(13,43,69,.12);
  --shadow-lg: 0 8px 32px rgba(13,43,69,.16);

  /* Transitions */
  --transition: 0.2s ease;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }
a { color: var(--color-link); text-decoration: underline; text-underline-offset: 3px; transition: color var(--transition); }
a:hover { color: var(--color-link-hover); }

/* ── Page wrapper (makes footer sticky to bottom) ──────────── */
.page-wrapper { display: flex; flex-direction: column; min-height: 100dvh; }
.page-wrapper main { flex: 1; }

/* ── Sticky Header ─────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: var(--color-navy);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
}
.header-inner {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--content-pad);
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: #fff;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.site-logo img { height: 36px; width: auto; }
.site-logo span { color: var(--color-sky-blue); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
}
.site-nav a {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius);
  color: #C8E6F5;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}
.site-nav a svg { width: 16px; height: 16px; flex-shrink: 0; }
.site-nav a:hover,
.site-nav a[aria-current="page"],
.site-nav a.active {
  background: rgba(91,200,245,.15);
  color: var(--color-sky-blue);
}

/* Hamburger */
.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  color: #fff;
  margin-left: auto;
}
.nav-toggle svg { width: 26px; height: 26px; }

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
  background: var(--color-navy);
  color: #8CBCD6;
  padding: 2.5rem var(--content-pad);
  margin-top: auto;
}
.footer-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}
.footer-col h3 {
  color: var(--color-sky-blue);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}
.footer-col a {
  display: block;
  color: #8CBCD6;
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.2rem 0;
  transition: color var(--transition);
}
.footer-col a:hover { color: var(--color-mango); }
.footer-bottom {
  max-width: var(--content-max);
  margin: 1.5rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(91,200,245,.15);
  font-size: 0.82rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
}

/* ── Main content container ─────────────────────────────────── */
.content-container {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 2.5rem var(--content-pad);
}

/* ── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.25;
  font-weight: 700;
  scroll-margin-top: calc(var(--header-height) + 1.5rem);
}
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); color: var(--color-navy); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem);   color: var(--color-ocean); margin-top: 2.5rem; margin-bottom: 0.75rem; }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); color: var(--color-navy); margin-top: 2rem; margin-bottom: 0.5rem; }
h4 { font-size: 1.05rem; color: var(--color-ocean); margin-top: 1.5rem; margin-bottom: 0.4rem; }
p  { margin-bottom: 1.1rem; }

/* Page title (article/hub) */
.page-title {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 3px solid var(--color-sky-blue);
}
.page-title h1 {
  background: linear-gradient(135deg, var(--color-ocean) 0%, var(--color-tangerine) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Breadcrumb ─────────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.85rem;
  color: #8CBCD6;
  margin-bottom: 1.25rem;
  padding: 0.5rem 0;
}
.breadcrumb a { color: var(--color-sky-blue); text-decoration: none; opacity: 0.9; }
.breadcrumb a:hover { color: var(--color-mango); text-decoration: underline; opacity: 1; }
.breadcrumb .sep { color: rgba(91,200,245,.4); margin: 0 0.1rem; }
.breadcrumb .current { color: #fff; font-weight: 500; }

/* ── Hero (home page) ───────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--color-navy) 0%, #0a3d5c 60%, var(--color-ocean) 100%);
  color: #fff;
  padding: clamp(3rem, 8vw, 7rem) var(--content-pad);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(91,200,245,.12) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner { max-width: 860px; margin: 0 auto; position: relative; }
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.8rem);
  color: #fff;
  margin-bottom: 1rem;
  text-shadow: 0 2px 12px rgba(0,0,0,.3);
}
.hero h1 span { color: var(--color-sky-blue); }
.hero p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: #B8D9ED;
  max-width: 680px;
  margin: 0 auto 2rem;
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2.5rem;
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  cursor: pointer;
  border: none;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-primary   { background: var(--color-tangerine); color: #fff; }
.btn-secondary { background: var(--color-sky-blue);  color: var(--color-navy); }
.btn-outline   { background: transparent; color: var(--color-sky-blue); border: 2px solid var(--color-sky-blue); }
.btn svg { width: 20px; height: 20px; }

/* ── Cards (section/subsection grids) ───────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px,100%), 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: var(--color-sky-blue);
}
.card-icon { font-size: 2rem; line-height: 1; }
.card h3 { color: var(--color-ocean); font-size: 1.05rem; margin: 0; }
.card p  { color: var(--color-text-muted); font-size: 0.9rem; margin: 0; flex: 1; }
.card-arrow { color: var(--color-tangerine); font-size: 1.1rem; align-self: flex-end; margin-top: 0.5rem; }

/* ── Article prose ──────────────────────────────────────────── */
.prose { max-width: 100%; }
.prose > * + * { margin-top: 1.1rem; }
.prose h2 { margin-top: 2.5rem; }
.prose h3 { margin-top: 2rem; }
.prose ul, .prose ol { padding-left: 1.5rem; margin-bottom: 1.1rem; }
.prose li { margin-bottom: 0.3rem; }
.prose li + li { margin-top: 0.25rem; }
.prose strong { color: var(--color-navy); }
.prose blockquote {
  border-left: 4px solid var(--color-sky-blue);
  padding: 0.6rem 1.2rem;
  background: var(--color-code-bg);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--color-text-muted);
  font-style: italic;
  margin: 1.5rem 0;
}
.prose hr { border: none; border-top: 2px solid var(--color-border); margin: 2rem 0; }

/* ── Inline code ────────────────────────────────────────────── */
:not(pre) > code {
  background: var(--color-code-bg);
  border: 1px solid var(--color-code-border);
  color: var(--color-ocean);
  padding: 0.1em 0.4em;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.875em;
}

/* ── Code blocks ────────────────────────────────────────────── */
.code-block-wrapper {
  position: relative;
  margin: 1.5rem 0;
}
pre[class*="language-"],
pre:not([class]) {
  background: #EBF6FB !important;
  border: 1px solid var(--color-code-border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--color-navy) !important;
}
code[class*="language-"] { color: var(--color-navy) !important; }

/* Prism token overrides to match colour scheme */
.token.comment, .token.prolog, .token.doctype, .token.cdata { color: var(--color-text-muted); font-style: italic; }
.token.keyword, .token.rule       { color: var(--color-ocean); font-weight: 600; }
.token.string, .token.attr-value  { color: #2a7c3f; }
.token.number, .token.boolean     { color: var(--color-tangerine); }
.token.function, .token.class-name{ color: #8b3a9e; }
.token.property, .token.tag       { color: var(--color-ocean); }
.token.operator, .token.punctuation { color: var(--color-text-muted); }
.token.important, .token.bold     { font-weight: 700; }

/* Copy button */
.copy-btn {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  background: var(--color-surface);
  border: 1px solid var(--color-code-border);
  border-radius: 5px;
  padding: 0.3rem 0.7rem;
  font-size: 0.75rem;
  font-family: var(--font-sans);
  color: var(--color-ocean);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.copy-btn:hover  { background: var(--color-sky-blue); color: var(--color-navy); }
.copy-btn.copied { background: #d4edda; color: #1a7a34; border-color: #a3d9b1; }

/* ── Tables ─────────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; margin: 1.5rem 0; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  white-space: nowrap;
  background: var(--color-surface);
}
thead tr { background: var(--color-navy); color: #fff; }
thead th { padding: 0.75rem 1rem; text-align: left; font-weight: 600; white-space: nowrap; }
tbody tr:nth-child(even) { background: var(--color-code-bg); }
tbody tr:hover { background: #daeef8; }
tbody td { padding: 0.7rem 1rem; border-bottom: 1px solid var(--color-border); white-space: normal; }

/* ── Task list / checkboxes ─────────────────────────────────── */
.task-list-item { list-style: none; padding-left: 0; display: flex; align-items: flex-start; gap: 0.5rem; }
.task-list-item input[type="checkbox"] {
  margin-top: 0.25rem;
  width: 17px;
  height: 17px;
  accent-color: var(--color-ocean);
  cursor: pointer;
  flex-shrink: 0;
}
.task-list-item label { cursor: pointer; }
.task-list-item input:checked + label,
.task-list-item.is-checked label { text-decoration: line-through; color: var(--color-text-muted); }

/* ── FAQ Accordion ──────────────────────────────────────────── */
.faq-section h2, .faq-section h3 { color: var(--color-ocean); }
.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin: 0.6rem 0;
  overflow: hidden;
  background: var(--color-surface);
}
.faq-item + .faq-item { border-top: none; border-radius: 0; }
.faq-item:first-of-type { border-radius: var(--radius) var(--radius) 0 0; }
.faq-item:last-of-type  { border-radius: 0 0 var(--radius) var(--radius); }
.faq-question {
  padding: 1rem 1.2rem;
  font-weight: 600;
  color: var(--color-navy);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  user-select: none;
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question::after { content: '+'; font-size: 1.3rem; color: var(--color-sky-blue); transition: transform var(--transition); }
details[open] .faq-question::after { content: '−'; transform: rotate(180deg); }
.faq-answer { padding: 0 1.2rem 1rem; color: var(--color-text-muted); border-top: 1px solid var(--color-border); padding-top: 0.75rem; }

/* ── Mermaid diagrams ───────────────────────────────────────── */
.mermaid { margin: 1.5rem 0; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1.25rem; text-align: center; overflow-x: auto; }

/* ── Related content nav ────────────────────────────────────── */
.related-nav {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--color-border);
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.related-nav a {
  flex: 1;
  min-width: 200px;
  padding: 1rem 1.25rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.related-nav a:hover { border-color: var(--color-sky-blue); box-shadow: var(--shadow-sm); }
.related-nav .label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-text-muted); margin-bottom: 0.25rem; }
.related-nav .title { font-weight: 600; color: var(--color-ocean); font-size: 0.95rem; }

/* ── Section intro block ────────────────────────────────────── */
.section-intro {
  background: linear-gradient(135deg, var(--color-navy) 0%, #0a3d5c 100%);
  color: #fff;
  padding: clamp(2rem, 5vw, 4rem) var(--content-pad);
}
.section-intro-inner { max-width: var(--content-max); margin: 0 auto; }
.section-intro h1 {
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  color: var(--color-sky-blue);
  margin-bottom: 0.75rem;
}
.section-intro p { color: #B8D9ED; font-size: 1.05rem; max-width: 720px; }

/* ── Home feature strip ─────────────────────────────────────── */
.home-features {
  padding: clamp(2.5rem, 6vw, 5rem) var(--content-pad);
  background: var(--color-surface);
}
.home-features-inner { max-width: var(--content-max); margin: 0 auto; }
.home-features h2 { text-align: center; margin-bottom: 2.5rem; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .site-nav { display: none; position: absolute; top: var(--header-height); left: 0; right: 0; background: var(--color-navy); flex-direction: column; padding: 1rem var(--content-pad); border-top: 1px solid rgba(255,255,255,.1); }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 0.7rem 1rem; width: 100%; }
  .nav-toggle { display: flex; }
  .hero-ctas { flex-direction: column; align-items: center; }
  .related-nav { flex-direction: column; }
}
@media (max-width: 480px) {
  table { font-size: 0.8rem; }
  .card-grid { grid-template-columns: 1fr; }
}

