@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/space-grotesk-latin.woff2") format("woff2");
}

:root {
  --bg: #141414;
  --label-dark: #ffffff;
  --body-text: rgba(235, 235, 245, 0.9);
  --yellow: #ffd426;
  --muted: #989898;
  --divider: #343434;

  /* One Figma pixel. The desktop frame is 1440 wide, the mobile frame 390;
     the page is taller than the viewport, so it scales with width only. */
  --u: clamp(0.45px, 100vw / 1440, 1.6px);
}

@media (max-width: 699px) {
  :root {
    --u: min(100vw / 390, 1.5px);
  }
}

/* Where supported, measure the body instead of the viewport so a classic
   (space-taking) scrollbar never pushes the layout into horizontal overflow. */
@supports (width: 1cqw) {
  body {
    container-type: inline-size;
  }

  :root {
    --u: clamp(0.45px, 100cqw / 1440, 1.6px);
  }

  @media (max-width: 699px) {
    :root {
      --u: min(100cqw / 390, 1.5px);
    }
  }
}

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

html {
  background: var(--bg);
  color: var(--label-dark);
  font-family: "Space Grotesk", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
}

h1,
p {
  margin: 0;
}

img {
  display: block;
}

a {
  color: inherit;
}

a:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: calc(4 * var(--u));
}

/* ---- Desktop (Figma node 2520:16260) ---- */

.page {
  width: calc(1440 * var(--u));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(60 * var(--u));
  /* frame 32/36 + hero 40 + hero copy 40 */
  padding: calc(112 * var(--u)) calc(24 * var(--u)) calc(116 * var(--u));
}

.headline {
  width: 100%;
  font-size: calc(64 * var(--u));
  font-weight: 500;
  /* Figma rounds line heights to whole pixels: 64 x 1.05 = 67.2 -> 67. */
  line-height: calc(67 * var(--u));
  text-align: center;
  /* Figma's baseline for this line lands half a pixel lower than Chrome's. */
  position: relative;
  top: calc(0.5 * var(--u));
}

.mark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(28 * var(--u));
}

/* Layer_1-2: 18px left padding + 1395.69 x 3061.128 group. The SVG export is
   larger by its 4px stroke and overhangs the group by 2px left and top. */
.illustration {
  display: block;
  flex: none;
  width: calc(1413.6896 * var(--u));
  height: calc(3061.1282 * var(--u));
  padding-left: calc(18 * var(--u));
}

.illustration img {
  width: calc(1399.69 * var(--u));
  height: calc(3063.13 * var(--u));
  max-width: none;
  margin: calc(-2 * var(--u)) 0 0 calc(-2 * var(--u));
}

.eo-mark {
  width: calc(24.399 * var(--u));
  height: calc(48 * var(--u));
}

/* Figma strokes don't take layout space: 2px border + 6px padding = 8px. */
.view-app {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: calc(420 * var(--u));
  height: calc(76 * var(--u));
  padding: calc(6 * var(--u)) calc(14 * var(--u)) calc(6 * var(--u)) calc(6 * var(--u));
  border: calc(2 * var(--u)) solid var(--yellow);
  border-radius: calc(20 * var(--u));
  background: var(--bg);
  color: var(--yellow);
  text-decoration: none;
  transition: background-color 120ms ease, transform 120ms ease;
}

.view-app:hover {
  background: #1f1d12;
}

.view-app:active {
  transform: scale(0.98);
}

.app-icon {
  position: relative;
  flex: none;
  width: calc(60 * var(--u));
  height: calc(60 * var(--u));
  border-radius: calc(17.578 * var(--u));
  background: var(--bg);
  overflow: hidden;
}

.app-icon img {
  position: absolute;
  left: 50%;
  top: calc(10.31 * var(--u));
  width: calc(37.5 * var(--u));
  height: calc(39.374 * var(--u));
  transform: translateX(-50%);
}

.view-app-label {
  display: flex;
  align-items: center;
  gap: calc(8 * var(--u));
  font-size: calc(20 * var(--u));
  font-weight: 700;
  line-height: calc(26 * var(--u));
  letter-spacing: calc(-0.6 * var(--u));
  white-space: nowrap;
}

.view-app-text {
  min-width: calc(84 * var(--u)); /* Figma's text box: 83.1 rounded up */
}

.view-app-label img {
  width: calc(24 * var(--u));
  height: calc(24 * var(--u));
}

/* Dividers: 1px top stroke sits inside the Figma frame's padding. */
.about {
  display: flex;
  flex-direction: column;
  gap: calc(28 * var(--u));
  width: calc(420 * var(--u));
  padding: calc(24 * var(--u) - 1px) calc(8 * var(--u)) 0;
  border-top: 1px solid var(--divider);
  color: var(--body-text);
  font-size: calc(17 * var(--u));
  line-height: calc(27 * var(--u)); /* 17 x 1.56 = 26.52, rounded up by Figma */
}

/* Privacy Policy sits above the email on both layouts (mobile frame
   2524:17044); the copyright aligns with the bottom row. */
.footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  width: calc(420 * var(--u));
  padding-top: calc(28 * var(--u) - 1px);
  border-top: 1px solid var(--divider);
}

.links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: calc(40 * var(--u));
}

.privacy,
.email {
  font-size: calc(16 * var(--u));
  /* Natural line height (16 x 1.276) in Figma's rounded 20px box. */
  line-height: normal;
  height: calc(20 * var(--u));
  white-space: nowrap;
}

.email-text {
  align-self: flex-start; /* text sits at the top of the 20px row, like .privacy */
}

.privacy,
.email-text {
  text-decoration: underline;
  text-decoration-thickness: from-font;
  text-underline-position: from-font;
}

.email {
  display: flex;
  align-items: center;
  gap: calc(10 * var(--u));
  text-decoration: none;
}

.email > img {
  width: calc(18 * var(--u));
  height: calc(18 * var(--u));
}

.privacy:hover,
.email:hover .email-text {
  color: var(--yellow);
}

.copyright {
  color: var(--muted);
  font-size: calc(14 * var(--u));
  line-height: normal;
  height: calc(18 * var(--u));
  white-space: nowrap;
}

/* ---- Mobile (Figma node 2524:16825) ---- */

@media (max-width: 699px) {
  .page {
    width: calc(390 * var(--u));
    gap: calc(40 * var(--u));
    padding: calc(40 * var(--u)) calc(24 * var(--u));
  }

  .headline {
    font-size: calc(45 * var(--u));
    font-weight: 400;
    line-height: calc(47 * var(--u)); /* 45 x 1.05 = 47.25 -> 47 */
    letter-spacing: calc(-4.5 * var(--u));
    text-align: left;
    top: 0;
  }

  /* 354.679 x 777.909 group; the export overhangs it by 1px left and top. */
  .illustration {
    width: calc(354.6794 * var(--u));
    height: calc(777.9093 * var(--u));
    padding-left: 0;
  }

  .illustration img {
    width: calc(356.68 * var(--u));
    height: calc(778.911 * var(--u));
    margin: calc(-1 * var(--u)) 0 0 calc(-1 * var(--u));
  }

  .view-app,
  .about,
  .footer {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .view-app {
    transition: none;
  }
}
