/* ─────────────────────────────────────────────────────────────
   luuks.software — blueprint stylesheet
   ───────────────────────────────────────────────────────────── */

:root {
  --c-bg:        #ffffff;
  --c-ink:       #000000;
  --c-mute:      #666666;
  --c-faint:     #999999;
  --c-hair:      rgba(0, 0, 0, 0.08);
  --c-grid:      rgba(0, 0, 0, 0.035);
  --c-cross:     rgba(0, 0, 0, 0.06);
  --c-hover:     rgba(0, 0, 0, 0.04);

  --f-mono:      'JetBrains Mono', ui-monospace, 'SF Mono', Consolas, Monaco, monospace;

  --pad-x:       clamp(20px, 5vw, 80px);
  --pad-y:       clamp(60px, 9vw, 140px);

  --rule:        1px solid var(--c-ink);
  --hairline:    0.5px solid var(--c-hair);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--c-bg);
  color: var(--c-ink);
  font-family: var(--f-mono);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  cursor: crosshair;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

::selection { background: var(--c-ink); color: var(--c-bg); }

/* ─────────────────────────────────────────────────────────────
   BACKGROUND — construction grid
   ───────────────────────────────────────────────────────────── */
.grid-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--c-grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--c-grid) 1px, transparent 1px);
  background-size: 80px 80px;
}

/* ─────────────────────────────────────────────────────────────
   CURSOR CROSSHAIR (full-viewport guides, desktop only)
   ───────────────────────────────────────────────────────────── */
.crosshair {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}
.cross-h, .cross-v {
  position: absolute;
  background: var(--c-cross);
  will-change: transform;
}
.cross-h {
  left: 0; right: 0; top: 0;
  height: 1px;
  transform: translate3d(0, -100px, 0);
}
.cross-v {
  top: 0; bottom: 0; left: 0;
  width: 1px;
  transform: translate3d(-100px, 0, 0);
}
@media (hover: none), (pointer: coarse) {
  .crosshair, .coord-readout { display: none; }
  body { cursor: default; }
}

/* ─────────────────────────────────────────────────────────────
   SCROLL PROGRESS BAR
   ───────────────────────────────────────────────────────────── */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: var(--c-ink);
  z-index: 100;
  will-change: width;
}

/* ─────────────────────────────────────────────────────────────
   COORDINATE READOUT
   ───────────────────────────────────────────────────────────── */
.coord-readout {
  position: fixed;
  bottom: 16px;
  right: 20px;
  z-index: 50;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--c-faint);
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(4px);
  border: var(--hairline);
  transition: opacity 0.2s ease;
}
.coord-readout.is-hidden { opacity: 0; pointer-events: none; }
.coord-label { color: var(--c-mute); }
.coord-value { color: var(--c-ink); font-variant-numeric: tabular-nums; }

