/* Debbie's Wee Care. Written fresh for this site. */

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--body);
  font-size: var(--t-base);
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  position: relative;
}

/* the barely-there warm drift: one flat rectangle, transform only */
.drift {
  position: fixed;
  inset: -20vh -20vw;
  background: var(--sun);
  opacity: .03;
  z-index: -1;
  pointer-events: none;
  will-change: transform;
}

::selection { background: var(--sun-soft); color: var(--ink); }
* { scrollbar-color: var(--rule) var(--paper); scrollbar-width: thin; }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb { background: var(--rule); border-radius: 6px; border: 3px solid var(--paper); }
::-webkit-scrollbar-thumb:hover { background: var(--ink-faint); }

img, svg { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -.005em;
  margin: 0;
  color: var(--ink);
}
h1 { font-size: clamp(1.95rem, 1.35rem + 2.3vw, 2.71rem); }
h2 { font-size: var(--t-2xl); }
h3 { font-size: var(--t-md); font-weight: 600; }
p { margin: 0 0 var(--s-2); max-width: 62ch; }
a { color: var(--pine-deep); }

:focus-visible {
  outline: 3px solid var(--pine);
  outline-offset: 3px;
  border-radius: 3px;
}
[id] { scroll-margin-top: calc(var(--header-h) + var(--s-3)); }

.wrap { width: min(100% - var(--s-4), var(--wrap)); margin-inline: auto; }
.wrap-narrow { width: min(100% - var(--s-4), var(--wrap-narrow)); margin-inline: auto; }

