/* Shady Knoll Labs — dusk-on-a-hill theme */
:root {
  --bg: #0d1512;
  --bg-2: #121d19;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.07);
  --border: rgba(214, 232, 220, 0.12);
  --text: #e6efe9;
  --muted: #9bb0a5;
  --moss: #6fae84;
  --moss-deep: #1d3a2c;
  --knoll-back: #14261e;
  --knoll-front: #0d1512;
  --glow: #f3d77a;
  --glow-soft: rgba(243, 215, 122, 0.18);
  --danger: #f08a7a;
  --radius: 14px;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Fraunces", Georgia, serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(111, 174, 132, 0.12), transparent 60%),
    radial-gradient(900px 500px at 0% 10%, rgba(243, 215, 122, 0.05), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

main { flex: 1; position: relative; z-index: 1; }

#fireflies {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

a { color: var(--glow); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #fff1bd; }

:focus-visible { outline: 2px solid var(--glow); outline-offset: 3px; border-radius: 6px; }

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

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }

.glow {
  color: var(--glow);
  text-shadow: 0 0 24px rgba(243, 215, 122, 0.35);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--moss);
  margin-bottom: 0.9em;
}

.lede { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--muted); max-width: 40em; }

/* ---------- header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(13, 21, 18, 0.72);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 600; letter-spacing: 0.01em; }
.brand:hover { color: var(--text); }
.brand-mark { width: 30px; height: 30px; color: var(--moss); }
.brand-dot { fill: var(--glow); filter: drop-shadow(0 0 4px var(--glow)); }

.nav-links { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links a[aria-current="page"] { color: var(--text); background: var(--surface-2); }

.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; transition: transform .25s; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

@media (max-width: 680px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 64px; left: 0; right: 0;
    flex-direction: column;
    padding: 12px 16px 18px;
    background: rgba(13, 21, 18, 0.97);
    border-bottom: 1px solid var(--border);
    display: none;
  }
  .nav-links.open { display: flex; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .15s, box-shadow .25s, background .2s, color .2s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--glow); color: #1a1a0e; box-shadow: 0 0 0 0 var(--glow-soft); }
.btn-primary:hover { color: #1a1a0e; box-shadow: 0 0 28px 4px var(--glow-soft); }
.btn-ghost { border-color: var(--border); color: var(--text); background: var(--surface); }
.btn-ghost:hover { color: var(--text); background: var(--surface-2); }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- hero ---------- */
.hero { position: relative; padding: clamp(80px, 14vh, 150px) 0 clamp(140px, 22vh, 220px); overflow: hidden; }
.hero-inner { position: relative; z-index: 2; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.knoll { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: clamp(120px, 20vh, 220px); z-index: 1; }
.knoll-back { fill: var(--knoll-back); }
.knoll-front { fill: var(--knoll-front); }

.page-hero { padding: clamp(64px, 10vh, 110px) 0 20px; }

/* ---------- sections / cards ---------- */
.section { padding: clamp(48px, 8vh, 90px) 0; }
.section-tight { padding-top: 16px; }
.section-title { margin-bottom: 28px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color .25s, transform .25s, background .25s;
}
.card:hover { border-color: rgba(243, 215, 122, 0.25); }
.card h3 { color: var(--text); }
.card p:last-child { margin-bottom: 0; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 860px) { .grid-3 { grid-template-columns: 1fr; } }

.feature { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: center; padding: 36px; }
@media (max-width: 760px) { .feature { grid-template-columns: 1fr; } }

.link-arrow { font-weight: 600; text-decoration: none; }
.link-arrow span { display: inline-block; transition: transform .2s; }
.link-arrow:hover span { transform: translateX(4px); }

/* PAR demo meter */
.feature-meter {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
  font-variant-numeric: tabular-nums;
}
.meter-label { font-size: .78rem; letter-spacing: .16em; color: var(--moss); font-weight: 600; }
.meter-value { font-family: var(--font-display); font-size: 2.6rem; line-height: 1.1; margin: 6px 0 14px; }
.meter-value small { font-family: var(--font-body); font-size: .85rem; color: var(--muted); margin-left: 8px; }
.meter-bar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.meter-fill {
  height: 100%;
  width: 0%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--moss), var(--glow));
  box-shadow: 0 0 12px var(--glow-soft);
  transition: width .35s ease-out;
}
.meter-hint { margin-top: 12px; font-size: .82rem; color: var(--muted); }

/* CTA */
.cta-inner {
  text-align: center;
  padding: 56px 24px;
  border-radius: 20px;
  background: radial-gradient(600px 200px at 50% 0%, var(--glow-soft), transparent 70%), var(--surface);
  border: 1px solid var(--border);
}
.cta-inner p { color: var(--muted); }

/* prose (about page) */
.prose h2 { margin-top: 1.6em; font-size: 1.6rem; }
.prose h2:first-child { margin-top: 0; }
.prose p { color: #cfdcd4; }
.checklist { list-style: none; padding: 0; margin: 0 0 1em; }
.checklist li { position: relative; padding-left: 28px; margin-bottom: .7em; color: #cfdcd4; }
.checklist li::before {
  content: "";
  position: absolute;
  left: 4px; top: .6em;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--glow);
  box-shadow: 0 0 10px var(--glow);
}
.about-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

/* ---------- contact form ---------- */
.contact-form { display: grid; gap: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .field-row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 6px; }
.field label { font-weight: 500; font-size: .95rem; }
.req { color: var(--glow); }
.field input, .field textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 150px; }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: rgba(243, 215, 122, 0.6);
  box-shadow: 0 0 0 3px var(--glow-soft);
}
.field.invalid input, .field.invalid textarea { border-color: var(--danger); }
.char-count { font-size: .8rem; text-align: right; }
.contact-form .btn { justify-self: start; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.notice { padding: 14px 18px; border-radius: 10px; margin-bottom: 18px; font-weight: 500; }
.form-status .notice { margin-bottom: 0; }
.notice-ok { background: rgba(111, 174, 132, 0.15); border: 1px solid rgba(111, 174, 132, 0.45); }
.notice-err { background: rgba(240, 138, 122, 0.12); border: 1px solid rgba(240, 138, 122, 0.45); }

.sent-state { text-align: center; padding: 40px 10px; }
.sent-state .sent-icon {
  width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 50%;
  background: var(--glow); box-shadow: 0 0 40px 8px var(--glow-soft);
  animation: pulse 2.4s ease-in-out infinite;
}

/* ---------- footer ---------- */
.site-footer { position: relative; z-index: 1; border-top: 1px solid var(--border); background: #0a110e; font-size: .9rem; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding-top: 22px; padding-bottom: 22px; }
.footer-inner p { margin: 0; }

/* ---------- scroll reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.visible { opacity: 1; transform: none; }

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.9); opacity: .75; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .sent-state .sent-icon { animation: none; }
  #fireflies { display: none; }
}
