@font-face {
  font-family: "TT Espina";
  src: url("fonts/TT Espina Trial Black.ttf") format("truetype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Colors */
  --color-background: #fffbf4;
  --color-text: #383838;
  --color-bullet-line: rgba(38, 38, 38, 0.8);
  --color-accent-1: #ff8679;
  --color-accent-2: #8bc5ff;

  /* Typography — families */
  --font-hero: "TT Espina", serif;
  --font-nav: "TT Espina", serif;
  --font-header: "DM Sans", sans-serif;
  --font-body: "DM Mono", monospace;
  --font-bullet-number: "IBM Plex Mono", monospace;
  --font-bullet-body: "DM Mono", monospace;
  --font-footer: "DM Mono", monospace;

  /* Typography — weights */
  --font-weight-black: 900;
  --font-weight-extrabold: 800;
  --font-weight-regular: 400;

  /* Typography — sizes */
  --font-size-hero: clamp(7rem, 18vw, 250px);
  --font-size-nav: 36px;
  --font-size-header: 48px;
  --font-size-body: 13px;
  --font-size-bullet: 13px;
  --font-size-footer: 12px;

  /* Typography — line heights */
  --line-height-body: 18px;

  /* Typography — letter spacing */
  --letter-spacing-header: -0.01em;
  --letter-spacing-body: -0.01em;
  --letter-spacing-bullet-body: -0.02em;
  --letter-spacing-footer: 0;

  /* Typography — text transform */
  --text-transform-header: uppercase;
  --text-transform-body: lowercase;

  /* Layout */
  --grid-columns: 12;
  --layout-margin: 30px;
  --layout-gutter: 20px;
  --layout-container-max: 1440px;
  --layout-content-padding-y: 156px;
}

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

/* @media (max-width: 768px) {
  :root {
    --layout-margin: 30px;
  }
} */

html,
body {
  margin: 0;
  overflow-x: clip;
}

h1 {
  margin: 0;
}

h2 {
  margin: 0;
}

body {
  font-family: var(--font-body);
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
  letter-spacing: var(--letter-spacing-body);
  color: var(--color-text);
  background-color: var(--color-background);
}

.container {
  max-width: var(--layout-container-max);
  margin: 0 auto;
  padding: 0 var(--layout-margin);
}

.hero-section {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 10px;
}

.hero {
  flex: 1;
  padding: var(--layout-content-padding-y);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  h1 {
    position: relative;
    z-index: 1;
    margin: 0;
    font-family: var(--font-hero);
    font-size: 1em;
    font-weight: var(--font-weight-black);
    line-height: 1;
    letter-spacing: var(--letter-spacing-hero);

    pointer-events: none;
  }
}

.hero__composition {
  position: relative;
  display: inline-block;
  font-size: var(--font-size-hero);
  line-height: 1;
}

.hero__graphic {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 0;
  width: calc(100% + 100px);
  transform: translateX(-50%);
  height: 30%;
  user-select: none;
  object-fit: cover;
  cursor: crosshair;
}

footer {
  display: flex;
  justify-content: space-between;
  padding: 14px var(--layout-margin);
  background-color: transparent;
  position: absolute;
  bottom: 0;
  font-size: var(--font-size-footer);
  z-index: 100;
  width: 100%;
  pointer-events: none;
}

footer a,
footer p {
  pointer-events: auto; /* but the actual text/link is still clickable */
}

.hero h1 {
  position: relative;
  z-index: 1;
  margin: 0;
  font-family: var(--font-hero);
  font-size: 1em;
  font-weight: var(--font-weight-black);
  line-height: 1;
  letter-spacing: var(--letter-spacing-hero);
}

.about,
.services {
  flex: 1;
  padding: var(--layout-content-padding-y) 0;
  display: flex;
  flex-direction: column;
  align-items: start;
  justify-content: center;
  gap: 1rem;
}

.about-content {
  text-transform: var(--text-transform-body);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 65ch;
  p {
    margin: 0;
  }
  a {
    text-decoration: underline;
  }
}

.services h2 {
  text-transform: var(--text-transform-header);

  align-self: flex-end;
}

.services {
  padding-left: 100px;
  padding-right: 100px;
}

.services-list {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  counter-reset: services;
}

.services-list li {
  counter-increment: services;
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  column-gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 0.3px solid var(--color-bullet-line);
  font-family: var(--font-bullet-body);
  font-size: var(--font-size-bullet);
  letter-spacing: var(--letter-spacing-bullet-body);
  text-transform: var(--text-transform-body);

  &:first-child {
    border-top: 0.3px solid var(--color-bullet-line);
  }
}

.services-list li::before {
  content: counter(services) "";
  font-family: var(--font-bullet-number);
  font-size: var(--font-size-bullet);
  font-style: italic;
}

.feature-section {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 20px;

  position: relative;

  img {
    flex-shrink: 0;
    max-height: 500px;
    object-fit: contain;
    object-position: center;
  }
}

h2 {
  font-family: var(--font-header);
  font-size: var(--font-size-header);
  font-weight: var(--font-weight-extrabold);
  line-height: 1;
  letter-spacing: var(--letter-spacing-header);
}

header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  margin: 0;
  background-color: var(--color-background);
  transform: translateZ(0);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  padding-bottom: 14px;
  width: 100vw;
  margin: 0;
  padding: 14px var(--layout-margin);
}

header button {
  appearance: none;
  -webkit-appearance: none;

  border: none;
  background: none;

  padding: 0;

  font: inherit;
  color: inherit;

  border-radius: 0;

  outline: none;
  box-shadow: none;
  margin: 0;
  font-family: var(--font-nav);
  font-size: var(--font-size-nav);
  font-weight: var(--font-weight-black);
  line-height: 1;
  cursor: pointer;
  background-color: transparent;
  border: none;
}

header img {
  display: block;
  width: 33px;
  height: 33px;
}

.get-in-touch {
  padding-left: 200px;
}

.about {
  padding-inline: clamp(30px, 6vw, 100px);
}

canvas:not(#dot-canvas-header) {
  display: block;
  width: 400px;
  height: 500px;
  cursor: crosshair;
}

.get-in-touch-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: end;
  justify-content: end;

  canvas {
    margin-right: 200px;
  }
}

canvas#dot-canvas-3 {
  width: 600px;
  height: 350px;
}

.section-container {
  display: flex;
  flex-direction: column;
  gap: 5rem;
}

@media (max-width: 768px) {
  canvas:not(#dot-canvas-header) {
    display: none;
  }
  .services,
  .get-in-touch,
  .about {
    padding-left: 30px;
    padding-right: 30px;
  }

  .feature-section img {
    display: none;
  }

  .feature-section {
    flex-direction: column;
    align-items: flex-start;
  }

  .about,
  .services {
    width: 100%;
  }

  .get-in-touch {
    padding-bottom: 100px;
  }
}

a {
  color: inherit;
  text-decoration: none;
  &:hover {
    text-decoration: underline;
  }
}

::selection {
  background-color: var(--color-accent-1);
}

::-moz-selection {
  background-color: var(--color-accent-1);
}
