:root {
  --ink: #171713;
  --paper: #f2efe5;
  --paper-deep: #e5dfd0;
  --accent: #e44728;
  --accent-dark: #b92f18;
  --muted: #777267;
  --line: rgba(23, 23, 19, 0.22);
  --mono: "DM Mono", monospace;
  --sans: "Zen Kaku Gothic New", sans-serif;
  --space: clamp(1.25rem, 3vw, 3rem);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(23, 23, 19, 0.025) 1px, transparent 1px),
    var(--paper);
  background-size: 100% 6px;
  font-family: var(--sans);
  line-height: 1.7;
}

body::before {
  position: fixed;
  z-index: 10;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.1;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

.site-header {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 84px;
  padding: 0 var(--space);
  border-bottom: 1px solid var(--ink);
  background: rgba(242, 239, 229, 0.92);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  width: fit-content;
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: var(--paper);
  background: var(--accent);
  font-family: var(--sans);
  font-size: 1.1rem;
  font-weight: 900;
}

nav {
  display: flex;
  gap: 2rem;
  font-family: var(--mono);
  font-size: 0.72rem;
}

nav a,
.text-link {
  position: relative;
}

nav a::after,
.text-link::after {
  position: absolute;
  right: 0;
  bottom: -4px;
  left: 0;
  height: 1px;
  content: "";
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms ease;
}

nav a:hover::after,
.text-link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.header-cta {
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 500;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 1.4rem;
}

.language-switch {
  display: flex;
  gap: 0.4rem;
  font-family: var(--mono);
  font-size: 0.68rem;
}

.language-switch [aria-current="page"] {
  color: var(--accent);
  font-weight: 500;
}

.language-switch a:hover {
  color: var(--accent);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.95fr);
  min-height: calc(100vh - 84px);
  border-bottom: 1px solid var(--ink);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(4rem, 9vw, 9rem) var(--space);
}

.eyebrow {
  margin: 0 0 1.6rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
}

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

h1 {
  max-width: 850px;
  margin-bottom: 2.3rem;
  font-size: clamp(3.2rem, 7vw, 7.8rem);
  font-weight: 900;
  letter-spacing: -0.07em;
  line-height: 0.97;
}

h1 span {
  display: inline-block;
  color: var(--accent);
}

.lead {
  max-width: 660px;
  margin-bottom: 2.5rem;
  font-size: clamp(1rem, 1.35vw, 1.28rem);
}

.page-en .hero-copy {
  max-width: 980px;
}

.page-en h1 {
  font-family: var(--mono);
  font-size: clamp(3.2rem, 6.5vw, 7.2rem);
  font-weight: 500;
  letter-spacing: -0.075em;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 1.5rem;
  border: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  transition:
    color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.button:hover {
  transform: translate(-3px, -3px);
  box-shadow: 4px 4px 0 var(--ink);
}

.button-primary {
  color: white;
  border-color: var(--accent);
  background: var(--accent);
}

.button-primary:hover {
  border-color: var(--ink);
  background: var(--accent-dark);
}

.text-link {
  font-family: var(--mono);
  font-size: 0.78rem;
}

.bento-stage {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: clamp(5rem, 8vw, 8rem) var(--space);
  color: var(--paper);
  border-left: 1px solid var(--ink);
  background: var(--ink);
}

.bento-stage::before {
  position: absolute;
  width: 60%;
  aspect-ratio: 1;
  border: 1px solid rgba(242, 239, 229, 0.1);
  border-radius: 50%;
  content: "";
  transform: scale(1.55);
}

.label {
  position: absolute;
  z-index: 2;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.12em;
}

.label-top {
  top: 2rem;
  right: 2rem;
}

.label-bottom {
  bottom: 2rem;
  left: 2rem;
  color: var(--accent);
}

.bento-box {
  position: relative;
  display: grid;
  grid-template: 1fr 0.9fr / 1.2fr 0.8fr;
  width: min(100%, 620px);
  aspect-ratio: 1.08;
  border: 5px solid var(--paper);
  box-shadow: 18px 18px 0 var(--accent);
  transform: rotate(-2.5deg);
}

.bento-cell {
  position: relative;
  display: flex;
  padding: 1.5rem;
  border: 1px solid var(--paper);
}

.cell-number {
  position: absolute;
  top: 0.65rem;
  right: 0.8rem;
  font-family: var(--mono);
  font-size: 0.62rem;
  opacity: 0.5;
}

.cell-command {
  align-items: flex-end;
  background: var(--accent);
}

.cell-command code {
  font-family: var(--mono);
  font-size: clamp(0.66rem, 1.3vw, 0.95rem);
}

.cell-local {
  flex-direction: column;
  justify-content: flex-end;
  background: var(--paper);
  color: var(--ink);
}

.large-type {
  font-family: var(--mono);
  font-size: clamp(1.6rem, 4vw, 3.5rem);
  line-height: 1;
}

.cell-local small {
  margin-top: 0.35rem;
  font-weight: 700;
}

.cell-report {
  align-items: flex-end;
  justify-content: space-between;
}

.cell-report strong {
  font-family: var(--mono);
  font-size: clamp(1rem, 2.2vw, 1.8rem);
  line-height: 1.1;
}

.report-lines {
  display: flex;
  width: 42%;
  flex-direction: column;
  gap: 0.55rem;
}

.report-lines i {
  height: 3px;
  background: var(--paper);
}

.report-lines i:nth-child(2) {
  width: 75%;
}

.report-lines i:nth-child(3) {
  width: 90%;
}

.cell-redacted {
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(242, 239, 229, 0.08),
      rgba(242, 239, 229, 0.08) 8px,
      transparent 8px,
      transparent 16px
    ),
    var(--ink);
  font-family: var(--mono);
  font-size: 0.75rem;
}

