/* Hedgerow site styles. One file, no framework. Light and dark follow the visitor's system setting. */

:root {
  color-scheme: light dark;
  --bg: #f5f5f2;
  --surface: #ffffff;
  --surface-2: #eeefea;
  --border: #dfe1da;
  --text: #1a1c19;
  --text-2: #4d5249;
  --accent: #2d6a43;
  --accent-hover: #23573620;
  --accent-strong: #1f5233;
  --accent-soft: #e3eee5;
  --on-accent: #ffffff;
  --focus: #1f5233;
  --warn-bg: #fbf3dc;
  --warn-text: #5c4500;
  --shadow: 0 1px 2px rgb(0 0 0 / 6%), 0 4px 16px rgb(0 0 0 / 5%);
  --radius: 12px;
  --radius-s: 8px;
  --wrap: 72rem;
  --gutter: 16px;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", Consolas, ui-monospace, "SF Mono", Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1c1a;
    --surface: #252623;
    --surface-2: #2d2f2b;
    --border: #3a3d37;
    --text: #ecede8;
    --text-2: #b3b8ad;
    --accent: #84cc9c;
    --accent-hover: #84cc9c26;
    --accent-strong: #a3dbb5;
    --accent-soft: #233328;
    --on-accent: #0e1a12;
    --focus: #a3dbb5;
    --warn-bg: #3a3218;
    --warn-text: #f1dfa6;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 4px 16px rgb(0 0 0 / 25%);
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

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

a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-strong); text-decoration-thickness: 2px; }

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

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; margin: 0 0 0.5em; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.75rem); }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }
p, ul, ol, table { margin: 0 0 1rem; }
ul, ol { padding-left: 1.4rem; }
li + li { margin-top: 0.3rem; }

code, kbd { font-family: var(--mono); font-size: 0.88em; }
code { background: var(--surface-2); border-radius: 4px; padding: 0.1em 0.35em; overflow-wrap: anywhere; }
kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: 0.05em 0.4em;
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--surface);
  text-align: center;
  line-height: 1.5;
  white-space: nowrap;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 48rem) { :root { --gutter: 32px; } }

.skip {
  position: absolute; left: var(--gutter); top: -100px; z-index: 10;
  background: var(--accent); color: var(--on-accent); padding: 0.5rem 1rem; border-radius: var(--radius-s);
}
.skip:focus { top: 0.75rem; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* Header and footer */

.site-header { border-bottom: 1px solid var(--border); background: var(--bg); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--text); text-decoration: none; font: 600 1.15rem/1 var(--font-display); }
.brand:hover { color: var(--text); }
.brand svg { width: 32px; height: 32px; flex: none; }
.site-nav ul { list-style: none; display: flex; gap: 0.25rem; margin: 0; padding: 0; }
.site-nav li + li { margin: 0; }
.site-nav a { display: block; padding: 0.5rem 0.75rem; border-radius: var(--radius-s); color: var(--text); text-decoration: none; }
.site-nav a:hover { background: var(--accent-hover); }
.site-nav a[aria-current="page"] { color: var(--accent); font-weight: 600; }

.site-footer { margin-top: 5rem; border-top: 1px solid var(--border); padding: 2.5rem 0 3rem; color: var(--text-2); font-size: 0.92rem; }
.site-footer .wrap { display: grid; gap: 1.5rem; }
@media (min-width: 48rem) { .site-footer .wrap { grid-template-columns: 1fr auto; align-items: start; } }
.site-footer ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; margin: 0; padding: 0; }
.site-footer li + li { margin: 0; }
.site-footer a { color: var(--text-2); }
.site-footer a:hover { color: var(--text); }
.site-footer p { margin: 0.25rem 0 0; }

/* Buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 2.75rem; padding: 0.55rem 1.2rem;
  border: 1px solid var(--border); border-radius: var(--radius-s);
  background: var(--surface); color: var(--text);
  font: 600 1rem/1.2 var(--font); text-decoration: none; text-align: center;
}
.btn:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--on-accent); }
.btn[aria-disabled="true"] { background: var(--surface-2); border-style: dashed; color: var(--text-2); cursor: default; }
.btn small { font-weight: 400; opacity: 0.85; }
.btn svg { width: 1.1em; height: 1.1em; flex: none; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.5rem 0 0; }
.actions.center { justify-content: center; }
.fineprint { color: var(--text-2); font-size: 0.9rem; margin-top: 0.75rem; }

/* Home */

