:root {
  color-scheme: dark;
  --bg: #0a0c12;
  --bg-deep: #07090f;
  --text: #f2f5f9;
  --muted: #a4adbd;
  --quiet: #6d7788;
  --rule: rgb(255 255 255 / 9%);
  --rule-strong: rgb(255 255 255 / 16%);
  --accent-cyan: #4fdccd;
  --accent-mint: #8bf1e2;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial,
    "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --jp: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --header-height: 68px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
}

p,
h1,
h2,
h3,
h4,
figure {
  margin-top: 0;
}

h1,
h2,
h3,
h4 {
  text-wrap: balance;
}

section[id] {
  scroll-margin-top: calc(var(--header-height) + 24px);
}

::selection {
  background: var(--accent-cyan);
  color: var(--bg-deep);
}

:focus-visible {
  outline: 2px solid var(--accent-mint);
  outline-offset: 4px;
}

.site-width,
.wrap {
  width: 100%;
  margin-inline: auto;
  padding-inline: max(24px, env(safe-area-inset-left));
  padding-right: max(24px, env(safe-area-inset-right));
}

.site-width {
  max-width: 1240px;
}

.wrap {
  max-width: 820px;
}

.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.eyebrow,
.section-index,
.project-index,
.tenet-no,
.updated {
  font-family: var(--mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
}

.eyebrow {
  color: var(--muted);
}

.eyebrow > span:first-child,
.section-index > span:first-child {
  color: var(--accent-cyan);
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: max(12px, env(safe-area-inset-top));
  left: max(16px, env(safe-area-inset-left));
  padding: 10px 14px;
  background: var(--accent-mint);
  color: var(--bg-deep);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

/* Header: solid and precise, with a crop of the actual logo asset. */
.bar {
  position: sticky;
  z-index: 30;
  top: 0;
  min-height: var(--header-height);
  padding-top: env(safe-area-inset-top);
  background: rgb(20 19 35 / 96%);
  border-bottom: 1px solid var(--rule);
}

.bar .site-width,
.bar .wrap {
  display: flex;
  min-height: var(--header-height);
  max-width: 1240px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.mark {
  display: inline-flex;
  flex: none;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1;
  text-decoration: none;
}

.brand-symbol {
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: 32px;
  height: 24px;
  overflow: hidden;
  background: var(--bg);
}

.brand-symbol img {
  position: absolute;
  top: -18.5px;
  left: -37px;
  width: 106px;
  height: auto;
  max-width: none;
}

.mark .rom {
  font-size: 14px;
  white-space: nowrap;
}

.links {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 34px);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.links a,
.backlink {
  position: relative;
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--muted);
  text-decoration: none;
}

.links a::after,
.backlink::after {
  position: absolute;
  right: 100%;
  bottom: -7px;
  left: 0;
  height: 1px;
  background: var(--accent-cyan);
  content: "";
  transition: right 180ms ease;
}

.links a:hover,
.links a:focus-visible,
.backlink:hover,
.backlink:focus-visible {
  color: var(--text);
}

.links a:hover::after,
.links a:focus-visible::after,
.backlink:hover::after,
.backlink:focus-visible::after {
  right: 0;
}

.hgroup {
  display: flex;
  align-items: center;
  gap: 20px;
}

.backlink {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Landing hero */
.hero {
  padding-block: clamp(72px, 10vw, 136px) clamp(70px, 9vw, 116px);
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: center;
  column-gap: clamp(20px, 3.2vw, 44px);
}

.hero-copy {
  z-index: 1;
  grid-column: 1 / 8;
  max-width: 680px;
}

.hero .eyebrow {
  margin-bottom: 24px;
}

.hero h1 {
  max-width: 11ch;
  margin-bottom: 30px;
  font-size: clamp(44px, 6.8vw, 92px);
  font-weight: 650;
  letter-spacing: -0.06em;
  line-height: 0.97;
}

.hero .lede {
  max-width: 58ch;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(16px, 1.45vw, 19px);
  line-height: 1.72;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  margin-top: 36px;
}

.text-link,
.project-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 9px;
  padding-block: 4px;
  border-bottom: 1px solid var(--accent-cyan);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
}

.text-link span,
.project-link span {
  transition: transform 180ms ease;
}

.text-link:hover span,
.text-link:focus-visible span,
.project-link:hover span,
.project-link:focus-visible span {
  transform: translate(2px, 1px);
}

.text-link.quiet {
  border-bottom-color: var(--rule-strong);
  color: var(--muted);
}

.text-link.quiet:hover,
.text-link.quiet:focus-visible {
  color: var(--text);
  border-bottom-color: var(--accent-cyan);
}

.hero-logo {
  grid-column: 8 / 13;
  width: min(100%, 600px);
  margin: 0;
  justify-self: end;
}

.hero-logo img {
  width: 100%;
  height: auto;
  background: var(--bg);
}

.hero-logo figcaption {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-inline: 21.5%;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
  color: var(--quiet);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  line-height: 1.5;
  text-transform: uppercase;
}

@keyframes settle-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes settle-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.hero-copy > * {
  animation: settle-up 560ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero-copy > :nth-child(2) { animation-delay: 70ms; }
.hero-copy > :nth-child(3) { animation-delay: 140ms; }
.hero-copy > :nth-child(4) { animation-delay: 210ms; }
.hero-logo { animation: settle-in 700ms ease 180ms both; }

/* Landing sections */
.landing-section {
  padding-block: clamp(72px, 9vw, 116px);
  border-top: 1px solid var(--rule);
}

.work-section,
.contact {
  background: var(--bg-deep);
}

.section-head {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  align-items: baseline;
  column-gap: clamp(20px, 3.2vw, 44px);
  margin-bottom: clamp(48px, 6vw, 76px);
}

.section-index {
  margin-bottom: 0;
  color: var(--quiet);
}

.section-head h2 {
  margin-bottom: 0;
  font-size: clamp(30px, 4vw, 52px);
  font-weight: 620;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.section-head-wide {
  align-items: start;
}

.section-intro {
  max-width: 51ch;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.work-list {
  border-bottom: 1px solid var(--rule);
}

.project-row {
  display: grid;
  grid-template-columns: 48px minmax(190px, 0.72fr) minmax(0, 1.35fr);
  gap: clamp(24px, 3.2vw, 44px);
  padding-block: clamp(42px, 5vw, 64px);
  border-top: 1px solid var(--rule);
  transition: border-color 180ms ease;
}

.project-row:hover {
  border-top-color: var(--accent-cyan);
}

.project-index,
.tenet-no {
  margin-bottom: 0;
  color: var(--quiet);
}

.project-name {
  margin-bottom: 0;
}

.project-name .cn {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-family: var(--jp);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.25;
}

.project-name .en {
  display: block;
  font-size: clamp(24px, 2.2vw, 31px);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.12;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 20px 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
}

.status .dot {
  width: 7px;
  height: 7px;
  border: 1px solid var(--quiet);
  border-radius: 50%;
}

.status.beta .dot {
  background: var(--accent-cyan);
  border-color: var(--accent-cyan);
}

.tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 0;
  margin-top: 26px;
  margin-bottom: 0;
  padding: 0;
  color: var(--quiet);
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.5;
  list-style: none;
}

.tech-list li + li::before {
  margin-inline: 8px;
  color: var(--rule-strong);
  content: "/";
}

.project-detail h4 {
  max-width: 27ch;
  margin-bottom: 17px;
  font-size: clamp(21px, 2.25vw, 28px);
  font-weight: 620;
  letter-spacing: -0.03em;
  line-height: 1.24;
}

.project-detail p {
  max-width: 61ch;
  margin-bottom: 23px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.72;
}

.project-link {
  color: var(--text);
  font-size: 13px;
}

/* Ethos is a ledger, not a card grid. */
.tenet-list {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
  list-style: none;
}

.tenet-list li {
  display: grid;
  grid-template-columns: 48px minmax(210px, 0.72fr) minmax(0, 1.35fr);
  gap: clamp(24px, 3.2vw, 44px);
  align-items: start;
  padding-block: 34px;
  border-bottom: 1px solid var(--rule);
}

.tenet-name {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 14px;
  align-items: baseline;
}

.tenet-name > span {
  color: var(--accent-cyan);
  font-family: var(--jp);
  font-size: 20px;
  font-weight: 700;
}

.tenet-name h3 {
  margin-bottom: 0;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 1.4;
}

.tenet-list li > p {
  max-width: 58ch;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.7;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 90px minmax(260px, 0.9fr) minmax(320px, 1fr);
  gap: clamp(20px, 3.2vw, 44px);
  align-items: end;
}

.contact h2 {
  margin-bottom: 0;
  font-family: var(--jp);
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 550;
  letter-spacing: -0.035em;
  line-height: 1.4;
}

.contact-action {
  justify-self: end;
  text-align: right;
}

.contact-action .eyebrow {
  margin-bottom: 12px;
}

.mail {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--accent-cyan);
  font-size: clamp(15px, 1.6vw, 19px);
  font-weight: 650;
  line-height: 1.5;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.mail:hover,
.mail:focus-visible {
  color: var(--accent-mint);
}

/* Shared footer */
footer {
  border-top: 1px solid var(--rule);
  background: var(--bg-deep);
}

footer .site-width,
footer .wrap {
  display: flex;
  min-height: 86px;
  max-width: 1240px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  color: var(--quiet);
  font-size: 11px;
  line-height: 1.5;
}

footer .kanji {
  color: var(--accent-cyan);
  font-family: var(--jp);
  font-weight: 700;
}

footer a {
  color: var(--muted);
  text-decoration-color: transparent;
  text-underline-offset: 4px;
}

footer a:hover,
footer a:focus-visible {
  color: var(--text);
  text-decoration-color: var(--accent-cyan);
}

footer .fnav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
}

footer .fnav a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
}

/* Buttons used on project pages */
.btn {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 17px;
  border: 1px solid var(--rule-strong);
  border-radius: 2px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  transition: border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.btn.primary {
  background: var(--accent-cyan);
  border-color: var(--accent-cyan);
  color: var(--bg-deep);
}

.btn.ghost {
  border-color: var(--quiet);
  color: var(--text);
}

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

.btn.primary:hover,
.btn.primary:focus-visible {
  background: var(--accent-mint);
  border-color: var(--accent-mint);
}

.btn.ghost:hover,
.btn.ghost:focus-visible {
  border-color: var(--accent-cyan);
}

.btn .arw {
  transition: transform 180ms ease;
}

.btn:hover .arw,
.btn:focus-visible .arw {
  transform: translateX(2px);
}

/* Project pages */
.proj {
  padding-block: clamp(64px, 9vw, 108px) 18px;
}

.proj .eyebrow,
.prose .eyebrow {
  margin-bottom: 20px;
}

.project-title {
  margin-bottom: 0;
}

.proj .cn {
  display: block;
  margin-bottom: 11px;
  color: var(--accent-cyan);
  font-family: var(--jp);
  font-size: clamp(20px, 3.2vw, 28px);
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.3;
}

.proj .en {
  display: block;
  font-size: clamp(42px, 7vw, 68px);
  font-weight: 650;
  letter-spacing: -0.055em;
  line-height: 1;
}

.proj .tagline {
  max-width: 28ch;
  margin: 28px 0 0;
  color: var(--text);
  font-size: clamp(20px, 2.7vw, 26px);
  font-weight: 520;
  letter-spacing: -0.025em;
  line-height: 1.42;
}

.proj .lead {
  max-width: 63ch;
  margin: 38px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 18px);
  line-height: 1.78;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.tag {
  padding: 5px 8px;
  border: 1px solid var(--rule);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 38px;
}

section.block {
  margin-top: clamp(50px, 7vw, 78px);
  padding-block: clamp(48px, 7vw, 76px);
  border-top: 1px solid var(--rule);
}

.block h2 {
  margin-bottom: 30px;
  font-size: clamp(24px, 3.5vw, 33px);
  font-weight: 620;
  letter-spacing: -0.04em;
  line-height: 1.2;
}

.steps,
.feat {
  border-top: 1px solid var(--rule);
}

.steps .row,
.feat .row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 18px;
  padding-block: 24px;
  border-bottom: 1px solid var(--rule);
  align-items: start;
}

.steps {
  counter-reset: step;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps .n {
  color: var(--accent-cyan);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  counter-increment: step;
}

.steps .n::before {
  content: counter(step, decimal-leading-zero);
}

.steps p,
.feat p {
  max-width: 61ch;
  margin: 0;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.72;
}

.feat .k {
  color: var(--accent-cyan);
  font-family: var(--jp);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.45;
}

.feat h3 {
  margin: 0 0 7px;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 1.45;
}

.pill {
  display: inline-block;
  margin-left: 7px;
  padding: 1px 6px;
  border: 1px solid rgb(22 187 206 / 55%);
  color: var(--accent-mint);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.5;
  text-transform: uppercase;
  vertical-align: 2px;
}

/* Privacy prose */
.prose {
  padding-block: clamp(56px, 8vw, 92px);
}

.prose h1 {
  margin-bottom: 8px;
  font-size: clamp(38px, 6vw, 58px);
  font-weight: 650;
  letter-spacing: -0.055em;
  line-height: 1.05;
}

.prose .updated {
  margin-bottom: 38px;
  color: var(--quiet);
}

.prose h2 {
  margin: 44px 0 13px;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.35;
}

.prose p,
.prose li {
  max-width: 66ch;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.76;
}

.prose ul {
  padding-left: 22px;
}

.prose li {
  margin-block: 8px;
  padding-left: 4px;
}

.prose strong {
  color: var(--text);
  font-weight: 650;
}

.prose a {
  color: var(--accent-mint);
  text-underline-offset: 3px;
}

@media (max-width: 880px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 52px;
  }

  .hero-copy,
  .hero-logo {
    grid-column: 1;
  }

  .hero-copy {
    max-width: 680px;
  }

  .hero-logo {
    width: min(100%, 590px);
    justify-self: start;
  }

  .project-row,
  .tenet-list li {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .project-identity,
  .project-detail,
  .tenet-name,
  .tenet-list li > p {
    grid-column: 2;
  }

  .project-detail {
    margin-top: 6px;
  }

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

  .contact h2,
  .contact-action {
    grid-column: 2;
  }

  .contact-action {
    justify-self: start;
    margin-top: 24px;
    text-align: left;
  }
}

@media (max-width: 560px) {
  :root {
    --header-height: 64px;
  }

  .site-width,
  .wrap {
    padding-inline: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
  }

  .bar .site-width,
  .bar .wrap {
    gap: 14px;
  }

  .brand-symbol {
    width: 28px;
    height: 21px;
  }

  .brand-symbol img {
    top: -16px;
    left: -32px;
    width: 92px;
  }

  .mark {
    gap: 8px;
  }

  .mark .rom {
    font-size: 13px;
  }

  .links {
    gap: 12px;
    font-size: 10px;
    letter-spacing: 0.04em;
  }

  .hero {
    padding-block: 58px 70px;
  }

  .hero h1 {
    margin-bottom: 24px;
    font-size: clamp(42px, 13vw, 58px);
  }

  .hero-actions {
    margin-top: 30px;
  }

  .hero-grid {
    row-gap: 38px;
  }

  .hero-logo figcaption {
    margin-inline: 13%;
  }

  .section-head {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 16px;
  }

  .project-row,
  .tenet-list li {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 16px;
  }

  .tenet-name {
    grid-template-columns: 24px 1fr;
    gap: 10px;
  }

  .contact-grid {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 16px;
  }

  .tech-list li + li::before {
    margin-inline: 6px;
  }

  .cta {
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  .steps .row,
  .feat .row {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 12px;
  }

  footer .site-width,
  footer .wrap {
    min-height: 0;
    padding-block: 25px;
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 380px) {
  .mark .rom {
    font-size: 12px;
  }

  .links {
    gap: 9px;
    font-size: 9.5px;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (forced-colors: active) {
  .brand-symbol {
    border: 1px solid CanvasText;
  }

  .status .dot {
    background: LinkText;
  }
}
