/* =========================================================
   Underfoot — shared styles
   A naturalist's field notebook, not a startup landing page.
   ========================================================= */

:root {
  --paper: #EFE8D8;
  --paper-dim: #E6DEC9;
  --ink: #2B3A2F;
  --moss: #4B6B4E;
  --moss-dark: #3A5540;
  --honey: #C98A2C;
  --rust: #B85C4A;
  --slate: #6E7B85;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Karla", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --max: 1080px;
  --edge: 1px solid rgba(43, 58, 47, 0.16);
  --radius: 4px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-width: 0;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; }

/* ---------- Base ---------- */
body {
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  /* subtle pressed-paper grain, CSS only */
  background-image:
    radial-gradient(rgba(43, 58, 47, 0.035) 1px, transparent 1px),
    radial-gradient(rgba(43, 58, 47, 0.025) 1px, transparent 1px);
  background-size: 3px 3px, 7px 7px;
  background-position: 0 0, 2px 3px;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* focus ring — visible everywhere, styled to match */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--honey);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Mono labels / stamps ---------- */
.stamp {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--moss-dark);
  border: 1px solid rgba(75, 107, 78, 0.45);
  border-radius: 2px;
  padding: 3px 9px;
  display: inline-block;
  background: rgba(75, 107, 78, 0.06);
}

.label-mono {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--slate);
}

/* ---------- Header / nav ---------- */
.site-header {
  border-bottom: var(--edge);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}
.brand-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--ink);
}
.site-nav {
  display: flex;
  gap: 24px;
  align-items: center;
}
.site-nav a {
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}
.site-nav a:hover { border-bottom-color: var(--moss); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-family: var(--body);
  font-weight: 700;
  font-size: 0.98rem;
  padding: 13px 26px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary {
  background: var(--moss);
  color: var(--paper);
  box-shadow: 0 2px 0 var(--moss-dark);
}
.btn-primary:hover { background: var(--moss-dark); }
.btn-ghost {
  background: transparent;
  border-color: rgba(43, 58, 47, 0.3);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--ink); }

/* ---------- Hero ---------- */
.hero {
  padding: 72px 0 56px;
  border-bottom: var(--edge);
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}
.hero-icon {
  width: 84px;
  height: 84px;
  border-radius: 20px;
  box-shadow: 0 6px 18px rgba(43, 58, 47, 0.22);
  margin-bottom: 22px;
}
.hero-eyebrow {
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  line-height: 1.06;
  margin-bottom: 18px;
}
.hero .tagline {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 1.3rem;
  color: var(--moss-dark);
  margin-bottom: 18px;
  line-height: 1.4;
}
.hero .subhead {
  color: var(--slate);
  font-size: 1.06rem;
  max-width: 46ch;
  margin-bottom: 30px;
}
.hero-ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}
.hero-note {
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--slate);
}

/* hero specimen art */
.hero-art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
}
.hero-art img {
  position: absolute;
  width: 118px;
  height: 118px;
  filter: drop-shadow(0 8px 14px rgba(43, 58, 47, 0.18));
}
.hero-art .a1 { top: 4%; left: 6%; width: 96px; height: 96px; transform: rotate(-8deg); }
.hero-art .a2 { top: 40%; right: 2%; width: 140px; height: 140px; transform: rotate(6deg); }
.hero-art .a3 { bottom: 2%; left: 20%; width: 104px; height: 104px; transform: rotate(4deg); }
.hero-art .a4 { top: 6%; right: 26%; width: 82px; height: 82px; transform: rotate(-4deg); }
.hero-art .pin {
  position: absolute;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  border: 1px dashed rgba(43, 58, 47, 0.22);
}

/* ---------- Section scaffolding ---------- */
section { padding: 64px 0; }
section + section { border-top: var(--edge); }
.section-head {
  max-width: 60ch;
  margin-bottom: 40px;
}
.section-head .stamp { margin-bottom: 14px; }
.section-head h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.2rem);
  margin-bottom: 12px;
}
.section-head p {
  color: var(--slate);
  font-size: 1.02rem;
}

/* ---------- How it works ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.step {
  border: var(--edge);
  border-radius: var(--radius);
  padding: 26px 22px;
  background: rgba(255, 255, 255, 0.25);
  position: relative;
}
.step-num {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--honey);
  border: 1px solid var(--honey);
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.step h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}
.step p {
  color: var(--slate);
  font-size: 0.96rem;
}

/* ---------- Features ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(43, 58, 47, 0.16);
  border: var(--edge);
  border-radius: var(--radius);
  overflow: hidden;
}
.feature {
  background: var(--paper);
  padding: 26px 24px;
}
.feature .mark {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--slate);
  margin-bottom: 10px;
  display: block;
}
.feature h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
  line-height: 1.3;
}
.feature p {
  color: var(--slate);
  font-size: 0.94rem;
}

/* ---------- Screenshots (device-ish frames, CSS only) ---------- */
.screens {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
  align-items: start;
}
.phone {
  position: relative;
  background: var(--ink);
  border-radius: 30px;
  padding: 10px;
  box-shadow:
    0 16px 32px rgba(43, 58, 47, 0.28),
    0 2px 0 rgba(0, 0, 0, 0.08) inset;
  max-width: 240px;
  margin: 0 auto;
}
/* No CSS notch: the screenshots already include the device's real Dynamic
   Island and status bar, so drawing a fake one here doubled it up. */
