@import url('./_base.css');
@import url('./_navbar.css');

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/geist-latin-variable.woff2") format("woff2");
}

@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/geist-mono-latin-variable.woff2") format("woff2");
}

:root {
  --base-size: 16px;
  --page-width: calc(var(--base-size) * 80);

  /* COLOR */
  --clr-bg: hsl(240 11% 96%);
  --clr-ink: hsl(240 3% 12%);
  --clr-ink-light: hsl(240 3% 32%);
  --clr-ink-muted: hsl(240 3% 62%);

  /* FONT */
  --font-body:
    "Geist",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  --font-headline: var(--font-body);

  --font-mono:
    "Geist Mono",
    "SFMono-Regular",
    Consolas,
    "Liberation Mono",
    monospace;
}


/* BASE */

body {
  min-height: 100vh;
  min-height: 100dvh;

  color: var(--clr-ink);
  background: var(--clr-bg);

  font-family: var(--font-body);
  font-optical-sizing: auto;
  font-weight: 400;
  font-synthesis: none;

  text-rendering: optimizeLegibility;

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}


/* LAYOUT */

.boxed {
  width: 100%;
  max-width: var(--page-width);

  margin-inline: auto;
  padding-inline: clamp(0px, 2vw, var(--base-size));
}

.boxed-width {
  width: 100%;
  max-width: calc(var(--page-width) + (var(--base-size) * 2));

  margin-inline: auto;
  padding-inline: clamp(0px, 2vw, var(--base-size));
}


/* SPACING */

.section-block {
  padding-block: clamp(
    calc(var(--base-size) * 3.5),
    calc(var(--base-size) * 2 + 4vw),
    calc(var(--base-size) * 6)
  );
}

.mb {
  margin-bottom: calc(var(--base-size) * 0.75);
}


/* TYPOGRAPHY */

.title {
  max-width: 18ch;

  margin: 0;
  margin-left: -0.05em;

  font-size: clamp(3rem, 2rem + 4vw, 5rem);
  line-height: 0.94;

  font-weight: 700;
  letter-spacing: -0.048em;

  text-wrap: balance;

  font-kerning: normal;
  font-feature-settings:
    "kern" 1,
    "liga" 1;
}

.lead {
  max-width: 52ch;

  margin: 0;
  margin-left: -0.01em;

  color: var(--clr-ink-muted);

  font-size: clamp(
    1.125rem,
    1.05rem + 0.3vw,
    1.375rem
  );

  line-height: 1.55;

  font-weight: 400;
  letter-spacing: -0.012em;

  text-wrap: pretty;
}

.eyebrow {
  display: inline-block;
  position: relative;

  margin-block: 0 1.25rem;
  margin-left: -0.02em;

  color: var(--clr-ink-muted);

  font-size: clamp(
    0.8125rem,
    0.78rem + 0.1vw,
    0.9375rem
  );

  line-height: 1.3;

  font-weight: 500;
  letter-spacing: 0.065em;

  text-transform: uppercase;
}

.eyebrow::before {
  content: "";

  position: absolute;

  left: 0;
  bottom: -0.45rem;

  width: 34%;

  border-bottom: 1px solid currentColor;

  opacity: 0.22;

  pointer-events: none;
}

.gradient-text {
  color: transparent;

  background:
    linear-gradient(
      135deg,
      var(--clr-ink) 0%,
      var(--clr-ink-light) 100%
    );

  background-clip: text;
  -webkit-background-clip: text;

  -webkit-text-fill-color: transparent;
}

.font-headline {
  font-family: var(--font-headline);

  font-optical-sizing: auto;
  font-weight: 777;
  font-style: normal;
  font-synthesis: none;
}

.font-mono {
  font-family: var(--font-mono);

  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  font-synthesis: none;

  font-variant-ligatures: none;
}


/* HERO */

.hero {
  overflow: hidden;
}

.hero__inner {
  min-height: min(60rem, 88vh);

  display: grid;

  grid-template-columns:
    minmax(0, 1fr)
    minmax(30rem, 1.05fr);

  align-items: stretch;

  padding-left: max(
    var(--base-size),
    calc((100vw - var(--page-width)) / 2)
  );
}


