:root {
  color-scheme: light;
  --bg: #f5f7f8;
  --panel: #ffffff;
  --panel-strong: #0e1b22;
  --text: #15242d;
  --muted: #60717b;
  --line: #dbe3e7;
  --accent: #0f766e;
  --accent-2: #b45309;
  --accent-3: #3657a7;
  --accent-soft: #e0f2ef;
  --shadow: 0 18px 50px rgba(16, 35, 45, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

a {
  color: inherit;
}

.shell {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  min-height: 100vh;
}

.rail {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 22px;
  background: #0f1d24;
  color: #f7fbfc;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: #17323b;
  font-weight: 800;
}

.brand small,
.rail-note span,
.project-link small {
  display: block;
  color: rgba(247, 251, 252, 0.68);
}

.project-nav {
  display: grid;
  gap: 8px;
}

.project-link {
  display: grid;
  gap: 2px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  text-decoration: none;
}

.project-link[aria-current="page"],
.project-link:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.1);
}

.rail-note {
  margin-top: auto;
  padding: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

main {
  min-width: 0;
}

.home-view,
.project-view {
  padding: 38px;
}

.home-copy {
  max-width: 920px;
  margin-bottom: 26px;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 980px;
  margin-bottom: 16px;
  font-size: clamp(2.2rem, 5vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 1.45rem;
  line-height: 1.15;
  letter-spacing: 0;
}

.summary,
.home-copy p {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.65;
}

.eyebrow {
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 390px);
  gap: 28px;
  align-items: stretch;
  min-height: 470px;
  padding: 32px;
  background:
    linear-gradient(90deg, rgba(14, 27, 34, 0.88), rgba(14, 27, 34, 0.62)),
    var(--hero-image);
  background-size: cover;
  background-position: center;
  color: white;
}

.hero .eyebrow,
.hero .summary {
  color: rgba(255, 255, 255, 0.76);
}

.hero-copy {
  align-self: end;
  padding-right: 16px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0;
}

.tag {
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.82rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.button.primary {
  border-color: transparent;
  background: var(--accent);
  color: white;
}

.button.full {
  width: 100%;
}

.gate-panel,
.demo-card,
.home-card,
.contact-form {
  background: var(--panel);
  box-shadow: var(--shadow);
}

.gate-panel {
  display: grid;
  gap: 16px;
  align-self: center;
  padding: 22px;
  color: var(--text);
}

.panel-heading {
  display: flex;
  gap: 10px;
  align-items: center;
}

.panel-heading small {
  display: block;
  color: var(--muted);
}

.lock-dot {
  width: 14px;
  height: 14px;
  background: var(--accent-2);
  border-radius: 50%;
}

label {
  display: grid;
  gap: 7px;
  font-size: 0.84rem;
  font-weight: 800;
}

input,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  padding: 10px 12px;
  color: var(--text);
  font: inherit;
  font-weight: 500;
  background: #fff;
}

textarea {
  resize: vertical;
}

.muted {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.section-band {
  padding: 34px 0 0;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  margin-bottom: 16px;
}

.section-heading.compact {
  display: block;
}

.preview-grid,
.home-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.home-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.preview-card {
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
}

.mock-image {
  min-height: 210px;
  padding: 14px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent), white 72%), #ffffff 72%),
    #fff;
}

.mock-top {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.mock-top span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.8;
}

.mock-panel {
  min-height: 170px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(15, 27, 34, 0.1);
}

.mock-title {
  width: 58%;
  height: 14px;
  background: var(--panel-strong);
  margin-bottom: 14px;
}

.mock-row {
  height: 10px;
  margin-bottom: 9px;
  background: color-mix(in srgb, var(--accent), white 58%);
}

.mock-chart {
  display: flex;
  gap: 7px;
  align-items: end;
  height: 84px;
  margin-top: 16px;
}

.mock-chart span {
  flex: 1;
  min-height: 22px;
  background: var(--accent);
}

.preview-card figcaption {
  padding: 14px;
}

.preview-card strong,
.home-card strong {
  display: block;
  margin-bottom: 6px;
}

.preview-card p,
.home-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  padding-top: 34px;
}

.demo-card {
  padding: 22px;
  border: 1px solid var(--line);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.metric {
  padding: 12px;
  border: 1px solid var(--line);
  background: #f8fafb;
}

.metric small {
  display: block;
  color: var(--muted);
  margin-bottom: 5px;
}

.metric strong {
  font-size: 1.15rem;
}

.code-block {
  overflow: auto;
  min-height: 220px;
  margin: 16px 0 0;
  padding: 16px;
  background: #0e1b22;
  color: #e8f2f4;
  font-size: 0.88rem;
  line-height: 1.55;
}

.contact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--line);
}

.contact-form .wide {
  grid-column: 1 / -1;
}

.home-card {
  display: grid;
  min-height: 220px;
  padding: 18px;
  border: 1px solid var(--line);
  text-decoration: none;
}

.home-card:hover {
  border-color: var(--accent);
}

.home-card .card-foot {
  align-self: end;
  color: var(--accent);
  font-weight: 800;
}

[hidden] {
  display: none !important;
}

@media (max-width: 980px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .rail {
    position: static;
    height: auto;
  }

  .project-nav {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  }

  .hero,
  .split-section,
  .preview-grid,
  .contact-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .home-view,
  .project-view {
    padding: 18px;
  }

  .hero {
    min-height: 0;
    padding: 22px;
  }

  h1 {
    font-size: 2.2rem;
  }
}
