/* Chip Route House — resets, tokens and shared page furniture */

:root {
  --cream: #f7f2e8;
  --surface: #fffcf5;
  --surface-sunk: #f1e9d9;
  --ink: #17211c;
  --ink-soft: #4a5751;
  --ink-quiet: #6e7b74;
  --line: #ded4c0;
  --line-strong: #c8bb9f;
  --accent: #0e5c3a;
  --accent-deep: #0a4229;
  --accent-tint: #e7efe9;
  --accent-tint-strong: #d3e2d8;

  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;

  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;

  --wrap: 1140px;
  --wrap-narrow: 760px;

  --font: "Jost", "Avenir Next", Avenir, "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --age-bar: 62px;
}

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

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

body {
  margin: 0;
  padding-bottom: var(--age-bar);
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  margin: 0 0 var(--s-4);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--ink);
}

h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.3vw, 2.05rem); }
h3 { font-size: clamp(1.15rem, 1.05rem + 0.5vw, 1.35rem); }
h4 { font-size: 1.05rem; }

p { margin: 0 0 var(--s-4); }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 var(--s-4); padding-left: 1.15em; }
li { margin-bottom: var(--s-2); }
li:last-child { margin-bottom: 0; }

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

table { border-collapse: collapse; width: 100%; }

figure { margin: 0; }

/* Links underline on hover only */
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover,
a:focus-visible { text-decoration: underline; text-underline-offset: 3px; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 60;
  background: var(--accent);
  color: #fff;
  padding: var(--s-3) var(--s-4);
}
.skip-link:focus { left: 0; }

/* Layout helpers */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--s-5);
}

.wrap-narrow { max-width: var(--wrap-narrow); }

.section { padding: var(--s-8) 0; }
.section + .section { border-top: 1px solid var(--line); }

.kicker {
  display: block;
  margin: 0 0 var(--s-3);
  font-size: 0.78rem;
  font-variant: small-caps;
  text-transform: lowercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  color: var(--accent);
}

.lede {
  font-size: 1.12rem;
  color: var(--ink-soft);
  max-width: 68ch;
}

.measure { max-width: 70ch; }

.quiet { color: var(--ink-quiet); font-size: 0.92rem; }

.numeric { font-variant-numeric: tabular-nums; }

/* Minimal text CTA with an animated chevron */
.cta {
  display: inline-flex;
  align-items: baseline;
  gap: var(--s-2);
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--accent);
  letter-spacing: 0.01em;
}
.cta::after {
  content: "\203A";
  font-size: 1.25em;
  line-height: 1;
  transform: translateX(0);
  transition: transform 0.22s ease;
}
.cta:hover::after,
.cta:focus-visible::after { transform: translateX(5px); }

.cta--lead { font-size: 1.05rem; }

.cta--quiet { color: var(--ink-soft); font-weight: 500; }

/* Subtle tinted badges */
.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: var(--radius-sm);
  background: var(--accent-tint);
  color: var(--accent-deep);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.badge--plain { background: var(--surface-sunk); color: var(--ink-soft); }

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  padding: 0;
  margin: 0;
  list-style: none;
}
.badge-row li { margin: 0; }

/* Tiles — the bento building block */
.tile {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: var(--s-5);
}

/* Masthead: utility strip above, main nav below */
.masthead {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.masthead__utility {
  background: var(--accent);
  color: #eef4f0;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}
.masthead__utility .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-5);
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  padding-top: 5px;
  padding-bottom: 5px;
}
.masthead__utility p { margin: 0; }
.masthead__utility a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }

.masthead__main .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  color: var(--ink);
  font-weight: 600;
  font-size: 1.08rem;
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand span { white-space: nowrap; }

.nav-toggle {
  display: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  padding: 7px 12px;
  cursor: pointer;
}

.sitenav ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-5);
  list-style: none;
  margin: 0;
  padding: 0;
}
.sitenav li { margin: 0; }
.sitenav a {
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 500;
}
.sitenav a:hover { color: var(--accent); }
.sitenav a[aria-current="page"] {
  color: var(--accent);
  box-shadow: inset 0 -2px 0 var(--accent);
}

