/* InsanLab — one-page landing. Design system per build plan. */

@font-face {
  font-family: "Nunito Variable";
  src: url("fonts/Nunito-Variable.woff2") format("woff2") tech("variations"),
       url("fonts/Nunito-Variable.woff2") format("woff2-variations");
  font-weight: 400 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #F4F2EC;
  --paper-2: #ECE9E0;
  --card: #FFFFFF;
  --ink: #16150F;
  --ink-2: #4A4840;
  --ink-3: #6E6B62;
  --line: #8C8980;
  --line-2: #B7B4AB;
  --lamp: #F6D77A;
  --lamp-deep: #D9A21B;
  --leaf: #2F6B4F;
  --focus: #1F5FD1;

  --r-sm: 8px;
  --r-md: 16px;
  --r-lg: 24px;
  --shadow: 0 1px 2px rgba(22, 21, 15, .06), 0 8px 24px -12px rgba(22, 21, 15, .18);

  --font: "Nunito Variable", "Nunito", ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", system-ui, sans-serif;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.6;
  font-weight: 500;
  overflow-x: clip;
}

img { max-width: 100%; }

.wrap {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 24px;
}

/* ---------- Header ---------- */

.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  background: rgba(244, 242, 236, .92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -7px;
  height: 14px;
  background: url("img/wave.svg") repeat-x left bottom / 240px 14px;
  pointer-events: none;
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 16px;
}

