/* Hanza Labs — light, agile software studio */
:root {
  --ink: #101418;
  --ink-soft: #2a3138;
  --muted: #6b7480;
  --paper: #eef1f4;
  --paper-2: #e4e9ee;
  --line: rgba(16, 20, 24, 0.1);
  --accent: #0e7c7b;
  --accent-deep: #0a5c5b;
  --glow: rgba(14, 124, 123, 0.18);
  --radius: 2px;
  --max: 1120px;
  --nav-h: 72px;
  --font-display: "Syne", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
}

.skip:focus {
  left: 16px;
  top: 16px;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 8px 12px;
}

/* Atmosphere */
.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 500px at 12% -10%, var(--glow), transparent 55%),
    radial-gradient(700px 420px at 95% 8%, rgba(16, 20, 24, 0.06), transparent 50%),
    linear-gradient(180deg, #f5f7f9 0%, var(--paper) 45%, var(--paper-2) 100%);
}

.atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.35;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 75%);
}

.wrap {
  width: min(100% - 40px, var(--max));
  margin-inline: auto;
}

/* Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  backdrop-filter: blur(14px);
  background: rgba(238, 241, 244, 0.78);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(238, 241, 244, 0.92);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(100% - 40px, var(--max));
  margin-inline: auto;
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
}

.brand span {
  color: var(--accent);
  font-weight: 600;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 0.92rem;
  color: var(--ink-soft);
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--ink);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: 1px solid var(--ink);
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-cta:hover {
  background: var(--ink);
  color: #fff;
}

.nav-end {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-inline-start: auto;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--ink);
}

/* Hero — one composition, brand first */
.hero {
  min-height: calc(100vh - var(--nav-h));
  display: grid;
  grid-template-columns: 1fr minmax(280px, 0.95fr);
  gap: 32px;
  align-items: center;
  padding: 48px 0 72px;
  position: relative;
  overflow: hidden;
}

.hero-media {
  position: relative;
  min-height: min(62vh, 520px);
  overflow: hidden;
  animation: planeIn 1.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: absolute;
  inset: 0;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(238, 241, 244, 0.15), transparent 40%);
  pointer-events: none;
}

.hero-plane {
  display: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 9vw, 6.5rem);
  font-weight: 750;
  line-height: 0.92;
  letter-spacing: -0.05em;
  margin: 0 0 28px;
}

.hero-brand em {
  font-style: normal;
  color: var(--accent);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 3.2vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.25;
  margin: 0 0 14px;
  max-width: 18ch;
}

.hero p {
  margin: 0 0 32px;
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 38ch;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  font-weight: 650;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--ink);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-deep);
}

.btn-ghost {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}

.btn-ghost:hover {
  background: rgba(16, 20, 24, 0.05);
}

/* Sections */
.section {
  padding: 88px 0;
}

.section-head {
  max-width: 560px;
  margin-bottom: 40px;
  animation: rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.section-head .eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin: 0 0 12px;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.service-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.service-item {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 20px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
  transition: background 0.25s ease, padding-left 0.25s ease;
}

.service-item:hover {
  background: rgba(255, 255, 255, 0.45);
  padding-left: 12px;
}

.service-num {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent);
  padding-top: 4px;
}

.service-item h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  margin: 0 0 8px;
}

.service-item p {
  margin: 0;
  color: var(--muted);
  max-width: 56ch;
}

.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.split-visual {
  min-height: 360px;
  position: relative;
  overflow: hidden;
  background: #dde3e9;
}

.split-visual img {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
  display: block;
}

.split-visual::before {
  display: none;
}

.split-visual::after {
  content: var(--split-label, "Build · Ship · Iterate");
  position: absolute;
  left: 24px;
  bottom: 24px;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.45);
  z-index: 1;
}

.page-hero {
  padding: 64px 0 40px;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4rem);
  letter-spacing: -0.05em;
  line-height: 0.98;
  margin: 0 0 16px;
}

.page-hero p {
  margin: 0;
  color: var(--muted);
  max-width: 48ch;
  font-size: 1.08rem;
}

.prose {
  max-width: 68ch;
}

.prose p {
  color: var(--ink-soft);
}

.prose h2 {
  font-family: var(--font-display);
  letter-spacing: -0.03em;
  margin-top: 2rem;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
}

.contact-card {
  padding: 8px 0;
}

.contact-card a {
  color: var(--accent-deep);
  font-weight: 600;
}

.contact-card a:hover {
  text-decoration: underline;
}

.form {
  display: grid;
  gap: 14px;
}

.form label {
  display: grid;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
}

.form input,
.form textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  padding: 12px 14px;
  color: var(--ink);
}

.form input:focus,
.form textarea:focus {
  outline: 2px solid rgba(14, 124, 123, 0.35);
  border-color: var(--accent);
}

.form textarea {
  min-height: 140px;
  resize: vertical;
}

.form-note {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 56px;
  margin-top: 40px;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
}

.footer-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}

.footer-meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-meta a:hover {
  color: var(--ink);
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

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

@keyframes planeIn {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes pulseRing {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.55;
  }
  50% {
    transform: scale(1.06);
    opacity: 0.9;
  }
}

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: fixed;
    inset: var(--nav-h) 0 auto 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 20px 20px;
    background: rgba(238, 241, 244, 0.97);
    border-bottom: 1px solid var(--line);
    margin: 0;
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links li {
    border-bottom: 1px solid var(--line);
  }

  .nav-links a,
  .nav-cta {
    display: block;
    padding: 14px 0;
    border: 0;
  }

  .nav-cta {
    margin-top: 8px;
    text-align: center;
    border: 1px solid var(--ink) !important;
    padding: 12px !important;
  }

  .hero {
    grid-template-columns: 1fr;
    align-items: start;
    min-height: auto;
    padding-top: 32px;
  }

  .hero-media {
    order: -1;
    min-height: 240px;
    height: 240px;
  }

  .hero-plane {
    display: none;
  }

  .split,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .split-visual {
    min-height: 240px;
  }

  .split-visual img {
    min-height: 240px;
  }
}