.skip {
  position: absolute; left: var(--s-1); top: -60px;
  background: var(--clay); color: #fff; padding: 10px var(--s-2);
  border-radius: var(--radius-sm); z-index: 200; font-weight: 500;
  transition: top var(--dur) var(--ease);
}
.skip:focus { top: var(--s-1); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- header: a row of tabs along the very top ---------- */

.tabbar {
  position: sticky; top: 0; z-index: 100;
  background: var(--paper-2);
  border-bottom: 1px solid var(--rule);
}
.tabbar__inner {
  width: min(100% - var(--s-4), var(--wrap));
  margin-inline: auto;
  display: flex; align-items: stretch;
  min-height: var(--header-h);
}
.tabs { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.tabs a {
  display: flex; align-items: center;
  height: 100%; min-height: 44px;
  padding: 0 var(--s-3);
  font-size: var(--t-sm); font-weight: 500;
  color: var(--ink-soft); text-decoration: none;
  border-radius: var(--radius) var(--radius) 0 0;
  position: relative;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.tabs a::after {
  content: ""; position: absolute; left: var(--s-2); right: var(--s-2); bottom: 0;
  height: 3px; background: var(--sun); border-radius: 2px 2px 0 0;
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur) var(--ease);
}
.tabs a:hover { color: var(--ink); background: rgba(232,163,61,.12); }
.tabs a:hover::after { transform: scaleX(1); }
.tabs a[aria-current="page"] {
  background: var(--clay); color: #fff; font-weight: 500;
}
.tabs a[aria-current="page"]::after { transform: scaleX(1); left: 0; right: 0; }
.tabs a[aria-current="page"]:hover { background: var(--clay-warm); color: #fff; }

.tabbar__nav-toggle {
  display: none;
  align-items: center; gap: var(--s-1);
  min-height: 44px; padding: 0 var(--s-2);
  background: none; border: 0; cursor: pointer;
  font-family: var(--body); font-size: var(--t-sm); font-weight: 500;
  color: var(--ink); border-radius: var(--radius-sm);
  transition: background var(--dur) var(--ease);
}
.tabbar__nav-toggle:hover { background: rgba(44,33,23,.06); }
.tabbar__nav-toggle svg { width: 18px; height: 18px; }
.tabbar__nav-toggle .ico-close { display: none; }
.tabbar__nav-toggle[aria-expanded="true"] .ico-close { display: block; }
.tabbar__nav-toggle[aria-expanded="true"] .ico-menu { display: none; }

/* ---------- hero: two-row photo mosaic with the h1 in the gap ---------- */

.hero { padding: var(--s-5) 0 var(--s-6); }
.hero__name {
  font-family: var(--body);
  font-size: var(--t-sm);
  font-weight: 500;
  font-variant: small-caps;
  /* short small-caps label only, never a run of body text */
  letter-spacing: .045em;
  color: var(--ink-soft);
  margin: 0 0 var(--s-2);
}
.hero__name b { color: var(--clay); font-weight: 600; }

.mosaic { display: grid; gap: var(--s-1); }
.mosaic__row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-1); }
.mosaic figure { margin: 0; overflow: hidden; border-radius: var(--radius); background: var(--paper-2); }
.mosaic img { width: 100%; height: 100%; object-fit: cover; }
.mosaic__wide img { aspect-ratio: 24 / 8; }
.mosaic__narrow img { aspect-ratio: 4 / 3; }

.hero__gap {
  padding: var(--s-4) 0 var(--s-3);
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: var(--s-2) var(--s-5);
  align-items: end;
}
.hero__gap .hero__name { grid-column: 1 / -1; }
.hero__gap h1 { grid-column: 1; }
.hero__gap .hero__side { grid-column: 2; padding-bottom: 4px; }
.hero__gap h1 { max-width: 17ch; }
.hero__lede {
  margin: 0;
  font-size: var(--t-md);
  color: var(--ink-soft);
  max-width: 46ch;
}

/* ---------- buttons and links ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 0 var(--s-3);
  font-family: var(--body); font-size: var(--t-base); font-weight: 500;
  border-radius: var(--radius); border: 0; cursor: pointer;
  background: var(--clay); color: #fff; text-decoration: none;
  box-shadow: var(--shadow-1);
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.btn:hover { background: var(--clay-warm); transform: translateY(-1px); box-shadow: var(--shadow-2); }
.btn:active { transform: translateY(1px); box-shadow: var(--shadow-1); background: var(--clay-deep); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn[disabled] { background: var(--rule); color: var(--ink-faint); cursor: not-allowed; box-shadow: none; transform: none; }

/* the text link with a growing underline */
.link-grow {
  display: inline-block; position: relative;
  font-weight: 500; color: var(--pine-deep); text-decoration: none;
  padding: 10px 2px; min-height: 44px; line-height: 26px;
}
.link-grow::after {
  content: ""; position: absolute; left: 2px; right: 2px; bottom: 8px;
  height: 2px; background: var(--pine); border-radius: 2px;
  transform: scaleX(.28); transform-origin: left;
  transition: transform 220ms var(--ease);
}
.link-grow:hover::after, .link-grow:focus-visible::after { transform: scaleX(1); }

.cta-pair { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; margin-top: var(--s-3); }

/* ---------- sections and the scalloped ambient band ---------- */

.section { padding: var(--s-6) 0; position: relative; }
.section--tint { background: var(--paper-2); }

.scallop {
  display: block; width: 100%; height: 14px;
  color: var(--sun);
  opacity: .38;
}
.scallop + .section { padding-top: var(--s-5); }

.section__head { margin-bottom: var(--s-4); }
.section__head p { color: var(--ink-soft); margin-top: var(--s-1); }

/* ---------- panels: 6px radius, thin colored top edge, no full border ---------- */

.panel {
  background: var(--card);
  border-radius: var(--radius);
  padding: var(--s-3);
  box-shadow: var(--shadow-1);
  border-top: 3px solid var(--sun);
}
.panel--pine { border-top-color: var(--pine); }
.panel--clay { border-top-color: var(--clay); }
.panel h3 { margin-bottom: var(--s-1); }
.panel p:last-child { margin-bottom: 0; }

/* ---------- the signature: the Colquitt Road almanac ---------- */

.almanac { margin: 0; }
.almanac__row {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: var(--s-2) var(--s-3);
  align-items: baseline;
  padding: var(--s-3) 0;
  border-bottom: 1px solid var(--rule);
  position: relative;
}
.almanac__row:first-child { border-top: 1px solid var(--rule); }
.almanac__year {
  font-family: var(--display); font-weight: 700;
  font-size: var(--t-lg); color: var(--clay);
  font-variant-numeric: tabular-nums;
  margin: 0;
}
.almanac__body { margin: 0; }
.almanac__fact { margin: 0; font-size: var(--t-md); line-height: 1.45; max-width: 48ch; }
.almanac__src {
  display: block; margin-top: 6px;
  font-size: var(--t-xs); color: var(--ink-faint);
}
/* the dotted leader draws itself */
.almanac__leader {
  grid-column: 1 / -1;
  height: 1px; margin-top: -2px;
  background-image: radial-gradient(circle, var(--rule) 1px, transparent 1.4px);
  background-size: 7px 1px;
  background-repeat: repeat-x;
  transform: scaleX(0); transform-origin: left;
}
.no-js .almanac__leader, .almanac__leader.is-drawn { transform: scaleX(1); }

/* ---------- generic content bits ---------- */

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--s-3); align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--s-3); }

