/*
 * WebPort-inspired icon menu, adapted for SLC.
 * Kept in a separate layer so the existing bilingual header and mobile
 * navigation behavior remain intact.
 */

@font-face {
  font-family: "Tekuteku";
  src: url("./fonts/TEKURA__-webfont.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --header-height: 0rem;
}

/*
 * The reference composition places both elements inside the hero:
 * the yellow identity tab on the reading side and the icon menu opposite it.
 */

.hero-utility {
  position: absolute;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: calc(var(--z-content) + 2);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  direction: ltr;
  pointer-events: none;
}

[dir="rtl"] .hero-utility {
  direction: rtl;
}

.hero-utility > * {
  pointer-events: auto;
}

#logo {
  position: relative;
  width: 230px;
  height: 116px;
  flex: 0 0 230px;
  overflow: visible;
  border: 0;
  line-height: 1;
}

.header-promocode-button {
  position: relative;
  display: block;
  width: 230px;
  height: 108px;
  overflow: hidden;
  padding: 8px 10px 14px;
  border-top: 1px solid #ffc000;
  background: transparent url("./assets/images/webport-logo-tab.png") bottom center / 230px auto no-repeat;
  /*
   * The tab PNG has transparent lower corners. A drop-shadow on the whole
   * element paints into those corners and appears as a triangular flare.
   */
  filter: none;
  color: #1c1c1c;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  transform-origin: top center;
  animation: slc-logo-drop 2s ease both;
}

.header-promocode-button::before,
.header-promocode-button::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
}

.header-promocode-button::before {
  z-index: 1;
  border-top: 1px solid rgb(255 255 255 / 0.5);
  background: linear-gradient(180deg, rgb(255 255 255 / 0.2), transparent 38%);
  clip-path: polygon(0 0, 100% 0, 100% 72%, 50% 100%, 0 72%);
}

.header-promocode-button::after {
  z-index: 2;
  display: none;
  width: 42%;
  background: linear-gradient(
    108deg,
    transparent 15%,
    rgb(255 255 255 / 0.08) 38%,
    rgb(255 255 255 / 0.48) 50%,
    rgb(255 255 255 / 0.08) 62%,
    transparent 85%
  );
  clip-path: polygon(0 0, 100% 0, 100% 72%, 50% 100%, 0 72%);
  transform: translateX(-180%) skewX(-12deg);
  animation: none;
}

#logobobble,
#logoslogan {
  z-index: 3;
}

#logobobble {
  position: relative;
  display: block;
  width: 210px;
  height: 60px;
  margin: -3px auto 0;
  animation:
    slc-logo-fade 1.2s linear both,
    slc-logo-bobble 5.9s ease-in-out 1.5s infinite;
}

#logoshine,
#logoshine_canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 210px;
  height: 60px;
}

#logoshine {
  object-fit: contain;
}

#logoshine_canvas {
  opacity: 0;
  transition: opacity 220ms ease;
}

#logobobble.is-canvas-ready #logoshine_canvas {
  opacity: 1;
}

#logobobble.is-canvas-ready #logoshine {
  opacity: 0;
}

#logoslogan {
  position: relative;
  display: block;
  max-width: 202px;
  margin: 1px auto 0;
  direction: ltr;
  color: #735b00;
  font-family: "Tekuteku", "Arial Narrow", Impact, sans-serif;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.035em;
  line-height: 1.05;
  text-align: center;
  opacity: 0;
}

.logosloganfadeInUp {
  animation: slc-logo-slogan 1s ease-out 1.8s both;
}

