:root {
  --margin: 10px;
  --gap: calc(8 * var(--margin));
  --white: #fff;
  --light-gray: #e0e0e0;
  --medium-gray: #d5d3d3;
  --switcher-big-unit: 5px;
  --switcher-small-unit: 2px;
  --mobile-grid: repeat(5, 2fr);
  --desktop-grid: repeat(7, 2fr);
  --menu-dashes: 40px;
}

::selection {
  color: var(--white);
  background: var(--medium-gray);
}

@font-face {
  font-family: "Aether";
  src: url(../font/Aether-BMono.woff) format("woff");
  font-weight: normal;
  text-rendering: geometricPrecision;
}

/* --- NORMALIZE --- */
ul {
  list-style: none;
}

ul,
figure {
  margin: 0;
  padding: 0;
}

figure {
  line-height: 0;
}

a {
  text-decoration: none;
  color: unset;
}

h2,
h5 {
  font-weight: normal;
}

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

/* --- CONTENT --- */

html,
body {
  width: 100%;
  font-family: "area-normal", sans-serif;
  font-weight: 700;
}

body {
  background-color: var(--light-gray);
  margin: 0;
}

header {
  display: flex;
  justify-content: space-between;
  /* padding: calc(2 * var(--margin)); */
  padding: var(--margin);
  position: fixed;
  width: 100%;
  z-index: 2;
  top: 0;
}

header img {
  height: 15px;
}

/* header figure,
header a {
  line-height: 0;
} */

header figure {
  line-height: 0;
}

main p {
  font-size: 12px;
  line-height: 1.4;
}

/* --- MENU --- */
.menu-button {
  width: fit-content;
  transition: 0.3s ease-in-out;
  cursor: pointer;
}

.menu-active {
  transform: rotate(45deg);
}

/* --- Full Page Timeline Menu --- */

