/* ---------- GENERAL ---------- */
/* #region GENERAL*/
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
}

:root {
  font-family: "Poppins", system-ui, Avenir, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  font-weight: 400;

  color-scheme: light dark;

  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  --bg-main-color: linear-gradient(130deg, #003366 0%, #66b2ff 100%);
  --bg-sub-color: #ffffff;
  --accent-color: #003366;
  --sub-color: #e0e0e0;
  --header-h: 3rem;
  --heading-font-size: clamp(5rem, 4vw, 7rem);
  --spacing: clamp(2rem, 4vw, 4rem) clamp(2rem, 4vw, 10rem);
  --radius: 2rem;
  --dur-slow: 600ms;
}

body {
  min-height: 100dvh;
  width: 100%;
  display: flex;
  justify-content: center;
  background: var(--bg-sub-color);
  color: var(--text-main-color);
  transition: background-color 0.25s ease, color 0.25s ease;
}

.general-container {
  max-width: 1920px;
  position: relative;
}

footer {
  background: var(--bg-main-color);
  text-align: center;
  padding: 2rem;
  font-size: 1.6rem;
  font-weight: 600;
  border-radius: 2rem 2rem 0 0;
  color: #ffffff;
}

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

footer nav a:hover {
  text-decoration: underline;
}

html {
  scroll-padding-top: var(--header-h);
  scroll-behavior: smooth;
}

body {
  scroll-padding-top: var(--header-h);
}

section[id] {
  scroll-margin-top: var(--header-h);
}

/* Heading with animated underline highlight */
h2 {
  font-size: var(--heading-font-size);
  color: var(--accent-color);
  line-height: 1.05;
  margin: 0;
  padding: 0 2rem 0 0;
  width: fit-content;
  background-image: var(--bg-main-color);
  background-repeat: no-repeat;
  background-size: 0% 1rem;
  background-position: 0 88%;
  transition: background-size var(--dur-slow) cubic-bezier(0.2, 0.65, 0.2, 1);
}

h2:hover,
h2:focus-visible {
  background-size: 100% 1rem;
}

/* === Skip link (accessibility) === */
.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  background-color: #ffffff;
  color: #0b5fff;
  padding: 0.6rem 1rem;
  border-radius: 0.4rem;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-150%);
  transition: transform 0.25s ease, opacity 0.25s ease;
  opacity: 0;
  z-index: 1000;
}

/* Show when focused */
.skip-link:focus {
  transform: translateY(0);
  opacity: 1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  outline: 2px solid #0b5fff;
  outline-offset: 2px;
}

.white-text {
  color: var(--text-main-color);
}

.no-hover:hover {
  background-size: 0% 1rem;
}

.flex-container {
  display: flex;
  flex-flow: column nowrap;
  gap: 2rem;
  justify-content: space-between;
  padding: var(--spacing);
}

/* #endregion GENERAL */

#toast {
  position: fixed;
  left: -50vw;
  bottom: 5rem;
  padding: 1.5rem 3rem;
  font-size: 1.6rem;
  border-radius: var(--radius);
  transition: left 0.25s ease;
}

#toast.show {
  left: 5rem;
}

#toast.error {
  background: #ff0000;
}

#toast.success {
  background: #00c700;
}
