/* Found Matcha — foundmatcha.org v2 */
:root {
  --foam: #f5f7ee;
  --paper: #fdfdf9;
  --stone: #dfe5d2;
  --stone-deep: #b9c6a4;
  --tencha: #6b8e3a;
  --bright: #a6c957;
  --leaf: #2e4a1e;
  --deep: #1c2d13;
  --ink: #141c12;
  --mute: #55634f;
  --gold: #c4952b;
  --display: "Lora", Georgia, serif;
  --body: "Instrument Sans", "Poppins", system-ui, sans-serif;
  --measure: 64ch;
  --r: 18px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--foam); color: var(--ink); font-family: var(--body); font-size: 1.0625rem; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; }
a { color: var(--leaf); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--tencha); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--foam); padding: .5rem 1rem; }
.skip:focus { left: 1rem; z-index: 100; }
.wrap { width: min(100% - 2.5rem, 74rem); margin-inline: auto; }
.narrow { width: min(100% - 2.5rem, 52rem); margin-inline: auto; }

/* Header */
.site-head { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); background: rgba(245,247,238,.8); border-bottom: 1px solid rgba(223,229,210,.7); }
.site-head.on-dark { background: rgba(28,45,19,.72); border-bottom-color: rgba(255,255,255,.08); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 0; }
.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--ink); font-family: var(--display); font-size: 1.3rem; font-weight: 600; letter-spacing: -.01em; }
.on-dark .brand, .on-dark .nav a { color: var(--foam); }
.brand svg { width: 32px; height: 32px; flex: none; }
.nav { display: flex; gap: 1.6rem; align-items: center; font-size: .95rem; }
.nav a { text-decoration: none; color: var(--ink); }
.nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--tencha); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.nav .pill { background: var(--ink); color: var(--foam) !important; padding: .5rem 1rem; border-radius: 999px; font-weight: 600; }
.on-dark .nav .pill { background: var(--bright); color: var(--ink) !important; }
.nav .pill:hover { background: var(--leaf); }
.brand .bname { display: inline-flex; flex-direction: column; justify-content: center; line-height: 1.02; }
.brand .byline { font-family: var(--body); font-weight: 500; font-size: .6em; letter-spacing: .01em; opacity: .82; margin-top: .12em; }
.nav-toggle { display: none; }
@media (max-width: 720px) {
  .site-head .wrap { position: relative; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: calc(100% + 1px); flex-direction: column; align-items: stretch; gap: 0; background: var(--deep); border-bottom: 1px solid rgba(255,255,255,.12); padding: .4rem 0 1rem; box-shadow: 0 24px 40px -24px rgba(0,0,0,.6); }
  .site-head.nav-open .nav { display: flex; }
  .nav a { color: var(--foam) !important; padding: .9rem clamp(1.25rem, 5vw, 2rem); font-size: 1.05rem; }
  .nav a[aria-current="page"] { text-decoration: none; background: rgba(255,255,255,.07); }
  .nav .pill { background: var(--bright); color: var(--ink) !important; margin: .8rem clamp(1.25rem, 5vw, 2rem) .2rem; text-align: center; padding: .85rem 1rem; }
  .nav-toggle { display: inline-flex; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 44px; margin-right: -8px; padding: 0; border: 0; background: transparent; color: var(--ink); cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .on-dark .nav-toggle { color: var(--foam); }
  .nav-toggle span { display: block; width: 24px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
  .site-head.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .site-head.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .site-head.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* Type */
h1, h2, h3 { font-family: var(--display); font-weight: 500; letter-spacing: -.025em; line-height: 1.05; margin: 0 0 .5em; }
h1 { font-size: clamp(2.8rem, 7.5vw, 6.2rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3.3rem); }
h3 { font-size: 1.35rem; font-weight: 600; letter-spacing: -.01em; }
p, li { max-width: var(--measure); }
.lede { font-size: clamp(1.15rem, 1.9vw, 1.4rem); line-height: 1.45; color: var(--leaf); }
.muted { color: var(--mute); font-size: .95rem; }
.kicker { font-family: var(--display); font-style: italic; color: var(--tencha); font-size: 1.15rem; margin: 0 0 .75rem; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: .5rem; background: var(--ink); color: var(--foam); padding: .9rem 1.5rem; border-radius: 999px; text-decoration: none; border: 0; font: inherit; font-weight: 600; cursor: pointer; transition: background .15s ease, transform .15s ease; }
.btn:hover { background: var(--leaf); color: #fff; transform: translateY(-1px); }
.btn.bright { background: var(--bright); color: var(--ink); }
.btn.bright:hover { background: #b9d86e; color: var(--ink); }
.btn.ghost { background: transparent; color: inherit; border: 1px solid currentColor; }
.btn.ghost:hover { background: rgba(255,255,255,.08); color: inherit; }
.actions { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; margin-top: 1.75rem; }

/* Sections */
section { padding: clamp(4rem, 9vw, 7.5rem) 0; }
section.tint { background: var(--stone); }
section.deep { background: var(--deep); color: var(--foam); }
section.deep a { color: var(--foam); }
section.deep .lede { color: var(--stone); }
section.deep .muted { color: #9fb18f; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 2.5rem 4rem; align-items: start; }
.three { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 2.5rem 3rem; }

/* Doc pages */
.doc { padding: 3rem 0 5rem; }
.doc h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
.doc h2 { font-size: 1.6rem; margin-top: 2.75rem; }
.doc h3 { font-size: 1.1rem; margin-top: 1.5rem; }
.doc .meta { color: var(--mute); font-size: .9rem; margin-bottom: 2rem; }
.placeholder { background: #fff3c4; border-bottom: 2px dashed var(--gold); padding: 0 .2em; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: .6rem 2rem; margin: 1.5rem 0; padding: 1.5rem 1.75rem; background: var(--paper); border: 1px solid var(--stone); border-radius: var(--r); }
.facts dt { font-weight: 600; }
.facts dd { margin: 0; }
@media (max-width: 560px) { .facts { grid-template-columns: 1fr; gap: .1rem; } .facts dd { margin-bottom: .8rem; } }

/* Footer */
.site-foot { background: var(--ink); color: #b8c4ad; padding: 2.25rem 0 2rem; font-size: .9rem; }
.site-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .6rem 1.5rem; }
@media (max-width: 800px) { .site-foot .wrap { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .site-foot .wrap { grid-template-columns: 1fr; } }
.site-foot strong { color: var(--foam); font-family: var(--display); font-weight: 600; font-size: 1.05rem; }
.site-foot ul { list-style: none; padding: 0; margin: .6rem 0 0; }
.site-foot li { margin: .35rem 0; }
.site-foot a { color: inherit; }
.site-foot a:hover { color: var(--bright); }
.site-foot .tag { font-family: var(--display); font-style: italic; color: var(--bright); font-size: 1.15rem; margin: .4rem 0 0; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
@media (max-width: 480px) { .brand { font-size: 1.15rem; } }

/* Mobile & in-app webview: notch safe-areas + tighter vertical rhythm */
.wrap, .narrow { padding-inline: max(0px, env(safe-area-inset-left), env(safe-area-inset-right)); }
.site-foot { padding-bottom: calc(2rem + env(safe-area-inset-bottom)); }
@media (max-width: 640px) { section { padding: clamp(2.5rem, 8vw, 4.25rem) 0; } }
html.is-webview section { padding-block: clamp(2.25rem, 6.5vw, 3.5rem); }

/* Contact form */
.cform { max-width: 34rem; margin-top: 1.5rem; display: grid; gap: 1.25rem; }
.cform .fld { display: grid; gap: .4rem; }
.cform .fld-l { font-weight: 600; font-size: .95rem; }
.cform select, .cform input, .cform textarea { font: inherit; width: 100%; padding: .8rem 1rem; border: 1px solid var(--stone-deep); border-radius: 12px; background: var(--paper); color: var(--ink); }
.cform textarea { resize: vertical; min-height: 8rem; line-height: 1.5; }
.cform select:focus, .cform input:focus, .cform textarea:focus { outline: 3px solid var(--tencha); outline-offset: 1px; border-color: var(--tencha); }
.cform .fld-count { justify-self: end; font-size: .8rem; color: var(--mute); }
.cform .hp { position: absolute; left: -9999px; width: 1px; height: 1px; }
.cform .btn { justify-self: start; }
.msg { margin: .25rem 0 0; font-weight: 500; min-height: 1.4rem; }
.msg.ok { color: var(--tencha); }
.msg.err { color: #b23c17; }
