/* ==========================================================================
   MyGPSConverter — standalone app site
   Structured like the rcsentinel.com / mygpswaypoints.com app sites,
   styled with the GPX Analyzer design system (cream/ink/gold instrument
   look; IBM Plex Mono + Barlow).
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600;700&family=Barlow:wght@400;500;600;700&display=swap");

/* --------------------------------------------------------------------------
   Design tokens
   -------------------------------------------------------------------------- */
:root {
  --gold-200: #EBD79E;
  --gold-300: #E0C067;
  --gold-500: #C9992B;
  --gold-700: #9C7418;
  --gold-800: #7C5B12;

  --ink-900: #22251C;
  --ink-700: #3A3D31;
  --ink-500: #5C5F50;
  --ink-300: #8B8D7F;

  --cream-50: #FBF8EC;
  --cream-100: #F4EEDA;
  --cream-200: #EAE0C2;
  --cream-300: #DDD0A8;

  --red-600: #C1272D;
  --red-700: #9E1F24;
  --cactus-600: #6E7F3C;
  --cactus-700: #55632D;

  --surface-page: var(--cream-100);
  --surface-card: var(--cream-50);
  --surface-inset: var(--cream-200);
  --text-primary: var(--ink-900);
  --text-secondary: var(--ink-500);
  --text-muted: var(--ink-300);
  --text-brand: var(--gold-700);
  --border-default: #D4C79E;
  --border-subtle: #E4DBBE;
  --focus-ring: rgba(201, 153, 43, 0.5);

  --font-mono: "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;
  --font-sans: "Barlow", "Helvetica Neue", Arial, sans-serif;
  --tracking-label: 0.08em;
  --tracking-wide: 0.14em;

  --radius-sm: 3px;
  --radius-md: 6px;
  --container-max: 1160px;

  --shadow-card: 0 1px 2px rgba(34, 37, 28, 0.08);
  --shadow-hard: 3px 3px 0 var(--ink-900);
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --duration-fast: 120ms;

  --dune-lines: repeating-linear-gradient(180deg,
      var(--cream-100) 0px, var(--cream-100) 10px,
      rgba(201, 153, 43, 0.05) 10px, rgba(201, 153, 43, 0.05) 11px);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--surface-page);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-mono);
  line-height: 1.15;
  color: var(--text-primary);
}

a { color: var(--text-brand); text-decoration-color: var(--gold-300); transition: color var(--duration-fast) var(--ease-out); }
a:hover { color: var(--gold-800); }

img { max-width: 100%; }

::selection { background: var(--gold-300); color: var(--ink-900); }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
}

.eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-brand);
}

.accent { color: var(--gold-700); }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--gold-500);
  color: var(--ink-900);
  border: 1px solid var(--gold-700);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  vertical-align: middle;
}

/* --------------------------------------------------------------------------
   Buttons & store badges
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  text-decoration: none;
  background: var(--ink-900);
  color: var(--cream-50);
  border: 1px solid var(--ink-900);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-out);
  white-space: nowrap;
}
.btn:hover { background: var(--ink-700); color: var(--cream-50); }
.btn:active { transform: translateY(1px); }

.btn.ghost {
  background: transparent;
  color: var(--ink-900);
  border-color: var(--ink-900);
}
.btn.ghost:hover { background: var(--cream-200); color: var(--ink-900); }

.stores { display: flex; gap: 12px; flex-wrap: wrap; margin: 20px 0 12px; }

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: var(--ink-900);
  color: var(--cream-50);
  border: 1px solid var(--ink-900);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: background var(--duration-fast) var(--ease-out);
}
.store-badge:hover { background: var(--ink-700); color: var(--cream-50); }
.store-badge i { font-size: 24px; }
.store-badge .lines { display: flex; flex-direction: column; line-height: 1.25; }
.store-badge small {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--cream-200);
}
.store-badge strong {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.02em;
}

.cta-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

/* --------------------------------------------------------------------------
   Hero — split layout on the dune band
   -------------------------------------------------------------------------- */
.hero {
  background: var(--dune-lines);
  border-bottom: 2px solid var(--ink-900);
  padding: 40px 0 48px;
}

.hero .container {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 40px;
  align-items: center;
}

.hero-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.hero-icon img {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  display: block;
}
.hero-brand .name {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.03em;
  color: var(--ink-900);
}
.hero-brand .name em { font-style: normal; color: var(--gold-700); }

.hero-copy .eyebrow { margin-bottom: 12px; }

.hero-copy h1 {
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}

.hero-copy p {
  font-size: 16px;
  color: var(--ink-700);
  max-width: 540px;
}

/* Hero image — quiet 1px gold hairline, same as the section-title rules */
.hero-image {
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-card);
}
.hero-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero-image .caption {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  border-top: 1px solid var(--border-default);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--text-secondary);
  background: var(--surface-card);
}

/* Coordinate readout strip — the instrument motif */
.coord-readout {
  display: flex;
  background: var(--ink-900);
  border-radius: var(--radius-sm);
  overflow: hidden;
  font-family: var(--font-mono);
  max-width: 620px;
  margin-top: 22px;
}
.coord-readout > div {
  flex: 1;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  border-left: 1px solid var(--ink-700);
}
.coord-readout > div:first-child { border-left: none; }
.coord-readout .coord-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--gold-300);
}
.coord-readout .coord-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--cream-50);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --------------------------------------------------------------------------
   Content blocks
   -------------------------------------------------------------------------- */
