@font-face {
  font-family: "Sora";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("./fonts/sora-600.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --fermix-blue: #0A84FF;
  --tezra-blue: #0A84FF;
  --tezra-blue-dark: #006FD6;
  --signal-lemon: #F4F06A;
  --signal-mint: #B8F2C8;
  --signal-coral: #FF7657;
  --page: #f9fbff;
  --surface: #ffffff;
  --ink: #11131a;
  --muted: #545966;
  --line: rgb(17 19 26 / 18%);
  --line-light: rgb(255 255 255 / 26%);
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: "Sora", var(--sans);
  font-family: var(--sans);
}

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

html {
  background: var(--ink);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background: var(--page);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.5;
}

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

a:focus-visible,
button:focus-visible,
label:focus-visible {
  outline: 3px solid var(--signal-lemon);
  outline-offset: 4px;
}

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

p,
li,
code,
td,
th {
  overflow-wrap: anywhere;
}

code,
pre {
  font-family: var(--mono);
}

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 50;
  min-height: 44px;
  padding: 0.7rem 0.9rem;
  border: 2px solid var(--ink);
  background: var(--signal-lemon);
  color: var(--ink);
  font-family: var(--mono);
  transform: translateY(-180%);
}

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

.shell {
  width: min(1380px, calc(100% - 32px));
  margin: 0 auto;
}

.edge-frame {
  position: relative;
  border-right: 1px solid var(--line-light);
  border-left: 1px solid var(--line-light);
}

.corner-mark {
  position: absolute;
  bottom: -10px;
  width: 21px;
  height: 21px;
  pointer-events: none;
}

.corner-mark::before,
.corner-mark::after {
  position: absolute;
  background: var(--line-light);
  content: "";
}

.corner-mark::before {
  top: 10px;
  left: 0;
  width: 21px;
  height: 1px;
}

.corner-mark::after {
  top: 0;
  left: 10px;
  width: 1px;
  height: 21px;
}

.corner-left {
  left: -11px;
}

.corner-right {
  right: -11px;
}

.announcement-wrap {
  padding-top: 10px;
  background: var(--ink);
}

.announcement {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin: 0 10px;
  padding: 8px 16px;
  border: 1px solid rgb(255 255 255 / 18%);
  background: var(--signal-lemon);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  text-align: center;
  text-transform: uppercase;
}

.announcement a {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--tezra-blue);
  color: white;
}

.header-layout {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-height: 72px;
  align-items: center;
  gap: 24px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line-light);
}

.brand,
.site-nav,
.footer-links {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  min-height: 44px;
  font-weight: 700;
}

.wordmark {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.04em;
  text-transform: lowercase;
}

.tezra-logo {
  display: block;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
}

.logo-diamond {
  fill: none;
  stroke: currentColor;
}

.logo-spark {
  fill: currentColor;
}

.site-nav,
.footer-links {
  flex-wrap: wrap;
  justify-content: center;
  gap: 1px;
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
}

.site-nav a,
.footer-links a,
.header-link {
  min-height: 38px;
  padding: 10px 14px;
  border: 1px solid var(--line-light);
}

.site-nav a:hover,
.header-link:hover {
  background: white;
  color: var(--tezra-blue);
}

.header-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.github-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: currentColor;
}

.nav-toggle-input,
.nav-toggle {
  display: none;
}

.nav-toggle-icon {
  width: 22px;
  height: 22px;
}

.hero {
  overflow: hidden;
  background: var(--tezra-blue);
  color: white;
}

.hero-shell {
  min-height: calc(100svh - 122px);
  padding: clamp(72px, 10vh, 120px) 24px 76px;
}

.hero-copy {
  max-width: 1180px;
  margin: 0;
  text-align: left;
}

h1 {
  max-width: 11ch;
  margin: 0 0 28px;
  font-family: var(--display);
  font-size: clamp(3.5rem, 8.2vw, 8.6rem);
  font-weight: 600;
  letter-spacing: -0.065em;
  line-height: 0.88;
  text-wrap: balance;
}

