@tailwind base;
@tailwind components;
@tailwind utilities;

:root[data-theme="light"] {
  /* components */
  --background: #fffaf5;
  --text: #2f4858;
  --img-bg: #ffebec;
  --logo: #2f4858;
  --full-width-banner: #02cb8c;
  --flyout: #02cb8c;
  --badge: #02cb8c;
  --badge-text: #ffffff;
  --info-block: #fdc704;
  --button-bg: #02cb8c;
  --button-text: #ffffff;
  --mouse: #02cb8c;
  --mouse-color: #fffaf5;
  --border-color: #eee;
}

:root[data-theme="dark"] {
  /* components */
  --background: #262626;
  --text: #fffaf5;
  --img-bg: #ffebec;
  --logo: #02cb8c;
  --full-width-banner: #2f4858;
  --flyout: #2f4858;
  --badge: #02cb8c;
  --badge-text: #2f4858;
  --info-block: #2f4858;
  --button-bg: #02cb8c;
  --button-text: #2f4858;
  --mouse: #fffaf5;
  --mouse-color: #2f4858;
  --border-color: #eee;
}

:root {
  /* colors */
  --primary: #02cb8c;
  --secondary: #e95260;
  --tertiary: #6b91db;
  --quartenary: #fdc704;
  --quinary: #2f4858;

  --max-width: 1800px;

  /* spacing */
  --spacing-lg: 6rem;
  --spacing-md: 4rem;
  --spacing-sm: 2rem;
  --spacing-xs: 1rem;

  /* border */
  --border-radius: 20px;
  --border-radius-sm: 8px;
  --border-width: 3px;

  /* font */
  --fw-thin: 100;
  --fw-x-light: 200;
  --fw-light: 300;
  --fw-reg: 400;
  --fw-med: 500;
  --fw-bold: 600;
  --fw-s-bold: 700;
  --fw-x-bold: 800;
  --fw-black: 900;

  /* z-index */
  --z-10: 10;
  --z-20: 20;
  --z-30: 30;
  --z-40: 40;
  --z-50: 50;

  /* easing */
  --easing: all 1.2s cubic-bezier(0.77, 0, 0.175, 1);
}

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

::selection {
  background: var(--text);
  color: var(--background);
}

/* width */
::-webkit-scrollbar {
  width: 4px;
}

/* Track */
::-webkit-scrollbar-track {
  background: #eee;
}

/* Handle */
::-webkit-scrollbar-thumb {
  background: var(--primary);
}

* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
  text-decoration-color: var(--primary) !important;
}

html {
  font-size: 22px;
  font-family: var(--font-lexend), sans-serif;
}

body {
  color: var(--text);
  background: var(--background);
  font-weight: var(--fw-light);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-width: 100vw;
  max-width: 100vw;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: 84px;
}

@media screen and (min-width: 992px) {
  body {
    padding-top: 145px;
  }
}

a {
  color: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: currentColor !important;
  font-weight: inherit;

  &:hover {
    color: var(--quartenary);

    & p {
      color: var(--text);
    }
  }
}

u {
  display: inline-block;
}

ul,
ol {
  padding-left: var(--spacing-sm);
  margin: 1.25rem 0;
  list-style-type: disc;
}

ol {
  list-style-type: decimal;
}

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

strong {
  font-weight: var(--fw-bold);
}

p {
  font-size: 1rem;
  margin-bottom: 1.25rem;
  font-weight: var(--fw-light);
  line-height: 40px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin-bottom: 1.25rem;
}

h1,
.h1 {
  font-size: clamp(42px, 5vw, 84px);
  font-weight: var(--fw-s-bold);
  text-transform: none;
}

h2,
.h2 {
  font-size: clamp(18px, 5vw, 36px);
  font-weight: var(--fw-s-bold);
  text-transform: uppercase;
}

h3,
.h3 {
  font-size: clamp(30px, 5vw, 36px);
  font-weight: var(--fw-s-bold);
}

h4,
.h4 {
  font-size: clamp(18px, 5vw, 22px);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
}

h5,
.h5 {
  font-size: clamp(18px, 5vw, 22px);
  font-weight: var(--fw-bold);
}

.strap {
  height: 0;
  display: block;
  grid-area: wide;
  border-bottom: 2px solid var(--primary);
  width: 0;
  animation: grow 0.85s cubic-bezier(0.65, 0, 0.35, 1) both;
  animation-delay: 0.5s;
}

@keyframes grow {
  0% {
    width: 0;
  }

  100% {
    width: 100%;
  }
}

/* hide recaptcha badge */
.grecaptcha-badge {
  display: none !important;
}

.fade-enter {
  opacity: 0;
  transform: translate(-100%, -50%);
}

.fade-exit {
  opacity: 1;
  transform: translate(-50%, -50%);
}

.fade-enter-active {
  opacity: 1;
  transform: translate(-50%, -50%);
}

.fade-exit-active {
  opacity: 0;
  transform: translate(100%, -50%);
}

.fade-enter-active,
.fade-exit-active {
  transition:
    opacity 500ms,
    transform 500ms;
}

html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

.lenis.lenis-smooth iframe {
  pointer-events: none;
}

table {
  border-collapse: collapse;
  width: 100%;
  display: table;
  margin-bottom: 1.5rem;
}

table th,
table td {
  padding: 1rem;
  border: var(--border-width) solid var(--border-color);
}

/* Thumbnail animations / styles */
.thumbnail {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  clip-path: polygon(0 100%, 100% 100%, 100% 100%, 0 100%);
  visibility: hidden;
  transition: clip-path 1s cubic-bezier(0.77, 0, 0.175, 1) 0.2s;
}

.thumbnail__img {
  object-fit: cover;
  width: 100%;
  height: 100%;
  transform: scale(1.3);
}

.fixed_aspect_ratio {
  aspect-ratio: 1;
}

.animating {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  visibility: visible;
}

.animating__img {
  transform: scale(1);
  transition: 4s ease-out;
}

.thumbnail--video {
  aspect-ratio: 1;
  min-height: 0;
}

/* Animating word styles */
.word {
  display: block;
  overflow: hidden;
  margin: 0;
  animation: slideUp 0.85s cubic-bezier(0.65, 0, 0.35, 1) forwards;
  transform: translateY(100%);
  opacity: 0;
}

@keyframes slideUp {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
