/* ==========================================================================
   Design tokens
   ========================================================================== */
:root {
  --black: #0a0a0a;
  --white: #ffffff;
  --gray-100: #f5f5f5;
  --gray-200: #e5e5e5;
  --gray-500: #737373;
  --gray-400: #a3a3a3;

  --font-heading: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  --container: 1200px;
  --gutter: 24px;
  --section-space: 120px;
  --header-height: 72px;

  --ease: cubic-bezier(0.2, 0, 0, 1);
  --duration: 200ms;
}

@media (max-width: 767px) {
  :root {
    --gutter: 16px;
    --section-space: 72px;
    --header-height: 64px;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--white);
  color: var(--black);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

main {
  flex: 1;
}

body.menu-open {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

::selection {
  background: var(--black);
  color: var(--white);
}

.skip-link {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--black);
  color: var(--white);
  font-size: 14px;
  transform: translateY(-200%);
}

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

/* ==========================================================================
   Layout helpers
   ========================================================================== */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: var(--section-space) 0;
}

.section + .section {
  border-top: 1px solid var(--gray-200);
}

/* ==========================================================================
   Typography
   ========================================================================== */
.eyebrow {
  display: block;
  margin-bottom: 24px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-500);
}

.display {
  font-size: clamp(2.5rem, 7.5vw, 6rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.h2 {
  font-size: clamp(2rem, 4.5vw, 3.5rem);
}

.h3 {
  font-size: 1.375rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.lead {
  max-width: 560px;
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  line-height: 1.55;
  color: var(--gray-500);
}

.muted {
  color: var(--gray-500);
}

/* Underline that draws in on hover */
.link {
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size var(--duration) var(--ease);
}

.link:hover,
.link[aria-current="page"] {
  background-size: 100% 1px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  border: 1px solid var(--black);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition:
    background-color var(--duration) var(--ease),
    color var(--duration) var(--ease),
    border-color var(--duration) var(--ease);
}

.btn--primary {
  background: var(--black);
  color: var(--white);
}

.btn--primary:hover {
  background: var(--white);
  color: var(--black);
}

.btn .arrow {
  transition: transform var(--duration) var(--ease);
}

.btn:hover .arrow {
  transform: translateX(4px);
}

/* ==========================================================================
   Header / navbar
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid transparent;
  transition: border-color var(--duration) var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--gray-200);
}

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

.wordmark {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.nav__links {
  display: flex;
  gap: 40px;
  font-size: 14px;
  font-weight: 500;
}

.nav__toggle {
  display: none;
  position: relative;
  width: 40px;
  height: 40px;
  margin-right: -8px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--black);
  cursor: pointer;
}

.nav__toggle span {
  position: absolute;
  left: 10px;
  width: 20px;
  height: 1.5px;
  background: currentColor;
  transition: transform var(--duration) var(--ease);
}

.nav__toggle span:first-child {
  top: 16px;
}

.nav__toggle span:last-child {
  top: 23px;
}

.nav__toggle[aria-expanded="true"] span:first-child {
  transform: translateY(3.5px) rotate(45deg);
}

.nav__toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

@media (max-width: 767px) {
  .nav__toggle {
    display: block;
  }

  .nav__links {
    position: fixed;
    inset: var(--header-height) 0 0 0;
    flex-direction: column;
    gap: 8px;
    padding: 32px var(--gutter);
    background: var(--white);
    font-family: var(--font-heading);
    font-size: 40px;
    letter-spacing: -0.03em;
    opacity: 0;
    visibility: hidden;
    transition:
      opacity var(--duration) var(--ease),
      visibility var(--duration);
  }

  .nav__links.is-open {
    opacity: 1;
    visibility: visible;
  }

  .nav__links .link {
    background-size: 0 0;
  }

  .nav__links .link[aria-current="page"] {
    color: var(--gray-400);
  }
}

/* ==========================================================================
   Home: hero
   ========================================================================== */
.hero {
  padding: clamp(80px, 14vw, 180px) 0 var(--section-space);
}

.hero .display {
  max-width: 11ch;
  margin-bottom: 32px;
}

.hero .lead {
  margin-bottom: 48px;
}

/* ==========================================================================
   Statement
   ========================================================================== */
.statement {
  max-width: 20ch;
  margin: 0 auto;
  font-family: var(--font-heading);
  font-weight: 500;
  letter-spacing: -0.03em;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.08;
  text-align: center;
}

.statement .muted {
  color: var(--gray-400);
}

/* ==========================================================================
   About page
   ========================================================================== */
.page-header {
  padding: clamp(72px, 11vw, 140px) 0 var(--section-space);
}

.page-header .display {
  max-width: 14ch;
}

.split {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 64px;
}

.split__body {
  display: grid;
  gap: 24px;
  font-size: 18px;
}

.split__body p:first-child {
  color: var(--black);
}

.split__body p + p {
  color: var(--gray-500);
}

.image-placeholder {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  color: var(--gray-400);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

@media (max-width: 767px) {
  .split {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .image-placeholder {
    aspect-ratio: 4 / 3;
  }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  padding: 48px 0;
  background: var(--black);
  color: var(--white);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer__links {
  display: flex;
  gap: 32px;
  font-size: 14px;
}

.footer__copy {
  font-size: 13px;
  color: var(--gray-500);
}

@media (max-width: 767px) {
  .footer__inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ==========================================================================
   Motion preferences
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
