:root {
  --magic-header-offset: 96px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 0;
}

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

.magic-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1050;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  transition: background-color .3s ease, box-shadow .3s ease,
    backdrop-filter .3s ease, border-color .3s ease;
}

.magic-header nav {
  height: 86px;
}

.magic-header .navbar-brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  width: auto;
  height: auto;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.magic-header .navbar-brand img {
  display: block;
  width: auto;
  height: auto;
  max-width: 130px;
  max-height: 64px;
  object-fit: contain;
  padding: 3px;
  border-radius: 50%;
  background: rgba(255, 253, 249, .88);
  filter: drop-shadow(0 5px 12px rgba(0, 0, 0, .16));
}

.magic-header .nav-link {
  position: relative;
  font-family: 'Comfortaa', sans-serif;
  transition: color .25s ease;
}

.magic-header:not(.is-scrolled) .nav-link {
  color: #fff;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .45);
}

.magic-header .nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -7px;
  height: 1px;
  background: #d7b47a;
  transition: right .25s ease;
}

.magic-header .nav-link:hover::after,
.magic-header .nav-link:focus-visible::after,
.magic-header .nav-link.active::after {
  right: 0;
}

.magic-header:not(.is-scrolled) .nav-link:hover,
.magic-header:not(.is-scrolled) .nav-link.active,
.magic-header.is-scrolled .nav-link:hover,
.magic-header.is-scrolled .nav-link.active {
  color: #d7b47a;
}

.magic-header .lang {
  color: #fff;
  border-color: rgba(255, 255, 255, .58);
  background: rgba(20, 39, 33, .18);
  text-shadow: 0 1px 10px rgba(0, 0, 0, .35);
}

.magic-header .toggle {
  color: #fff;
  text-shadow: 0 1px 10px rgba(0, 0, 0, .45);
}

.magic-header.is-scrolled {
  background: rgba(18, 35, 30, .94);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 6px 25px rgba(0, 0, 0, .15);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.magic-header.is-scrolled .nav-link,
.magic-header.is-scrolled .lang,
.magic-header.is-scrolled .toggle {
  color: #f5f1e9;
  text-shadow: none;
}

.magic-header.is-scrolled .lang {
  border-color: rgba(255, 255, 255, .26);
  background: rgba(255, 255, 255, .04);
}

.magic-hero {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  background: #142721;
  padding: 0;
}

.magic-hero__inner {
  display: contents;
}

.magic-hero__visual {
  position: absolute;
  inset: 0 0 0 auto;
  width: 58%;
  z-index: 0;
  min-width: 0;
  clip-path: polygon(18% 0, 100% 0, 100% 100%, 0 100%);
}

.magic-hero__visual::after {
  display: none;
}

.magic-hero__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: none;
}

.magic-hero__content {
  position: relative;
  z-index: 2;
  width: min(45%, 650px);
  max-width: 650px;
  margin-left: max(18px, calc((100vw - 1160px) / 2));
  margin-right: auto;
  padding: 180px 0 110px;
  background: transparent;
}

.magic-hero__content::after {
  display: none;
}

.magic-hero__copy {
  width: min(100%, 570px);
  margin: 0;
  padding: 0 46px 0 0;
}

.magic-hero__content h1 {
  max-width: 560px;
  font-family: 'Comfortaa', sans-serif;
  font-size: clamp(34px, 3.2vw, 48px);
  line-height: 1.25;
  font-weight: 500;
}

.magic-hero__content .hero-description {
  max-width: 600px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, .84);
  font-family: 'Comfortaa', sans-serif;
  font-size: clamp(15px, 1.15vw, 17px);
  line-height: 1.85;
}

.magic-hero__content .ey,
.magic-hero__content .btn {
  font-family: 'Comfortaa', sans-serif;
}

.magic-hero__content .ey {
  color: #e4c28f;
}

.magic-hero__content .actions {
  margin-top: 29px;
}

.magic-hero .actions .btn {
  animation: heroCtaFadeInUp .65s ease backwards;
  transition: transform .3s ease, box-shadow .3s ease,
    background-color .3s ease, border-color .3s ease, color .3s ease;
}

.magic-hero .actions .btn:nth-child(1) { animation-delay: .45s; }
.magic-hero .actions .btn:nth-child(2) { animation-delay: .6s; }

@keyframes heroCtaFadeInUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (hover: hover) {
  .magic-hero .actions .btn:hover {
    transform: translateY(-3px);
    border-color: #d2ad70;
    background-color: #d2ad70;
    color: #20372f;
    box-shadow: 0 12px 26px rgba(159, 128, 66, .2);
  }

  .magic-hero .actions .btn.alt:hover {
    border-color: #d2ad70;
    background-color: rgba(210, 173, 112, .15);
    color: #fff;
  }
}

.magic-hero .actions .btn:active { transform: translateY(-1px); }

.magic-hero .actions .btn:focus-visible {
  outline: 2px solid #f1d19b;
  outline-offset: 4px;
  box-shadow: 0 0 0 4px rgba(20, 39, 33, .55);
}

@media (max-width: 991.98px) {
  :root { --magic-header-offset: 82px; }
  .magic-header nav { height: 72px; }
  .magic-header .navbar-brand img { max-width: 105px; max-height: 50px; }
  .magic-header .links {
    inset: 72px 0 auto;
    background: rgba(18, 35, 30, .98);
    box-shadow: 0 15px 30px rgba(0, 0, 0, .18);
  }
  .magic-header .links .nav-link,
  .magic-header .links .lang { color: #f5f1e9; text-shadow: none; }
  .magic-header .links .lang { border-color: rgba(255,255,255,.26); }
  .magic-hero { min-height: unset; }
  .magic-hero__inner { display: flex; flex-direction: column; }
  .magic-hero__content {
    width: min(100% - 36px, 1160px);
    margin: 0 auto;
    padding: 130px 0 55px;
  }
  .magic-hero__copy { width: min(100%, 690px); padding: 0; }
  .magic-hero__visual {
    position: relative;
    width: 100%;
    height: 350px;
    clip-path: polygon(0 0, 100% 0, 100% 88%, 0 100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .magic-hero .actions .btn {
    animation: none !important;
    transition: none !important;
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 575.98px) {
  .magic-header .navbar-brand img { max-width: 105px; max-height: 50px; }
  .magic-hero__content { padding: 115px 0 40px; }
  .magic-hero__content h1 { font-size: clamp(27px, 7vw, 34px); }
  .magic-hero__visual { height: 270px; }
  .magic-hero__content .actions { display: grid; }
}
