/*
 * Geoprism Registry home page.
 * Used only by _layouts/home.html; the /docs/ pages use Just the Docs.
 */

/* ---------- Tokens ---------- */
:root {
  /* Palette: aligned with the Geoprism Registry app theme
     (georegistry-ui/src/styles/theme.css):
     #3E2A5A dark purple, #A29BAB light purple, #6BA542 green,
     #7C868D grey, #DBD7A5 yellow. */
  --c-brand-purple: #3E2A5A;
  --c-brand-purple-light: #A29BAB;
  --c-brand-green: #6BA542;
  --c-brand-yellow: #DBD7A5;

  --c-ink: #16141F;
  --c-text: #3E3A47;
  --c-muted: #625C6B;
  --c-ground: #F8F8FB;
  --c-alt: #EFEDF3;
  --c-white: #FFFFFF;
  --c-border: #E1DEE6;
  --c-border-strong: #CFCAD6;
  --c-line: #B7B0C1;
  --c-rule: #ECEAF0;
  --c-contour: #D3CEDB;
  --c-placeholder: #9D94AC;
  --c-accent: var(--c-brand-purple);
  --c-accent-hover: #2A1C3D;
  --c-change: #467328;          /* brand green darkened to 5.6:1 for text and outlines */
  --c-change-fill: #E3EFD9;
  --c-area-fill: #ECEAF0;

  /* Dark band (brand purple) */
  --c-dark-bg: var(--c-brand-purple);
  --c-dark-text: #F1EFF5;
  --c-dark-muted: #D5D0DD;
  --c-dark-eyebrow: var(--c-brand-yellow);
  --c-dark-border: var(--c-brand-purple-light);
  --c-dark-rule: #55426F;
  --c-dark-footer: #C9C2D3;

  /* Type */
  --font-sans: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --fs-xs: 13px;
  --fs-sm: 15px;
  --fs-md: 16px;
  --fs-base: 17px;
  --fs-lead: 20px;
  --fs-h1: clamp(40px, 5.4vw, 64px);
  --fs-h2: clamp(28px, 1.2rem + 2.2vw, 38px);
  --fs-h2-dark: clamp(28px, 1.2rem + 1.8vw, 34px);

  /* Spacing & shape */
  --container: 1200px;
  --gutter: 32px;
  --section-y: 96px;
  --radius-sm: 4px;
  --radius: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --shadow-card: 0 1px 2px rgba(19, 35, 46, 0.06), 0 12px 32px rgba(19, 35, 46, 0.06);
  --focus: 3px solid var(--c-accent);
  --tap: 44px;
}

@media (max-width: 600px) {
  :root {
    --gutter: 20px;
    --section-y: 64px;
    --fs-lead: 18px;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body.home {
  margin: 0;
  background: var(--c-ground);
  color: var(--c-ink);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.55;
  overflow-wrap: break-word;
}

.home h1, .home h2, .home h3, .home p { margin: 0; }
.home ul, .home ol { margin: 0; padding: 0; list-style: none; }
.home img { max-width: 100%; height: auto; display: block; }

.home a { color: var(--c-accent); }
.home a:hover { color: var(--c-accent-hover); }

.home :focus-visible {
  outline: var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}
.band--dark :focus-visible,
.site-footer :focus-visible { outline-color: var(--c-dark-eyebrow); }

[hidden] { display: none !important; }

.container {
  max-width: calc(var(--container) + 2 * var(--gutter)); /* --container is the content width */
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 8px;
  top: -100px;
  z-index: 10;
  padding: 12px 16px;
  background: var(--c-ink);
  color: var(--c-white) !important;
  border-radius: var(--radius);
  font-weight: 500;
}
.skip-link:focus { top: 8px; }

/* ---------- Shared pieces ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 400;
  line-height: 1.4;
  color: var(--c-accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.eyebrow--muted { color: var(--c-muted); }
.eyebrow--dark { color: var(--c-dark-eyebrow); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
}
.btn svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.btn--sm { min-height: var(--tap); padding: 10px 16px; }
.home .btn--primary { background: var(--c-accent); color: var(--c-white); }
.home .btn--primary:hover { background: var(--c-accent-hover); color: var(--c-white); }
.home .btn--outline { border-color: var(--c-ink); color: var(--c-ink); }
.home .btn--outline:hover { background: var(--c-ink); color: var(--c-white); }
.home .btn--light { padding: 0 20px; background: var(--c-white); color: var(--c-ink); }
.home .btn--light:hover { background: var(--c-dark-text); color: var(--c-ink); }
.home .btn--ghost { padding: 0 20px; border-color: var(--c-dark-border); color: var(--c-white); }
.home .btn--ghost:hover { border-color: var(--c-white); color: var(--c-white); }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }
.community .btn-row { gap: 12px; padding-top: 6px; }

/* Plain text label, deliberately unboxed so it doesn't read as a button */
.tag {
  display: inline-flex;
  align-items: center;
  color: var(--c-muted);
}
/* Official DPGA badge (img.shields.io). Shown as-is; the link is padded to a 44px target. */
.dpg-badge { display: inline-flex; align-items: center; min-height: var(--tap); margin: -7px 0; }
.dpg-badge img { display: block; height: 28px; width: auto; }

/* Bracketed placeholders still to be filled in */
.placeholder {
  border: 1px dashed var(--c-placeholder);
  font-family: var(--font-mono);
  color: var(--c-muted);
}
.placeholder-text {
  padding: 0 2px;
  background: var(--c-brand-yellow);
  color: var(--c-ink);
  font-family: inherit;
}

/* ---------- Header / nav ---------- */
.site-header {
  background: var(--c-ground);
  border-bottom: 1px solid var(--c-border);
}
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding-top: 18px;
  padding-bottom: 18px;
}
.home .brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: var(--tap);
  color: var(--c-ink);
  text-decoration: none;
}
.brand__mark { width: 32px; height: 32px; flex: none; }
.brand__name { font-weight: 600; font-size: 19px; letter-spacing: -0.01em; }

