:root {
  --paper: #f8f5f1;
  --navy: #162139;
  --gold: #b9925a;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--navy);
  font-family: "Montserrat", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

.site-shell {
  min-height: 100svh;
  padding: clamp(12px, 2.1vw, 28px);
}

.site-frame {
  position: relative;
  display: flex;
  min-height: calc(100svh - clamp(24px, 4.2vw, 56px));
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(22, 33, 57, 0.15);
  background: var(--paper);
}

.site-frame::before,
.site-frame::after {
  position: absolute;
  z-index: 0;
  background: var(--gold);
  content: "";
  opacity: 0.7;
}

.site-frame::before {
  top: 0;
  left: 0;
  width: 1px;
  height: clamp(72px, 14vh, 168px);
}

.site-frame::after {
  right: 0;
  bottom: 0;
  width: clamp(72px, 14vw, 168px);
  height: 1px;
}

.site-header,
.hero,
.contact-section,
.site-footer {
  position: relative;
  z-index: 1;
}

.site-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: clamp(24px, 4vw, 58px) clamp(22px, 5vw, 74px) 0;
}

.header-mark {
  display: inline-flex;
  width: clamp(20px, 2.6vw, 32px);
  transition: transform 240ms ease;
}

.header-mark:hover {
  transform: translateY(-2px);
}

.header-mark img {
  display: block;
  width: 100%;
  height: auto;
}

.header-index,
.hero-intro,
.contact-kicker,
.site-footer {
  font-size: clamp(9px, 0.72vw, 11px);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.header-index {
  color: rgba(22, 33, 57, 0.55);
  line-height: 1.4;
}

.hero {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(56px, 9vh, 120px) 22px clamp(54px, 10vh, 122px);
  text-align: center;
}

.hero-intro {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: clamp(34px, 5vh, 64px);
  color: var(--gold);
  line-height: 1;
}

.hero-intro::after {
  display: inline-block;
  width: 28px;
  height: 1px;
  flex: 0 0 auto;
  background: var(--gold);
  content: "";
}

.intro-rule {
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--gold);
}

.brand-lockup {
  display: flex;
  width: min(100%, 515.02px);
  flex-direction: column;
  align-items: center;
}

.animated-mark {
  position: relative;
  width: clamp(188px, 60.86%, 313.44px);
  aspect-ratio: 313.44 / 400.57;
}