/* ─────────────────────────────────────────────────────────────
   TOPBAR
   ───────────────────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px var(--pad-x);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: var(--hairline);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.brand-home {
  display: inline-flex;
  align-items: center;
  transition: opacity 0.18s;
}
.brand-home:hover { opacity: 0.55; }
.brand-mark {
  height: 28px;
  width: auto;
  display: block;
}
.brand-section {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--c-ink);
  font-variant-numeric: tabular-nums;
  display: inline-block;
  min-width: 84px;
  padding: 4px 0;
  transition: opacity 0.15s;
}
.brand-section::before {
  content: '/';
  color: var(--c-faint);
  margin-right: 4px;
}
.brand-section:hover { opacity: 0.55; }
.brand-section.is-changing { opacity: 0; }
.nav {
  display: flex;
  gap: 32px;
  font-size: 12px;
  letter-spacing: 0.08em;
}
.nav a {
  position: relative;
  padding: 4px 0;
  transition: opacity 0.2s;
}
.nav a:hover { opacity: 0.55; }
.nav-num {
  color: var(--c-faint);
  margin-right: 6px;
  font-size: 10px;
}

/* ─────────────────────────────────────────────────────────────
   HERO
   ───────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  z-index: 1;
  padding: clamp(60px, 10vw, 140px) var(--pad-x) clamp(40px, 6vw, 80px);
  border-bottom: var(--hairline);
  min-height: 88vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}
.hero-mark-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: clamp(28px, 4vw, 48px);
}
.hero-mark {
  width: clamp(80px, 10vw, 120px);
  height: auto;
  display: block;
}
.hero-mark-callout {
  position: absolute;
  font-size: 9px;
  letter-spacing: 0.15em;
  color: var(--c-faint);
  padding: 3px 5px;
  border: var(--hairline);
  background: var(--c-bg);
}
.hero-mark-callout-tl { top: -4px; left: -28px; }
.hero-mark-callout-br { bottom: -4px; right: -28px; }

.headline {
  font-family: var(--f-mono);
  font-weight: 800;
  font-size: clamp(56px, 11vw, 168px);
  line-height: 0.92;
  letter-spacing: -0.04em;
  margin-bottom: clamp(28px, 3vw, 40px);
}
.headline-line { display: block; }

.subhead {
  max-width: 640px;
  font-size: clamp(15px, 1.4vw, 19px);
  line-height: 1.55;
  color: var(--c-mute);
  margin-bottom: clamp(36px, 5vw, 56px);
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  font-size: 13px;
  letter-spacing: 0.06em;
  border: 1px solid var(--c-ink);
  background: var(--c-bg);
  transition: background 0.18s, color 0.18s, transform 0.18s;
  cursor: crosshair;
}
.btn:hover { background: var(--c-ink); color: var(--c-bg); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--c-ink); color: var(--c-bg); }
.btn-primary:hover { background: var(--c-bg); color: var(--c-ink); }
.btn-arrow { display: inline-block; transition: transform 0.2s; }
.btn:hover .btn-arrow { transform: translateX(4px); }

/* HERO META BAR */
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(16px, 3vw, 48px);
  margin-top: clamp(60px, 8vw, 100px);
  padding-top: 20px;
  border-top: var(--hairline);
  font-size: 10px;
  letter-spacing: 0.12em;
}
.meta-pair {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.meta-label { color: var(--c-faint); }
.meta-value {
  color: var(--c-ink);
  display: flex;
  align-items: center;
  gap: 6px;
  font-variant-numeric: tabular-nums;
}
.status-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--c-ink);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.3; }
}

/* ─────────────────────────────────────────────────────────────
   GENERIC SECTION
   ───────────────────────────────────────────────────────────── */
.section {
  position: relative;
  z-index: 1;
  padding: var(--pad-y) var(--pad-x);
  border-bottom: var(--hairline);
  /* offset anchor jumps so the section header lands BELOW the sticky topbar */
  scroll-margin-top: 72px;
}
.section-header {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 11px;
  letter-spacing: 0.18em;
  margin-bottom: clamp(40px, 5vw, 64px);
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}
.section-num { color: var(--c-faint); }
.section-title { color: var(--c-ink); font-weight: 500; }
.section-rule {
  flex: 1;
  height: 1px;
  background: var(--c-ink);
  opacity: 0.15;
}
.section-rule:last-of-type { flex: 0 0 80px; }
.section-meta { color: var(--c-faint); font-size: 10px; }
.section-intro {
  max-width: 720px;
  margin: 0 auto clamp(48px, 6vw, 80px);
  font-size: clamp(16px, 1.3vw, 20px);
  color: var(--c-mute);
  line-height: 1.55;
}

/* ─────────────────────────────────────────────────────────────
   CAPABILITIES — diagram + grid
   ───────────────────────────────────────────────────────────── */
/* Tighten vertical spacing on desktop so the whole section fits one viewport
   when navigated to via the §01 shortcut. */
