/* Good Neighbor — thegoodneighbor.community
 *
 * One stylesheet, no JavaScript, no web fonts. The site is served with
 * Content-Security-Policy: style-src 'self'; script-src 'none'; font-src 'self'
 * (see ./_headers), so there must be zero inline style="" attributes anywhere
 * in the HTML and nothing may be loaded from a third-party origin.
 *
 * Colour and type follow the iOS app. The page ground is WHITE, matching
 * gnCream = Color.white in the app, with cream #FBF5EC used only as a
 * full-bleed band behind the header art, the page titles and the footer.
 * White cards float on those bands the way gnCard() cards do in the app.
 * Headings use SF Rounded, body copy uses SF Pro — the same pairing as the UI.
 */

:root {
  /* brand */
  --espresso:   #3D2314;
  --cocoa:      #5D3A1A;
  --cream:      #FBF5EC;
  --sand:       #F1E7D6;
  --honey:      #E0A32E;
  --honey-deep: #B8801C;
  --sage:       #7E8C63;
  --sage-deep:  #5C6B45;
  --terracotta: #C56A46;
  --terra-deep: #9C4A2C;
  --brick:      #B23A2E;
  --wheat:      #E8CFA0;

  /* neutrals */
  --ink:    #2E1C0F;
  --dusk:   #4A3B2E;
  --taupe:  #8B7B6B;
  --border: #E6DCCB;

  /* layout */
  --measure: 42rem;
  --wide:    64rem;
  --radius:  16px;
  --shadow:  0 1px 2px rgba(61,35,20,.05), 0 8px 24px rgba(61,35,20,.06);

  --font-round: ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN",
                -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-body:  -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
                Roboto, Helvetica, Arial, system-ui, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: #FFFFFF;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

/* ---------- layout ---------- */

.wrap      { max-width: var(--measure); margin: 0 auto; padding: 0 1.25rem; }
.wrap-wide { max-width: var(--wide);    margin: 0 auto; padding: 0 1.25rem; }

.section       { padding: 3rem 0; }
.section-tight { padding: 1rem 0 2rem; }
.band-cream    { background: var(--cream); border-block: 1px solid var(--border); }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,.9);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 74px;
  padding-block: .5rem;
}

.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand-mark { display: block; height: 46px; width: auto; }
.brand:hover .brand-mark { opacity: .85; }

.nav {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .15rem;
  margin: 0;
  padding: 0;
}

.nav a {
  display: inline-block;
  padding: .4rem .75rem;
  border-radius: 999px;
  font-family: var(--font-round);
  font-weight: 600;
  font-size: .95rem;
  color: var(--cocoa);
  text-decoration: none;
}

.nav a:hover { background: var(--sand); color: var(--espresso); }
.nav a[aria-current="page"] { background: var(--sand); color: var(--espresso); }

/* ---------- type ---------- */

h1, h2, h3 {
  font-family: var(--font-round);
  color: var(--espresso);
  letter-spacing: -.02em;
  line-height: 1.18;
  margin: 0 0 .65rem;
  text-wrap: balance;
}

h1 { font-size: 2.5rem;  font-weight: 800; }
h2 { font-size: 1.6rem;  font-weight: 700; margin-top: 2.5rem; }
h3 { font-size: 1.12rem; font-weight: 700; }

h2:first-child, h3:first-child { margin-top: 0; }

p  { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1.25rem; padding-left: 1.25rem; }
li { margin-bottom: .4rem; }

a { color: var(--cocoa); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--espresso); }

strong { color: var(--espresso); }

.lede  { font-size: 1.2rem; line-height: 1.55; color: var(--dusk); }
.meta  { color: var(--taupe); font-size: .95rem; }
.small { font-size: .95rem; }

/* a short honey rule under a heading, the way the app accents section titles */
.rule { position: relative; padding-bottom: .85rem; }
.rule::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 2.75rem;
  height: 4px;
  border-radius: 2px;
  background: var(--honey);
}

.center { text-align: center; }
.center .rule::after { left: 50%; transform: translateX(-50%); }

/* ---------- hero ---------- */

.hero {
  background: var(--cream);
  border-bottom: 1px solid var(--border);
  padding: 3.5rem 0 3.25rem;
  text-align: center;
}

.hero-logo { display: block; width: 208px; margin: 0 auto 1.75rem; }

.hero h1 { font-size: 2.6rem; max-width: 18ch; margin-inline: auto; }
.hero .lede { max-width: 34rem; margin-inline: auto; }
.hero .pill-row { margin: 1.5rem 0 0; }

