/* Open Grove: site styles.
   Layout: a planting plan. The hero puts copy and the plan side by side (7 / 5 columns),
   everything below reads in one column; spacing follows an 8px rhythm. */

@font-face {
  font-family: "Literata Variable";
  src: url("/assets/fonts/literata-latin-opsz-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Public Sans Variable";
  src: url("/assets/fonts/public-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Atkinson Hyperlegible Mono Variable";
  src: url("/assets/fonts/atkinson-hyperlegible-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Color: survey paper, spruce ink, plan lines, one spruce accent. */
  --paper: #f2f5f3;
  --surface: #e3ebe7;
  --ink: #14211d;
  --muted: #4c5b54;
  --line: #93a89e;
  --accent: #245e52;
  --on-accent: #f2f5f3;

  /* Hilm's section uses the app's own palette (design/tokens.json). */
  --hilm-bg: #ece4d5;
  --hilm-ink: #33291f;
  --hilm-muted: #655848;
  --hilm-accent: #7d5b27;
  --hilm-line: #d8cebd;

  /* Type: a book serif for headings, a plain civic sans for reading, a legibility-first mono for labels. */
  --font-display: "Literata Variable", "Literata", Georgia, "Times New Roman", serif;
  --font-body: "Public Sans Variable", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Atkinson Hyperlegible Mono Variable", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.625rem, 1.25rem + 1.5vw, 2.25rem);
  --step-3: clamp(2.375rem, 1.5rem + 3.5vw, 4rem);

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-6: 3rem;
  --space-8: 4rem;
  --space-12: 6rem;

  --measure: 38rem;
  --wide: 72rem;
  --gutter: 16px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0f1614;
    --surface: #18231f;
    --ink: #e3ebe7;
    --muted: #a0b0a8;
    --line: #3e524a;
    --accent: #86c3b1;
    --on-accent: #0f1614;
    --hilm-bg: #2a221b;
    --hilm-ink: #f0e9db;
    --hilm-muted: #bcb09c;
    --hilm-accent: #ddbd78;
    --hilm-line: #4a3e33;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --paper: #0f1614;
  --surface: #18231f;
  --ink: #e3ebe7;
  --muted: #a0b0a8;
  --line: #3e524a;
  --accent: #86c3b1;
  --on-accent: #0f1614;
  --hilm-bg: #2a221b;
  --hilm-ink: #f0e9db;
  --hilm-muted: #bcb09c;
  --hilm-accent: #ddbd78;
  --hilm-line: #4a3e33;
  color-scheme: dark;
}

@media (min-width: 720px) {
  :root {
    --gutter: 48px;
  }
}

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

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
}

img,
svg {
  max-width: 100%;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

p {
  margin: 0 0 var(--space-2);
  max-width: var(--measure);
}

address {
  font-style: normal;
}

.wrap {
  max-width: var(--wide);
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
}

.skip-link:focus {
  left: max(16px, env(safe-area-inset-left, 0px));
  top: 16px;
  z-index: 10;
  padding: 0.5rem 0.75rem;
  background: var(--paper);
  color: var(--ink);
}

.label {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Header */

.site-header {
  padding-block: var(--space-3);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand svg {
  width: 26px;
  height: 26px;
  flex: none;
}

.mark-planted {
  fill: var(--accent);
}

.mark-open {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--step--1);
}

.nav a {
  color: var(--ink);
  text-decoration: none;
}

.nav a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* Hero */

.hero {
  padding-block: var(--space-4) var(--space-2);
}

.hero .wrap {
  display: grid;
  gap: var(--space-8);
}

@media (min-width: 960px) {
  .hero {
    padding-block: var(--space-8);
  }

  .hero .wrap {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: center;
  }
}

.hero .label {
  margin: 0 0 var(--space-3);
}

h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--step-3);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.lede {
  max-width: 34rem;
  margin: var(--space-4) 0 0;
  font-size: var(--step-1);
  line-height: 1.55;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-4);
  margin-top: var(--space-6);
}

.button {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.125rem;
  border-radius: 4px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  text-decoration: none;
}

.button:hover {
  text-decoration: underline;
}

.text-link {
  font-weight: 700;
}

/* Planting plan */

.plan-figure {
  margin: 0;
  min-width: 0;
}

.plan {
  display: block;
  width: 100%;
  max-width: 440px;
  height: auto;
  margin-inline: auto;
}

.plan-grid line {
  stroke: var(--line);
  stroke-width: 0.75;
  opacity: 0.75;
}

.plan-open {
  fill: var(--paper);
  stroke: var(--line);
  stroke-width: 1.5;
  stroke-dasharray: 3 4;
}

.plan-center {
  fill: var(--line);
}

.plan-ring {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1;
}

.plan-tree {
  fill: var(--accent);
}

.plan-trunk {
  fill: var(--paper);
}

.plan-north {
  fill: var(--muted);
}

.plan text {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  fill: var(--muted);
}

.plan-figure figcaption {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-3);
  padding-left: 18px;
  max-width: 440px;
  margin: var(--space-2) auto 0;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--muted);
}

