/* EndoLore — styles shared by every page: the nav, the footer bar and the
   site-wide navigation and footer. Each page keeps its own layout styles. */

/* --- fonts hosted on iGEM infrastructure ---
   IBM Plex Mono uses the official variable fonts under the SIL Open Font License;
   see fonts/IBM-Plex-Mono-LICENSE.txt. */
@font-face { font-family: 'Arapey'; src: url('https://static.igem.wiki/teams/6417/wiki/fonts/arapey-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Arapey'; src: url('https://static.igem.wiki/teams/6417/wiki/fonts/arapey-latin-400-italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Pacifico'; src: url('https://static.igem.wiki/teams/6417/wiki/fonts/pacifico-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Open Sans'; src: url('https://static.igem.wiki/teams/6417/wiki/fonts/opensans-variablefont-wdth-wght.woff2') format('woff2-variations'); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Open Sans'; src: url('https://static.igem.wiki/teams/6417/wiki/fonts/opensans-italic-variablefont-wdth-wght.woff2') format('woff2-variations'); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('https://static.igem.wiki/teams/6417/wiki/endolore-font-ibmplexmonovar-roman.woff2') format('woff2-variations'); font-weight: 100 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('https://static.igem.wiki/teams/6417/wiki/endolore-font-ibmplexmonovar-italic.woff2') format('woff2-variations'); font-weight: 100 700; font-style: italic; font-display: swap; }

/* --- nav --- */
.site-nav { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 100; width: min(1180px, 94vw); height: 60px; padding: 0 18px 0 14px; border-radius: 999px;
  background: linear-gradient(165deg, rgba(255,255,255,0.6), rgba(255,252,246,0.42));
  backdrop-filter: blur(68px) saturate(1.5); -webkit-backdrop-filter: blur(68px) saturate(1.5);
  border: 1px solid rgba(255,255,255,0.6);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.8), inset 0 -2px 6px rgba(90,31,175,0.08), 0 18px 44px rgba(90,31,175,0.14);
  display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.site-nav .brand, .site-foot .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.site-nav .brand img { height: 36px; width: auto; display: block; }
.site-nav .brand span, .site-foot .brand span { font-family: 'Pacifico', cursive; font-size: 18px; color: #5a1faf; }
.site-nav .links { display: flex; height: 100%; align-items: center; gap: 2px; font-family: 'IBM Plex Mono', monospace; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }
.navlink { text-decoration: none; color: #2a2130; padding: 9px 12px; border-radius: 999px; white-space: nowrap; }
.navlink:hover { background: rgba(255,255,255,0.75); }
.navlink.is-active { color: #fffcf6; background: #4b168c; box-shadow: 0 8px 18px rgba(90,31,175,0.22); }
.navlink.is-active:hover, .navlink.is-active:focus-visible { color: #fffcf6; background: #401075; }

/* Project opens its sub-pages. The panel is paper, not glass: a blur nested in the
   glass nav would only blur the nav itself. padding-top is an invisible bridge so the
   pointer can travel from the tab to the panel without closing it. */
.navgroup { position: relative; display: flex; height: 100%; align-items: center; }
.navgroup > .navlink { display: inline-flex; align-items: center; }
.caret { width: 8px; height: 5px; margin-left: 7px; vertical-align: 2px; transition: transform .25s ease; }
.navmenu { position: absolute; top: 100%; left: 50%; padding-top: 22px; transform: translate(-50%, -6px); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .16s ease, transform .16s ease, visibility 0s linear .16s; }
.navgroup.hover-open .navmenu, .navgroup:focus-within .navmenu, .navgroup.open .navmenu { opacity: 1; visibility: visible; pointer-events: auto; transform: translate(-50%, 0); transition: opacity .16s ease, transform .16s ease, visibility 0s; }
.navgroup.hover-open .caret, .navgroup:focus-within .caret, .navgroup.open .caret { transform: rotate(180deg); }
/* the last dropdown sits at the right end of the bar: its panel is right-aligned instead
   of centred, so it cannot be clipped off the edge of the screen */
.links > .navgroup:last-child .navmenu { left: auto; right: -6px; transform: translate(0, -6px); }
.links > .navgroup:last-child.hover-open .navmenu,
.links > .navgroup:last-child:focus-within .navmenu,
.links > .navgroup:last-child.open .navmenu { transform: translate(0, 0); }

.navmenu-panel { width: 280px; padding: 8px; border-radius: 22px; background: #fffcf6; border: 1px solid rgba(90,31,175,0.12); box-shadow: 0 18px 44px rgba(90,31,175,0.16); display: flex; flex-direction: column; gap: 2px; }
.navmenu a { display: flex; flex-direction: column; gap: 4px; padding: 11px 14px; border-radius: 14px; text-decoration: none; color: #2a2130; }
.navmenu a:hover, .navmenu a:focus-visible { background: #f3ebff; outline: none; }
.navmenu a[aria-current="page"] { background: #4b168c; color: #fffcf6; }
.navmenu .d { font-family: 'Arapey', serif; font-size: 15px; line-height: 1.3; letter-spacing: 0; text-transform: none; color: #6b6478; }
.navmenu a[aria-current="page"] .d { color: rgba(255,252,246,0.78); }

/* --- footer bar --- */
.site-foot { position: relative; z-index: 1; background: #fffcf6; padding: 12vh clamp(20px, 6vw, 90px) 6vh; }
.site-foot-inner { max-width: 1240px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }
.site-foot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px; border-top: 1px solid rgba(27,16,36,0.14); padding-top: 26px; }
.site-foot .brand img { height: 40px; width: auto; display: block; }
.site-foot .brand span { font-size: 20px; }
.site-foot .team { font-family: 'IBM Plex Mono', monospace; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: #4a4155; }
.site-foot .foot-links { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; font-family: 'IBM Plex Mono', monospace; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; }
.site-foot .foot-links a { text-decoration: none; color: #5a1faf; }
.site-foot .license { margin: 0; font-family: 'Open Sans', sans-serif; font-size: 12px; line-height: 1.6; color: #4a4155; }

/* --- missing-content tags ---
   Internal only. Each [data-todo] marks something the wiki still needs; the dock in the
   editor can review before the Wiki Freeze. */
.todo { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 2px 0; padding: 7px 11px; border: 1px dashed #b39c12; border-radius: 8px;
  background: repeating-linear-gradient(-45deg, #fbf7c8 0 10px, #f7f0b8 10px 20px);
  font-family: 'IBM Plex Mono', monospace; font-size: 12px; font-weight: 400; font-style: normal; line-height: 1.55; letter-spacing: 0.01em; text-transform: none; color: #1b1024; text-align: left; }
.todo::before { content: 'À fournir'; flex: none; font-size: 10px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: #fffcf6; background: #5a1faf; padding: 2px 7px; border-radius: 4px; }
.todo[data-kind="verify"]::before { content: 'À vérifier'; background: #9959d1; }
.todo[data-kind="figure"]::before { content: 'Figure à créer'; }
.todo[data-kind="site"]::before { content: 'Tout le site'; background: #2a2130; }
.todo[data-kind="page"]::before { content: 'Page à construire'; background: #6b6478; }
.todo.block { display: flex; width: 100%; }
.todo.flash { animation: todoflash 1.6s ease; }
@keyframes todoflash { 0%, 100% { box-shadow: 0 0 0 0 rgba(90,31,175,0); } 30% { box-shadow: 0 0 0 6px rgba(90,31,175,0.35); } }
.todos-hidden .todo { display: none !important; }

/* Responsive navigation: collapsible site menu and inline submenus. */
.site-nav .menu-toggle { display: none; }
@media (max-width: 1040px) {
  .site-nav { width: min(94vw, 640px); height: 60px; padding: 0 12px 0 14px; border-radius: 28px; }
  .site-nav .menu-toggle { display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 5px; min-width: 42px; min-height: 42px; border: 0; border-radius: 13px;
    background: rgba(243,235,255,.87); cursor: pointer; }
  .site-nav .menu-toggle span { width: 19px; height: 2px; border-radius: 4px; background: #5a1faf;
    transition: transform .2s ease, opacity .2s ease; }
  .site-nav.menu-open .menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .site-nav.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
  .site-nav.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .site-nav .links { display: none; height: auto; position: absolute; top: calc(100% + 9px); left: 0; width: 100%;
    max-height: calc(100dvh - 105px); overflow-y: auto; overscroll-behavior: contain;
    padding: 13px; border: 1px solid rgba(90,31,175,.14); border-radius: 23px;
    background: #fffcf6; box-shadow: 0 21px 44px rgba(27,16,36,.22);
    flex-direction: column; align-items: stretch; gap: 4px; }
  .site-nav.menu-open .links { display: flex; }
  .site-nav .links > .navlink, .site-nav .navgroup > .navlink {
    display: flex; justify-content: space-between; align-items: center;
    margin: 0; padding: 13px 16px; border-radius: 14px; white-space: normal; }
  .site-nav .navgroup { width: 100%; height: auto; display: block; }
  .site-nav .navmenu, .site-nav .links > .navgroup:last-child .navmenu { position: static; display: none;
    opacity: 1; visibility: visible; transform: none; transition: none; padding: 0 0 4px; width: 100%; }
  .site-nav .navgroup.open .navmenu, .site-nav .links > .navgroup:last-child.open .navmenu { display: block; transform: none; }
  .site-nav .navgroup.hover-open:not(.open) .navmenu,
  .site-nav .navgroup:focus-within:not(.open) .navmenu { display: none; }
  .site-nav .navmenu-panel { width: auto; padding: 3px; margin: 0 4px 0 12px;
    border-radius: 14px; box-shadow: none; background: #f3ebff; border: 0; }
  .site-nav .navmenu a { padding: 11px 12px; }
  .site-nav .navmenu .d { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .site-nav .menu-toggle span { transition: none; }
}

/* --- partners band: the logos pass by, left, above the footer of every page ---
   Two identical rows ride one track; the track slides by exactly half its width, so the
   second row arrives where the first one started and the loop has no seam. The logos keep
   their own colours: a sponsor's mark is read as it was drawn, never greyed out. */
.foot-partners { border-top: 1px solid rgba(27,16,36,0.14); padding-top: 24px; display: flex; align-items: center; gap: clamp(16px, 3vw, 40px); }
.foot-partners .fp-label { flex: none; font-family: 'IBM Plex Mono', monospace; font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: #5a1faf; }
/* the mask hides the logos as they reach either end, so none of them is cut mid-stroke */
.foot-partners .fp-mask { position: relative; overflow: hidden; flex: 1 1 auto; min-width: 0;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent); }
.foot-partners .fp-track { display: flex; width: max-content; animation: fp-slide 42s linear infinite; }
.foot-partners .fp-mask:hover .fp-track { animation-play-state: paused; }
.foot-partners .fp-row { display: flex; align-items: center; gap: clamp(28px, 5vw, 64px); padding-right: clamp(28px, 5vw, 64px); }
.foot-partners img { height: 60px; width: auto; max-width: 220px; object-fit: contain; display: block; }
/* a near-square logo carries its own white margin: at equal height its drawing reads half
   the size of a wide one, so it is given more room rather than left looking second-rate */
.foot-partners img.fp-tall { height: 88px; }
@keyframes fp-slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (max-width: 720px) { .foot-partners { flex-direction: column; align-items: flex-start; gap: 16px; } .foot-partners .fp-mask { width: 100%; } }
/* Windows' "reduce animation" setting, and its equivalents: the band stops sliding and
   becomes a plain wrapped row. The duplicate row is dropped so nothing is shown twice. */
@media (prefers-reduced-motion: reduce) {
  .foot-partners .fp-track { animation: none; width: auto; }
  .foot-partners .fp-row[aria-hidden] { display: none; }
  .foot-partners .fp-row { flex-wrap: wrap; gap: clamp(20px, 3vw, 40px); padding-right: 0; }
}

/* Secondary documentary destinations within the Wet Lab menu. */
.navmenu .navmenu-section { margin: 9px 10px 1px; padding: 10px 4px 4px; border-top: 1px solid rgba(90,31,175,.20); font: 10px/1.5 "IBM Plex Mono", monospace; letter-spacing: .16em; text-transform: uppercase; color: #5a1faf; }