.hero-lede {
  max-width: 860px;
  margin: 0;
  font-size: clamp(1.15rem, 2vw, 1.8rem);
  font-weight: 520;
  line-height: 1.22;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0;
  margin-top: 34px;
}

.hero-proof {
  max-width: 760px;
  margin: 22px 0 0;
  color: rgb(255 255 255 / 70%);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
  text-transform: uppercase;
}

.button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  padding: 14px 20px;
  border: 1px solid white;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.button-primary {
  background: white;
  color: var(--tezra-blue);
}

.button-primary:hover {
  background: var(--signal-lemon);
  color: var(--ink);
}

.button-secondary {
  background: transparent;
  color: white;
}

.button-secondary:hover {
  background: white;
  color: var(--tezra-blue);
}

.hero-visual {
  position: relative;
  max-width: 1120px;
  margin: 84px 0 0 auto;
}

.hero-visual::before {
  position: absolute;
  top: -34px;
  left: -34px;
  width: 126px;
  height: 126px;
  border-top: 1px solid var(--line-light);
  border-left: 1px solid var(--line-light);
  content: "";
}

.demo-panel {
  position: relative;
  overflow: hidden;
  border: 2px solid var(--ink);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 14px 14px 0 var(--signal-lemon);
}

.demo-toolbar {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  min-height: 54px;
  align-items: center;
  padding: 0 18px;
  border-bottom: 2px solid var(--ink);
  background: var(--ink);
  color: white;
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
}

.demo-toolbar strong {
  padding: 4px 7px;
  background: var(--signal-mint);
  color: var(--ink);
}

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

.code-window {
  min-width: 0;
  border-right: 2px solid var(--ink);
  background: var(--surface);
}

.code-window:last-child {
  border-right: 0;
}

.code-title {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
}

.code-title strong {
  color: var(--ink);
  font-weight: 700;
}

.code-window pre,
.response-lines {
  min-height: 230px;
  margin: 0;
  padding: 26px 24px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.8;
}

.code-window pre {
  white-space: pre-wrap;
}

.runtime-panel {
  position: relative;
  background: #f3f5f8;
}

.runtime-panel::before {
  position: absolute;
  top: 52px;
  bottom: 0;
  left: 0;
  width: 4px;
  background: var(--fermix-blue);
  content: "";
  animation: signalSweep 4s linear infinite;
}

.response-lines {
  list-style: none;
}

.response-lines li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
}

.response-lines span {
  color: var(--muted);
  text-align: right;
}

.section {
  position: relative;
}

.section-shell {
  padding: clamp(72px, 10vw, 150px) 24px;
  border-color: var(--line);
}

.section-products {
  background: var(--signal-lemon);
}

.section-fermix {
  background: var(--signal-mint);
}

.section-principles {
  background: var(--signal-coral);
}

.section-label {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: clamp(64px, 9vw, 130px);
  color: rgb(17 19 26 / 58%);
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
}

.section-label::after {
  height: 1px;
  background: var(--line);
  content: "";
}

.section-label span:nth-child(2),
.section-label span:nth-child(3) {
  color: var(--ink);
}

.section-intro {
  max-width: 930px;
  margin-bottom: 52px;
}

.section-intro > p:last-child {
  max-width: 680px;
  color: rgb(17 19 26 / 72%);
  font-size: 17px;
}

