@font-face {
  font-family: "SB Sans";
  src: url("./assets/fonts/sb-sans-display.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "SB Sans Text";
  src: url("./assets/fonts/sb-sans-display.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --page: #e2f7ee;
  --ink: #102018;
  --muted: #4a6257;
  --line: #cfe2d6;
  --border-input: #7e9f8e;
  --accent: #067844;
  --accent-strong: #056e3e;
  --card: #ffffff;
  --radius-card: 16px;
  --radius-preview: 8px;
  --radius-control: 8px;
  font-family: "SB Sans", sans-serif;
  color: var(--ink);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--page);
}

body {
  position: relative;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  overscroll-behavior-y: none;
  background: var(--page);
}

.ambient-noise {
  position: fixed;
  z-index: 0;
  inset: 0;
  opacity: 1;
  pointer-events: none;
  background:
    radial-gradient(72% 70% at 6% -8%, rgba(255, 255, 255, 0.84) 0%, transparent 72%),
    radial-gradient(68% 66% at 96% 106%, rgba(94, 232, 145, 0.18) 0%, transparent 70%),
    linear-gradient(180deg, #ebfaf3 0%, #dff6ea 100%);
}

.digital-noise {
  position: fixed;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 1;
}

a {
  color: inherit;
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 40px), 1280px);
  margin: 0 auto;
  padding: 24px 0 34px;
}

.hero {
  padding: 54px 0 62px;
}

.hero__copy {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  text-align: center;
  transform: translate3d(0, var(--inertia-y, 0px), 0);
}

.hero h1 {
  max-width: 980px;
  margin: 0;
  font-size: clamp(54px, 7.3vw, 94px);
  font-weight: 720;
  line-height: 0.92;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.hero__copy p {
  max-width: 500px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.project-card {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius-card);
  background: var(--card);
  color: #171715;
  box-shadow: 0 14px 38px rgba(31, 78, 54, 0.08);
  transform: translate3d(0, calc(var(--inertia-y, 0px) + var(--hover-y, 0px)), 0);
  transition: box-shadow 220ms ease;
}

.project-card:hover {
  box-shadow: 0 24px 54px rgba(31, 78, 54, 0.14);
}

.project-card:focus-within {
  outline: 3px solid #067844;
  outline-offset: 3px;
}

.preview-frame {
  position: relative;
  display: grid;
  width: calc(100% - 32px);
  min-width: 0;
  height: clamp(260px, 34vw, 440px);
  margin: 16px 16px 0;
  place-items: center;
  overflow: hidden;
  border: 1px dashed var(--border-input);
  border-radius: var(--radius-preview);
  background: rgba(255, 255, 255, 0.72);
  contain: layout paint;
}

.preview-frame iframe {
  display: block;
  min-width: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: #fff;
  pointer-events: auto;
  touch-action: pan-y;
}

.project-card--onboarding .preview-frame iframe {
  width: 149.26%;
  height: 149.26%;
  transform: scale(0.67);
  transform-origin: center;
}

.project-card--manager .preview-frame iframe {
  width: 70.43%;
  height: 70.43%;
  transform: scale(1.42);
  transform-origin: center;
}

.project-card--swing .preview-frame iframe {
  width: 111.12%;
  height: 111.12%;
  transform: scale(0.9);
  transform-origin: center;
}

.project-card__body {
  display: grid;
  gap: 10px;
  padding: 22px 26px 26px;
}

.project-card h2 {
  margin: 0;
  max-width: none;
  overflow: hidden;
  font-size: clamp(24px, 2.2vw, 32px);
  font-weight: 680;
  line-height: 34px;
  letter-spacing: -0.03em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-card__body > p {
  margin: 0;
  max-width: 46ch;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

body.is-inertial .hero__copy,
body.is-inertial .project-card {
  will-change: transform;
}

@media (max-width: 820px) {
  .page-shell {
    width: min(calc(100% - 24px), 640px);
    padding-top: 16px;
  }

  .hero {
    padding: 38px 0 36px;
  }

  .hero__copy {
    gap: 14px;
  }

  .hero h1 {
    font-size: clamp(46px, 11vw, 64px);
    line-height: 0.96;
  }

  .gallery {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .preview-frame {
    height: clamp(250px, 76vw, 400px);
  }
}

@media (max-width: 520px) {
  .hero h1 {
    font-size: clamp(40px, 11.6vw, 50px);
    white-space: nowrap;
  }

  .project-card {
    border-radius: var(--radius-card);
  }

  .project-card__body {
    gap: 10px;
    padding: 20px;
  }

  .project-card h2 {
    font-size: 24px;
    line-height: 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