/* Page header band for interior routes */
.page-head {
  position: relative;
  background: var(--accent-deep) url("/assets/hero-band.jpg") center / cover no-repeat;
  color: #f4f8f5;
  padding: var(--s-8) 0;
  border-bottom: 1px solid var(--accent-deep);
}
.page-head::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10, 55, 34, 0.92) 0%, rgba(10, 55, 34, 0.74) 60%, rgba(10, 55, 34, 0.6) 100%);
}
.page-head .wrap { position: relative; }
.page-head h1 { color: #fff; max-width: 20ch; }
.page-head .kicker { color: #b9d8c7; }
.page-head p { color: #dfeae3; max-width: 62ch; margin-bottom: 0; }

.breadcrumb {
  font-size: 0.82rem;
  color: #b9d8c7;
  margin: 0 0 var(--s-4);
}
.breadcrumb a { color: #dfeae3; }

/* Safety block */
.safety-list {
  display: grid;
  gap: var(--s-3);
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}
.safety-list li { margin: 0; }

.safety-card {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  height: 100%;
  padding: var(--s-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--ink);
}
.safety-card:hover { text-decoration: none; border-color: var(--accent); }
.safety-card img {
  align-self: flex-start;
  box-sizing: content-box;
  height: 30px;
  width: auto;
  max-width: 148px;
  padding: 7px 10px;
  background: var(--ink);
  border-radius: var(--radius-sm);
  object-fit: contain;
}
.safety-card strong { font-size: 0.98rem; font-weight: 600; }
.safety-card span { font-size: 0.85rem; color: var(--ink-quiet); line-height: 1.5; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface-sunk);
  padding: var(--s-8) 0 var(--s-6);
  margin-top: var(--s-8);
}

.footer-safety {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: var(--s-5);
  margin-bottom: var(--s-7);
}
.footer-safety > summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.05rem;
  list-style: none;
  margin-bottom: var(--s-2);
}
.footer-safety > summary::-webkit-details-marker { display: none; }
.footer-safety > summary::after {
  content: "\2013";
  float: right;
  color: var(--ink-quiet);
}
.footer-safety:not([open]) > summary::after { content: "+"; }
.footer-safety > p { max-width: 74ch; color: var(--ink-soft); font-size: 0.95rem; }

.footer-grid {
  display: grid;
  gap: var(--s-6);
  grid-template-columns: 1.4fr repeat(3, 1fr);
}
.footer-grid h3 {
  font-size: 0.78rem;
  font-variant: small-caps;
  text-transform: lowercase;
  letter-spacing: 0.12em;
  color: var(--ink-quiet);
  margin-bottom: var(--s-3);
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: var(--s-2); }
.footer-grid a { color: var(--ink-soft); font-size: 0.93rem; }
.footer-grid a:hover { color: var(--accent); }
.footer-about p { font-size: 0.93rem; color: var(--ink-soft); max-width: 40ch; }

.footer-strip {
  margin-top: var(--s-7);
  padding-top: var(--s-5);
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3) var(--s-5);
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--ink-quiet);
}
.footer-strip p { margin: 0; }

.disclaimer {
  margin-top: var(--s-5);
  font-size: 0.84rem;
  line-height: 1.6;
  color: var(--ink-quiet);
  max-width: 88ch;
}

/* Fixed age notice */
.age-notice {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  background: var(--ink);
  color: #e8ede9;
  border-top: 1px solid var(--accent);
  font-size: 0.82rem;
  line-height: 1.45;
}
.age-notice .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-4);
  align-items: center;
  padding-top: 10px;
  padding-bottom: 10px;
}
.age-notice p { margin: 0; }
.age-notice b {
  display: inline-block;
  border: 1px solid #8fb9a2;
  border-radius: var(--radius-sm);
  padding: 1px 7px;
  margin-right: var(--s-2);
  font-size: 0.8rem;
  letter-spacing: 0.03em;
}
.age-notice a { color: #a9d3bc; }

/* Cookie consent */
.cookie-bar {
  position: fixed;
  left: var(--s-4);
  right: var(--s-4);
  bottom: calc(var(--age-bar) + var(--s-4));
  z-index: 45;
  max-width: 640px;
  margin-left: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: var(--s-5);
}
.cookie-bar[hidden] { display: none; }
.cookie-bar h2 { font-size: 1.02rem; margin-bottom: var(--s-2); }
.cookie-bar p { font-size: 0.9rem; color: var(--ink-soft); }
.cookie-bar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-5);
  align-items: center;
  margin-top: var(--s-4);
}
.cookie-bar button {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--accent);
  cursor: pointer;
  display: inline-flex;
  align-items: baseline;
  gap: var(--s-2);
}
.cookie-bar button::after {
  content: "\203A";
  font-size: 1.25em;
  line-height: 1;
  transition: transform 0.22s ease;
}
.cookie-bar button:hover::after { transform: translateX(5px); }
.cookie-bar button.is-quiet { color: var(--ink-soft); font-weight: 500; }

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  body { font-size: 16px; --age-bar: 84px; }

  .masthead__main .wrap {
    flex-wrap: wrap;
    align-items: center;
    padding-top: var(--s-3);
    padding-bottom: var(--s-3);
    min-height: 0;
  }
  .nav-toggle { display: inline-block; }
  .sitenav {
    display: none;
    width: 100%;
    border-top: 1px solid var(--line);
    padding-top: var(--s-3);
  }
  .sitenav.is-open { display: block; }
  .sitenav ul { flex-direction: column; gap: 0; }
  .sitenav li { border-bottom: 1px solid var(--line); }
  .sitenav li:last-child { border-bottom: 0; }
  .sitenav a { display: block; padding: 11px 0; }

  .section { padding: var(--s-7) 0; }
  .footer-grid { grid-template-columns: 1fr; gap: var(--s-5); }
  .cookie-bar { left: var(--s-3); right: var(--s-3); padding: var(--s-4); }
}

/* No-JS: the nav must stay reachable */
.no-js .nav-toggle { display: none; }
@media (max-width: 720px) {
  .no-js .sitenav { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
