:root {
  --background: oklch(0.17 0.015 250);
  --card: oklch(0.21 0.018 250);
  --foreground: oklch(0.96 0.005 250);
  --muted-foreground: oklch(0.72 0.015 250);
  --border: oklch(1 0 0 / 0.1);
  --primary: #fd7a19;
  --primary-foreground: oklch(0.17 0.015 250);
  --success: #6fd3a0;
  --error: #ff8a80;

  --font-display: "Syne", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --wrap: 72rem;
  --gutter: 1.5rem;
  --header-h: 4rem;

  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

h2 {
  margin-top: 0.75rem;
  max-width: 42rem;
  font-size: clamp(2.25rem, 5vw, 3rem);
  line-height: 1.05;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

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

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

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: var(--primary);
  color: var(--primary-foreground);
  font-weight: 600;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

.accent {
  color: var(--primary);
}

.dim,
.muted {
  color: var(--muted-foreground);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--primary);
}

/* Header */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: oklch(0.17 0.015 250 / 0.7);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.brand {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  text-decoration: none;
}

.menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.875rem;
}

.menu a {
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color 0.2s;
}

.menu a:hover {
  color: var(--foreground);
}

.menu .menu__contact {
  padding: 0.375rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--foreground);
  transition: border-color 0.2s, color 0.2s;
}

.menu .menu__contact:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.menu-toggle {
  display: none;
}

@media (max-width: 39.99rem) {
  .menu-toggle {
    display: inline-grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    margin-right: -0.625rem;
    padding: 0;
    border: 0;
    background: none;
    color: var(--foreground);
    cursor: pointer;
  }

  .menu-toggle__bars,
  .menu-toggle__bars::before {
    display: block;
    width: 1.375rem;
    height: 2px;
    background: currentColor;
    transition: transform 0.2s;
  }

  .menu-toggle__bars {
    position: relative;
    transform: translateY(-4px);
  }

  .menu-toggle__bars::before {
    content: "";
    position: absolute;
    top: 8px;
  }

  .menu-toggle[aria-expanded="true"] .menu-toggle__bars {
    transform: rotate(45deg);
  }

  .menu-toggle[aria-expanded="true"] .menu-toggle__bars::before {
    transform: translateY(-8px) rotate(-90deg);
  }

  .menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem var(--gutter) 1.25rem;
    border-bottom: 1px solid var(--border);
    background: var(--background);
  }

  .js .menu:not(.is-open) {
    display: none;
  }

  .menu a {
    display: flex;
    align-items: center;
    min-height: 3rem;
    border-bottom: 1px solid var(--border);
    font-size: 1rem;
  }

  .menu .menu__contact {
    justify-content: center;
    margin-top: 1rem;
    padding-block: 0.75rem;
  }
}

/* Buttons and tags */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--foreground);
  font: inherit;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
}

.button:hover {
  border-color: var(--foreground);
}

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

.button--primary:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.button:disabled {
  opacity: 0.6;
  cursor: progress;
  transform: none;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tags li {
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted-foreground);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

/* Background grid, the "plans" motif */

.grid-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(oklch(1 0 0 / 0.05) 1px, transparent 1px),
    linear-gradient(90deg, oklch(1 0 0 / 0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 40%, transparent 100%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 40%, transparent 100%);
}

/* Hero */

.hero {
  position: relative;
  overflow: hidden;
  padding-top: var(--header-h);
}

.hero__glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 50% at 70% 0%, rgb(253 122 25 / 0.16), transparent 70%);
}

.hero__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 88vh;
  padding-block: 6rem;
}

.hero--short .hero__inner {
  min-height: 70vh;
}

.hero__title {
  margin-top: 0.5rem;
  font-size: clamp(3rem, 9vw, 6rem);
  line-height: 0.95;
}

.hero__lead {
  max-width: 36rem;
  margin-top: 2rem;
  color: var(--muted-foreground);
  font-size: 1.125rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.5rem;
}

