/* ==========================================================================
   Astrondo light theme
   Brand palette taken from the SVG logos:
   navy #17253f · teal #3a9ca8 · orange #e8792b · blue #0b6aac · mint #dbeceb
   ========================================================================== */

:root {
  --navy: #17253f;
  --navy-soft: #33415a;
  --teal: #3a9ca8;
  --teal-dark: #2c7d88;
  --orange: #e8792b;
  --orange-dark: #cf6410;
  --blue: #0b6aac;

  --ink: #17253f;      /* headings */
  --body: #4c5a6e;     /* paragraph text */
  --muted: #7c8798;    /* secondary text */

  --bg: #f5f8fb;       /* page background */
  --bg-alt: #eef3f8;   /* alternating section */
  --surface: #ffffff;  /* cards */
  --mint: #dbeceb;     /* pale teal fill */
  --line: #e3eaf1;     /* borders */

  --shadow: 0 1px 2px rgba(23, 37, 63, 0.04), 0 8px 24px rgba(23, 37, 63, 0.06);
  --shadow-lg: 0 12px 40px rgba(23, 37, 63, 0.12);
  --radius: 16px;
  --maxw: 1160px;
  --font: 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  line-height: 1.65;
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; }

a { color: var(--teal-dark); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem; }

/* ------------------------------------------------------------------ Nav */
header { position: sticky; top: 0; z-index: 1000; }

.navbar {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav-container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.7rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.logo a { display: inline-flex; align-items: center; text-decoration: none; }
.logo img { height: 38px; width: auto; display: block; }

.nav-menu { display: flex; list-style: none; gap: 0.35rem; align-items: center; }

.nav-menu a {
  color: var(--navy);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-menu a:hover { color: var(--teal-dark); background: var(--bg-alt); }
.nav-menu a.active { color: var(--teal-dark); background: var(--mint); }

/* --------------------------------------------------------------- Buttons */
.cta-buttons { display: flex; gap: 0.9rem; flex-wrap: wrap; }
.hero .cta-buttons { justify-content: center; }

.btn {
  padding: 0.8rem 1.7rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.98rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
  border: 2px solid transparent;
  display: inline-block;
  cursor: pointer;
}

.btn.primary { background: var(--orange); color: #fff; box-shadow: 0 8px 18px rgba(232, 121, 43, 0.28); }
.btn.primary:hover { background: var(--orange-dark); transform: translateY(-2px); box-shadow: 0 12px 24px rgba(232, 121, 43, 0.34); }

.btn.secondary { border-color: var(--teal); color: var(--teal-dark); background: transparent; }
.btn.secondary:hover { background: var(--teal); color: #fff; transform: translateY(-2px); }

/* ------------------------------------------------------------------ Hero */
.hero {
  text-align: center;
  padding: 6rem 1.5rem 5rem;
  background:
    radial-gradient(1100px 500px at 50% -10%, rgba(58, 156, 168, 0.16), transparent 70%),
    radial-gradient(900px 400px at 85% 0%, rgba(232, 121, 43, 0.10), transparent 70%),
    var(--bg);
  border-bottom: 1px solid var(--line);
}

.hero-content { max-width: 760px; margin: 0 auto; }
.hero-mark { height: 128px; width: auto; margin-bottom: 1.5rem; }

.hero-content h1 {
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  letter-spacing: -0.02em;
  margin-bottom: 0.8rem;
}

.hero-content h2 {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: var(--teal-dark);
  font-weight: 600;
  margin-bottom: 1.2rem;
}

.hero-content p {
  font-size: 1.12rem;
  color: var(--body);
  max-width: 620px;
  margin: 0 auto 2rem;
}

/* --------------------------------------------------------------- Sections */
section { padding: 4.5rem 0; }
.section-alt { background: var(--bg-alt); }

.section-head { text-align: center; max-width: 680px; margin: 0 auto 3rem; }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.5rem); letter-spacing: -0.02em; }
.section-head h2::after {
  content: ""; display: block; width: 56px; height: 4px; border-radius: 2px;
  background: linear-gradient(90deg, var(--teal), var(--orange));
  margin: 0.9rem auto 0;
}
.section-head p { margin-top: 1rem; color: var(--body); font-size: 1.08rem; }

/* Standalone section h2 (used on inner pages) */
.subpage section > .container > h2:first-child,
section.services h2,
section.about h2 { }

/* Inner pages clear nothing extra (nav is sticky, not fixed) */
.subpage { padding-top: 1rem; }

/* --------------------------------------------------------------- Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.4rem;
}

.service-card {
  background: var(--surface);
  padding: 2rem 1.6rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: rgba(58, 156, 168, 0.4); }

.service-icon {
  font-size: 1.8rem;
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  background: var(--mint);
  border-radius: 14px;
  margin-bottom: 1.1rem;
}
.service-card h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.service-card p { color: var(--body); }

/* --------------------------------------------------------------- Products */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.6rem;
}

.product-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  background: var(--surface);
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: rgba(58, 156, 168, 0.45); }

