/* Theme knobs — change these first when you pick a palette */
:root {
  --bg: #f4f4f1;
  --ink: #111827;
  --ink-soft: #4b5563;
  --accent: #0f766e;
  --rule: #d6d3d1;
  --panel: #0b1220;
  --panel-ink: #e5e7eb;
  --panel-muted: #94a3b8;
  --font: "IBM Plex Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  color: var(--ink);
  font-family: var(--font);
  background: var(--bg);
}

.page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.intro {
  position: relative;
  width: min(100%, 720px);
  padding: clamp(1.75rem, 4vw, 3rem) clamp(1.25rem, 4vw, 3rem) 1.25rem;
  opacity: 0;
  animation: rise 0.7s ease forwards;
  background-color: var(--bg);
  background-image: radial-gradient(
    circle at center,
    rgba(17, 24, 39, 0.14) 1px,
    transparent 1.2px
  );
  background-size: 14px 14px;
  background-position: 0 0;
}

.intro > * {
  position: relative;
  z-index: 1;
}

.brand {
  margin: 0 0 0.85rem;
  font-size: clamp(1.85rem, 3.5vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.headline {
  margin: 0 0 0.75rem;
  font-size: clamp(1.2rem, 2.2vw, 1.45rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.support {
  margin: 0 0 1.25rem;
  max-width: 36rem;
  color: var(--ink-soft);
  font-size: 1.02rem;
  font-weight: 400;
  line-height: 1.55;
}

.status {
  margin: 0;
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.contact {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-width: 22rem;
  padding: 1.15rem 1.15rem 1.2rem;
  border: 1px solid var(--ink);
  background: var(--bg);
}

.contact-title {
  margin: 0 0 0.15rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--rule);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}

.contact-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.contact-field input,
.contact-field textarea {
  width: 100%;
  margin: 0;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--rule);
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  resize: vertical;
}

.contact-field input:focus,
.contact-field textarea:focus {
  outline: none;
  border-color: var(--ink);
}

.contact-submit {
  align-self: flex-start;
  margin-top: 0.25rem;
  padding: 0.55rem 1rem;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.contact-submit:hover {
  background: transparent;
  color: var(--ink);
  text-decoration: none;
}

.contact-status {
  margin: 0;
  min-height: 1.2em;
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-soft);
}

.contact-status[data-state="ok"] {
  color: var(--accent);
}

.contact-status[data-state="error"] {
  color: #9f1239;
}

.contact-honeypot {
  display: none !important;
}

.visual {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: min(62vh, 620px);
  border-top: 1px solid var(--rule);
  background: var(--panel);
  opacity: 0;
  animation: fade 0.9s ease 0.12s forwards;
}

.heatmap-shell {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 360px;
  padding: 1rem 1rem 0.85rem;
  gap: 0.55rem;
}

.heatmap-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--panel-ink);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.heatmap-hover {
  color: var(--panel-muted);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
  min-height: 1.1em;
}

.heatmap-blurb {
  margin: 0;
  color: var(--panel-muted);
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.4;
  text-transform: none;
}

.heatmap-stage {
  position: relative;
  flex: 1;
  min-height: 360px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: #070b14;
  overflow: hidden;
}

.heatmap-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 252, 240, 0.04);
}

#heatmap {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  background: #070b14;
  cursor: crosshair;
}

.heatmap-axes {
  display: flex;
  justify-content: space-between;
  color: var(--panel-muted);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .intro,
  .visual {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

@media (min-width: 960px) {
  .page {
    display: grid;
    grid-template-columns: minmax(280px, 0.85fr) minmax(480px, 1.45fr);
  }

    .intro {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: auto;
    height: 100%;
    padding: clamp(2rem, 5vw, 4rem);
  }

    .visual {
    min-height: 100vh;
    min-height: 100dvh;
    height: 100%;
    border-top: 0;
    border-left: 1px solid var(--rule);
  }

  .heatmap-shell {
    padding: 1.25rem 1.25rem 1rem;
    min-height: 100%;
  }
}
