@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --ink: #0B1220;
  --ink-raised: #101a30;
  --paper: #F4F6FB;
  --cobalt: #3355FF;
  --coral: #FF6B4A;
  --cyan: #59E6C5;
  --mist: #8891A6;
  --hairline: rgba(244, 246, 251, 0.12);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: 'Space Grotesk', sans-serif;
  -webkit-font-smoothing: antialiased;
}

.mono {
  font-family: 'IBM Plex Mono', monospace;
}

a { color: inherit; }

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- HEADER ---------- */
header.site {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(11, 18, 32, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hairline);
}
header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}
.brandmark {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
}
.brandmark .code { color: var(--coral); }
nav.site-nav {
  display: flex;
  gap: 28px;
  font-size: 0.92rem;
  color: var(--mist);
}
nav.site-nav a { text-decoration: none; transition: color 0.15s ease; }
nav.site-nav a:hover, nav.site-nav a:focus-visible { color: var(--paper); }
@media (max-width: 640px) {
  nav.site-nav { display: none; }
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  padding: 96px 0 72px;
  border-bottom: 1px solid var(--hairline);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.15) brightness(0.55);
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(11,18,32,0.55) 0%, rgba(11,18,32,0.88) 65%, var(--ink) 100%),
    linear-gradient(115deg, rgba(51,85,255,0.35), rgba(255,107,74,0.22));
  mix-blend-mode: normal;
}
.hero .wrap { position: relative; z-index: 1; }
.hero .top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 40px;
}
.coords {
  text-align: right;
  color: var(--mist);
  font-size: 0.82rem;
  line-height: 1.6;
}
.coords .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  margin-right: 6px;
  box-shadow: 0 0 8px var(--cyan);
}

.flap-board {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}
.flap-card {
  background: var(--ink-raised);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  width: clamp(46px, 8vw, 84px);
  height: clamp(64px, 11vw, 116px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(2rem, 6vw, 4.2rem);
  font-weight: 700;
  color: var(--paper);
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(14px);
  animation: flapIn 0.5s ease forwards;
}
.flap-card::after {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 1px;
  background: rgba(0,0,0,0.35);
}
.flap-card.accent { color: var(--cobalt); }
.flap-card.accent2 { color: var(--coral); }

@keyframes flapIn {
  to { opacity: 1; transform: translateY(0); }
}
.flap-card:nth-child(1) { animation-delay: 0.02s; }
.flap-card:nth-child(2) { animation-delay: 0.08s; }
.flap-card:nth-child(3) { animation-delay: 0.14s; }
.flap-card:nth-child(4) { animation-delay: 0.20s; }
.flap-card:nth-child(5) { animation-delay: 0.26s; }

.hero-sub {
  max-width: 46ch;
  color: var(--mist);
  font-size: 1.08rem;
  line-height: 1.65;
  margin: 0 0 32px;
}
.hero-sub strong { color: var(--paper); font-weight: 500; }

.cta-row { display: flex; gap: 16px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn-primary { background: var(--cobalt); color: var(--paper); }
.btn-primary:hover, .btn-primary:focus-visible { background: #4d6bff; }
.btn-ghost { border: 1px solid var(--hairline); color: var(--paper); }
.btn-ghost:hover, .btn-ghost:focus-visible { border-color: var(--mist); }

/* ---------- BOARD (services) ---------- */
.board-section { padding: 72px 0; border-bottom: 1px solid var(--hairline); }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 28px;
  gap: 16px;
  flex-wrap: wrap;
}
.section-head h2 {
  font-size: 1.6rem;
  margin: 0;
  font-weight: 600;
}
.section-head .count {
  color: var(--mist);
  font-size: 0.85rem;
}

.board {
  border-top: 1px solid var(--hairline);
}
.board-row {
  display: grid;
  grid-template-columns: 90px 1fr 160px 130px;
  gap: 20px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--hairline);
  transition: background 0.15s ease;
}
.board-row:hover { background: rgba(244,246,251,0.03); }
.board-row .id { color: var(--mist); font-size: 0.85rem; }
.board-row .name { font-size: 1.05rem; font-weight: 500; }
.board-row .desc { color: var(--mist); font-size: 0.88rem; display: block; margin-top: 4px; }
.board-row .status { font-size: 0.85rem; display: flex; align-items: center; gap: 8px; }
.status .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 6px var(--cyan); }
.board-row .timeframe { color: var(--mist); font-size: 0.85rem; text-align: right; }

@media (max-width: 720px) {
  .board-row { grid-template-columns: 56px 1fr; }
  .board-row .status, .board-row .timeframe { display: none; }
}

/* ---------- APPROACH ---------- */
.approach-section { padding: 72px 0; border-bottom: 1px solid var(--hairline); }
.approach-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
@media (max-width: 720px) { .approach-grid { grid-template-columns: 1fr; } }
.approach-item .idx { color: var(--coral); font-size: 0.85rem; margin-bottom: 10px; }
.approach-item h3 { font-size: 1.1rem; font-weight: 600; margin: 0 0 10px; }
.approach-item p { color: var(--mist); font-size: 0.92rem; line-height: 1.6; margin: 0; }

/* ---------- CONTACT ---------- */
.contact-section { padding: 88px 0; text-align: left; }
.contact-section h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 600;
  max-width: 18ch;
  margin: 0 0 20px;
  line-height: 1.2;
}
.contact-section p.lead {
  color: var(--mist);
  max-width: 46ch;
  line-height: 1.6;
  margin: 0 0 32px;
}

footer.site {
  border-top: 1px solid var(--hairline);
  padding: 28px 0 40px;
  color: var(--mist);
  font-size: 0.82rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

@media (prefers-reduced-motion: reduce) {
  .flap-card { animation: none; opacity: 1; transform: none; }
}

/* ---------- GALLERY BAND ---------- */
.gallery-section {
  padding: 64px 0;
  border-bottom: 1px solid var(--hairline);
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 720px) {
  .gallery-grid { grid-template-columns: 1fr; }
}
.gallery-item {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--hairline);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.1) brightness(0.75);
}
.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(51,85,255,0.32), rgba(255,107,74,0.28));
}
.gallery-item .tag {
  position: absolute;
  left: 14px;
  bottom: 12px;
  z-index: 1;
  font-size: 0.78rem;
  color: var(--paper);
  letter-spacing: 0.02em;
}
.gallery-item .tag .dot { color: var(--cyan); }
