@import "./reset.css";
@import "./header.css";
@import "./hero.css";
@import "./services.css";
@import "./about-us.css";
@import "./portfolio.css";
@import "./reviews.css";
@import "./contact.css";
@import "./footer.css";
@import "./privacy.css";

:root {
  --color-yellow: #fdc345;
  --color-orange: #f39c12;
  --color-dark: #46494f;
  --color-gray: #d0d0d0;
  --color-white: #fffdf7;
  --color-success: #28a745;
  --color-error: #dc3545;
}

html {
  scroll-behavior: smooth;
}

body {
  color: var(--color-dark);
  font-family: "Open Sans", sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 30px;

  background-color: var(--color-white);

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.form-showed {
  position: relative;

  overflow-y: hidden;
}

body.form-showed::after {
  position: fixed;
  z-index: 90;
  inset: 0;

  width: 100%;
  height: 100%;

  content: "";

  background-color: rgba(0, 0, 0, 0.6);

  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Buttons */

button,
.button {
  padding: 14px 30px;

  color: var(--color-dark);
  font-family: "Open Sans", sans-serif;
  font-size: 20px;
  font-weight: 500;
  line-height: 20px;

  background-color: var(--color-white);
  border: none;
  border-radius: 40px;

  cursor: pointer;

  transition:
    background-color 0.2s ease-in-out,
    color 0.2s ease-in-out,
    box-shadow 0.2s ease-in-out,
    text-shadow 0.2s ease-in-out,
    transform 0.2s ease-in-out;
}

button:hover,
.button:hover {
  color: var(--color-white);

  background-color: var(--color-orange);
  box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.5);

  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
}

button:focus-visible,
.button:focus-visible {
  outline: 3px solid var(--color-yellow);
  outline-offset: 2px;
}

button:disabled,
.button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

button:disabled:hover,
.button:disabled:hover {
  color: var(--color-dark);

  background-color: var(--color-white);
  box-shadow: none;

  text-shadow: none;
  transform: none;
}

.button--ghost {
  background: none;
}

/* Visibility */

.hidden,
[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;

  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;

  overflow: hidden;

  clip: rect(0, 0, 0, 0);

  white-space: nowrap;

  border: 0;
}

/* Typography */

h1,
.h1 {
  font-size: 64px;
  font-weight: 700;
  line-height: 80px;
}

h2,
.h2 {
  font-size: 40px;
  font-weight: 700;
  line-height: 58px;
}

h3,
.h3 {
  font-size: 23px;
  font-weight: 600;
  line-height: 34px;
}

h1 mark,
.h1 mark,
h2 mark,
.h2 mark {
  color: var(--color-yellow);

  background: none;
}

h1 mark.dot--black,
.h1 mark.dot--black,
h2 mark.dot--black,
.h2 mark.dot--black {
  color: var(--color-dark);
  text-shadow: none;
}

/* Links */

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

  transition: color 0.2s ease;
}

a:focus-visible {
  outline: 3px solid var(--color-yellow);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Images */

img {
  display: block;

  max-width: 100%;
  height: auto;
}

/* Form toast */

.form-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9999;

  width: min(420px, calc(100vw - 32px));
  padding: 16px 20px;

  font-size: 15px;
  line-height: 1.4;

  background: #fff;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);

  opacity: 0;
  visibility: hidden;

  transform: translateY(20px);

  transition:
    opacity 0.25s ease,
    transform 0.25s ease,
    visibility 0.25s ease;
}

.form-toast--visible {
  opacity: 1;
  visibility: visible;

  transform: translateY(0);
}

.form-toast--success {
  border-left: 4px solid var(--color-success);
}

.form-toast--error {
  border-left: 4px solid var(--color-error);
}

/* Selection */

::selection {
  color: var(--color-dark);

  background: var(--color-yellow);
}

::-moz-selection {
  color: var(--color-dark);

  background: var(--color-yellow);
}

/* Focus */

:focus:not(:focus-visible) {
  outline: none;
}

/* Skip link */

.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  z-index: 10000;

  padding: 12px 24px;

  color: var(--color-dark);
  font-weight: 600;

  background: var(--color-yellow);
  border-radius: 4px;

  transform: translateX(-50%);

  transition: top 0.3s ease;
}

.skip-link:focus {
  top: 10px;
}

/* Responsive */

@media (max-width: 1024px) {
  h2,
  .h2 {
    font-size: 32px;
    line-height: 44px;
  }

  h3,
  .h3 {
    font-size: 20px;
    line-height: 30px;
  }
}

@media (max-width: 768px) {
  h1,
  .h1 {
    font-size: 30px;
    line-height: 44px;
  }

  h2,
  .h2 {
    font-size: 28px;
    line-height: 40px;
  }
}

@media (max-width: 550px) {
  .form-toast {
    right: 16px;
    bottom: 16px;

    width: calc(100vw - 32px);
  }
}

/* Reduced motion */

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
