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

/* Fluid Design */
:root {
  --font-from: 18;
  --font-to: 20;
  --vw-from: calc(1920 / 100);
  --vw-to: calc(2400 / 100);
  --coefficient: calc((var(--font-to) - var(--font-from)) / (var(--vw-to) - var(--vw-from)));
  --base: calc((var(--font-from) - var(--vw-from) * var(--coefficient)) / 16);
}

html {
  font-size: calc(var(--base) * 1rem + var(--coefficient) * 1vw);
}

@media screen and (max-width: 1920px) {
  :root {
    --font-from: 16;
    --font-to: 18;
    --vw-from: calc(1440 / 100);
    --vw-to: calc(1920 / 100);
  }
}

@media screen and (max-width: 1440px) {
  :root {
    --font-from: 14;
    --font-to: 16;
    --vw-from: calc(479 / 100);
    --vw-to: calc(1440 / 100);
  }
}

@media screen and (max-width: 479px) {
  :root {
    --font-from: 12;
    --font-to: 16;
    --vw-from: calc(1 / 100);
    --vw-to: calc(479 / 100);
  }
}

@media screen and (min-width: 2400px) {
  html {
    font-size: 20px;
  }
}

/* Typography */
h1, h2, h3, h4, h5, h6, p, blockquote, label {
  font-family: inherit;
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  margin: 0;
}

body, p {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1;
  text-wrap: pretty;
}

h1, h2, h3 {
  text-wrap: balance;
}

/* Line Height Trim */
:not(.u-text-trim-off,[class*="u-line-clamp"]) > :is(h1,h2,h3,h4,h5,h6,p):not(.u-text-trim-off,[class*="u-line-clamp"],:has([class*="u-text-style-"]))::before,
[class*="u-text-style-"]:not(.u-text-trim-off,[class*="u-line-clamp"],:has(h1,h2,h3,h4,h5,h6,p))::before {
  content: "";
  display: table;
  margin-bottom: calc(-0.5lh + var(--_text-style---trim-top));
}

:not(.u-text-trim-off,[class*="u-line-clamp"]) > :is(h1,h2,h3,h4,h5,h6,p):not(.u-text-trim-off,[class*="u-line-clamp"],:has([class*="u-text-style-"]))::after,
[class*="u-text-style-"]:not(.u-text-trim-off,[class*="u-line-clamp"],:has(h1,h2,h3,h4,h5,h6,p))::after {
  content: "";
  display: table;
  margin-bottom: calc(-0.5lh + var(--_text-style---trim-bottom));
}

/* Links */
a:not([class]) {
  text-decoration: underline;
}

/* Media Elements */
img,
picture,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block;
  vertical-align: middle;
}

img,
picture,
video,
canvas,
svg {
  max-width: 100%;
  height: auto;
}

img {
  font-style: italic;
  background-repeat: no-repeat;
  background-size: cover;
}

img::selection {
  background: transparent;
}

svg {
  fill: currentColor;
  max-width: 100%;
}

video {
  width: 100%;
  object-fit: cover;
}

/* Form Elements */
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

select:has(option[value=""]:checked) {
  color: rgba(0, 0, 0, 0.6);
  color: color-mix(in lab, currentcolor 60%, transparent);
}

@media (prefers-color-scheme: light) {
  option {
    color: black;
  }
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
textarea {
  font-size: 16px;
}

::placeholder {
  opacity: 0.6;
  color: currentColor;
}

/* Buttons */
button,
[role="button"] {
  border: none;
  padding: 0;
  background-color: transparent;
  font: inherit;
  color: inherit;
  line-height: inherit;
  text-align: inherit;
  cursor: pointer;
}

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

/* Focus States */
:focus-visible {
  outline: 2px solid var(--brand, #0066cc);
  outline-offset: 2px;
}

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

/* Selection */
::selection {
  background-color: var(--_theme---selection--background, var(--palette--brand, #e9fe00));
  color: var(--_theme---selection--text, var(--black, #000));
  text-shadow: none;
}

/* Mobile Interactions */
* {
  -webkit-tap-highlight-color: transparent;
}