@keyframes slc-logo-drop {
  0% {
    opacity: 0;
    transform: translateY(-160%);
  }
  68% {
    opacity: 1;
    transform: translateY(0);
  }
  84% {
    transform: translateY(-7px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slc-logo-bobble {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -5px, 0);
  }
}

@keyframes slc-logo-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slc-logo-slogan {
  from {
    opacity: 0;
    transform: translateY(0.55rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slc-frame-shine {
  0%,
  18% {
    transform: translateX(-180%) skewX(-12deg);
  }
  52%,
  100% {
    transform: translateX(380%) skewX(-12deg);
  }
}

.v7-rail-lighting {
  z-index: calc(var(--z-content) + 3);
}

.hero-language-signal {
  grid-template-rows: 1fr 1fr auto;
  width: 3.35rem;
  gap: 0.42rem;
  padding: 0.48rem 0.48rem 0.38rem;
  color: #f5fbff;
  text-decoration: none;
  pointer-events: auto;
  cursor: pointer;
  transition:
    border-color 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease,
    filter 180ms ease;
}

.signal-language-code {
  display: block;
  direction: ltr;
  color: rgb(245 251 255 / 0.9);
  font-family: "IRANSansX", Arial, sans-serif;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-align: center;
  text-shadow: 0 1px 5px rgb(0 0 0 / 0.7);
}

html[lang="en"] .signal-language-code {
  letter-spacing: 0;
}

.hero-language-signal:is(:hover, :focus-visible) {
  border-color: rgb(121 212 255 / 0.72);
  background: rgb(4 25 47 / 0.92);
  box-shadow:
    0 18px 34px rgb(0 7 18 / 0.5),
    0 0 22px rgb(37 184 255 / 0.2);
  filter: brightness(1.12);
}

.hero-language-signal:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

.hero-language-signal:is(:hover, :focus-visible) .v7-signal-lamp-cyan {
  box-shadow: 0 0 28px var(--v7-cyan);
}

.hero-language-signal:is(:hover, :focus-visible) .v7-signal-lamp-amber {
  box-shadow: 0 0 28px var(--v7-amber);
}

.hero-stage {
  padding-block-start: 8.25rem;
}

.hero-menu-button {
  display: none;
}

#main-menu {
  position: relative;
  grid-column: auto;
  align-self: start;
  direction: ltr;
  margin-block-start: 0.8rem;
}

#main-menu .menu-navigation,
#main-menu .menuUL {
  min-width: 0;
}

#main-menu .menuUL {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

#main-menu .menuUL li {
  display: block;
  min-width: 0;
  text-align: center;
  visibility: visible;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#main-menu .menuUL .nav-link {
  position: relative;
  display: flex;
  width: clamp(5.5rem, 7.8vw, 7rem);
  height: clamp(6.1rem, 8.65vw, 7.75rem);
  min-height: clamp(6.1rem, 8.65vw, 7.75rem);
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  overflow: hidden;
  padding: clamp(0.7rem, 0.95vw, 0.85rem) 0.4rem 0.45rem;
  border: 2px solid rgb(215 215 215 / 0.18);
  border-radius: 0.25rem;
  background: rgb(255 255 255 / 0.085);
  box-shadow:
    0 0 1px rgb(255 255 255 / 0.4),
    inset 0 3px 5px rgb(0 0 0 / 0.05),
    0 2px 8px rgb(0 0 0 / 0.02),
    inset 0 1px 20px rgb(255 255 255 / 0.16),
    inset 0 -15px 30px rgb(0 0 0 / 0.05),
    0 4px 10px rgb(0 0 0 / 0.1);
  color: rgb(249 249 249 / 0.85);
  font-weight: 700;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  text-shadow:
    -1px -1px 0 #5f6a76,
    1px -1px 0 #5f6a76,
    -1px 1px 0 #5f6a76,
    1px 1px 0 #5f6a76;
  user-select: none;
  transform: translateZ(0);
  transition:
    color 200ms linear,
    background-color 200ms linear,
    border-color 420ms cubic-bezier(0.2, 0.8, 0.2, 1),
    height 220ms ease,
    transform 220ms ease,
    opacity 300ms ease;
}

#main-menu .menuUL .nav-link::after {
  display: none;
}

#main-menu .icon,
#main-menu .menu-title {
  display: block;
}

#main-menu .icon {
  padding-top: 0;
  transition: margin 300ms ease;
}

#main-menu .icon-contact {
  position: relative;
  display: inline-grid;
  width: clamp(3rem, 4.25vw, 3.85rem);
  height: clamp(3rem, 4.25vw, 3.85rem);
  margin: 0 auto;
  place-items: center;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.1);
  box-shadow: 0 0 0 1.9rem transparent;
  line-height: 1;
  transform: translate3d(0, 0, 0);
  transition: box-shadow 450ms ease-in-out;
}

#main-menu .menu-title {
  max-width: 100%;
  margin-top: 0.55rem;
  overflow: hidden;
  font-family: "IRANYekanX", "IRANSansX", Tahoma, Arial, sans-serif;
  font-size: clamp(0.82rem, 1.05vw, 0.95rem);
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: margin 420ms ease;
}

html[lang="fa"] #main-menu .menu-title {
  direction: rtl;
}

html[lang="en"] #main-menu .menu-title {
  font-family: Inter, Arial, sans-serif;
  font-size: clamp(0.72rem, 0.9vw, 0.8rem);
}

@media (hover: hover) and (pointer: fine) {
  #main-menu .menuUL:hover .nav-link {
    opacity: 0.42;
  }

  #main-menu .menuUL .nav-link:hover,
  #main-menu .menuUL .nav-link:focus-visible,
  #main-menu .menuUL .nav-link.is-active {
    height: clamp(6.5rem, 9.1vw, 8.2rem);
    border-color: rgb(215 215 215 / 0.42);
    background: rgb(255 255 255 / 0.22);
    color: #fff;
    opacity: 1;
    transform: translateY(0.15rem);
  }

  #main-menu .menuUL .nav-link:hover .menu-title,
  #main-menu .menuUL .nav-link:focus-visible .menu-title {
    margin-top: 0.52rem;
    text-shadow: none;
  }

  #main-menu .menuUL .nav-link:hover .icon-contact,
  #main-menu .menuUL .nav-link:focus-visible .icon-contact,
  #main-menu .menuUL .nav-link.is-active .icon-contact {
    box-shadow: 0 0 3px 2px rgb(255 255 255 / 0.22);
  }
}

#main-menu .menuUL .nav-link:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