.wordmark {
  font-size: 1.125rem;
  font-weight: 1000;
  letter-spacing: .02em;
  color: var(--ink);
  text-decoration: none;
  filter: url(#rough);
}

.site-nav {
  display: flex;
  gap: 24px;
}

.site-nav a {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover {
  text-decoration: underline;
  text-decoration-color: var(--lamp-deep);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 96px 0 64px;
  overflow: hidden;
}

.hero-art {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.art-box {
  position: absolute;
  margin: 0;
}

.art-box img {
  display: block;
  filter: url(#rough-line);
  opacity: .85;
}

.art-box figcaption {
  margin-top: 8px;
  font-size: .875rem;
  font-weight: 600;
  color: var(--ink-3);
}

.art-rack { top: 12%; left: 3%; transform: rotate(-4deg); }
.art-circuit { top: 16%; right: 3%; transform: rotate(2deg); }
.art-flask { bottom: 10%; left: 5%; transform: rotate(-3deg); }

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.kicker {
  margin: 0 0 16px;
  font-size: .875rem;
  font-weight: 800;
  letter-spacing: .1em;
  color: var(--ink-2);
}

h1 {
  margin: 0 0 24px;
  font-size: 2rem;
  font-weight: 1000;
  letter-spacing: -.01em;
  line-height: 1.15;
  text-transform: uppercase;
  filter: url(#rough);
}

.lead {
  margin: 0 0 32px;
  max-width: 65ch;
  color: var(--ink-2);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px 24px;
}

/* ---------- Button & links ---------- */

.btn {
  display: inline-block;
  padding: 16px 32px;
  background: var(--lamp);
  color: var(--ink);
  font-size: 1.125rem;
  font-weight: 900;
  border: 1px solid var(--lamp-deep);
  border-radius: 999px;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: background-color .15s ease-out, transform .15s ease-out, box-shadow .15s ease-out;
}

.btn:hover { background: var(--lamp-deep); }
.btn:active { transform: translateY(1px); }

.textlink {
  color: var(--ink);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--lamp-deep);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  transition: text-decoration-color .15s ease-out;
}

.textlink:hover { text-decoration-color: var(--ink); }

a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

/* ---------- Sections ---------- */

.divider {
  height: 14px;
  background: url("img/wave.svg") no-repeat center / 240px 14px;
}

section {
  position: relative;
  padding: 80px 0;
}

h2 {
  margin: 0 0 32px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -.01em;
  line-height: 1.25;
  text-transform: uppercase;
  filter: url(#rough);
}

#contact .lead {
  margin-inline: auto;
  text-align: center;
}

.narrow {
  max-width: 65ch;
  margin-inline: auto;
}

.uline {
  background: url("img/uline.svg") repeat-x left bottom / 48px 6px;
  padding-bottom: 2px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* Lists: grouped rows, 24px apart, proximity only */

.rows {
  list-style: none;
  margin-block: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.rows h3 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 900;
  line-height: 1.4;
  color: var(--ink);
}

.rows p {
  margin: 8px 0 0;
  color: var(--ink-2);
}

/* Numbered steps: hand-drawn circled numerals */

.steps { counter-reset: step; }

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 48px;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--paper);
  font-size: 1rem;
  font-weight: 900;
  color: var(--ink);
  filter: url(#rough-line);
}

/* Contact methods: three columns, animated Lucide icons (lucide-animated.com) */

.methods {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 40rem;
}

.methods a {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  text-align: center;
  color: inherit;
  text-decoration: none;
}

.methods a > svg {
  margin-bottom: 16px;
  color: var(--ink);
}

.methods .name {
  font-size: 1.125rem;
  font-weight: 900;
  color: var(--ink);
}

.methods .handle {
  margin-top: 8px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink-2);
}

.methods .desc {
  margin-top: 8px;
  font-size: .875rem;
  color: var(--ink-2);
}

.methods a:hover .name {
  text-decoration: underline;
  text-decoration-color: var(--lamp-deep);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

/* Icon hover animation: CSS port of the lucide-animated behaviour */

.icon-send { overflow: visible; }

.methods .draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

.methods a:hover .draw { animation: icon-draw .6s linear; }

@keyframes icon-draw {
  0% { stroke-dashoffset: 1; opacity: 0; }
  16% { opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 1; }
}

.send-plane {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform .5s ease-out;
}

.methods a:hover .send-plane { transform: translate(3px, -3px) scale(.8); }

.send-squiggle {
  opacity: 0;
  transform: translate(-3px, 3px);
  transition: opacity .3s ease-out, transform .3s ease-out;
}

.methods a:hover .send-squiggle {
  opacity: 1;
  transform: none;
  transition: opacity .55s ease-out .1s, transform .55s ease-out .1s;
}

.before {
  margin: 32px auto 0;
  font-size: 1rem;
  color: var(--ink-2);
}

.before strong {
  font-weight: 900;
  color: var(--ink);
}

/* Section spot illustrations */

.side-art {
  position: absolute;
  pointer-events: none;
  filter: url(#rough-line);
  opacity: .85;
}

.art-bench { top: 96px; right: 24px; transform: rotate(2deg); }
.art-notebook { bottom: 96px; left: 24px; transform: rotate(-3deg); }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--paper-2);
  padding: 48px 0;
}

.fine {
  margin: 0;
  font-size: .875rem;
  color: var(--ink-3);
}

.footer-nav {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.footer-nav a {
  color: var(--ink);
  font-size: .875rem;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--lamp-deep);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  transition: text-decoration-color .15s ease-out;
}

.footer-nav a:hover { text-decoration-color: var(--ink); }

/* ---------- Motion ---------- */

.hero-inner > * { animation: rise .2s ease-out backwards; }
.hero-inner > :nth-child(2) { animation-delay: .05s; }
.hero-inner > :nth-child(3) { animation-delay: .1s; }
.hero-inner > :nth-child(4) { animation-delay: .15s; }

.hero-art .art-box { animation: fadein .25s ease-out .35s backwards; }

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
}

@keyframes fadein {
  from { opacity: 0; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  html { scroll-behavior: auto; }
}

/* ---------- Breakpoints: 1000 / 759 / 380 ---------- */

@media (max-width: 1000px) {
  .side-art { display: none; }
  .art-box img { width: 96px; height: auto; }
  .art-flask img { width: 72px; height: auto; }
}

@media (max-width: 759px) {
  .site-nav { display: none; }

  section { padding: 48px 0; }

  .art-rack,
  .art-circuit { display: none; }

  .art-flask {
    top: 80px;
    right: 24px;
    left: auto;
    bottom: auto;
  }

  .art-flask img { width: 64px; height: auto; }
  .art-flask figcaption { display: none; }

  h2 { margin-bottom: 24px; }
}

@media (max-width: 380px) {
  .hero { padding-top: 96px; }
  .hero-actions { flex-direction: column; }
  .methods { gap: 16px; }
}