.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: var(--s-5); align-items: start; }
.split--flip > :first-child { order: 2; }

figure { margin: 0; }
.photo { border-radius: var(--radius); overflow: hidden; background: var(--paper-2); }
.photo img { width: 100%; }
/* photos beside a text column: one consistent frame, composed not sliced */
.split .photo img, .grid-2 .photo img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; height: auto; }
figcaption { font-size: var(--t-sm); color: var(--ink-soft); margin-top: var(--s-1); }

.facts { list-style: none; margin: 0; padding: 0; }
.facts li {
  display: grid; grid-template-columns: 8.5rem 1fr; gap: var(--s-2);
  padding: 14px 0; border-bottom: 1px solid var(--rule-soft);
  align-items: baseline;
}
.facts li:last-child { border-bottom: 0; }
.facts .k {
  font-size: var(--t-sm); color: var(--ink-soft); font-weight: 500;
}
.facts .v { margin: 0; }

.ages { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.ages li { display: grid; grid-template-columns: auto 1fr; gap: var(--s-2); align-items: start; }
.ages svg { width: 22px; height: 22px; color: var(--pine); margin-top: 3px; flex: none; }
.ages h3 { margin-bottom: 2px; }
.ages p { margin: 0; color: var(--ink-soft); }

.note {
  background: var(--pine-tint);
  border-top: 3px solid var(--pine);
  border-radius: var(--radius);
  padding: var(--s-3);
}
.note p:last-child { margin-bottom: 0; }

/* ---------- accordion ---------- */

.faq { border-top: 1px solid var(--rule); padding-top: var(--s-1); }
.faq__item { border-bottom: 1px solid var(--rule); }
.faq__q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--s-2);
  background: none; border: 0; cursor: pointer;
  padding: var(--s-3) 0; min-height: 44px;
  font-family: var(--display); font-size: var(--t-md); font-weight: 600; text-align: left;
  color: var(--ink);
  transition: color var(--dur) var(--ease);
}
.faq__q:hover { color: var(--clay); }
.faq__q svg { width: 18px; height: 18px; flex: none; color: var(--ink-soft); transition: transform var(--dur) var(--ease); }
.faq__q[aria-expanded="true"] svg { transform: rotate(180deg); }
.faq__a { padding: 0 0 var(--s-3); }
.faq__a p:last-child { margin-bottom: 0; }
.faq__a[hidden] { display: none; }

/* ---------- form ---------- */

.form { display: grid; gap: var(--s-3); }
.field { display: grid; gap: 6px; }
.field label { font-size: var(--t-sm); font-weight: 500; color: var(--ink); }
.field .hint { font-size: var(--t-xs); color: var(--ink-soft); }
.field input, .field select, .field textarea {
  font-family: var(--body); font-size: var(--t-base); color: var(--ink);
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  padding: 12px var(--s-2);
  min-height: 46px;
  width: 100%;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.field textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--ink-faint); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--pine);
  box-shadow: 0 0 0 3px var(--pine-tint);
}
.field input:disabled, .field select:disabled { background: var(--paper-2); color: var(--ink-faint); cursor: not-allowed; }
.field input[aria-invalid="true"], .field select[aria-invalid="true"], .field textarea[aria-invalid="true"] {
  border-color: var(--clay);
}
.field .err { font-size: var(--t-xs); color: var(--clay-deep); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form__msg {
  border-radius: var(--radius);
  padding: var(--s-3);
  background: var(--clay-tint);
  border-top: 3px solid var(--clay);
}
.form__msg[hidden] { display: none; }
.form__msg p:last-child { margin-bottom: 0; }
.form__msg a { color: var(--clay-deep); font-weight: 500; }

/* ---------- map ---------- */

#map {
  height: 460px;
  border-radius: var(--radius);
  background: var(--paper-2);
  z-index: 0;
}
.marker-pin {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--clay); border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(44,33,23,.4);
}
.marker-pin--alt { background: var(--pine); width: 14px; height: 14px; border-width: 2px; }
.leaflet-popup-content-wrapper { border-radius: var(--radius); }
.leaflet-popup-content { font-family: var(--body); font-size: var(--t-sm); margin: 12px 14px; }
.leaflet-popup-content strong { font-family: var(--display); }