.hero { padding: 4rem 0 2.5rem; }
.hero p.lede { font-size: clamp(1.1rem, 1rem + 0.4vw, 1.3rem); color: var(--text-2); max-width: 40rem; }
.promises { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); margin: 2rem 0 0; padding: 0; list-style: none; }
.promises li { margin: 0; padding: 1rem 1.1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.promises strong { display: block; font-family: var(--font-display); }
.promises span { color: var(--text-2); font-size: 0.95rem; }

.jump { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; padding: 0; margin: 2.5rem 0 0; }
.jump li { margin: 0; }
.jump a { display: block; padding: 0.35rem 0.85rem; border: 1px solid var(--border); border-radius: 999px; color: var(--text); text-decoration: none; font-size: 0.92rem; background: var(--surface); }
.jump a:hover { border-color: var(--accent); color: var(--accent); }

.group { padding-top: 3rem; scroll-margin-top: 1rem; }
.group > header { margin-bottom: 1.25rem; }
.group > header p { color: var(--text-2); margin: 0; }

.cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); list-style: none; margin: 0; padding: 0; }
.cards li { margin: 0; }
.card {
  position: relative; display: flex; gap: 1rem; align-items: flex-start; height: 100%;
  padding: 1.1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); transition: border-color 0.15s, transform 0.15s;
}
.card:hover { border-color: var(--accent); }
.card:focus-within { border-color: var(--accent); }
.card img { width: 56px; height: 56px; flex: none; }
.card h3 { margin: 0.1rem 0 0.25rem; font-size: 1.1rem; }
.card h3 a { color: var(--text); text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.card h3 a:focus-visible { outline: none; }
.card h3 a:focus-visible::after { outline: 2px solid var(--focus); outline-offset: 2px; }
.card p { margin: 0; color: var(--text-2); font-size: 0.95rem; line-height: 1.45; }

.bundle-cta { margin-top: 4rem; padding: 2rem; border-radius: var(--radius); background: var(--accent-soft); border: 1px solid var(--border); }
.bundle-cta h2 { margin-bottom: 0.25rem; }
.bundle-cta p { margin: 0; color: var(--text-2); }

/* App pages */

.crumbs { margin: 1.5rem 0 0; font-size: 0.92rem; }
.crumbs a { color: var(--text-2); }

.app-head { display: flex; gap: 1rem; align-items: center; margin: 1.25rem 0 0; }
.app-head img { width: 48px; height: 48px; flex: none; }
.app-head .name { font: 600 1.35rem/1.2 var(--font-display); color: var(--text); text-decoration: none; }

.app-hero { display: grid; gap: 2rem; padding: 2rem 0 1rem; align-items: center; }
@media (min-width: 60rem) { .app-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 3rem; } }
.app-hero .title { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.app-hero .title img { width: 72px; height: 72px; flex: none; }
.app-hero h1 { margin: 0; }
.app-hero .tagline { font: 600 clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem)/1.3 var(--font-display); margin: 0 0 0.75rem; }
.app-hero .summary { color: var(--text-2); font-size: 1.05rem; }
.meta { list-style: none; padding: 0; margin: 1.25rem 0 0; color: var(--text-2); font-size: 0.92rem; display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.meta li { margin: 0; }

.subnav { margin: 1.25rem 0 0; border-bottom: 1px solid var(--border); }
.subnav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0 0.25rem; margin: 0; padding: 0; }
.subnav li { margin: 0; }
.subnav a { display: block; padding: 0.6rem 0.75rem; margin-bottom: -1px; color: var(--text-2); text-decoration: none; border-bottom: 2px solid transparent; }
.subnav a:hover { color: var(--text); border-bottom-color: var(--border); }
.subnav a[aria-current="page"] { color: var(--text); font-weight: 600; border-bottom-color: var(--accent); }
/* On phones the six tabs wrap, so they become pills instead of an underlined row. */
@media (max-width: 40rem) {
  .subnav { border-bottom: 0; }
  .subnav ul { gap: 0.4rem; }
  .subnav a { margin: 0; padding: 0.35rem 0.85rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-size: 0.95rem; }
  .subnav a:hover { border-color: var(--accent); }
  .subnav a[aria-current="page"] { border-color: var(--accent); background: var(--accent-soft); }
}