@media (min-width: 1024px) {
  #capabilities {
    padding-top: 48px;
    padding-bottom: 48px;
  }
  #capabilities .section-header { margin-bottom: 24px; }
  #capabilities .section-intro {
    margin-bottom: 20px;
    font-size: 15px;
  }
  #capabilities .cap-card { padding: 18px; }
  #capabilities .cap-card-meta { margin-bottom: 12px; padding-bottom: 10px; }
  #capabilities .cap-title { margin-bottom: 8px; }
  #capabilities .cap-desc { min-height: 0; margin-bottom: 14px; }
}
.cap-diagram {
  max-width: 360px;
  margin: 0 auto clamp(28px, 3vw, 44px);
  width: 100%;
}
.cap-diagram-svg {
  width: 100%;
  height: auto;
  display: block;
}
.line-draw {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: draw 1.4s ease-out forwards;
}
.cap-diagram[data-anim="graph"] .line-draw:nth-of-type(1) { animation-delay: 0.1s; }
.cap-diagram[data-anim="graph"] .line-draw:nth-of-type(2) { animation-delay: 0.6s; }
@keyframes draw {
  to { stroke-dashoffset: 0; }
}
.dot-fill, .dot-open {
  opacity: 0;
  animation: pop 0.4s ease-out forwards;
  transform-origin: center;
  transform-box: fill-box;
}
.dot-fill:nth-of-type(1) { animation-delay: 0.2s; }
.dot-open:nth-of-type(1) { animation-delay: 0.6s; }
.dot-open:nth-of-type(2) { animation-delay: 1.3s; }
.node-group:nth-of-type(1) .dot-fill { animation-delay: 0.2s; }
.node-group:nth-of-type(2) .dot-fill { animation-delay: 1.0s; }
.node-group:nth-of-type(3) .dot-fill { animation-delay: 1.6s; }
.node-group .dot-fill,
.node-group text {
  transition: transform 0.25s ease, fill 0.2s, font-weight 0.2s;
}
.node-group.node-active .dot-fill {
  transform: scale(1.4);
}
.node-group.node-active text {
  fill: #000;
  font-weight: 700;
}
@keyframes pop {
  from { opacity: 0; transform: scale(0); }
  to   { opacity: 1; transform: scale(1); }
}

.cap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2vw, 28px);
  max-width: 1200px;
  margin: 0 auto;
}
.cap-card {
  padding: 24px;
  background: var(--c-bg);
  border: 1px solid var(--c-ink);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}
.cap-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 5px 5px 0 var(--c-ink);
}
.cap-card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--c-faint);
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: var(--hairline);
}
.cap-title {
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}
.cap-desc {
  font-size: 13px;
  line-height: 1.6;
  color: var(--c-mute);
  margin-bottom: 18px;
  min-height: 6em;
}
.cap-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 10px;
  letter-spacing: 0.08em;
}
.cap-tags li {
  padding: 3px 8px;
  border: var(--hairline);
  color: var(--c-mute);
}

/* Tablet: 1 col on top, 2 below — or just stack */
@media (max-width: 880px) {
  .cap-grid { grid-template-columns: 1fr; }
  .cap-desc { min-height: 0; }
}

/* ─────────────────────────────────────────────────────────────
   SPECIMENS
   ───────────────────────────────────────────────────────────── */
.specimens {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}
.specimen {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: clamp(20px, 4vw, 60px);
  padding: clamp(36px, 5vw, 56px) 0;
  border-top: var(--hairline);
  position: relative;
  transition: background 0.18s;
}
.specimen:last-child { border-bottom: var(--hairline); }
.specimen:hover { background: var(--c-hover); }
.spec-num {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 300;
  line-height: 1;
  color: var(--c-ink);
  letter-spacing: -0.02em;
}
.spec-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.spec-title {
  font-size: clamp(28px, 3vw, 44px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}
.spec-title-reserved {
  color: var(--c-faint);
  font-weight: 400;
  font-style: italic;
}
.spec-tag {
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--c-mute);
  padding: 4px 8px;
  border: var(--hairline);
}
.spec-desc {
  max-width: 640px;
  font-size: 14px;
  color: var(--c-mute);
  line-height: 1.6;
  margin-bottom: 24px;
}
.spec-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px 32px;
  padding-top: 20px;
  border-top: var(--hairline);
}
.spec-meta div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.spec-meta dt {
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--c-faint);
}
.spec-meta dd {
  font-size: 12px;
  color: var(--c-ink);
}
.spec-link {
  border-bottom: 1px solid var(--c-ink);
  padding-bottom: 1px;
  transition: opacity 0.18s;
}
.spec-link:hover { opacity: 0.55; }
.spec-link-arrow {
  display: inline-block;
  font-size: 10px;
  margin-left: 2px;
  transition: transform 0.18s;
}
.spec-link:hover .spec-link-arrow { transform: translate(2px, -2px); }
.spec-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 12px;
  letter-spacing: 0.06em;
  border: 1px solid var(--c-ink);
  transition: background 0.18s, color 0.18s;
}
.spec-cta:hover { background: var(--c-ink); color: var(--c-bg); }
.spec-cta:hover .btn-arrow { transform: translateX(4px); }
.spec-cta .btn-arrow { transition: transform 0.2s; }

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

/* ─────────────────────────────────────────────────────────────
   CONTACT
   ───────────────────────────────────────────────────────────── */