.product-logo { height: 84px; width: auto; margin-bottom: 1.2rem; align-self: flex-start; }
.product-card h3 { font-size: 1.4rem; margin-bottom: 0.6rem; }
.product-card p { color: var(--body); margin-bottom: 1.2rem; flex: 1; }
.product-link { color: var(--orange-dark); font-weight: 700; margin-top: auto; }
.product-card:hover .product-link { color: var(--orange); }

/* ---------------------------------------------------------- Product pages */
.product-hero {
  text-align: center;
  padding: 4.5rem 1.5rem 4rem;
  background:
    radial-gradient(900px 420px at 50% -10%, rgba(58, 156, 168, 0.15), transparent 70%),
    var(--bg);
  border-bottom: 1px solid var(--line);
}
.product-hero .container { max-width: 820px; }
.product-hero-logo { height: 132px; width: auto; margin-bottom: 1.4rem; }
.product-hero h1 { font-size: clamp(2.2rem, 5vw, 3rem); letter-spacing: -0.02em; margin-bottom: 0.6rem; }
.product-hero h2 { font-size: clamp(1.1rem, 2.4vw, 1.5rem); color: var(--teal-dark); font-weight: 600; margin-bottom: 1.3rem; }
.product-hero p { font-size: 1.12rem; color: var(--body); margin-bottom: 2rem; }

