/* PhenoTrack landing — palette mirrors lib/core/theme/pheno_colors.dart */

:root {
  --bg: #0B1410;
  --surface: #111B16;
  --surface-high: #182520;
  --outline: #24332C;
  --text-primary: #EAF2EC;
  --text-secondary: #A9BDB1;
  --text-muted: #6F8479;
  --leaf: #4ADE80;
  --leaf-deep: #22C55E;
  --forest: #166534;
  --moss: #14532D;
  --info: #38BDF8;
  --warn: #FACC15;
  --bad: #EF4444;

  --max: 1100px;
  --rad: 12px;
  --rad-lg: 18px;
  --gap: 28px;
  --gap-sm: 14px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--leaf);
  text-decoration: none;
  border-radius: 4px;
}
a:hover { color: var(--leaf-deep); text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--leaf); outline-offset: 2px; }

h1, h2, h3 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  color: var(--text-primary);
}
h1 { font-size: 2.5rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; color: var(--text-secondary); max-width: 64ch; }

ul { margin: 0 0 1em; padding-left: 1.25em; color: var(--text-secondary); }
li { margin-bottom: 0.35em; max-width: 64ch; }
li::marker { color: var(--text-muted); }

code, kbd, samp {
  font-family: "SF Mono", "Cascadia Code", Consolas, "Liberation Mono", monospace;
  font-size: 0.9em;
  background: var(--surface-high);
  border: 1px solid var(--outline);
  padding: 0.1em 0.35em;
  border-radius: 4px;
  color: var(--text-primary);
}

/* ---------- Layout shell ---------- */

.shell {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--leaf);
  color: var(--bg);
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 600;
  z-index: 100;
}
.skip:focus { left: 12px; top: 12px; }

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(11, 20, 16, 0.85);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--outline);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: var(--max);
  margin: 0 auto;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.2px;
}
.brand:hover { color: var(--text-primary); text-decoration: none; }
.brand .mark { width: 28px; height: 28px; flex-shrink: 0; }
.brand-light { color: var(--leaf); font-weight: 300; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.nav-links a {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
}
.nav-links a:hover { color: var(--text-primary); text-decoration: none; }
.nav-links .cta {
  color: var(--bg);
  background: var(--leaf);
  padding: 7px 14px;
  border-radius: 999px;
  font-weight: 600;
}
.nav-links .cta:hover { background: var(--leaf-deep); color: var(--bg); }

@media (max-width: 640px) {
  .nav-links li:not(:last-child) { display: none; }
}

/* ---------- Hero ---------- */

.hero {
  padding: 92px 0 64px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -180px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 600px;
  background: radial-gradient(closest-side, rgba(74, 222, 128, 0.18), transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.hero > .shell { position: relative; z-index: 1; }
.hero .tag {
  display: inline-block;
  padding: 5px 12px;
  border: 1px solid var(--outline);
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  max-width: 16ch;
}
.hero h1 .accent {
  background: linear-gradient(135deg, var(--leaf), var(--forest));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .lead {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 56ch;
  margin-bottom: 28px;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  border: 1px solid transparent;
  transition: transform 80ms ease, background 120ms ease, border-color 120ms ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--leaf); color: var(--bg); }
.btn-primary:hover { background: var(--leaf-deep); color: var(--bg); }
.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--outline);
}
.btn-secondary:hover { border-color: var(--leaf); color: var(--text-primary); }
.btn .arrow { transition: transform 120ms ease; }
.btn:hover .arrow { transform: translateX(2px); }

/* ---------- Sections ---------- */

section.block { padding: 64px 0; border-top: 1px solid var(--outline); }
section.block.first { border-top: 0; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--leaf);
  margin-bottom: 14px;
  display: block;
}

.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
  margin-top: 28px;
}
@media (min-width: 760px) {
  .grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.card {
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: var(--rad-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.card .icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(74, 222, 128, 0.22), rgba(22, 101, 52, 0.22));
  border: 1px solid var(--outline);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--leaf);
  margin-bottom: 6px;
}
.card h3 { color: var(--text-primary); margin: 0; }
.card p { margin: 0; color: var(--text-secondary); font-size: 0.96rem; }

/* ---------- Pricing ---------- */

.price-card {
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: var(--rad-lg);
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.price-card .tier {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.price-card .amount {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}
.price-card .amount small {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 2px;
}
.price-card .desc { color: var(--text-secondary); font-size: 0.95rem; margin: 0; }
.price-card.featured { border-color: var(--leaf); }
.price-card.featured .tier { color: var(--leaf); }

/* ---------- Footer ---------- */

footer.foot {
  border-top: 1px solid var(--outline);
  padding: 36px 0 48px;
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 0.92rem;
}
.foot-cols {
  display: grid;
  gap: 28px;
  grid-template-columns: 1fr;
}
@media (min-width: 760px) {
  .foot-cols { grid-template-columns: 1.5fr 1fr 1fr 1fr; }
}
.foot-cols h4 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-secondary);
  margin: 0 0 12px;
}
.foot-cols ul { list-style: none; padding: 0; margin: 0; }
.foot-cols li { margin-bottom: 6px; }
.foot-cols a { color: var(--text-muted); }
.foot-cols a:hover { color: var(--text-primary); }
.foot-bottom {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--outline);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--text-muted);
}

/* ---------- Legal pages ---------- */

main.legal {
  padding: 56px 0 24px;
}
main.legal .head { margin-bottom: 36px; }
main.legal .head .updated {
  color: var(--text-muted);
  font-size: 0.95rem;
}
main.legal section {
  padding: 24px 0;
  border-top: 1px solid var(--outline);
}
main.legal section:first-of-type { border-top: 0; padding-top: 0; }
main.legal section h2 { font-size: 1.25rem; }
main.legal section p,
main.legal section li { color: var(--text-primary); }
main.legal section li { line-height: 1.6; }

/* ---------- 404 ---------- */

.notfound {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 24px;
}
.notfound h1 { font-size: 4rem; margin-bottom: 8px; }
.notfound .lead { max-width: 40ch; color: var(--text-secondary); }

/* ---------- Utilities ---------- */

.muted { color: var(--text-muted); }
.center { text-align: center; }
.row-end { display: flex; justify-content: flex-end; }
.spacer-lg { height: 56px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