.nav-menu {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 28px;
  font-size: var(--fs-sm);
}
.home .nav-menu__link {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  color: var(--c-ink);
  text-decoration: none;
}
.home .nav-menu__link:hover { color: var(--c-accent); text-decoration: underline; text-underline-offset: 4px; }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: var(--tap);
  min-width: var(--tap);
  padding: 0 14px;
  border: 1px solid var(--c-ink);
  border-radius: var(--radius);
  background: transparent;
  color: var(--c-ink);
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 500;
  cursor: pointer;
}
.nav-toggle svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

@media (min-width: 860px) {
  .nav-toggle { display: none !important; }
}
@media (max-width: 859px) {
  /* Without JS the menu simply wraps below the brand. With JS it collapses behind the button. */
  .nav-menu { gap: 0 20px; }
  .site-header.has-js .nav-menu { display: none; }
  .site-header.has-js .nav-menu.is-open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    padding: 8px 0 4px;
    border-top: 1px solid var(--c-border);
  }
  .site-header.has-js .nav-menu.is-open li { width: 100%; }
  .site-header.has-js .nav-menu.is-open .nav-menu__link { width: 100%; }
  .site-header.has-js .nav-menu.is-open .btn { margin-top: 8px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--c-border);
}
.hero__contours {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  fill: none;
  stroke: var(--c-contour);
  stroke-width: 1;
}
.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
  gap: 64px;
  align-items: center;
  padding-top: 88px;
  padding-bottom: 96px;
}
.hero__copy { display: flex; flex-direction: column; gap: 28px; }
.hero__badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.hero__title {
  font-size: var(--fs-h1);
  line-height: 1.04;
  letter-spacing: -0.025em;
  font-weight: 600;
}
.hero__lead { font-size: var(--fs-lead); color: var(--c-text); max-width: 34em; }

@media (max-width: 600px) {
  .hero__inner { gap: 48px; padding-top: 56px; padding-bottom: 64px; }
}

/* Map card */
.map-card {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  padding: 24px;
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}
.map-card__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.map-card__bar .eyebrow { letter-spacing: 0.05em; }
.map-card__caption {
  padding-top: 14px;
  border-top: 1px solid var(--c-rule);
  font-size: var(--fs-sm);
  color: var(--c-text);
}
@media (max-width: 600px) { .map-card { padding: 18px; } }

