/**
 * Base styles: fonts, reset, typography and layout primitives.
 */

/* Fonts */
@font-face {
  font-family: "Clarity City";
  src: url("../fonts/clarity-city/ClarityCity-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Clarity City";
  src: url("../fonts/clarity-city/ClarityCity-RegularItalic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Clarity City";
  src: url("../fonts/clarity-city/ClarityCity-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Clarity City";
  src: url("../fonts/clarity-city/ClarityCity-BoldItalic.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  overflow-x: clip;
  font-family: var(--font-family);
  font-size: var(--font-medium);
  line-height: var(--line-medium);
  color: var(--text-primary);
  background-color: var(--surface-primary);
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6, p, ul, ol, figure {
  margin: 0;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

button, input, textarea, select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

/* Elements toggled with the hidden attribute stay hidden whatever display their class sets */
[hidden] {
  display: none !important;
}

/* Typography */
h1, h2, h3, h4, h5, h6,
.display {
  font-weight: 700;
  line-height: 1.1;
  color: var(--text-primary);
}

.display { font-size: var(--font-display); }
h1, .h1 { font-size: var(--font-h1); }
h2, .h2 { font-size: var(--font-h2); }
h3, .h3 { font-size: var(--font-h3); }
h4, .h4 { font-size: var(--font-h4); }
h5, .h5 { font-size: var(--font-h5); }

h6, .h6 {
  font-size: var(--font-h6);
  font-weight: 400;
  letter-spacing: var(--tracking-title-small);
  text-transform: uppercase;
}

.text-large {
  font-size: var(--font-large);
  line-height: var(--line-large);
}

.text-small {
  font-size: var(--font-small);
  line-height: var(--line-small);
}

a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--link-hover);
}

:focus-visible {
  outline: 2px solid var(--color-turquoise-500);
  outline-offset: 2px;
}

::selection {
  background-color: var(--color-turquoise-200);
  color: var(--color-gray-900);
}

/* Scrollbar */
* {
  scrollbar-color: var(--scrollbar) transparent;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-thumb {
  background-color: var(--scrollbar);
  border-radius: var(--radius-3xl);
}

*::-webkit-scrollbar-thumb:hover {
  background-color: var(--scrollbar-hover);
}

/* Layout */
.container {
  width: 100%;
  max-width: calc(var(--container-width) + 2 * var(--layout-margin));
  margin-inline: auto;
  padding-inline: var(--layout-margin);
}

.section {
  padding-block: var(--content-distance-m);
}

.section-secondary {
  background-color: var(--surface-secondary);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

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