.hero__facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  max-width: 30rem;
  margin: 5rem 0 0;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.hero__facts dt {
  font-family: var(--font-display);
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 1.2;
}

.hero__facts dd {
  margin: 0.25rem 0 0;
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

.rise {
  animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.rise:nth-child(2) { animation-delay: 80ms; }
.rise:nth-child(3) { animation-delay: 160ms; }
.rise:nth-child(4) { animation-delay: 240ms; }

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

/* Sections */

.section {
  padding-block: 7rem;
}

.services {
  display: grid;
  gap: 1px;
  margin-top: 3.5rem;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--border);
}

@media (min-width: 40rem) {
  .services {
    grid-template-columns: 1fr 1fr;
  }
}

.service {
  padding: 2rem;
  background: var(--background);
  transition: background-color 0.2s;
}

.service:hover {
  background: var(--card);
}

.service__num {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--primary);
}

.service h3 {
  margin-top: 1.5rem;
  font-size: 1.5rem;
  font-weight: 600;
}

.service p {
  margin: 0.75rem 0 1.5rem;
  color: var(--muted-foreground);
}

/* Projects */

.projects {
  display: grid;
  gap: 3.5rem 2rem;
  margin-top: 3.5rem;
}

@media (min-width: 48rem) {
  .projects {
    grid-template-columns: 1fr 1fr;
  }

  .projects .project:nth-child(even) {
    margin-top: 4rem;
  }
}

.project {
  display: block;
  text-decoration: none;
}

.cover {
  position: relative;
  display: flex;
  align-items: flex-end;
  aspect-ratio: 16 / 10;
  padding: 1.5rem;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background:
    radial-gradient(80% 90% at 85% 10%, oklch(0.6 0.16 var(--hue) / 0.55), transparent 60%),
    linear-gradient(160deg, oklch(0.24 0.03 var(--hue)), oklch(0.17 0.015 250));
  transition: transform 0.5s;
}

.cover::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.4;
  background-image:
    linear-gradient(oklch(1 0 0 / 0.08) 1px, transparent 1px),
    linear-gradient(90deg, oklch(1 0 0 / 0.08) 1px, transparent 1px);
  background-size: 32px 32px;
}

.cover__name {
  position: relative;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
}

.project:hover .cover {
  transform: translateY(-4px);
}

.project__info {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.25rem;
}

.project__info h3 {
  font-size: 1.25rem;
  font-weight: 600;
}

.project__info p {
  margin-top: 0.25rem;
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

.project__arrow {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.25rem;
  flex: none;
  fill: none;
  stroke: var(--muted-foreground);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.3s, stroke 0.3s;
}

.project:hover .project__arrow {
  transform: rotate(45deg);
  stroke: var(--primary);
}

/* About */

.about {
  border-block: 1px solid var(--border);
  background: oklch(0.21 0.018 250 / 0.4);
}

.about__inner {
  display: grid;
  gap: 3rem;
  padding-block: 7rem;
}

@media (min-width: 48rem) {
  .about__inner {
    grid-template-columns: 1fr 1.4fr;
  }
}

.about__text {
  display: grid;
  gap: 1.25rem;
  color: var(--muted-foreground);
  font-size: 1.125rem;
}

/* Contact */

.kw {
  color: #c792ea;
}

.str {
  color: var(--primary);
}

.notice {
  display: grid;
  gap: 0.75rem;
  width: 100%;
  max-width: 40rem;
  margin-top: 4rem;
  padding: 1.25rem 1.5rem;
  border: 1px dashed oklch(1 0 0 / 0.22);
  border-radius: 0.5rem;
  text-align: left;
}

.notice__code {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.notice p:last-child {
  color: var(--foreground);
}

.notice + .form {
  margin-top: 1.5rem;
}

.contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-block: 8rem;
  text-align: center;
}

.contact h2 {
  max-width: 48rem;
  margin-top: 1.5rem;
  font-size: clamp(2.25rem, 6vw, 3.75rem);
}

.contact__lead {
  max-width: 36rem;
  margin-top: 1.5rem;
  color: var(--muted-foreground);
  font-size: 1.125rem;
}

.contact__email {
  margin-top: 2.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 5vw, 2.25rem);
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  overflow-wrap: anywhere;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat;
  transition: background-size 0.3s;
}