/* ---------- footer ---------- */

.footer { background: var(--ink); color: #E9DFD2; padding: var(--s-6) 0 var(--s-4); margin-top: var(--s-6); }
.footer a { color: #F3E9DC; }
.footer h2, .footer h3 { color: #fff; }
.footer__grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: var(--s-4); }
.footer__name { font-family: var(--display); font-size: var(--t-md); font-weight: 700; color: #fff; margin: 0 0 var(--s-1); }
.footer p { color: #CDBFAE; max-width: 40ch; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li a {
  display: inline-flex; align-items: center; min-height: 44px;
  text-decoration: none; color: #E9DFD2;
  transition: color var(--dur) var(--ease);
}
.footer li a:hover { color: #fff; text-decoration: underline; }
.footer__legal {
  margin-top: var(--s-4); padding-top: var(--s-3);
  border-top: 1px solid rgba(255,255,255,.13);
  font-size: var(--t-xs); color: #B3A493;
}
.footer__legal p { color: #B3A493; max-width: 76ch; margin-bottom: 6px; }

/* ---------- mobile sticky bar ---------- */

.stickybar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  display: none;
  gap: var(--s-1); padding: 10px var(--s-2);
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
  background: var(--paper);
  border-top: 1px solid var(--rule);
  box-shadow: 0 -2px 10px rgba(44,33,23,.07);
  transform: translateY(0);
  transition: transform 260ms var(--ease);
}
.stickybar.is-hidden { transform: translateY(110%); }
.stickybar .btn { flex: 1; min-height: 48px; }
.stickybar .btn--alt {
  background: var(--pine); color: #fff;
}
.stickybar .btn--alt:hover { background: var(--pine-deep); }

/* ---------- reveals ---------- */

.reveal { opacity: 0; transform: translateY(14px); }
.no-js .reveal, .reveal.is-in { opacity: 1; transform: none; }

.js .mosaic figure.wipe { clip-path: inset(0 100% 0 0); }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .hero__gap { grid-template-columns: 1fr; gap: var(--s-2); align-items: start; }
  .hero__gap h1, .hero__gap .hero__side { grid-column: 1; }
  .hero__gap .hero__side { padding-bottom: 0; }
  .split { grid-template-columns: 1fr; gap: var(--s-4); }
  .split--flip > :first-child { order: 0; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  :root { --s-6: 48px; --s-7: 64px; }
  .tabbar__nav-toggle { display: inline-flex; }
  .tabs {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    box-shadow: var(--shadow-2);
    padding: var(--s-1);
  }
  .tabs.is-open { display: flex; }
  .tabs a { border-radius: var(--radius-sm); padding: 0 var(--s-2); min-height: 48px; }
  .tabs a::after { display: none; }
  .tabs a[aria-current="page"]::after { display: none; }
  .tabbar__inner { position: relative; align-items: center; }
  .mosaic__wide img { aspect-ratio: 16 / 10; }
  .mosaic__narrow img { aspect-ratio: 3 / 4; }
  .hero { padding-top: var(--s-4); }
  .hero__gap { padding: var(--s-3) 0 var(--s-2); grid-template-columns: 1fr; gap: var(--s-2); align-items: start; }
  .hero__gap h1, .hero__gap .hero__side { grid-column: 1; }
  .hero__gap .hero__side { padding-bottom: 0; }
  .stickybar { display: flex; }
  body { padding-bottom: 76px; }
  .hero__name { font-size: var(--t-xs); letter-spacing: .04em; }
  .stickybar .btn { font-size: var(--t-sm); padding: 0 var(--s-2); white-space: nowrap; }
  .almanac__row { grid-template-columns: 1fr; gap: 4px; padding: var(--s-2) 0 var(--s-3); }
  .almanac__year { font-size: var(--t-md); }
  .almanac__fact { font-size: var(--t-base); }
  .facts li { grid-template-columns: 1fr; gap: 2px; }
  .footer__grid { grid-template-columns: 1fr; gap: var(--s-3); }
  #map { height: 320px; }
}

/* ---------- reduced motion: the static page is complete ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .drift { display: none; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .js .mosaic figure.wipe, .mosaic figure { clip-path: none !important; }
  .almanac__leader { transform: scaleX(1) !important; }
  .link-grow::after { transform: scaleX(1); }
}