/* Screenshot slot: a window-shaped panel. A real screenshot replaces the icon when one is listed. */
.shot {
  position: relative; overflow: hidden; margin: 0;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow);
}
.shot .bar { display: flex; align-items: center; gap: 0.5rem; height: 2.25rem; padding: 0 0.75rem; font-size: 0.8rem; color: var(--text-2); border-bottom: 1px solid var(--border); position: relative; z-index: 1; }
.shot .bar img { width: 16px; height: 16px; }
.shot .bar .dots { margin-left: auto; letter-spacing: 0.6em; opacity: 0.6; }
.shot .body { position: relative; aspect-ratio: 16 / 10; display: grid; place-items: center; overflow: hidden; }
.shot .glow { position: absolute; inset: -20%; width: 140%; height: 140%; max-width: none; object-fit: cover; filter: blur(60px) saturate(1.2); opacity: 0.35; }
.shot .mark { position: relative; width: 112px; height: 112px; filter: drop-shadow(0 8px 24px rgb(0 0 0 / 18%)); }
.shot .body > img.screen { width: 100%; height: 100%; object-fit: cover; object-position: top left; }

.section { padding-top: 3rem; }
.prose { max-width: 44rem; }
.prose h2 { margin-top: 2.5rem; scroll-margin-top: 1rem; }
.prose h3 { margin-top: 1.75rem; }
.prose > :first-child { margin-top: 0; }

.features { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); list-style: none; padding: 0; margin: 1.5rem 0 0; }
.features li { margin: 0; padding: 1.1rem 1.2rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.features h3 { font-size: 1.05rem; margin-bottom: 0.35rem; }
.features p { margin: 0; color: var(--text-2); font-size: 0.97rem; }

.panel { padding: 1.5rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.panel > :last-child { margin-bottom: 0; }
.panel-soft { background: var(--accent-soft); }
.two-up { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); margin-top: 1.5rem; }

table { width: 100%; border-collapse: collapse; font-size: 0.97rem; }
th, td { text-align: left; vertical-align: top; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--border); }
thead th { font-weight: 600; color: var(--text-2); font-size: 0.88rem; border-bottom-width: 2px; }
.table-scroll { overflow-x: auto; }

.toc { margin: 1.5rem 0 2rem; padding: 1rem 1.25rem; border-left: 3px solid var(--accent); background: var(--surface); border-radius: 0 var(--radius-s) var(--radius-s) 0; }
.toc p { margin: 0 0 0.35rem; font-weight: 600; }
.toc ul { margin: 0; }

.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li { counter-increment: step; position: relative; padding-left: 2.6rem; margin: 0 0 1rem; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 1.8rem; height: 1.8rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-strong); font-weight: 700; font-size: 0.9rem;
}

.price-card { display: grid; gap: 0.5rem; }
.price { font: 600 2rem/1.1 var(--font-display); }
.checklist { list-style: none; padding: 0; }
.checklist li { position: relative; padding-left: 1.6rem; }
.checklist li::before { content: ""; position: absolute; left: 0.2rem; top: 0.45em; width: 0.45rem; height: 0.8rem; border: solid var(--accent); border-width: 0 2px 2px 0; transform: rotate(45deg); }

.release { padding: 1.5rem 0; border-top: 1px solid var(--border); }
.release:first-of-type { border-top: 0; padding-top: 0; }
.release h2 { margin-bottom: 0.25rem; }
.release .when { color: var(--text-2); margin: 0 0 1rem; }

.review-note { padding: 0.9rem 1.1rem; border-radius: var(--radius-s); background: var(--warn-bg); color: var(--warn-text); font-size: 0.95rem; }

.notfound { padding: 5rem 0 2rem; text-align: center; }
.notfound p { color: var(--text-2); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

@media print {
  .site-header nav, .subnav, .actions, .site-footer { display: none; }
  body { background: #fff; color: #000; }
}