/* ---------- page head (privacy / terms / support / 404) ---------- */

.page-head {
  background: var(--cream);
  border-bottom: 1px solid var(--border);
  padding: 2.75rem 0 2.5rem;
}

.page-head h1 { margin: 0; font-size: 2.15rem; }

/* ---------- pieces ---------- */

.pill {
  display: inline-block;
  background: var(--wheat);
  color: var(--espresso);
  font-family: var(--font-round);
  font-weight: 700;
  font-size: .9rem;
  padding: .4rem .95rem;
  border-radius: 999px;
}

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

@media (min-width: 44rem) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
}

.card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.4rem 1.5rem;
  box-shadow: var(--shadow);
}

.card::before {
  content: "";
  display: block;
  width: 2.25rem;
  height: .4rem;
  border-radius: 999px;
  background: var(--honey);
  margin-bottom: .95rem;
}

.card-sage::before  { background: var(--sage); }
.card-terra::before { background: var(--terracotta); }
.card-cocoa::before { background: var(--cocoa); }

.card h3 { margin-bottom: .4rem; }
.card p  { margin: 0; color: var(--dusk); }

.panel {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem;
  box-shadow: var(--shadow);
}

.panel > :last-child { margin-bottom: 0; }
.panel-safety { border-left: 5px solid var(--terracotta); }
.panel h2 { margin-top: 0; }

.rows { display: grid; gap: .85rem; margin: 1.25rem 0 1.75rem; }

.row {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem 1.15rem;
}

.row-label {
  display: block;
  font-family: var(--font-round);
  font-weight: 700;
  color: var(--espresso);
  margin-bottom: .3rem;
}

.row p { margin: 0; color: var(--dusk); }

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 1.25rem 0 1.75rem;
  background: #FFFFFF;
}

table { border-collapse: collapse; width: 100%; min-width: 30rem; }

th, td {
  text-align: left;
  padding: .8rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  background: var(--sand);
  font-family: var(--font-round);
  font-weight: 700;
  font-size: .95rem;
  color: var(--espresso);
}

tbody tr:last-child td { border-bottom: 0; }

.btn {
  display: inline-block;
  background: var(--espresso);
  color: #FFFFFF;
  font-family: var(--font-round);
  font-weight: 700;
  text-decoration: none;
  padding: .72rem 1.4rem;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(61,35,20,.2);
}

.btn:hover { background: var(--cocoa); color: #FFFFFF; }

.btn-quiet {
  background: #FFFFFF;
  color: var(--espresso);
  border: 1.5px solid var(--espresso);
  box-shadow: none;
}

.btn-quiet:hover { background: var(--sand); color: var(--espresso); }

/* ---------- footer ---------- */

.site-footer {
  background: var(--cream);
  border-top: 1px solid var(--border);
  padding: 2.75rem 0 3rem;
  text-align: center;
}

.footer-mark { display: block; height: 68px; width: auto; margin: 0 auto 1.1rem; }

.footer-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .25rem 1.4rem;
  margin: 0 0 .9rem;
  padding: 0;
}

.footer-links li { margin: 0; }

.footer-links a {
  font-family: var(--font-round);
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
  color: var(--cocoa);
}

.footer-links a:hover { color: var(--espresso); text-decoration: underline; }

.site-footer p { margin: 0; color: var(--taupe); font-size: .9rem; }

/* ---------- accessibility ---------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--espresso);
  color: #FFFFFF;
  padding: .7rem 1.1rem;
  border-radius: 0 0 12px 0;
  text-decoration: none;
  z-index: 50;
}

.skip-link:focus { left: 0; color: #FFFFFF; }

a:focus-visible, .brand:focus-visible {
  outline: 3px solid var(--honey-deep);
  outline-offset: 3px;
  border-radius: 8px;
}

/* ---------- small screens ---------- */

@media (max-width: 34rem) {
  body { font-size: 1rem; }

  .site-header-inner {
    min-height: 0;
    flex-direction: column;
    align-items: center;
    gap: .35rem;
    padding-block: .75rem;
  }

  .brand-mark { height: 42px; }
  .nav a { padding: .35rem .6rem; font-size: .9rem; }

  .hero { padding: 2.5rem 0 2.25rem; }
  .hero-logo { width: 168px; margin-bottom: 1.35rem; }
  .hero h1 { font-size: 2rem; }
  .lede { font-size: 1.1rem; }

  .page-head { padding: 2rem 0 1.85rem; }
  .page-head h1 { font-size: 1.8rem; }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.4rem; }

  .section { padding: 2.25rem 0; }
  .card, .panel { padding: 1.2rem; }
}