.contact__email:hover {
  background-size: 100% 2px;
}

.form {
  display: grid;
  gap: 1.25rem;
  width: 100%;
  max-width: 40rem;
  margin-top: 4rem;
  text-align: left;
}

@media (min-width: 40rem) {
  .form {
    grid-template-columns: 1fr 1fr;
  }

  .field--wide {
    grid-column: 1 / -1;
  }
}

.field {
  display: grid;
  gap: 0.5rem;
}

.field label {
  font-size: 0.875rem;
  font-weight: 600;
}

.field input,
.field textarea {
  width: 100%;
  min-height: 3rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--card);
  color: var(--foreground);
  font: inherit;
  transition: border-color 0.2s;
}

.field textarea {
  min-height: 9rem;
  resize: vertical;
}

.field input:focus-visible,
.field textarea:focus-visible {
  outline-offset: 0;
  border-color: var(--primary);
}

.field [aria-invalid="true"] {
  border-color: var(--error);
}

.field--trap {
  position: absolute;
  left: -9999px;
}

.form__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}

.form__status:empty {
  display: none;
}

.form__status.is-success {
  color: var(--success);
}

.form__status.is-error {
  color: var(--error);
}

/* Case study */

.case {
  padding-block: calc(var(--header-h) + 2.5rem) 6rem;
}

.breadcrumb {
  display: flex;
  gap: 0.625rem;
  margin-bottom: 3rem;
  color: var(--muted-foreground);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.breadcrumb a {
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--foreground);
}

.case__head {
  display: grid;
  gap: 1.25rem;
  justify-items: start;
  margin-bottom: 3.5rem;
}

.case__head h1 {
  font-size: clamp(3rem, 9vw, 5.5rem);
  line-height: 0.95;
}

.case__lead {
  max-width: 40rem;
  color: var(--muted-foreground);
  font-size: 1.125rem;
}

.case .cover {
  aspect-ratio: 21 / 9;
  padding: clamp(1.5rem, 4vw, 3rem);
}

.case .cover__name {
  font-size: clamp(2.5rem, 9vw, 6rem);
}

@media (max-width: 39.99rem) {
  .case .cover {
    aspect-ratio: 4 / 3;
  }
}

.case__body {
  display: grid;
  gap: 3rem;
  margin-top: 4rem;
}

@media (min-width: 56rem) {
  .case__body {
    grid-template-columns: 1fr 1.4fr;
    gap: 5rem;
  }
}

.facts {
  display: grid;
  align-self: start;
  margin: 0;
  border-top: 1px solid var(--border);
}

.facts div {
  display: grid;
  grid-template-columns: minmax(7rem, 1fr) 2fr;
  gap: 1rem;
  padding-block: 0.875rem;
  border-bottom: 1px solid var(--border);
}

.facts dt {
  padding-top: 0.15rem;
  color: var(--muted-foreground);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.facts dd {
  margin: 0;
}

.facts a {
  color: var(--primary);
  overflow-wrap: anywhere;
}

.case__features h2 {
  margin: 0 0 1.5rem;
  font-size: 1.75rem;
}

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

.feature-list li {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  padding-block: 1rem;
  border-top: 1px solid var(--border);
  counter-increment: feature;
}

.feature-list li::before {
  content: counter(feature, decimal-leading-zero);
  padding-top: 0.15rem;
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.next-case {
  display: grid;
  gap: 0.5rem;
  margin-top: 6rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  text-decoration: none;
}

.next-case__name {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 7vw, 4.5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.025em;
  transition: color 0.2s;
}

.next-case:hover .next-case__name {
  color: var(--primary);
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-block: 2rem;
}

.site-footer a {
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 0.3s, color 0.2s;
}

.site-footer a:hover {
  color: var(--foreground);
  background-size: 100% 1px;
}