.eyebrow,
.card-kicker {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.eyebrow {
  margin-bottom: 22px;
}

h2 {
  max-width: 14ch;
  margin: 0 0 22px;
  font-family: var(--display);
  font-size: clamp(3rem, 6.4vw, 7rem);
  font-weight: 600;
  letter-spacing: -0.06em;
  line-height: 0.91;
  text-wrap: balance;
}

h3 {
  margin: 0 0 14px;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.project-grid,
.principle-grid {
  display: grid;
  gap: 2px;
  border: 2px solid var(--ink);
  background: var(--ink);
}

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

.project-card,
.principle,
.control-flow li {
  position: relative;
  min-width: 0;
  background: var(--surface);
  color: var(--ink);
}

.project-card,
.principle {
  min-height: 330px;
  padding: 28px;
}

.project-card p,
.principle p {
  color: var(--muted);
}

.project-card::after,
.principle::after {
  position: absolute;
  right: 24px;
  bottom: 24px;
  width: 12px;
  height: 12px;
  background: var(--ink);
  content: "";
}

.project-card-primary {
  background: var(--tezra-blue);
  color: white;
}

.project-card-primary p,
.project-card-primary .card-kicker,
.project-card-primary .text-link {
  color: white;
}

.project-card-primary::after {
  background: var(--signal-lemon);
}

.card-kicker {
  margin: 0 0 34px;
}

.product-name {
  display: flex;
  align-items: center;
  gap: 10px;
}

.product-mark {
  width: auto;
  height: 34px;
  flex: 0 0 auto;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.text-link {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  margin-top: 14px;
  color: var(--tezra-blue);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.text-link::before {
  width: 22px;
  height: 2px;
  margin-right: 8px;
  background: currentColor;
  content: "";
}

.text-link:hover::before {
  width: 32px;
}

.control-grid,
.principles-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1fr);
  gap: clamp(40px, 8vw, 120px);
}

.control-flow {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  border: 2px solid var(--ink);
  background: var(--ink);
  list-style: none;
  counter-reset: flow;
}

.control-flow li {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  column-gap: 16px;
  row-gap: 6px;
  min-height: 112px;
  align-items: center;
  padding: 20px 24px;
  counter-increment: flow;
  overflow-wrap: normal;
}

.control-flow li::before {
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: center;
  color: var(--tezra-blue);
  content: "0" counter(flow);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
}

.control-flow span,
.control-flow strong {
  grid-column: 2;
}

.control-flow span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
}

.control-flow strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 680;
  overflow-wrap: normal;
  word-break: normal;
}

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

.principle {
  min-height: 245px;
}

.principle:nth-child(1) {
  background: var(--signal-lemon);
}

.principle:nth-child(4) {
  background: var(--signal-mint);
}

.principle span {
  position: absolute;
  right: 22px;
  bottom: 12px;
  color: rgb(17 19 26 / 14%);
  font-family: var(--display);
  font-size: 68px;
  font-weight: 600;
  line-height: 1;
}

.principle h3,
.principle p {
  position: relative;
  z-index: 1;
}

.pixel-transition {
  position: relative;
  width: 100%;
  aspect-ratio: 6 / 1;
  overflow: hidden;
  background: var(--pixel-to);
}

.transition-blue-lemon {
  --pixel-from: var(--tezra-blue);
  --pixel-to: var(--signal-lemon);
}

.transition-lemon-mint {
  --pixel-from: var(--signal-lemon);
  --pixel-to: var(--signal-mint);
}

.transition-mint-coral {
  --pixel-from: var(--signal-mint);
  --pixel-to: var(--signal-coral);
}

.transition-coral-ink {
  --pixel-from: var(--signal-coral);
  --pixel-to: var(--ink);
}

.pixel-field.pixel-eaten {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  grid-template-rows: repeat(4, minmax(0, 1fr));
}

.pixel {
  min-width: 0;
  min-height: 0;
  background: var(--pixel-from);
}

.pixel:nth-child(27),
.pixel:nth-child(33),
.pixel:nth-child(36),
.pixel:nth-child(41),
.pixel:nth-child(46),
.pixel:nth-child(n + 49) {
  background: var(--pixel-to);
}

.pixel:nth-child(49),
.pixel:nth-child(50),
.pixel:nth-child(53),
.pixel:nth-child(57),
.pixel:nth-child(58),
.pixel:nth-child(62),
.pixel:nth-child(65),
.pixel:nth-child(69),
.pixel:nth-child(72),
.pixel:nth-child(76),
.pixel:nth-child(82),
.pixel:nth-child(86),
.pixel:nth-child(91),
.pixel:nth-child(95) {
  background: var(--pixel-from);
}

.pixel:nth-child(49),
.pixel:nth-child(58),
.pixel:nth-child(62),
.pixel:nth-child(69),
.pixel:nth-child(76),
.pixel:nth-child(86),
.pixel:nth-child(95) {
  animation: pixelFlicker 4.8s steps(1, end) infinite;
}