.cell-redacted b {
  color: var(--accent);
  font-size: clamp(0.85rem, 1.6vw, 1.3rem);
}

.problem-section,
.principles-section {
  position: relative;
  display: grid;
  grid-template-columns: 80px minmax(280px, 0.8fr) minmax(420px, 1.2fr);
  gap: var(--space);
  padding: clamp(6rem, 11vw, 11rem) var(--space);
  border-bottom: 1px solid var(--ink);
}

.section-index {
  font-family: var(--mono);
  color: var(--accent);
}

.section-heading h2,
.principles-header h2,
.roadmap-section h2,
.closing-section h2 {
  font-size: clamp(2.7rem, 5.3vw, 6rem);
  letter-spacing: -0.055em;
  line-height: 1.05;
}

.problem-list article {
  display: grid;
  grid-template-columns: 42px 1fr;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
}

.problem-list article:last-child {
  border-bottom: 1px solid var(--line);
}

.problem-list span {
  grid-row: 1 / 3;
  font-family: var(--mono);
  color: var(--accent);
  font-size: 0.72rem;
}

.problem-list h3 {
  margin-bottom: 0.4rem;
  font-size: 1.25rem;
}

.problem-list p {
  margin-bottom: 0;
  color: var(--muted);
}

.problem-answer {
  grid-column: 2 / 4;
  margin: 4rem 0 0;
  padding-left: calc(80px + var(--space));
  font-size: clamp(1.35rem, 2.5vw, 2.4rem);
}

.problem-answer strong {
  color: var(--accent);
}

.product-section {
  color: var(--paper);
  border-bottom: 1px solid var(--ink);
  background: var(--accent);
}

.product-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: clamp(5rem, 8vw, 8rem) var(--space) 4rem;
  border-bottom: 1px solid rgba(242, 239, 229, 0.5);
}

.product-intro h2 {
  margin: 0;
  font-family: var(--mono);
  font-size: clamp(4rem, 10vw, 10rem);
  font-weight: 500;
  letter-spacing: -0.08em;
  line-height: 0.78;
  text-transform: uppercase;
}

.version-tag {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border: 1px solid var(--paper);
  border-radius: 50%;
  font-family: var(--mono);
}

.product-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
}

.terminal-card {
  align-self: center;
  margin: clamp(3rem, 7vw, 7rem) var(--space);
  color: #cfcfc4;
  border: 1px solid var(--paper);
  background: var(--ink);
  box-shadow: 12px 12px 0 rgba(23, 23, 19, 0.35);
  transform: rotate(1.2deg);
}

.terminal-bar {
  display: flex;
  justify-content: space-between;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid #4a4a45;
  font-family: var(--mono);
  font-size: 0.65rem;
}

.terminal-card pre {
  overflow-x: auto;
  margin: 0;
  padding: clamp(1.4rem, 4vw, 3rem);
  font-family: var(--mono);
  font-size: clamp(0.68rem, 1.15vw, 0.94rem);
  line-height: 1.8;
}

.muted {
  color: #77776f;
}

.ok {
  color: #87d186;
}

.redact {
  color: var(--accent);
  letter-spacing: -0.15em;
}

.product-copy {
  padding: clamp(4rem, 8vw, 8rem) var(--space);
  border-left: 1px solid rgba(242, 239, 229, 0.5);
}

.product-lead {
  margin-bottom: 3rem;
  font-size: clamp(1.25rem, 2.2vw, 2rem);
  font-weight: 500;
}

.feature-list {
  margin: 0 0 3rem;
  padding: 0;
  list-style: none;
}

.feature-list li {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid rgba(242, 239, 229, 0.35);
}

.feature-list li:last-child {
  border-bottom: 1px solid rgba(242, 239, 229, 0.35);
}

.feature-list span {
  font-family: var(--mono);
  font-size: 0.68rem;
}

.install-block {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding: 1rem;
  border: 1px solid var(--paper);
  font-family: var(--mono);
  font-size: 0.75rem;
}

.install-block button {
  padding: 0;
  color: var(--paper);
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.button-dark {
  width: 100%;
  color: var(--paper);
  border-color: var(--ink);
  background: var(--ink);
}

.product-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.product-actions .button {
  width: 100%;
  padding-right: 1rem;
  padding-left: 1rem;
}

.button-light {
  color: var(--ink);
  border-color: var(--paper);
  background: var(--paper);
}

.principles-section {
  grid-template-columns: 80px 0.75fr 1.25fr;
}

.principles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--ink);
}