.toggle {
  display: flex;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  overflow: hidden;
}
.toggle__btn {
  min-height: var(--tap);
  min-width: var(--tap);
  padding: 0 16px;
  border: 0;
  background: var(--c-white);
  color: var(--c-ink);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.toggle__btn:hover { background: var(--c-alt); }
.toggle__btn[aria-pressed="true"] { background: var(--c-ink); color: var(--c-white); font-weight: 600; }
.toggle__btn:focus-visible { outline-offset: -3px; }

.map { display: block; width: 100%; height: auto; }
.map__area { fill: var(--c-area-fill); stroke: var(--c-ink); stroke-width: 1.5; }
.map__area--changed { fill: var(--c-change-fill); stroke: var(--c-change); stroke-width: 2; }
.map__name { font-family: var(--font-sans); font-size: 15px; font-weight: 600; fill: var(--c-ink); text-anchor: middle; }
.map__name--sm { font-size: 14px; }
.map__id { font-family: var(--font-mono); font-size: 11px; fill: var(--c-muted); text-anchor: middle; }

/* ---------- Sections ---------- */
.section {
  display: flex;
  flex-direction: column;
  gap: 48px;
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
}
.section--tight { gap: 36px; }
.section__head { display: flex; flex-direction: column; gap: 14px; max-width: 760px; }
.section__head--split {
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 24px;
  max-width: none;
}
.section__head--split > .section__head { max-width: 700px; }
.section__title {
  font-size: var(--fs-h2);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 600;
}
.section__title--dark { font-size: var(--fs-h2-dark); color: var(--c-white); }
.section__lead { font-size: 19px; color: var(--c-text); }
.section__lead--sm { font-size: 18px; }
@media (max-width: 600px) { .section__lead, .section__lead--sm { font-size: var(--fs-base); } }

.home .text-link { display: inline-flex; align-items: center; min-height: var(--tap); font-weight: 500; }

.band { border-top: 1px solid var(--c-border); border-bottom: 1px solid var(--c-border); }
.band--alt { background: var(--c-alt); }
.band--white { background: var(--c-white); }
.band--dark { border: 0; background: var(--c-dark-bg); color: var(--c-dark-text); }

/* Grids */
.grid { display: grid; }
.grid--why { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 24px; }
.grid--steps { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px; }
.grid--uses { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 24px; }
.grid--features { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 40px 48px; }
.grid--partners { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 16px; }

/* Cards */
.card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px;
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
}
.card--step { padding: 26px; border-color: var(--c-border-strong); }
.card__num { font-family: var(--font-mono); font-size: 14px; color: var(--c-change); }
.card__title { font-size: 21px; font-weight: 600; }
.card__title--lg { font-size: 22px; }
.card__text { color: var(--c-text); }
.card__text--sm { font-size: var(--fs-md); }

.step__top { display: flex; align-items: center; justify-content: space-between; }
.step__num { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--c-muted); }
.step__icon { fill: none; stroke: var(--c-brand-green); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.screenshot {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--c-white);
  border: 1px solid var(--c-border);
}
.screenshot--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 340px;
  padding: 24px;
  text-align: center;
  font-size: 14px;
}
@media (max-width: 600px) { .screenshot--placeholder { min-height: 220px; } }

/* Use cases */
.use {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 20px;
  border-top: 2px solid var(--c-ink);
}
.use__title { font-size: 20px; font-weight: 600; }

.aligned {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 28px;
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
}
.aligned__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 28px;
  font-size: var(--fs-md);
  font-weight: 500;
}
.aligned__list li { display: inline-flex; align-items: center; min-height: var(--tap); }
.home .aligned__list a { display: inline-flex; align-items: center; min-height: var(--tap); color: var(--c-ink); }
.home .aligned__list a:hover { color: var(--c-accent); }

/* What's new */
.feature { display: flex; flex-direction: column; gap: 8px; }
.feature__title { font-size: 19px; font-weight: 600; }

/* Partners */
.partner {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 128px;
  padding: 16px;
  text-align: center;
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  font-weight: 500;
}
.partner img { max-height: 64px; width: auto; }
.partner--placeholder { background: transparent; font-size: var(--fs-xs); font-weight: 400; }

/* ---------- Community (dark) ---------- */
.community {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 56px;
  padding-top: 88px;
  padding-bottom: 88px;
}
@media (max-width: 600px) { .community { gap: 48px; padding-top: 64px; padding-bottom: 64px; } }
.community__intro { display: flex; flex-direction: column; gap: 18px; }
.community__text { color: var(--c-dark-muted); }
.community__links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.community__heading { font-size: var(--fs-sm); font-weight: 600; color: var(--c-white); }
.community__list { display: flex; flex-direction: column; margin-top: 2px !important; }
.community__list li { display: flex; }
.home .community__list a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  color: var(--c-dark-muted);
}
.home .community__list a:hover { color: var(--c-white); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--c-dark-bg);
  border-top: 1px solid var(--c-dark-rule);
  color: var(--c-dark-footer);
  font-size: 14px;
}
.site-footer__inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 24px;
  padding-bottom: 24px;
}