#main-menu .clearfix {
  display: none;
}

@media (max-width: 64rem) {
  .hero-utility {
    inset-block-start: 0;
    justify-content: space-between;
  }

  [dir="rtl"] .hero-utility {
    justify-content: space-between;
  }

  #logo {
    width: 184px;
    height: 91px;
    flex-basis: 184px;
  }

  .header-promocode-button {
    width: 184px;
    height: 86px;
    padding: 5px 8px 11px;
    background-size: 184px auto;
  }

  #logobobble {
    width: 168px;
    height: 48px;
  }

  #logoshine,
  #logoshine_canvas {
    width: 168px;
    height: 48px;
  }

  #logoslogan {
    max-width: 168px;
    font-size: 0.62rem;
  }

  .hero-stage {
    padding-block-start: 6.6rem;
  }

  .hero-menu-button {
    position: relative;
    z-index: calc(var(--z-menu) + 2);
    display: inline-grid;
    align-self: flex-start;
    margin-block-start: 0.8rem;
  }

  body.menu-open .hero-menu-button {
    position: fixed;
    inset-block-start: 0.8rem;
    inset-inline-end: max(1rem, env(safe-area-inset-right));
  }

  #main-menu {
    position: fixed;
    grid-column: auto;
    margin-block-start: 0;
  }

  #main-menu .menu-navigation {
    width: min(100%, 38rem);
    margin-inline: auto;
  }

  #main-menu .menuUL {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    width: 100%;
  }

  #main-menu .menuUL .nav-link {
    width: 100%;
    height: clamp(6.2rem, 20vw, 8rem);
    min-height: clamp(6.2rem, 20vw, 8rem);
    justify-content: center;
    border-bottom: 2px solid rgb(215 215 215 / 0.18);
    border-radius: 0.45rem;
  }

  #main-menu .icon-contact {
    width: 2.8rem;
    height: 2.8rem;
    font-size: 1.75rem;
  }

  #main-menu .menu-title,
  html[lang="en"] #main-menu .menu-title {
    margin-top: 0.55rem;
    font-size: clamp(0.82rem, 2.8vw, 1.05rem);
  }

  .v7-signal-mast,
  [dir="ltr"] .v7-signal-mast {
    top: auto;
    right: auto;
    bottom: 1.5rem;
    left: 1rem;
  }

  [dir="ltr"] .v7-signal-mast {
    right: 1rem;
    left: auto;
  }
}

@media (max-width: 30rem) {
  #logo {
    width: 155px;
    height: 78px;
    flex-basis: 155px;
  }

  .header-promocode-button {
    width: 155px;
    height: 74px;
    padding: 4px 6px 9px;
    background-size: 155px auto;
  }

  #logobobble {
    width: 143px;
    height: 41px;
  }

  #logoshine,
  #logoshine_canvas {
    width: 143px;
    height: 41px;
  }

  #logoslogan {
    max-width: 143px;
    font-size: 0.54rem;
  }

  .hero-stage {
    padding-block-start: 5.8rem;
  }

  #main-menu .menuUL {
    gap: 0.55rem;
  }
}

/*
 * Desktop hero proportions:
 * strengthen the logo tab and keep the glass panel close to its content.
 */
@media (min-width: 64.0625rem) {
  #logo {
    width: 280px;
    height: 141px;
    flex-basis: 280px;
  }

  .header-promocode-button {
    width: 280px;
    height: 132px;
    padding: 10px 12px 17px;
    background-size: 280px auto;
  }

  #logobobble {
    width: 256px;
    height: 73px;
    margin-top: -4px;
  }

  #logoshine,
  #logoshine_canvas {
    width: 256px;
    height: 73px;
  }

  #logoslogan {
    max-width: 246px;
    font-size: 0.86rem;
  }

  .hero-copy {
    width: min(48vw, 56rem);
    max-width: 56rem;
    padding: clamp(1.85rem, 3vw, 3rem);
  }
}

@media (min-width: 48rem) and (max-width: 64rem) {
  .hero-copy {
    width: min(86vw, 44rem);
    padding: clamp(1.75rem, 3.5vw, 2.75rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .header-promocode-button,
  .header-promocode-button::after,
  #logobobble,
  .logosloganfadeInUp {
    animation: none;
  }

  #logoslogan {
    opacity: 1;
  }

  #main-menu .menuUL .nav-link,
  #main-menu .icon,
  #main-menu .icon-contact,
  #main-menu .menu-title {
    transition: none;
  }

  .hero-language-signal {
    transition: none;
  }
}

/* Footer contact details */
.footer-meta {
  max-width: 32rem;
}

.footer-contact {
  font-style: normal;
  line-height: 1.85;
}

.footer-contact p + p {
  margin-top: 0.55rem;
}

.footer-contact-label {
  font-weight: 800;
}

.footer-phone {
  display: inline-block;
  color: inherit;
  direction: ltr;
  text-decoration: none;
  unicode-bidi: isolate;
}

.footer-phone:hover,
.footer-phone:focus-visible {
  color: #075fbe;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