/* HERO CONTENT */

.hero__content {
  align-self: center;

  width: 100%;
  max-width: calc(var(--base-size) * 42);

  position: relative;
  z-index: 2;

  padding-block: clamp(
    calc(var(--base-size) * 4),
    8vw,
    calc(var(--base-size) * 8)
  );

  padding-right: clamp(
    calc(var(--base-size) * 2),
    5vw,
    calc(var(--base-size) * 6)
  );
}


/* HERO MEDIA */

.hero__media {
  position: relative;

  width: 100%;
  height: 100%;
  min-height: inherit;

  overflow: hidden;

  isolation: isolate;
}

.hero__mask-svg {
  position: absolute;

  width: 0;
  height: 0;

  overflow: hidden;
  pointer-events: none;
}

.hero__image {
  width: 100%;
  height: 100%;

  mask: url("#hero-mask");
  -webkit-mask: url("#hero-mask");
}

.hero__image::after {
  content: "";

  position: absolute;
  inset: 0;

  background:
    linear-gradient(
      90deg,
      hsl(240 11% 96% / 0.12),
      transparent 20%
    );

  pointer-events: none;
}

.hero__image img {
  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: center;

  transform: scale(1.025);

  animation:
    hero-image-drift
    22s
    ease-in-out
    infinite
    alternate;

  will-change: transform;
}


/* IMAGE MOTION */

@keyframes hero-image-drift {
  from {
    transform:
      scale(1.025)
      translate3d(0, 0, 0);
  }

  to {
    transform:
      scale(1.065)
      translate3d(-1%, 0.5%, 0);
  }
}


/* MOBILE */

@media (max-width: 900px) {

  .hero__inner {
    display: flex;
    flex-direction: column;

    min-height: auto;

    padding-left: 0;
  }

  .hero__media {
    order: 1;

    width: 100%;
    height: clamp(24rem, 72vw, 34rem);
    min-height: 0;
  }

  .hero__image {
    position: relative;

    mask: none;
    -webkit-mask: none;
  }

  .hero__image::after {
    background:
      linear-gradient(
        to bottom,
        transparent 46%,
        hsl(240 11% 96% / 0.05) 58%,
        hsl(240 11% 96% / 0.24) 70%,
        hsl(240 11% 96% / 0.62) 84%,
        var(--clr-bg) 100%
      );
  }

  .hero__content {
    order: 2;

    width: 100%;
    max-width: var(--page-width);

    margin-inline: auto;
    margin-top: calc(var(--base-size) * -3.5);

    padding:
      0
      var(--base-size)
      clamp(
        calc(var(--base-size) * 4),
        10vw,
        calc(var(--base-size) * 6)
      );

    z-index: 3;
  }
}


/* SMALL MOBILE */

@media (max-width: 560px) {

  .hero__media {
    height: clamp(
      21rem,
      92vw,
      28rem
    );
  }

  .hero__content {
    margin-top: calc(var(--base-size) * -3);
  }

  .title {
    font-size: clamp(
      2.75rem,
      12vw,
      4rem
    );
  }
}


/* REDUCED MOTION */

@media (prefers-reduced-motion: reduce) {

  .hero__image img {
    animation: none;
    transform: scale(1.025);
  }
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;

  margin-top: calc(var(--base-size) * 1.75);
  padding: 0.7rem 0.95rem;

  color: var(--clr-ink);
  background: hsl(0 0% 100% / 0.35);

  border: 1px solid hsl(240 3% 12% / 0.14);
  border-radius: 0.35rem;

  font-size: 0.9rem;
  line-height: 1;
  font-weight: 500;
  letter-spacing: -0.01em;

  text-decoration: none;

  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    transform 180ms ease;
}

.hero__cta svg {
  width: 1rem;
  height: 1rem;

  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;

  transition: transform 180ms ease;
}

.hero__cta:hover {
  background: hsl(0 0% 100% / 0.65);
  border-color: hsl(240 3% 12% / 0.24);

  transform: translateY(-1px);
}

.hero__cta:hover svg {
  transform: translateX(2px);
}

.hero__cta:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}
