:root {
  --ink: #0a1420;
  --ink-panel: #111e2e;
  --ink-raised: #0e2233;
  --ink-line: #1c2c3f;
  --ink-border: #24364b;
  --ink-border-strong: #3a5068;
  --on-ink: #e8eef4;
  --on-ink-muted: #b4c3d2;
  --on-ink-faint: #9fb2c5;
  --cyan: #00aeef;
  --cyan-text: #00719c;
  --paper: #ffffff;
  --paper-alt: #f5f7f9;
  --text: #0f1b2a;
  --text-muted: #4e5e70;
  --line: #dde3ea;
  --chip: #eef2f6;
  --gutter: clamp(20px, 5vw, 48px);
  --section-pad: clamp(64px, 9vw, 112px);
  --font-jp: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;
  --font-latin: "Space Grotesk", var(--font-jp);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-jp);
  line-height: 1.8;
  word-break: auto-phrase;
}

h1,
h2,
h3,
p,
ol,
dl,
dd {
  margin: 0;
}

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

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

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

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 16px;
  top: 16px;
  z-index: 10;
  padding: 10px 16px;
  background: var(--cyan);
  color: #06131f;
  font-weight: 700;
  border-radius: 4px;
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.eyebrow {
  font-family: var(--font-latin);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--cyan-text);
}

.dark {
  background: var(--ink);
  color: var(--on-ink);
}

.dark .eyebrow {
  color: var(--cyan);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 28px;
  border: 1px solid var(--ink-border-strong);
  border-radius: 4px;
  font-size: 16px;
  font-weight: 500;
  transition: border-color 0.15s, background-color 0.15s, color 0.15s;
}

.btn:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.btn-primary {
  background: var(--cyan);
  border-color: var(--cyan);
  color: #06131f;
  font-weight: 700;
}

.btn-primary:hover {
  background: #33c1f5;
  border-color: #33c1f5;
  color: #06131f;
}

.btn-large {
  min-height: 60px;
  padding: 0 36px;
  font-size: 17px;
}

/* Header */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 32px;
  padding-block: 20px;
}

.brand {
  display: flex;
  align-items: center;
  min-height: 44px;
}

.brand img {
  height: 40px;
  width: auto;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 28px;
  font-size: 14px;
  font-weight: 500;
}

.site-nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  transition: color 0.15s, border-color 0.15s;
}

.site-nav a:hover {
  color: var(--cyan);
}

.site-nav .nav-cta {
  padding: 0 20px;
  border: 1px solid var(--ink-border-strong);
  border-radius: 4px;
}

.site-nav .nav-cta:hover {
  border-color: var(--cyan);
}

/* Hero */
.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 56px 64px;
  padding-block: clamp(48px, 8vw, 96px) clamp(64px, 9vw, 120px);
}

.hero-copy {
  flex: 1 1 460px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.hero h1 {
  font-size: clamp(34px, 4.6vw, 58px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.01em;
  text-wrap: balance;
}

.hero-lead {
  max-width: 34em;
  font-size: 17px;
  color: var(--on-ink-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 8px;
}

/* Hero diagram */
.flow {
  flex: 1 1 400px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  font-size: 14px;
}

.flow-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--on-ink-faint);
}

.flow-label:first-child {
  margin-bottom: 10px;
}

.flow-label:last-child {
  margin-top: 10px;
}

.flow-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.flow-node {
  padding: 16px 6px;
  text-align: center;
  font-weight: 500;
  background: var(--ink-panel);
  border: 1px solid var(--ink-border);
  border-radius: 6px;
}

.flow-link {
  align-self: center;
  width: 1px;
  height: 32px;
  background: var(--ink-border-strong);
}

.flow-core {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  background: var(--ink-raised);
  border: 1px solid var(--cyan);
  border-radius: 6px;
}

.flow-core-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.flow-core-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

.flow-core-tag {
  font-family: var(--font-latin);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--cyan);
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  list-style: none;
  font-size: 13px;
}

.dark .pills li {
  padding: 4px 12px;
  color: #d5e0ea;
  border: 1px solid #2f4a63;
  border-radius: 999px;
}

/* Protocol strip */
.protocols {
  border-top: 1px solid var(--ink-line);
}

.protocols .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 32px;
  padding-block: 24px;
}

.protocols-label {
  font-size: 13px;
  color: var(--on-ink-faint);
}

.protocols ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-latin);
  font-size: 15px;
  font-weight: 500;
}

/* Sections */
.section {
  background: var(--paper);
}

.section-alt {
  background: var(--paper-alt);
}

