@font-face {
  font-family: "MainFont";
  src: url("assets/recursive.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 1000;
  font-display: swap;
}

@font-face {
  font-family: "FiraCode";
  src: url("assets/fira-code-regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  /* Tokens copied from Wren's wallet UI foundation. */
  --wren-bg-canvas: #090c0a;
  --wren-bg-subtle: #0e1210;
  --wren-bg-elevated: #141a16;
  --wren-surface-card: #0f1410;
  --wren-border-subtle: #2b352d;
  --wren-border-default: #3d493f;
  --wren-text-primary: #f2f4ef;
  --wren-text-secondary: #d0d6ce;
  --wren-text-tertiary: #a9b3aa;
  --wren-text-muted: #89958b;
  --wren-accent-primary: #a68a61;
  --wren-accent-primary-hover: #b79a70;
  --wren-radius-md: 8px;
  --wren-radius-xl: 14px;
  --wren-space-6: 24px;
  --wren-space-8: 32px;
  --wren-space-12: 48px;
  --wren-font-ui: "MainFont", sans-serif;
  --wren-font-utility: "FiraCode", monospace;
  --wren-font-body-settings: "CASL" 0.03, "CRSV" 0;
  --wren-font-heading-settings: "CASL" 0.28, "CRSV" 0;
}

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

html,
body {
  min-width: 320px;
  min-height: 100%;
  background: var(--wren-bg-subtle);
}

body {
  min-height: 100svh;
  margin: 0;
  color: var(--wren-text-primary);
  font-family: var(--wren-font-ui);
  font-variation-settings: var(--wren-font-body-settings);
}

a {
  color: inherit;
}

.site-shell {
  display: grid;
  width: min(100%, 1240px);
  min-height: 100svh;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
  grid-template-rows: auto 1fr;
}

.site-header {
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--wren-border-subtle);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 620;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand img {
  width: 28px;
  height: 28px;
  border-radius: var(--wren-radius-md);
}

.eyebrow {
  font-family: var(--wren-font-utility);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.header-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-links a {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: var(--wren-text-secondary);
  transition: color 120ms ease;
}

.header-links a:hover {
  color: var(--wren-text-primary);
}

.header-links a:focus-visible {
  outline: 2px solid var(--wren-accent-primary);
  outline-offset: 2px;
}

.header-links svg {
  display: block;
  width: 19px;
  height: 19px;
  fill: currentColor;
}

main {
  display: grid;
  align-items: center;
  padding: var(--wren-space-12) 0 64px;
}

.hero {
  position: relative;
  display: grid;
  width: min(100%, 1060px);
  min-height: min(590px, calc(100svh - 194px));
  margin: 0 auto;
  padding: clamp(44px, 6vw, 72px);
  align-items: center;
  overflow: hidden;
  isolation: isolate;
  background: transparent;
}

.hero-scene {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background: var(--wren-bg-subtle);
}

.hero-scene img {
  position: absolute;
  top: 50%;
  right: 0;
  width: min(800px, 75%);
  height: auto;
  max-height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  filter: saturate(0.9) contrast(1.02);
  transform: translateY(-50%);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 13%, #000 87%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 13%, #000 87%, transparent);
}

.hero-scene::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, var(--wren-bg-subtle) 0%, var(--wren-bg-subtle) 25%, rgba(14, 18, 16, 0.93) 42%, rgba(14, 18, 16, 0.22) 70%, rgba(14, 18, 16, 0.04) 100%),
    linear-gradient(180deg, rgba(14, 18, 16, 0.42), transparent 26%, transparent 74%, rgba(14, 18, 16, 0.5));
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: min(50%, 470px);
}

.eyebrow {
  margin: 0 0 var(--wren-space-8);
  color: var(--wren-accent-primary-hover);
}

.eyebrow::after {
  display: inline-block;
  width: 48px;
  height: 1px;
  margin: 0 0 3px 14px;
  content: "";
  background: var(--wren-border-default);
}

h1 {
  margin: 0;
  color: var(--wren-text-primary);
  font-size: clamp(90px, 11vw, 156px);
  font-weight: 680;
  font-variation-settings: "CASL" 0.65, "CRSV" 0.25;
  letter-spacing: -0.085em;
  line-height: 0.76;
}

.intro {
  max-width: 430px;
  margin: clamp(38px, 5vw, 58px) 0 0;
  color: var(--wren-text-tertiary);
  font-size: clamp(15px, 1.3vw, 18px);
  font-weight: 350;
  line-height: 1.55;
}

@media (max-width: 800px) {
  main {
    padding: var(--wren-space-8) 0 var(--wren-space-12);
  }

  .hero {
    min-height: 660px;
    padding: 40px 32px;
    align-items: start;
  }

  .hero-copy {
    width: min(100%, 500px);
    padding-top: 34px;
  }

  .hero-scene img {
    top: auto;
    right: -46px;
    bottom: -6px;
    width: min(760px, 172vw);
    max-width: none;
    max-height: none;
    filter: brightness(1.08) saturate(0.96) contrast(1.02);
    transform: none;
  }

  .hero-scene::after {
    background:
      linear-gradient(180deg, var(--wren-bg-subtle) 0%, rgba(14, 18, 16, 0.98) 40%, rgba(14, 18, 16, 0.12) 66%, rgba(14, 18, 16, 0.28) 100%),
      linear-gradient(90deg, rgba(14, 18, 16, 0.34), rgba(14, 18, 16, 0.02));
  }

  h1 {
    font-size: clamp(100px, 27vw, 150px);
  }

  .intro {
    max-width: 390px;
    margin-top: 38px;
  }
}

@media (max-width: 520px) {
  .site-shell {
    padding: 0 16px;
  }

  .site-header {
    min-height: 70px;
  }

  main {
    padding: var(--wren-space-6) 0 var(--wren-space-8);
  }

  .hero {
    min-height: 650px;
    padding: 30px 22px;
  }

  .hero-copy {
    padding-top: 26px;
  }

  .eyebrow {
    margin-bottom: 28px;
    font-size: 9px;
  }

  h1 {
    font-size: clamp(92px, 29vw, 130px);
  }

  .intro {
    max-width: 330px;
    margin-top: 34px;
    font-size: 15px;
  }

  .hero-scene img {
    right: -56px;
    width: 190vw;
  }
}

@media (max-height: 720px) and (min-width: 801px) {
  main {
    padding: var(--wren-space-6) 0 var(--wren-space-8);
  }

  .site-header {
    min-height: 70px;
  }

  .hero {
    min-height: 520px;
  }
}