.section-contact {
  border-bottom: none;
}
.contact-body {
  max-width: 1000px;
  margin: 0 auto;
  text-align: center;
}
.contact-prompt {
  font-size: clamp(40px, 7vw, 96px);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin-bottom: clamp(32px, 4vw, 56px);
}
.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: clamp(18px, 2.4vw, 32px);
  font-weight: 500;
  padding: 16px 28px;
  border: 1px solid var(--c-ink);
  margin-bottom: clamp(40px, 5vw, 64px);
  transition: background 0.18s, color 0.18s;
}
.contact-email:hover { background: var(--c-ink); color: var(--c-bg); }
.contact-arrow { transition: transform 0.2s; }
.contact-email:hover .contact-arrow { transform: translateX(6px); }

.contact-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 24px;
  max-width: 720px;
  margin: 0 auto;
  padding-top: 32px;
  border-top: var(--hairline);
}
.contact-meta div {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}
.contact-meta dt {
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--c-faint);
}
.contact-meta dd {
  font-size: 13px;
  color: var(--c-ink);
}

/* ─────────────────────────────────────────────────────────────
   FOOTER
   ───────────────────────────────────────────────────────────── */
.footer {
  position: relative;
  z-index: 1;
  padding: 24px var(--pad-x);
  border-top: var(--hairline);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--c-faint);
}
.footer-row {
  display: flex;
  gap: 12px;
  align-items: center;
}
.footer-sep { opacity: 0.4; }

/* ─────────────────────────────────────────────────────────────
   REDUCED MOTION
   ───────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .line-draw { stroke-dashoffset: 0; }
  .dot-fill, .dot-open { opacity: 1; }
  .status-dot { animation: none; }
}

/* ─────────────────────────────────────────────────────────────
   MOBILE MENU (hamburger + slide-in drawer)
   Must come last so source-order wins at equal specificity.
   ───────────────────────────────────────────────────────────── */
.menu-btn {
  display: none;            /* shown only on narrow viewports */
  appearance: none;
  background: var(--c-bg);
  border: 1px solid var(--c-ink);
  padding: 8px 12px;
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--c-ink);
  cursor: crosshair;
  align-items: center;
  gap: 6px;
  z-index: 21;
  transition: background 0.18s, color 0.18s;
}
.menu-btn:hover { background: var(--c-ink); color: var(--c-bg); }
.menu-btn-bracket { color: var(--c-faint); transition: color 0.18s; }
.menu-btn:hover .menu-btn-bracket { color: var(--c-bg); }
.menu-btn[aria-expanded="true"] .menu-btn-label { /* swap text via ::after */ }
.menu-btn-label { font-variant-numeric: tabular-nums; }

@media (max-width: 720px) {
  /* Hide cursor crosshair + coord readout on mobile (no mouse) */
  .crosshair, .coord-readout { display: none; }

  /* backdrop-filter on .topbar would create a containing block for the
     fixed-positioned nav drawer below — strip it on mobile so the drawer
     can fill the viewport. Also bump top padding so the hexagon mark
     isn't tight against the screen edge / sticky border. */
  .topbar {
    backdrop-filter: none;
    background: rgba(255,255,255,0.96);
    padding-top: 14px;
    padding-bottom: 14px;
    padding-left: 16px;
    padding-right: 16px;
  }
  .brand-mark { height: 24px; }

  /* Default --pad-x is ~20px on mobile, but the A1 callout sits at -28px from
     the hero hexagon — so it clips off the viewport. Bump the hero's left
     padding so the callout stays visible. */
  .hero { padding-left: 36px; }

  /* Swap inline nav for hamburger; size button to match brand mark */
  .menu-btn {
    display: inline-flex;
    padding: 6px 10px;
    font-size: 10.5px;
  }

  .nav {
    position: fixed;
    inset: 0;
    z-index: 19;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 36px;
    font-size: 22px;
    letter-spacing: 0.04em;
    padding: 80px 24px 40px;
    transform: translateY(-100%);
    transition: transform 0.3s ease, opacity 0.2s ease;
    opacity: 0;
    pointer-events: none;
  }
  .nav a {
    padding: 8px 0;
  }
  .nav-num {
    font-size: 12px;
    margin-right: 10px;
  }

  body.nav-open .nav {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  body.nav-open { overflow: hidden; }
}
