/* PURPOSE: Echelon Labs homepage. Deliberately plain; product cards carry their own themes. */
:root {
  --bg: #f4efe4;
  --text: #1f1c17;
  --muted: #6f685c;
  --line: #e2dacb;
  --menu: #faf7f0;
  --hover: #ebe4d6;
  --gutter: max(20px, calc((100vw - 1200px) / 2));
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1915;
    --text: #ece7dc;
    --muted: #a39b8c;
    --line: #2e2a23;
    --menu: #23201b;
    --hover: #2c2821;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { overflow-x: hidden; }
body {
  min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font: 17px/1.6 Inter, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

/* Faint paper grain over the beige. */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.8;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.45 0 0 0 0 0.38 0 0 0 0 0.28 0 0 0 0.18 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Nav ---------- */
.nav {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px var(--gutter); border-bottom: 1px solid var(--line);
}
.name { font-weight: 600; font-size: 16px; }
.nav-links { display: flex; align-items: center; gap: 4px; font-size: 15px; }
.nav-links > a, .dropdown summary {
  padding: 6px 12px; border-radius: 8px; color: var(--muted); cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.nav-links > a:hover, .dropdown summary:hover, .dropdown[open] summary { color: var(--text); background: var(--hover); }

.dropdown { position: relative; }
.dropdown summary { list-style: none; display: flex; align-items: center; gap: 6px; }
.dropdown summary::-webkit-details-marker { display: none; }
.caret {
  width: 6px; height: 6px; margin-top: -3px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg); transition: transform 0.15s;
}
.dropdown[open] .caret { transform: rotate(225deg); margin-top: 3px; }
.menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 10; min-width: 200px; padding: 6px;
  background: var(--menu); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.18);
}
.menu a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; }
.menu a:hover { background: var(--hover); }
.menu img { width: 24px; height: 24px; border-radius: 6px; }

/* ---------- Layout: about left (60%, sticky), products stacked on the right ---------- */
.layout {
  flex: 1; display: grid; grid-template-columns: 3fr 2fr; gap: 64px; align-items: start;
  padding: 72px var(--gutter) 96px;
}
.label { font-size: 14px; font-weight: 500; color: var(--muted); margin-bottom: 16px; }
.about { max-width: 600px; position: sticky; top: 72px; padding-top: 48px; }
.about h1 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.2; font-weight: 600; letter-spacing: -0.02em; }
.about p { margin-top: 16px; color: var(--muted); }
.interests { margin: 8px 0 0 1.2em; color: var(--muted); }
.interests li { padding-left: 4px; }

.products { min-width: 0; }
.strip { display: flex; flex-direction: column; gap: 16px; }
.card {
  position: relative; width: 100%; height: 340px; overflow: hidden;
  border-radius: 18px; transition: transform 0.25s ease;
}
a.card:hover { transform: translateY(-4px); }
.card .arrow { display: inline-block; transition: transform 0.25s ease; }
.card:hover .arrow { transform: translateX(4px); }

.card-soon {
  height: 120px; display: flex; align-items: center; justify-content: center;
  border: 1.5px dashed var(--line); color: var(--muted); font-size: 15px;
}

/* ----- Trailhead card: its own theme ----- */
.card-trailhead { color: #fff; background: #0b1411; }
.card-trailhead .card-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 55%; }
.card-trailhead::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11, 20, 17, 0) 35%, rgba(11, 20, 17, 0.88) 100%);
}
.card-trailhead .card-body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 24px; }
.th-wordmark { font-family: "Pacifico", cursive; font-size: 38px; line-height: 1.3; color: #e0a44b; }
.th-tagline { margin-top: 4px; color: rgba(255, 255, 255, 0.85); font-size: 15px; line-height: 1.5; }
.th-meta { display: inline-block; margin-top: 12px; font-size: 14px; font-weight: 500; color: rgba(255, 255, 255, 0.7); }

.foot { padding: 20px var(--gutter); border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.foot a:hover { text-decoration: underline; }

/* ---------- Narrow screens: stack ---------- */
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; gap: 56px; padding: 56px 20px 48px; }
  .about { position: static; padding-top: 0; }
  .card { height: 300px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