.principles-grid article {
  min-height: 260px;
  padding: 1.5rem;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.principle-mark {
  display: grid;
  width: 44px;
  height: 44px;
  margin-bottom: 3rem;
  place-items: center;
  color: var(--paper);
  background: var(--ink);
  font-weight: 900;
}

.principles-grid h3 {
  margin-bottom: 0.5rem;
  font-family: var(--mono);
  font-size: 1rem;
}

.principles-grid p {
  margin-bottom: 0;
  color: var(--muted);
}

.roadmap-section {
  padding: clamp(6rem, 10vw, 10rem) var(--space);
  color: var(--paper);
  background: var(--ink);
}

.roadmap-section h2 {
  max-width: 900px;
  margin-bottom: 5rem;
}

.roadmap-track {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(242, 239, 229, 0.4);
}

.roadmap-track article {
  position: relative;
  padding: 2rem 2rem 1rem 0;
}

.roadmap-track article::before {
  position: absolute;
  top: -7px;
  left: 0;
  width: 13px;
  height: 13px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  content: "";
  background: var(--paper);
}

.roadmap-track article:not(:last-child) {
  border-right: 1px solid rgba(242, 239, 229, 0.18);
}

.roadmap-track .is-live::before {
  background: var(--accent);
}

.roadmap-track span {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 0.68rem;
}

.roadmap-track h3 {
  margin: 1.8rem 0 0.5rem;
  font-family: var(--mono);
  font-size: 1.2rem;
}

.roadmap-track p {
  max-width: 280px;
  color: #9d9b91;
}

.closing-section {
  position: relative;
  overflow: hidden;
  padding: clamp(7rem, 13vw, 13rem) var(--space);
  border-bottom: 1px solid var(--ink);
}

.closing-section h2 {
  position: relative;
  z-index: 1;
  max-width: 1000px;
  margin-bottom: 3rem;
}

.closing-mark {
  position: absolute;
  right: -0.08em;
  bottom: -0.32em;
  color: var(--paper-deep);
  font-size: clamp(18rem, 40vw, 42rem);
  font-weight: 900;
  line-height: 1;
}

footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 2.5rem var(--space);
  font-family: var(--mono);
  font-size: 0.67rem;
}

footer p {
  margin: 0;
}

footer p:last-child {
  justify-self: end;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 700ms ease,
    transform 700ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

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

  .reveal {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 920px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  nav {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .bento-stage {
    min-height: 640px;
    border-top: 1px solid var(--ink);
    border-left: 0;
  }

  .problem-section,
  .principles-section {
    grid-template-columns: 50px 1fr;
  }

  .problem-list,
  .principles-grid {
    grid-column: 2;
  }

  .problem-answer {
    grid-column: 2;
    padding-left: 0;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .product-copy {
    border-top: 1px solid rgba(242, 239, 229, 0.5);
    border-left: 0;
  }
}

@media (max-width: 640px) {
  .site-header {
    min-height: 70px;
  }

  .header-cta {
    font-size: 0;
  }

  .header-cta::after {
    content: "GH ↗";
    font-size: 0.72rem;
  }

  .header-actions {
    gap: 0.8rem;
  }

  .hero {
    min-height: auto;
  }

  .hero-copy {
    padding-top: 5rem;
    padding-bottom: 5rem;
  }

  h1 {
    font-size: clamp(3rem, 15vw, 5.2rem);
  }

  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .bento-stage {
    min-height: 510px;
  }

  .bento-box {
    aspect-ratio: 0.92;
    box-shadow: 10px 10px 0 var(--accent);
  }

  .bento-cell {
    padding: 1rem;
  }

  .problem-section,
  .principles-section {
    grid-template-columns: 1fr;
  }

  .section-index,
  .problem-list,
  .principles-grid,
  .problem-answer {
    grid-column: 1;
  }

  .section-index {
    display: none;
  }

  .product-intro {
    align-items: flex-start;
    flex-direction: column;
    gap: 2.5rem;
  }

  .product-intro h2 {
    font-size: 20vw;
  }

  .terminal-card {
    margin: 3rem 1rem;
  }

  .principles-grid {
    grid-template-columns: 1fr;
  }

  .product-actions {
    grid-template-columns: 1fr;
  }

  .principles-grid article {
    min-height: 220px;
  }

  .roadmap-track {
    grid-template-columns: 1fr;
    border-top: 0;
    border-left: 1px solid rgba(242, 239, 229, 0.4);
  }

  .roadmap-track article {
    padding: 0 0 2.5rem 2rem;
  }

  .roadmap-track article::before {
    top: 4px;
    left: -7px;
  }

  .roadmap-track article:not(:last-child) {
    border-right: 0;
  }

  .roadmap-track h3 {
    margin-top: 0.5rem;
  }

  footer {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  footer p:last-child {
    justify-self: start;
  }
}