.mark-part {
  position: absolute;
  display: block;
  height: auto;
  opacity: 0;
  transform: translateY(5px) scale(0.985);
  transform-origin: center;
  filter: blur(3px);
  animation: mark-reveal 900ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.mark-outer {
  inset: 0;
  width: 100%;
  z-index: 3;
  animation-delay: 180ms;
}

.mark-m {
  top: 10.58%;
  left: 10.2%;
  width: 22.5%;
  z-index: 2;
  animation-delay: 780ms;
}

.mark-s {
  top: 5.4%;
  left: 36.285%;
  width: 27.3%;
  z-index: 2;
  animation-delay: 1280ms;
}

.mark-c {
  top: 10.58%;
  right: 10.8%;
  width: 22.2%;
  z-index: 2;
  animation-delay: 1780ms;
}

.mark-meridian {
  top: 55.83%;
  left: 48.25%;
  width: 3.484%;
  z-index: 1;
  animation-delay: 2300ms;
}

.mark-reflection {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
}

@supports (-webkit-mask-image: url("")) {
  .mark-reflection {
    background: linear-gradient(
        135deg,
        transparent 40%,
        rgba(255, 255, 255, 0.04) 45%,
        rgba(255, 255, 255, 0.92) 50%,
        rgba(255, 255, 255, 0.15) 55%,
        transparent 61%
      )
      no-repeat;
    background-position: -120% -120%;
    background-size: 250% 250%;
    opacity: 1;
    -webkit-mask-composite: source-over, source-over, source-over, source-over;
    -webkit-mask-image: url("../images/MSC_escudo_exterior.svg"), url("../images/MSC_Letra_M.svg"), url("../images/MSC_Letra_S.svg"), url("../images/MSC_Letra_C.svg"), url("../images/MSC_Meridiano.svg");
    -webkit-mask-position: 0 0, 10.2% 10.58%, 36.285% 5.4%, 67% 10.58%, 48.25% 55.83%;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: 100% 100%, 22.5% auto, 27.3% auto, 22.2% auto, 3.484% auto;
    animation: mark-reflection 5500ms cubic-bezier(0.22, 1, 0.36, 1) 5500ms infinite;
  }
}

@keyframes mark-reveal {
  0% {
    opacity: 0;
    transform: translateY(5px) scale(0.985);
    filter: blur(3px);
  }

  60% {
    opacity: 1;
    filter: blur(0);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes mark-reflection {
  0%,
  12% {
    background-position: 120% 120%;
    opacity: 0;
  }

  28% {
    opacity: 1;
  }

  62% {
    background-position: -120% -120%;
    opacity: 0.7;
  }

  72%,
  100% {
    background-position: -120% -120%;
    opacity: 0;
  }
}

.wordmark {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  margin: 23px 0 0;
}

.wordmark img {
  display: block;
  width: 100%;
  height: auto;
}

.hero-description {
  max-width: 530px;
  margin: clamp(32px, 5vh, 58px) auto 0;
  color: rgba(22, 33, 57, 0.78);
  font-size: clamp(14px, 1.25vw, 18px);
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: 0.015em;
}

.contact-section {
  margin: 0 clamp(22px, 5vw, 74px);
}

.contact-line {
  width: 100%;
  height: 1px;
  background: rgba(22, 33, 57, 0.18);
}

.contact-link {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(20px, 3vw, 34px) 0 clamp(26px, 4vw, 46px);
  text-decoration: none;
}

.contact-copy {
  display: flex;
  flex-direction: column;
  gap: 9px;
  text-align: left;
}

.contact-kicker {
  color: var(--gold);
  line-height: 1.2;
}

.contact-email {
  font-size: clamp(15px, 1.45vw, 21px);
  font-weight: 600;
  letter-spacing: -0.02em;
  transition: color 240ms ease;
}

.contact-arrow {
  display: inline-grid;
  width: clamp(34px, 3.2vw, 46px);
  height: clamp(34px, 3.2vw, 46px);
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(22, 33, 57, 0.26);
  border-radius: 50%;
  font-size: 19px;
  line-height: 1;
  transition: border-color 240ms ease, background-color 240ms ease, color 240ms ease, transform 240ms ease;
}

.contact-link:hover .contact-email,
.contact-link:focus-visible .contact-email {
  color: var(--gold);
}

.contact-link:hover .contact-arrow,
.contact-link:focus-visible .contact-arrow {
  border-color: var(--gold);
  background: var(--gold);
  color: var(--white);
  transform: translate(3px, -3px);
}

.contact-link:focus-visible,
.header-mark:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 6px;
}

.site-footer {
  display: flex;
  justify-content: center;
  padding: 0 clamp(22px, 5vw, 74px) clamp(24px, 4vw, 52px);
  color: rgba(22, 33, 57, 0.52);
  line-height: 1.4;
  text-align: center;
}

@media (max-width: 560px) {
  .site-shell {
    padding: 0;
  }

  .site-frame {
    min-height: 100svh;
    border-width: 0 1px;
  }

  .site-header {
    padding-top: 24px;
  }

  .hero {
    justify-content: center;
    padding-top: 56px;
    padding-bottom: 58px;
  }

  .hero-intro {
    margin-bottom: 34px;
  }

  .animated-mark {
    width: clamp(188px, 60.86%, 244px);
  }

  .wordmark {
    margin-top: 23px;
  }

  .hero-description {
    max-width: 310px;
    margin-top: 30px;
    font-size: 14px;
    line-height: 1.65;
  }

  .contact-link {
    align-items: flex-start;
    padding-top: 20px;
  }

  .contact-email {
    max-width: calc(100vw - 116px);
    overflow-wrap: anywhere;
    font-size: 14px;
    line-height: 1.35;
  }
}

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

  .mark-part {
    opacity: 1;
    transform: none;
    filter: none;
    animation: none;
  }

  .mark-reflection {
    display: none;
  }

  .header-mark,
  .contact-email,
  .contact-arrow {
    transition: none;
  }
}