.plan-caption-title {
  flex-basis: 100%;
  color: var(--ink);
}

.key {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.key::before {
  content: "";
  flex: none;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
}

.key-planted::before {
  background: var(--accent);
}

.key-open::before {
  border: 1.25px dashed var(--muted);
}

/* Sections */

.section {
  padding-block: var(--space-6);
}

.section-ruled {
  padding-top: 0;
}

.section-ruled .wrap > :first-child {
  padding-top: var(--space-6);
  border-top: 1px dashed var(--line);
}

@media (min-width: 960px) {
  .section {
    padding-block: var(--space-8);
  }

  .section-ruled {
    padding-top: 0;
  }

  .section-ruled .wrap > :first-child {
    padding-top: var(--space-8);
  }
}

h2 {
  margin: 0 0 var(--space-3);
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.section .label {
  margin: 0 0 var(--space-2);
}

/* Product */

.product {
  display: grid;
  gap: var(--space-6);
  padding: clamp(1.5rem, 1rem + 3vw, 3.5rem);
  border-radius: 6px;
  background: var(--hilm-bg);
  color: var(--hilm-ink);
}

.product .label {
  color: var(--hilm-muted);
}

.product .plan-ring {
  stroke: var(--hilm-accent);
}

.product .plan-tree {
  fill: var(--hilm-accent);
}

.product .plan-trunk {
  fill: var(--hilm-bg);
}

@media (min-width: 960px) {
  .product {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: var(--space-8);
    align-items: center;
  }
}

.product-copy {
  display: grid;
  gap: var(--space-4);
  align-content: start;
}

.product-copy > div > p:last-child {
  margin-bottom: 0;
}

.screens {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.75rem, 2vw, 1.5rem);
  max-width: 40rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.screens li:nth-child(2) {
  margin-top: clamp(1.5rem, 6vw, 3.5rem);
}

.screens img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 390 / 844;
  border: 1px solid var(--hilm-line);
  border-radius: clamp(14px, 4vw, 28px);
  box-shadow: 0 1px 2px rgb(51 41 31 / 0.08), 0 12px 32px -12px rgb(51 41 31 / 0.25);
}

.screens figcaption {
  margin-top: var(--space-1);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--hilm-muted);
}

.screens figure {
  margin: 0;
}

.screens-note {
  grid-column: 1 / -1;
  margin: 0;
  font-size: var(--step--1);
  color: var(--hilm-muted);
}

.product > * {
  min-width: 0;
}

.product h2 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.product h2 svg {
  width: 1.75rem;
  height: 1.75rem;
  flex: none;
}

.facts {
  display: grid;
  gap: var(--space-3);
  margin: 0;
}

.facts div {
  display: grid;
  gap: 0.25rem;
}

.facts dd {
  margin: 0;
}

/* Principles */

.principles {
  display: grid;
  gap: var(--space-6) var(--space-8);
  margin: var(--space-4) 0 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 720px) {
  .principles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.principles li {
  min-width: 0;
}

.principles h3 {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin: 0 0 var(--space-1);
  font-size: var(--step-1);
  font-weight: 700;
  line-height: 1.3;
}

.principles h3::before {
  content: "";
  flex: none;
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  background: var(--accent);
}

.principles p {
  margin: 0;
}

/* Company */

.company-facts {
  display: grid;
  gap: var(--space-1) var(--space-6);
  margin: var(--space-4) 0 0;
}

.company-facts dt {
  padding-top: var(--space-2);
}

.company-facts dd {
  margin: 0;
  min-width: 0;
}

@media (min-width: 720px) {
  .company-facts {
    grid-template-columns: 13rem minmax(0, 1fr);
    row-gap: var(--space-2);
  }

  .company-facts dt {
    padding-top: 0.2rem;
  }
}

.registry {
  margin-top: var(--space-4);
}

/* Contact */

.contact-list {
  display: grid;
  gap: var(--space-4);
  margin: var(--space-4) 0 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 720px) {
  .contact-list {
    grid-template-columns: repeat(2, minmax(0, max-content));
    column-gap: var(--space-12);
  }
}

.contact-list li {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.email {
  font-size: var(--step-1);
  font-weight: 700;
  overflow-wrap: anywhere;
}

/* Footer */

.site-footer {
  padding-block: var(--space-2) var(--space-8);
  color: var(--muted);
  font-size: var(--step--1);
}

.site-footer .wrap > div {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-1) var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px dashed var(--line);
}

.site-footer p {
  margin: 0;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a {
  color: inherit;
}

/* Legal pages and 404 */

.doc {
  padding-block: var(--space-6) var(--space-12);
}

.doc h1 {
  font-size: var(--step-2);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.doc .label {
  margin: var(--space-2) 0 var(--space-4);
}

.doc h2 {
  margin: var(--space-6) 0 var(--space-2);
  font-family: var(--font-body);
  font-size: var(--step-1);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0;
}

.doc ul {
  max-width: var(--measure);
  margin: 0 0 var(--space-2);
  padding-left: 1.25rem;
}

.doc li {
  margin-bottom: var(--space-1);
}

.doc address {
  font-style: normal;
}
