/* Brand typeface: subset of TeX Gyre Adventor (see fonts/README.md). */
@font-face {
  font-family: "Cultivator Sans";
  src: url("/fonts/cultivator-sans-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cultivator Sans";
  src: url("/fonts/cultivator-sans-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
:root {
  --font-brand: "Cultivator Sans", "Century Gothic", "URW Gothic", "Avant Garde", system-ui, sans-serif;
  --bg: #f7f7f2;
  --fg: #1d2a1f;
  --accent: #3f7d4e;
  --wheat-stem: #c9b98a;
  --wheat-head: #b89b5e;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121812; --fg: #e6efe6; --accent: #7cc48d;
    --wheat-stem: #3a3a26; --wheat-head: #5a4f30;
  }
}
#wheat {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh; /* tracks mobile browser chrome showing/hiding */
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-brand);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  /* Keep content clear of notches and home indicators (viewport-fit=cover). */
  padding: env(safe-area-inset-top) env(safe-area-inset-right)
           env(safe-area-inset-bottom) env(safe-area-inset-left);
}
img { max-width: 100%; height: auto; }
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: 40rem;
  margin: 0 auto;
  padding: 2rem clamp(1rem, 5vw, 2rem);
  text-align: center;
}
.logo { margin: 0 0 1rem; }
.logo img {
  display: block;
  width: 100%;
  max-width: 36rem;
  margin: 0 auto;
}
h1 { font-size: clamp(2rem, 6vw, 3.5rem); margin: 0 0 0.5rem; color: var(--accent); }
a { color: var(--accent); }
/* Standalone links get a comfortable touch target. */
.hero p > a:only-child {
  display: inline-block;
  min-height: 44px;
  padding: 0.6rem 1rem;
}
footer { padding: 1rem; text-align: center; font-size: 0.875rem; opacity: 0.7; }

/* Shared top bar */
:root { --surface: #ffffff; --border: #d9dccf; }
:root { --topbar-from: #e3f0df; --topbar-to: #b7d7bc; --topbar-fg: #1d3a24; --topbar-border: #9cc4a3; }
@media (prefers-color-scheme: dark) {
  :root {
    --surface: #1a231a; --border: #2c392c;
    --topbar-from: #16301d; --topbar-to: #2a5a38; --topbar-fg: #e6efe6; --topbar-border: #3f7d4e;
  }
}
.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.5rem;
  padding: 0.5rem clamp(1rem, 5vw, 2rem);
  border-bottom: 1px solid var(--topbar-border);
  background: linear-gradient(90deg, var(--topbar-from), var(--topbar-to));
}
.topbar-logo { display: inline-flex; align-items: center; min-height: 44px; }
.topbar-logo img { display: block; width: clamp(7rem, 30vw, 9rem); height: auto; }
.topbar nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0 0.25rem; }
.topbar-label { font-size: 0.9375rem; opacity: 0.75; color: var(--topbar-fg); padding-right: 0.25rem; }
.topbar nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.75rem;
  font-weight: 700;
  color: var(--topbar-fg);
  text-decoration: none;
}
.topbar nav a:hover, .topbar nav a[aria-current="page"] { text-decoration: underline; }

/* Project pages */
.project {
  flex: 1;
  width: 100%;
  max-width: 60rem;
  margin: 0 auto;
  padding: 1rem clamp(1rem, 5vw, 2rem) 3rem;
}
.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-bottom: 1rem;
}
.project-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.project-hero img { width: clamp(6rem, 25vw, 8rem); height: auto; border-radius: 22.37%; }
.project-hero h1 { margin: 0; }
.tagline { margin: 0.25rem 0 1rem; font-size: clamp(1.125rem, 3.5vw, 1.5rem); }
.button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1.25rem;
  border-radius: 0.5rem;
  background: var(--accent);
  color: var(--bg);
  font-weight: 700;
  text-decoration: none;
}
.button:hover { filter: brightness(1.1); }
.shots {
  display: flex;
  gap: 1rem;
  margin: 0 calc(-1 * clamp(1rem, 5vw, 2rem)) 2rem;
  padding: 0 clamp(1rem, 5vw, 2rem) 0.5rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
}
.shots img {
  flex: none;
  height: clamp(18rem, 60vw, 30rem);
  width: auto;
  border-radius: 1rem;
  border: 1px solid var(--border);
  scroll-snap-align: start;
}
.project h2 { font-size: clamp(1.25rem, 4vw, 1.75rem); margin: 2rem 0 0.75rem; color: var(--accent); }
.project ul { padding-left: 1.25rem; margin: 0; }
.project li { margin-bottom: 0.5rem; }
.columns { display: grid; gap: 0 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr));
  gap: 0.75rem;
  margin: 2rem 0 0;
}
.facts div { padding: 0.75rem 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 0.5rem; }
.facts dt { font-size: 0.875rem; opacity: 0.7; }
.facts dd { margin: 0; font-weight: 700; }
.links { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 0 1.5rem; }
.links a { display: inline-flex; align-items: center; min-height: 44px; }

/* Visibull theme: navy-to-burnt-orange, from the app's icon and screenshots. */
body.visibull {
  --fg: #f4ede6;
  --accent: #f4a259;
  --surface: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.18);
  color-scheme: dark;
  background: linear-gradient(180deg, #131b30 0%, #1c2a4a 40%, #6e3a22 100%);
  background-color: #1c2a4a;
}
body.visibull .button { color: #131b30; }
/* Nudge up so the logo body (not its leaf) centers on the text caps, which sit above line-box center. */
.button .apple-logo { flex: none; margin-right: 0.5rem; transform: translateY(-0.19em); }