.phone-screen {
  border-radius: 20px;
  overflow: hidden;
  background: var(--paper-dim);
}
.phone-screen img {
  width: 100%;
  height: auto;
  display: block;
}
.screen-caption {
  text-align: center;
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--slate);
  letter-spacing: 0.03em;
}

/* ---------- Trust / quiet-by-design ---------- */
.trust {
  background: rgba(75, 107, 78, 0.07);
  border-top: var(--edge);
  border-bottom: var(--edge);
}
.trust-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
  align-items: start;
}
.trust-list {
  display: grid;
  gap: 16px;
}
.trust-item {
  display: flex;
  gap: 12px;
}
.trust-item .glyph {
  font-family: var(--mono);
  color: var(--moss);
  flex-shrink: 0;
}
.trust-item p {
  color: var(--ink);
  font-size: 0.98rem;
}
.trust-item strong { color: var(--ink); }

/* ---------- Footer ---------- */
.site-footer {
  padding: 40px 0;
}
.site-footer .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-links {
  display: flex;
  gap: 22px;
}
.footer-links a {
  text-decoration: none;
  font-size: 0.9rem;
  color: var(--slate);
  border-bottom: 1px solid transparent;
}
.footer-links a:hover { color: var(--ink); border-bottom-color: var(--moss); }
.copyright {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--slate);
}

/* ---------- Simple/legal page layout ---------- */
.page-hero {
  padding: 56px 0 36px;
  border-bottom: var(--edge);
}
.page-hero h1 {
  font-size: clamp(2rem, 4vw, 2.6rem);
  margin-bottom: 10px;
}
.page-hero .updated {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--slate);
}
.page-hero p.dek {
  color: var(--slate);
  max-width: 60ch;
  margin-top: 14px;
  font-size: 1.02rem;
}

.doc {
  padding: 48px 0 72px;
}
.doc .wrap {
  max-width: 760px;
}
.doc h2 {
  font-size: 1.4rem;
  margin-top: 44px;
  margin-bottom: 14px;
}
.doc h2:first-child { margin-top: 0; }
.doc p {
  margin-bottom: 16px;
  color: var(--ink);
}
.doc ul {
  margin: 0 0 16px;
  display: grid;
  gap: 10px;
}
.doc ul li {
  padding-left: 22px;
  position: relative;
  color: var(--ink);
}
.doc ul li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--moss);
}
.doc .callout {
  border: 1px solid rgba(75, 107, 78, 0.35);
  background: rgba(75, 107, 78, 0.06);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 20px 0 28px;
}
.doc .callout p:last-child { margin-bottom: 0; }
.doc a { color: var(--moss-dark); text-decoration-color: rgba(75, 107, 78, 0.4); }
.doc a:hover { text-decoration-color: var(--moss-dark); }
.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 24px 0 8px;
  padding: 16px 18px;
  border: var(--edge);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.3);
}
.toc a {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--moss-dark);
  text-decoration: none;
}
.toc a:hover { text-decoration: underline; }

/* ---------- FAQ (support page) ---------- */
.faq-item {
  border-bottom: var(--edge);
  padding: 22px 0;
}
.faq-item:first-child { padding-top: 0; }
.faq-item:last-child { border-bottom: none; }
.faq-item h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}
.faq-item p { color: var(--slate); }

.contact-card {
  border: var(--edge);
  border-radius: var(--radius);
  padding: 26px 24px;
  background: rgba(255, 255, 255, 0.3);
  display: grid;
  gap: 6px;
  margin-bottom: 8px;
}
.contact-card .stamp { margin-bottom: 8px; width: fit-content; }
.contact-card a.mail {
  font-family: var(--mono);
  font-size: 1.05rem;
  color: var(--moss-dark);
  text-decoration: none;
  width: fit-content;
}
.contact-card a.mail:hover { text-decoration: underline; }
.contact-card p { color: var(--slate); font-size: 0.92rem; }

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .hero .wrap {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .hero-art { min-height: 220px; order: -1; }
  .steps { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .screens { grid-template-columns: 1fr 1fr; }
  .screens .screen-block:last-child { grid-column: 1 / -1; max-width: 240px; margin: 0 auto; }
  .trust-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { padding: 0 18px; }
  /* Stack the header into two tidy rows so the nav can't crowd or overlap the
     wordmark on a phone: brand on top, a centered wrapping link row below. */
  .site-header .wrap { flex-direction: column; gap: 12px; padding-top: 14px; padding-bottom: 14px; }
  .site-nav { gap: 14px 20px; flex-wrap: wrap; justify-content: center; }
  .site-nav a { font-size: 0.74rem; }
  .hero { padding: 48px 0 40px; }
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .hero-ctas .btn { justify-content: center; }
  .screens { grid-template-columns: 1fr; }
  .screens .screen-block:last-child { grid-column: auto; }
  section { padding: 48px 0; }
  .site-footer .wrap { flex-direction: column; align-items: flex-start; }
}