.block { padding: 44px 0; }
.block.alt {
  background: var(--surface-card);
  border-top: 1px solid var(--border-default);
  border-bottom: 1px solid var(--border-default);
}

.section-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-default);
}

.section-intro { color: var(--text-secondary); max-width: 640px; margin: -8px 0 20px; }

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 24px;
  align-items: start;
}
.about-grid .app-logo img {
  width: 96px;
  height: 96px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
}
.about-grid p { margin-bottom: 12px; color: var(--ink-700); }

/* Screenshot gallery */
.gallery {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}
.gallery img {
  width: 260px;
  max-width: 100%;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

/* Feature checklist */
.features { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.features li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-left: 3px solid var(--gold-500);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}
.features li i { color: var(--cactus-600); margin-top: 3px; }
.features li b { font-family: var(--font-mono); font-size: 14px; }
.features li span { color: var(--ink-700); }

/* Coordinate format cards */
.format-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}
.format-card {
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 14px 16px;
  transition: border-color var(--duration-fast) var(--ease-out);
}
.format-card:hover { border-color: var(--ink-900); }
.format-card h3 {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-brand);
  margin-bottom: 6px;
}
.format-card p { font-size: 13px; color: var(--text-secondary); margin-bottom: 10px; }
.format-card code {
  display: block;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-900);
  background: var(--surface-inset);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  overflow-x: auto;
  white-space: nowrap;
}

/* Photo CTA band */
.photo-band {
  position: relative;
  background-size: cover;
  background-position: center;
  border-top: 2px solid var(--ink-900);
  border-bottom: 2px solid var(--ink-900);
  padding: 56px 0;
}
.photo-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
      rgba(244, 238, 218, 0.96) 0%,
      rgba(244, 238, 218, 0.88) 42%,
      rgba(244, 238, 218, 0.30) 78%,
      rgba(244, 238, 218, 0.10) 100%);
}
.photo-band .container { position: relative; z-index: 1; }
.photo-band h2 { font-size: 30px; font-weight: 700; margin: 10px 0 12px; max-width: 560px; }
.photo-band p { color: var(--ink-700); max-width: 520px; }
.band--formats { background-image: url("../images/band-formats.png"); }

/* App info card */
.card {
  background: var(--surface-card);
  border: 2px solid var(--ink-900);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-hard);
  padding: 22px 24px;
}
.card h3 { font-size: 17px; font-weight: 700; margin-bottom: 12px; }
.card p { margin-bottom: 10px; color: var(--ink-700); }
.card p strong { font-family: var(--font-mono); font-size: 13px; }

/* Family cross-link strip */
.family-callout {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 14px 16px;
  margin-top: 24px;
}
.family-callout .text { flex: 1; min-width: 220px; }
.family-callout h3 { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.family-callout p { font-size: 13px; color: var(--text-secondary); }

/* --------------------------------------------------------------------------
   Footer — ink band, NexusWorks devby
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--ink-900);
  color: var(--cream-100);
  margin-top: 44px;
}
.site-footer .inner {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  padding-top: 26px;
  padding-bottom: 26px;
}
.devby { display: flex; align-items: center; gap: 12px; }
.devby img { height: 54px; width: auto; }
.devby span {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--cream-200);
}
.devby a { color: var(--gold-300); }
.devby a:hover { color: var(--gold-200); }
.footer-links { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.footer-links a {
  padding: 6px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  text-decoration: none;
  color: var(--cream-200);
}
.footer-links a:hover { color: var(--gold-300); }
.copyright {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: var(--tracking-label);
  color: var(--ink-300);
}

/* --------------------------------------------------------------------------
   Privacy / plain document pages
   -------------------------------------------------------------------------- */
.doc-topbar { background: var(--surface-card); border-bottom: 2px solid var(--ink-900); }
.doc-topbar-inner { max-width: 720px; margin: 0 auto; padding: 10px 20px; }
.doc-topbar a { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.doc-topbar img { width: 28px; height: 28px; border-radius: var(--radius-sm); }
.doc-topbar .name {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.03em;
  color: var(--ink-900);
}
.doc-topbar .name em { font-style: normal; color: var(--gold-700); }

.doc-page { max-width: 720px; margin: 0 auto; padding: 36px 20px 48px; }
.doc-page .eyebrow { margin-bottom: 10px; }
.doc-page h1 { font-size: 26px; font-weight: 700; margin-bottom: 6px; }
.doc-meta {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.doc-page h2 {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  margin: 26px 0 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}
.doc-page p { margin-bottom: 12px; color: var(--ink-700); }
.doc-footer {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px 40px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-image { max-width: 520px; }
  .hero-copy h1 { font-size: 32px; }
  .photo-band::before {
    background: linear-gradient(90deg,
        rgba(244, 238, 218, 0.95) 0%,
        rgba(244, 238, 218, 0.85) 60%,
        rgba(244, 238, 218, 0.55) 100%);
  }
}

@media (max-width: 600px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-grid .app-logo img { width: 72px; height: 72px; }
  .coord-readout { flex-wrap: wrap; }
  .coord-readout > div { flex: 1 1 40%; border-top: 1px solid var(--ink-700); }
  .coord-readout > div:nth-child(-n+2) { border-top: none; }
  .site-footer .inner { flex-direction: column; align-items: flex-start; gap: 14px; }
  .footer-links { margin-left: 0; }
}