.pixel:nth-child(58),
.pixel:nth-child(62),
.pixel:nth-child(86) {
  animation-delay: -2.4s;
}

.site-footer {
  background: var(--ink);
  color: white;
}

.footer-layout {
  display: flex;
  min-height: 150px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 24px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a:hover {
  background: var(--signal-lemon);
  color: var(--ink);
}

@keyframes signalSweep {
  0% {
    opacity: 0.2;
    transform: translateY(-20%);
  }

  50% {
    opacity: 1;
    transform: translateY(0);
  }

  100% {
    opacity: 0.2;
    transform: translateY(20%);
  }
}

@keyframes pixelFlicker {
  0%,
  72%,
  100% {
    opacity: 1;
  }

  78%,
  86% {
    opacity: 0;
  }
}

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

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

  .code-window {
    border-right: 0;
    border-bottom: 2px solid var(--ink);
  }

  .code-window:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 900px) {
  .header-layout {
    grid-template-columns: 1fr auto;
    column-gap: 16px;
    row-gap: 12px;
    min-height: 0;
    padding: 14px 20px;
  }

  .brand {
    grid-column: 1;
    grid-row: 1;
  }

  .header-link {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .site-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
  }

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

@media (max-width: 640px) {
  .shell {
    width: min(1380px, calc(100% - 20px));
  }

  .announcement {
    align-items: center;
    flex-direction: column;
    gap: 0;
    margin: 0 6px;
  }

  .site-header {
    position: relative;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line-light);
    background: transparent;
    color: white;
    cursor: pointer;
    pointer-events: none;
  }

  .nav-toggle-input {
    position: absolute;
    top: 14px;
    right: 20px;
    z-index: 2;
    display: block;
    width: 42px;
    height: 42px;
    margin: 0;
    cursor: pointer;
    opacity: 0;
  }

  .nav-toggle-input:focus-visible + .nav-toggle {
    outline: 3px solid var(--signal-lemon);
    outline-offset: 4px;
  }

  .site-nav,
  .header-link {
    display: none;
  }

  .nav-toggle-input:checked ~ .site-nav {
    display: flex;
    grid-column: 1 / -1;
    grid-row: 2;
    flex-direction: column;
    align-items: stretch;
    gap: 1px;
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px solid var(--line-light);
  }

  .nav-toggle-input:checked ~ .header-link {
    display: inline-flex;
    grid-column: 1 / -1;
    grid-row: 3;
    justify-self: start;
  }

  .hero-shell {
    min-height: auto;
    padding: 52px 18px 62px;
  }

  h1 {
    font-size: clamp(3.25rem, 17vw, 5.2rem);
  }

  .hero-lede {
    font-size: 1.08rem;
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .hero-proof {
    font-size: 10px;
  }

  .hero-visual {
    margin-top: 64px;
  }

  .hero-visual::before {
    display: none;
  }

  .demo-panel {
    box-shadow: 8px 8px 0 var(--signal-lemon);
  }

  .demo-toolbar {
    gap: 8px;
    padding: 0 12px;
    font-size: 10px;
  }

  .code-title {
    gap: 10px;
    padding: 0 12px;
    font-size: 10px;
  }

  .code-window pre,
  .response-lines {
    min-height: 0;
    padding: 18px 12px;
    font-size: 11px;
  }

  .section-shell {
    padding: 78px 18px;
  }

  .section-label {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-bottom: 64px;
  }

  .section-label::after {
    display: none;
  }

  h2 {
    font-size: clamp(3rem, 15vw, 4.9rem);
  }

  .project-grid,
  .principle-grid {
    grid-template-columns: 1fr;
  }

  .project-card,
  .principle {
    min-height: 270px;
    padding: 22px;
  }

  .control-flow li {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .control-flow li::before,
  .control-flow span,
  .control-flow strong {
    grid-column: 1;
    grid-row: auto;
  }

  .pixel-transition {
    aspect-ratio: 1.5 / 1;
  }

  .pixel-field.pixel-eaten {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-rows: repeat(8, minmax(0, 1fr));
  }

  .footer-layout {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 30px 18px;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}
