/* Homepage: "electric garden".
   Lichen-green field, deep green ink, one electric lime used like a highlighter.
   Bricolage Grotesque for everything; heavy and tight for display. */

:root[data-theme="light"] {
  --field: #DCE3D3;          /* lichen: page background */
  --field-line: rgba(20, 38, 28, 0.07);
  --paper: #F4F6EF;          /* card surface */
  --ink: #14261C;            /* text, outlines, shadows */
  --ink-soft: #4E5E52;       /* supporting text */
  --volt: #C9F31D;           /* the loud one */
  --volt-ink: #14261C;       /* text on volt */
  --moss: #3E6B3A;           /* sprout, small accents */
}

:root[data-theme="dark"] {
  --field: #0F1913;          /* soil */
  --field-line: rgba(220, 240, 210, 0.05);
  --paper: #17241B;
  --ink: #E4ECDC;
  --ink-soft: #9BAA9C;
  --volt: #C9F31D;
  --volt-ink: #14261C;
  --moss: #8BC37F;
}

@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url('../fonts/bricolage-grotesque.woff2') format('woff2-variations');
}

* { box-sizing: border-box; }

html { background: var(--field); }

body.home {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  font-family: 'Bricolage Grotesque', 'Arial Narrow', Arial, sans-serif;
  font-optical-sizing: auto;
  font-size: 17px;
  line-height: 1.55;
  /* faint survey grid, like plots in a garden */
  background:
    linear-gradient(var(--field-line) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, var(--field-line) 1px, transparent 1px) 0 0 / 56px 56px,
    var(--field);
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* ---------- Top bar ---------- */
.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 20px clamp(16px, 4vw, 48px);
}
.topbar > :last-child { justify-self: end; }

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.02em;
}

.sprout path { stroke: var(--moss); fill: none; }

.chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 7px 14px;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--ink);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.chip-btn:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); }
.chip-btn:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--ink); }

/* ---------- Menu ---------- */
.site-menu { position: relative; justify-self: start; }

.menu-toggle[aria-expanded="true"] { background: var(--volt); color: var(--volt-ink); }

.menu-list {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 20;
  min-width: 210px;
  display: flex;
  flex-direction: column;
  padding: 6px;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 16px;
  box-shadow: 5px 5px 0 var(--ink);
}
.menu-list[hidden] { display: none; }

.menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
}
.menu-item:hover, .menu-item:focus-visible { background: var(--volt); color: var(--volt-ink); }

/* ---------- Hero ---------- */
main {
  flex: 1;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(32px, 8vh, 96px) clamp(16px, 4vw, 48px) 48px;
}

.hero { margin-bottom: clamp(48px, 9vh, 96px); }

.hero-title {
  margin: 0 0 28px;
  font-weight: 800;
  font-size: clamp(44px, 8.4vw, 120px);
  line-height: 0.95;
  letter-spacing: -0.045em;
  font-variation-settings: 'opsz' 96;
}

.hero-name {
  /* lime highlighter */
  background: var(--volt);
  color: var(--volt-ink);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  padding: 0 0.12em;
  border-radius: 0.12em;
}

.hero-copy {
  max-width: 34em;
  margin: 0;
  font-size: clamp(18px, 1.6vw, 21px);
  color: var(--ink-soft);
}

mark {
  background: linear-gradient(transparent 55%, var(--volt) 55%, var(--volt) 92%, transparent 92%);
  color: inherit;
  padding: 0 0.1em;
}
/* On the dark field a half-height highlight hides light text, so it becomes a thick underline. */
:root[data-theme="dark"] mark {
  color: var(--ink);
  background: linear-gradient(transparent 84%, var(--volt) 84%, var(--volt) 96%, transparent 96%);
}

/* ---------- Doors (the three things to open) ---------- */
.doors {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.door {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 22px 20px;
  min-height: 250px;
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 18px;
  box-shadow: 6px 6px 0 var(--ink);
  text-decoration: none;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

a.door:hover { transform: translate(-3px, -3px); box-shadow: 9px 9px 0 var(--ink); }
a.door:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--ink); }

.door-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 14px;
  margin-bottom: 6px;
  background: var(--field);
}
.door-magnificent .door-icon { background: var(--volt); color: var(--volt-ink); }

.door-title {
  font-weight: 800;
  font-size: 28px;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.door-copy { color: var(--ink-soft); font-size: 16px; max-width: 30ch; }

.door-cta {
  margin-top: auto;
  align-self: flex-start;
  font-weight: 700;
  font-size: 15px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--field);
}
a.door:hover .door-cta { background: var(--volt); color: var(--volt-ink); }

/* The garden card: a dashed edge, like a fresh bed. */
.door-garden { border-style: dashed; }
.door-garden .door-icon { color: var(--moss); border-style: dashed; }

/* ---------- Small screens ---------- */
@media (max-width: 900px) {
  .doors { grid-template-columns: 1fr; }
  .door { min-height: 0; }
}

@media (max-width: 560px) {
  .topbar { grid-template-columns: auto 1fr auto; }
  .wordmark { justify-self: center; font-size: 0; gap: 0; }
  .wordmark .sprout { width: 30px; height: 30px; }
  #toggle-label { display: none; }
  .chip-btn { padding: 7px 12px; }
}

/* ---------- Accessibility ---------- */
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--volt);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--ink);
}

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