/* 1. The Main Overlay (No changes here) */
.menu-list {
  display: flex;
  height: 100vh;
  width: 100%;
  background-color: var(--light-gray);
  z-index: -1;
  position: fixed;
  inset: 0;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  /* opacity: 0; */
  pointer-events: none;
  transition: 0.6s ease-in;
  color: var(--white);
  transform: translateY(-110%);
  box-shadow: 0 2px 20px #c6c6c6;
}
body.menu-open .menu-list {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
body.menu-open {
  overflow: hidden;
}

/* 2. The Horizontal Scrolling Area (No changes here) */
.menu-main {
  width: 100%;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  -ms-overflow-style: none;
  scrollbar-width: none;
  height: 90vh;
}
.menu-main::-webkit-scrollbar {
  display: none;
}

/* 3. The UL inside the scroller */
.menu-list ul {
  list-style: none;
  position: relative;
  margin: auto;
  display: flex; /* IMPORTANT */
  align-items: center;
  padding: 45vh 0; /* This remains crucial for centering the end items */
  width: fit-content;
  flex-direction: column;
}

/* 4. The List Items (THE MAIN FIX) */
.menu-main li {
  flex-shrink: 0;
  scroll-snap-align: center;
  width: 240px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  padding-bottom: calc(5.1 * var(--menu-dashes));
  flex-direction: row;
}

/* 5. The Link Styling (No padding needed) */
.menu-main a {
  text-decoration: none;
  font-size: 20px;
  transition: all 0.3s ease;
}

/* 6. The Ruler Ticks (NEW ROBUST STRATEGY) */
.menu-main li::after {
  content: "";
  position: absolute;
  left: 100%;
  width: 50px;
  height: calc((6.1 * var(--menu-dashes)));
  background-image:
     /* Major Tick (center) */ linear-gradient(
      to bottom,
      #fff,
      #fff
    ),
    linear-gradient(to bottom, #fff, #fff),
    /* Medium Tick */ linear-gradient(to bottom, #fff, #fff),
    /* Minor Ticks (now 4 of them) */ linear-gradient(to bottom, #fff, #fff),
    linear-gradient(to bottom, #fff, #fff),
    linear-gradient(to bottom, #fff, #fff);

  background-repeat: no-repeat;

  /* Size each gradient */
  background-size: 50px 3px, /* Major tick size */ 40px 3px,
    /* Medium tick size */ 25px 2px, /* Minor tick size */ 25px 2px, 25px 2px,
    25px 2px, 25px 2px;

  /* Position each gradient precisely */
  background-position: center center,
    /* Major tick position */ center calc(50% - 3 * var(--menu-dashes)),
    /* Minor tick 1 */ center calc(50% - 2 * var(--menu-dashes)),
    /* Minor tick 2 */ center calc(50% - 1 * var(--menu-dashes)),
    /* Minor tick 3 */ center calc(50% + 1 * var(--menu-dashes)),
    /* Minor tick 4 */ center calc(50% + 2 * var(--menu-dashes)),
    /* Minor tick 5 */ center calc(50% + 3 * var(--menu-dashes)); /* Minor tick 6 */
}

.menu-main li:last-child::after {
  content: "";
  position: absolute;
  left: 100%;
  width: 50px;
  height: calc((6.1 * var(--menu-dashes)));
  background-image: linear-gradient(to bottom, #fff, #fff),
    /* Major Tick (center) */ linear-gradient(to bottom, #fff, #fff),
    /* Medium Tick */ linear-gradient(to bottom, #fff, #fff),
    /* Minor Ticks (now 4 of them) */ linear-gradient(to bottom, #fff, #fff),
    linear-gradient(to bottom, #fff, #fff),
    linear-gradient(to bottom, #fff, #fff),
    linear-gradient(to bottom, #fff, #fff);
  background-repeat: no-repeat;

  /* Size each gradient */
  background-size: 50px 3px, /* Major tick size */ 40px 3px,
    /* Medium tick size */ 25px 2px, /* Minor tick size */ 25px 2px, 25px 2px,
    25px 2px, 40px 3px;

  /* Position each gradient precisely */
  background-position: center center,
    /* Major tick position */ center calc(50% - 3 * var(--menu-dashes)),
    /* Minor tick 1 */ center calc(50% - 2 * var(--menu-dashes)),
    /* Minor tick 2 */ center calc(50% - 1 * var(--menu-dashes)),
    /* Minor tick 3 */ center calc(50% + 1 * var(--menu-dashes)),
    /* Minor tick 4 */ center calc(50% + 2 * var(--menu-dashes)),
    /* Minor tick 5 */ center calc(50% + 3 * var(--menu-dashes)); /* Minor tick 6 */
}

/* 7. The Active "Glow" State */
/* The glowing text */
.menu-main li.is-active a {
  color: #ffffff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.7),
    0 0 10px rgba(255, 255, 255, 0.7), 0 0 10px rgba(255, 255, 255, 0.7),
    0 0 10px rgba(255, 255, 255, 0.7);
}
/* Create a separate pseudo-element for the glowing major tick */
.menu-main li.is-active::before {
  content: "";
  position: absolute;
  left: 100%;
  width: 50px;
  height: 3px;
  background-color: #fff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.7),
    0 0 10px rgba(255, 255, 255, 0.7), 0 0 10px rgba(255, 255, 255, 0.7),
    0 0 10px rgba(255, 255, 255, 0.7);
}

/* 7. Footer Styling */
.menu-footer {
  position: absolute;
  padding: var(--margin);
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
/* --- Language Switcher Final Fix --- */
.menu-list .language-switcher {
  flex-direction: row;
  gap: 8px;
  padding: 0;
  margin: 0;
}
.switch-container {
  margin: 0 10px;
  line-height: 0;
}
.switch {
  position: relative;
  display: inline-block;
  width: 35px;
  height: 19px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ebebeb;
  -webkit-transition: 0.4s;
  transition: 0.4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 15px;
  width: 15px;
  left: 2px;
  bottom: 2px;
  background-color: var(--white);
  -webkit-transition: 0.4s;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider:before {
  -webkit-transform: translateX(16px);
  -ms-transform: translateX(16px);
  transform: translateX(16px);
}

.privacy-link {
  font-size: 12px;
  text-decoration: none;
}

/* --------- general settings for pages --------- */

.info {
  display: grid;
  grid-template-columns: var(--mobile-grid);
  column-gap: var(--margin);
}

.intro-content {
  padding-top: var(--gap);
}

.intro-content p {
  font-size: 14px;
}

footer {
  background-color: var(--medium-gray);
  padding: var(--margin);
  padding-top: var(--gap);
  color: var(--white);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: var(--margin);
  row-gap: calc(2 * var(--margin));
  font-size: 12px;
}

footer ::selection {
  color: var(--medium-gray);
  background: var(--white);
}

footer p {
  margin: 0;
}

.contacts p:last-of-type {
  margin-top: 40px;
}

.site-map li:last-of-type {
  margin-top: 20px;
}

footer .details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: var(--margin);
  grid-column: 1 / -1;
}

footer .website {
  font-weight: 400;
}

/*========================= DESKTOP ======================*/
@media screen and (min-width: 768px) {
  main p {
    font-size: 14px;
  }

  .menu-main {
    width: 100%;
    overflow-x: scroll;
    scroll-snap-type: x mandatory;
    -ms-overflow-style: none;
    height: 90%;
  }
  .menu-list ul {
    flex-direction: row;
    padding: 0 45vw;
    top: 50%;
    transform: translateY(-50%);
  }
  .menu-main li {
    padding-bottom: 80px;
    flex-direction: column;
    width: 302px;
  }

  .menu-main li::after {
    top: 50px;
    left: 0;
    height: 50px;
    width: 100%;
    background-image: linear-gradient(to right, #fff, #fff),
      /* Major Tick (center) */ linear-gradient(to right, #fff, #fff),
      /* Medium Tick */ linear-gradient(to right, #fff, #fff),
      /* Minor Ticks (now 4 of them) */ linear-gradient(to right, #fff, #fff),
      linear-gradient(to right, #fff, #fff),
      linear-gradient(to right, #fff, #fff);

    background-repeat: no-repeat;

    /* Size each gradient */
    background-size: 3px 50px, /* Major tick size */ 3px 40px,
      /* Medium tick size */ 2px 25px, /* Minor tick size */ 2px 25px, 2px 25px,
      2px 25px, 2px 25px;

    /* Position each gradient precisely */
    background-position: center center,
      /* Major tick position */ calc(50% - 150px) center,
      /* Minor tick 1 */ calc(50% - 100px) center,
      /* Minor tick 2 */ calc(50% - 50px) center,
      /* Minor tick 3 */ calc(50% + 50px) center,
      /* Minor tick 4 */ calc(50% + 100px) center,
      /* Minor tick 5 */ calc(50% + 150px) center; /* Minor tick 6 */
  }

  .menu-main li:last-child::after {
    top: 50px;
    left: 0;
    height: 50px;
    width: 100%;
    background-image: linear-gradient(to right, #fff, #fff),
      /* Major Tick (center) */ linear-gradient(to right, #fff, #fff),
      /* Medium Tick */ linear-gradient(to right, #fff, #fff),
      /* Minor Ticks (now 4 of them) */ linear-gradient(to right, #fff, #fff),
      linear-gradient(to right, #fff, #fff),
      linear-gradient(to right, #fff, #fff),
      linear-gradient(to right, #fff, #fff);

    background-repeat: no-repeat;

    /* Size each gradient */
    background-size: 3px 50px, /* Major tick size */ 3px 40px,
      /* Medium tick size */ 2px 25px, /* Minor tick size */ 2px 25px, 2px 25px,
      2px 25px, 3px 40px;

    /* Position each gradient precisely */
    background-position: center center,
      /* Major tick position */ calc(50% - 150px) center,
      /* Minor tick 1 */ calc(50% - 100px) center,
      /* Minor tick 2 */ calc(50% - 50px) center,
      /* Minor tick 3 */ calc(50% + 50px) center,
      /* Minor tick 4 */ calc(50% + 100px) center,
      /* Minor tick 5 */ calc(50% + 150px) center,
      /* Minor tick 6 */ calc(50% + 200px) center;
  }

  /* 7. The Active "Glow" State */
  /* The glowing text */
  .menu-main li.is-active a {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.7),
      0 0 10px rgba(255, 255, 255, 0.7), 0 0 10px rgba(255, 255, 255, 0.7),
      0 0 10px rgba(255, 255, 255, 0.7);
  }

  .menu-main li.is-active::before {
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 50px;
  }

  .menu-footer {
    bottom: 5vh;
    flex-direction: column;
    gap: 15px;
    justify-content: auto;
    width: auto;
  }

  .info {
    grid-template-columns: var(--desktop-grid);
  }

  .intro-content p {
    font-size: 18px;
  }

  .intro-content p:first-of-type {
    margin-top: 0;
  }

  footer {
    grid-template-columns: repeat(3, 1fr);
  }

  footer .site-map {
    text-align: center;
  }

  footer .details {
    grid-column: auto;
    display: block;
    text-align: right;
  }

  .contacts p:last-of-type {
    margin-top: 20px;
  }

  .site-map li:last-of-type {
    margin-top: 0px;
  }

  .details > p:last-of-type {
    margin-top: 40px;
  }
}