.breadcrumb { font-size: 0.9rem; color: var(--muted); margin-bottom: 1.2rem; }
.breadcrumb a { color: var(--teal-dark); text-decoration: none; font-weight: 600; }
.breadcrumb a:hover { text-decoration: underline; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.4rem;
}
.feature-card {
  background: var(--surface);
  padding: 1.8rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.feature-icon {
  font-size: 1.6rem;
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  background: var(--mint); border-radius: 12px; margin-bottom: 1rem;
}
.feature-card h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.feature-card p { color: var(--body); }
.feature-card code {
  background: var(--bg-alt);
  padding: 1px 6px; border-radius: 5px;
  color: var(--navy); font-size: 0.9em;
  border: 1px solid var(--line);
}

/* Simple prose blocks on product pages */
.prose { max-width: 760px; margin: 0 auto; }
.prose p { color: var(--body); font-size: 1.08rem; margin-bottom: 1.2rem; }
.prose h3 { font-size: 1.4rem; margin: 2rem 0 0.8rem; }
.prose ul { margin: 0 0 1.2rem 1.2rem; color: var(--body); }
.prose li { margin-bottom: 0.5rem; }

/* Callout band */
.cta-band { text-align: center; }
.cta-band .container { max-width: 720px; }
.cta-band h2 { font-size: clamp(1.6rem, 3.5vw, 2.1rem); margin-bottom: 0.8rem; }
.cta-band p { color: var(--body); font-size: 1.1rem; margin-bottom: 1.8rem; }
.cta-band .cta-buttons { justify-content: center; }

/* ------------------------------------------------------------------ About */
.about-content {
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  gap: 3rem;
  align-items: start;
}
.about-text p { margin-bottom: 1.3rem; color: var(--body); font-size: 1.08rem; }
.about-stats { display: flex; flex-direction: column; gap: 1rem; }
.stat {
  padding: 1.4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.stat h3 { font-size: 1.4rem; color: var(--teal-dark); margin-bottom: 0.15rem; }
.stat p { color: var(--muted); font-weight: 600; font-size: 0.92rem; }

/* ----------------------------------------------------------------- Footer */
footer {
  background: var(--navy);
  color: #c7d2e0;
  text-align: center;
  padding: 2.5rem 0;
}
footer .container { display: flex; flex-direction: column; gap: 0.5rem; }
footer img { height: 34px; width: auto; margin: 0 auto 0.8rem; }
footer p { color: #9fb0c4; font-size: 0.95rem; }
footer a { color: #bcd3d8; }

/* ================================================================ SeaRoute
   Demo widget: light panel around a Leaflet map                           */
.demo-intro {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 2.2rem;
  color: var(--body);
  font-size: 1.08rem;
}

.srd { display: grid; gap: 1.4rem; }

.srd-map {
  position: relative;
  height: 520px;
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
  background: #cfe0e6;         /* sea tone behind empty tiles */
  box-shadow: var(--shadow);
  isolation: isolate;
}

.srd-badge {
  position: absolute;
  top: 12px; right: 12px;
  z-index: 500;
  background: rgba(255, 255, 255, 0.92);
  color: var(--teal-dark);
  border: 1px solid var(--teal);
  padding: 6px 12px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 700;
  pointer-events: none;
  box-shadow: var(--shadow);
}

.srd-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.srd-hint { color: var(--body); margin-bottom: 1rem; min-height: 1.5rem; }

.srd-presets { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1rem; }

.srd-btn {
  padding: 0.5rem 1rem;
  border-radius: 50px;
  border: 1px solid var(--teal);
  background: transparent;
  color: var(--teal-dark);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.srd-btn:hover { background: var(--teal); color: #fff; transform: translateY(-1px); }

.srd-reset { border-color: var(--line); color: var(--muted); margin-left: auto; }
.srd-reset:hover { background: var(--bg-alt); color: var(--navy); }

.srd-replay { border-color: var(--orange); color: var(--orange-dark); }
.srd-replay:hover { background: var(--orange); color: #fff; }

.srd-stats { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 0.5rem; }
.srd-stats > div {
  flex: 1 1 120px;
  text-align: center;
  padding: 1rem;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.srd-stats span { display: block; font-size: 1.7rem; font-weight: 700; color: var(--navy); }
.srd-stats span small { font-size: 1rem; }
.srd-stats label { display: block; margin-top: 0.25rem; font-size: 0.85rem; color: var(--muted); }

.srd-foot { margin-top: 1.2rem; font-size: 0.85rem; color: var(--muted); }

.srd-spinner {
  width: 28px; height: 28px;
  border: 3px solid var(--mint);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: srd-spin 0.8s linear infinite;
  margin: 0.5rem 0;
}
@keyframes srd-spin { to { transform: rotate(360deg); } }

.srd-map .leaflet-control-attribution { background: rgba(255, 255, 255, 0.8); color: #55606f; }
.srd-map .leaflet-control-attribution a { color: var(--teal-dark); }

/* ============================================================ AngloTiles
   Side-by-side tile comparison (raw OpenStreetMap vs AngloTiles)           */
.compare-intro {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 2.2rem;
  color: var(--body);
  font-size: 1.08rem;
}

.anglo-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.anglo-pane {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #cfe0e6;   /* sea tone behind empty tiles */
  isolation: isolate;    /* keep Leaflet controls below the sticky navbar */
}

.anglo-map { height: 440px; width: 100%; }

.anglo-label {
  position: absolute;
  top: 12px; right: 12px;
  z-index: 500;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 50px;
  padding: 5px 13px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--navy);
  box-shadow: var(--shadow);
  pointer-events: none;
}
.anglo-label.is-anglo { color: var(--teal-dark); border-color: var(--teal); }

.anglo-hint { text-align: center; margin-top: 1rem; font-size: 0.9rem; color: var(--muted); }

.anglo-map .leaflet-control-attribution { background: rgba(255, 255, 255, 0.8); color: #55606f; }
.anglo-map .leaflet-control-attribution a { color: var(--teal-dark); }

/* ------------------------------------------------------------- Responsive */
@media (max-width: 760px) {
  .anglo-compare { grid-template-columns: 1fr; }
  .anglo-map { height: 340px; }
}

@media (max-width: 820px) {
  .about-content { grid-template-columns: 1fr; }
  .about-stats { flex-direction: row; flex-wrap: wrap; }
  .about-stats .stat { flex: 1 1 150px; }
}

@media (max-width: 680px) {
  .nav-container { flex-wrap: wrap; }
  .nav-menu { gap: 0.1rem; }
  .nav-menu a { padding: 0.4rem 0.6rem; font-size: 0.9rem; }
  .cta-buttons { flex-direction: column; align-items: stretch; }
  .hero .cta-buttons, .cta-band .cta-buttons { align-items: center; }
  .srd-map { height: 400px; }
  .srd-reset { margin-left: 0; }
}