.section > .wrap {
  display: flex;
  flex-direction: column;
  gap: 48px;
  padding-block: var(--section-pad);
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section h2,
.contact h2 {
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 700;
  line-height: 1.4;
}

.section-lead {
  max-width: 40em;
  font-size: 16px;
  color: var(--text-muted);
}

/* Services */
.cards {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 20px;
}

.card {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 36px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.num {
  font-family: var(--font-latin);
  font-size: 14px;
  font-weight: 600;
  color: var(--cyan-text);
}

.card h3 {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.5;
}

.card p,
.steps p {
  font-size: 15px;
  color: var(--text-muted);
}

.card .pills {
  margin: auto 0 0;
  padding-top: 8px;
}

.card .pills li {
  padding: 3px 12px;
  color: #33465a;
  background: var(--chip);
  border-radius: 999px;
}

.card-wide {
  grid-column: span 3;
}

/* Skill hill-climbing */
.skills {
  background: var(--ink);
}

.skills .section-lead {
  color: var(--on-ink-muted);
}

.climb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 48px 64px;
}

.climb-steps {
  flex: 1 1 420px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.climb-steps li {
  display: flex;
  gap: 20px;
  padding: 24px 0;
  border-top: 1px solid var(--ink-border);
}

.climb-steps li:last-child {
  border-bottom: 1px solid var(--ink-border);
}

.climb-steps .num {
  flex: 0 0 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan);
  border: 1px solid var(--cyan);
  border-radius: 50%;
}

.climb-steps h3 {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.6;
}

.climb-steps p {
  margin-top: 6px;
  font-size: 15px;
  color: var(--on-ink-muted);
}

.climb-chart {
  flex: 1 1 360px;
  min-width: 0;
  margin: 0;
  padding: 24px 24px 20px;
  background: var(--ink-panel);
  border: 1px solid var(--ink-border);
  border-radius: 6px;
}

.climb-chart svg {
  display: block;
  width: 100%;
  height: auto;
}

.climb-chart figcaption {
  margin-top: 12px;
  font-size: 13px;
  color: var(--on-ink-faint);
  text-align: center;
}

/* Hero diagram: the two parts Nico builds */
.flow-parts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.flow-part {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border: 1px solid #2f4a63;
  border-radius: 4px;
}

.flow-part-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.flow-part .pills {
  margin: 0;
}

/* Process */
.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px 24px;
  padding: 0;
  list-style: none;
}

.steps li {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 20px;
  border-top: 2px solid var(--text);
}

.steps h3 {
  font-size: 19px;
  font-weight: 700;
}

/* Company */
.company > .wrap {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 40px 64px;
}

.company .section-head {
  flex: 1 1 280px;
  min-width: 0;
}

.facts {
  flex: 2 1 480px;
  min-width: 0;
  font-size: 16px;
  border-bottom: 1px solid var(--line);
}

.facts > div {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.facts > div:first-child {
  border-top-color: var(--text);
}

.facts dt {
  flex: 0 0 120px;
  font-weight: 700;
}

.facts dd {
  flex: 1 1 260px;
}

/* Contact */
.contact > .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 32px 64px;
  padding-block: var(--section-pad);
}

.contact-copy {
  flex: 1 1 420px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact h2 {
  font-size: clamp(28px, 3.4vw, 42px);
  text-wrap: balance;
}

.contact p {
  max-width: 34em;
  font-size: 16px;
  color: var(--on-ink-muted);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--ink-line);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding-block: 28px;
}

.site-footer img {
  height: 28px;
  width: auto;
}

.site-footer small {
  font-size: 13px;
  color: var(--on-ink-faint);
}

@media (max-width: 1000px) {
  .card {
    grid-column: span 3;
  }

  .card:last-child {
    grid-column: span 6;
  }
}

@media (max-width: 900px) {
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .card,
  .card:last-child {
    grid-column: span 6;
    padding: 28px 24px;
  }

  .flow-core {
    padding: 16px;
  }

  .flow-part {
    padding: 12px 10px;
  }

  .dark .flow-part .pills li {
    padding: 3px 9px;
    font-size: 12px;
  }

  .climb-chart {
    padding: 16px 12px;
  }

  .site-nav {
    gap: 4px 20px;
  }

  .site-nav .nav-cta {
    display: none;
  }

  .flow-node {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .site-nav {
    gap: 4px 16px;
    font-size: 13px;
  }

  .steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .flow-row {
    gap: 6px;
  }

  .flow-node {
    padding-inline: 2px;
    font-size: 12px;
    white-space: nowrap;
  }

  .hero-actions .btn,
  .contact .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
  }
}
