/*
=================================
  FEATS 2027 CSS
=================================
*/

/* ================================
   CSS variables
================================ */

:root {
  --background: #f3f1ed;
  --text: #59564d;
  --muted-text: #77736d;
  --border: rgba(23, 23, 23, 0.18);
  --accent: rgb(217, 255, 79);
  --link: #202020;
  --dark-panel: #202020;
  --white: #fff;
  --table-border: #ddd;
  --heading-border: #ccc;
  --panel-padding: clamp(2rem, 5vw, 4rem);
  --transition: 240ms ease;
  --radius: 0;
  --highlight: rgb(178, 65, 241);
}

/* ================================
   Base styles
================================ */

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: "Nunito", sans-serif;
  line-height: 1.3;
}

img,
video,
iframe {
  max-width: 100%;
  height: auto;
}

h1 {
  font-size: 2.5rem;
}

p {
  color: var(--text);
}

a {
  color: var(--link);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--transition);
}

a:hover {
  color: #8f2ac4;
}

:where(a, button, .button, .project-item):focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 4px;
}

/* ================================
   Font helpers
================================ */

.nunito {
  font-family: "Nunito", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
}

.stix-two-math-regular {
  font-family: "STIX Two Math", serif;
  font-weight: 400;
  font-style: normal;
}

.jetbrains {
  font-family: "JetBrains Mono", monospace;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
}

.prompt-regular {
  font-family: "Prompt", sans-serif;
  font-weight: 400;
  font-style: normal;
}

.permanent-marker {
  font-family: "Permanent Marker", cursive;
  font-weight: 400;
  font-style: normal;
}

.black-ops {
  font-family: "Black Ops One", system-ui;
  font-weight: 400;
  font-style: normal;
}

.cantarell-regular,
.cantarell-bold,
.cantarell-regular-italic,
.cantarell-bold-italic {
  font-family: "Cantarell", sans-serif;
}

.cantarell-regular {
  font-weight: 400;
  font-style: normal;
}

.cantarell-bold {
  font-weight: 700;
  font-style: normal;
}

.cantarell-regular-italic {
  font-weight: 400;
  font-style: italic;
}

.cantarell-bold-italic {
  font-weight: 700;
  font-style: italic;
}

/* ================================
   Scroll reveal
================================ */

.js-enabled .reveal {
  opacity: 0;
  transform: translateY(50px);
  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
}

.js-enabled .reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ================================
   Main layout
================================ */

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 100vh;
  align-items: start;
}

.split-layout > *,
.project-item > * {
  min-width: 0;
}

.visual-panel {
  position: fixed;
  z-index: 1;
  top: 0;
  left: 0;
  display: flex;
  grid-column: 1;
  align-items: flex-end;
  width: 50vw;
  height: 100vh;
  min-height: 600px;
  isolation: isolate;
  background-color: var(--dark-panel);
  color: var(--white);
}

.content-panel {
  position: relative;
  z-index: 2;
  grid-column: 2;
  min-height: 100vh;
  background: var(--background);
}

.content-wrapper {
  width: min(100%, 900px);
  margin: 0 auto;
}

/* ================================
   More content panel
================================ */

#showContainer {
  color: var(--link);
  text-align: left;
}

#showLink,
#closeLink {
  color: var(--link);
  font-weight: 700;
  text-decoration: none;
}

#panel {
  display: none;
  padding: 30px 20px;
  border: 1px solid #b241f1;
  background-color: rgba(197, 241, 67, 0.1);
  box-shadow: 8px 8px 8px lightgrey;
}

#panel h1 {
  font-size: 2rem;
}

#closeLink {
  display: block;
  margin-top: 20px;
  text-align: center;
}

/* ================================
   Logos
================================ */

.logo-img {
  position: absolute;
  z-index: 1000;
  top: 50vw;
  left: 5vw;
  display: block;
  height: auto;
  margin: 0 auto;
}

.nwtc-logo-img {
  position: absolute;
  z-index: 1000;
  bottom: 1rem;
  left: 1rem;
  height: clamp(3rem, 6.5vw, 7rem);
}

.mitos-logo-img {
  position: absolute;
  z-index: 999;
  right: 1rem;
  bottom: 1rem;
  height: clamp(2.5rem, 5vw, 6rem);
  border-radius: 5px;
  border: 2px solid black;
}

.logo {
  position: absolute;
  z-index: 999;
  top: 1rem;
  left: 1rem;
  height: clamp(2.5rem, 4vw, 5rem);
}

.nwtc-nav-img,
.mitos-nav-img {
  display: none;
}

/* ================================
   Visual panel
================================ */

.visual-image {
  position: absolute;
  z-index: -3;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  background-color: var(--dark-panel);
  object-fit: cover;
  object-position: 30% bottom;
  transform: scale(1.02);
}

.visual-panel::before {
  position: absolute;
  z-index: -4;
  inset: -40px;
  background:
    url("../../images/Niederanven-background-image.jpg")
    center / cover no-repeat;
  filter: blur(24px);
  opacity: 0.45;
  transform: scale(1.1);
  content: "";
}

.visual-overlay {
  position: absolute;
  z-index: -2;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.08) 0%,
    rgba(0, 0, 0, 0.35) 42%,
    rgba(0, 0, 0, 0.5) 100%
  );
}

.visual-content {
  position: absolute;
  z-index: 1;
  top: 8vw;
  left: 0;
  width: 100%;
  max-width: 700px;
  padding: var(--panel-padding);
  padding-bottom: clamp(3rem, 5vw, 4rem);
}

.visual-content .eyebrow {
  margin: 0 0 2rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.visual-content h1 {
  max-width: 700px;
  margin: 0 0 1.5rem;
  color: var(--white);
  font-family: "Nunito", sans-serif;
  font-size: clamp(3rem, 6vw, 6rem);
  /*font-weight: 400;*/
  line-height: 0.95;
  letter-spacing: -0.07em;
}

.visual-content h2 {
  margin: 0 0 1.5rem;
  color: var(--white);
  font-size: clamp(1.2rem, 2vw, 2rem);
  font-weight: 400;
  line-height: 1.1;
}

.visual-description {
  max-width: 360px;
  margin: 2rem 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1rem;
  line-height: 1.6;
}

.visual-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 0.3rem;
  color: var(--white);
  border-bottom: 1px solid rgba(255, 255, 255, 0.65);
  transition:
    gap var(--transition),
    border-color var(--transition);
}

.visual-link:hover {
  gap: 1.2rem;
  color: var(--white);
  border-color: var(--white);
}

.visual-credit {
  position: absolute;
  z-index: 2;
  right: var(--panel-padding);
  bottom: 1.5rem;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.75rem;
}

/* ==========================================================
   NEWS FLASH
=========================================================== */

:root {
  --nf-right-inset: 1.5rem;
  --nf-offset-from-bottom: 8rem;   /* clears the MITOS logo */
  --nf-width: 25vw;                /* 25vw = 50% of the 50vw visual panel */
}

.news-flash {
  /* --- DESKTOP ANCHOR (fixed, relative to the viewport,
         which coincides with the fixed visual panel) --- */
  position: fixed;
  top: auto;
  left: auto;
  right: calc(50vw + var(--nf-right-inset));  /* = right edge of visual panel, inset */
  bottom: var(--nf-offset-from-bottom);

  /* --- appearance --- */
  z-index: 5;
  width: var(--nf-width);
  max-width: calc(50vw - (2 * var(--nf-right-inset)));
  padding: 1rem 1.25rem 1.1rem;

  /* fully opaque background so the photo behind
     can never bleed through the text */
     h1 {
      color: var(--accent) !important;
     }
  background: rgba(32, 32, 32, 0.85);
  border: 3px solid var(--accent);
  border-radius: 4px;
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.55),
    0 0 20px rgba(217, 255, 79, 0.2);
  color: var(--white);
  font-family: "Nunito", sans-serif;
  animation: nf-glow 2.4s ease-in-out infinite;
}

/* accent label + blinking dot */
.news-flash-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.6rem;
  color: var(--accent);
  font-family: "Black Ops One", system-ui;
  font-size: 0.9rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.news-flash-dot {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  background: #ff3b30;
  border-radius: 50%;
  animation: nf-blink 1s steps(2, start) infinite;
}

/* typography inside the box — fully opaque white
   for maximum legibility over ANY content coming
   from news-flash.php */
.news-flash :is(h1, h2, h3, h4) {
  margin: 0 0 0.5rem;
  overflow-wrap: break-word;
  color: var(--white);
  font-size: clamp(1.15rem, 1.8vw, 1.5rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.news-flash p {
  margin: 0 0 0.6rem;
  color: #ffffff;
  font-size: clamp(0.95rem, 1.2vw, 1.1rem);
  line-height: 1.5;
  text-align: left;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.news-flash p:last-child {
  margin-bottom: 0;
}

.news-flash a {
  color: var(--accent);
  font-weight: 800;
  white-space: normal;   /* undo global nowrap inside this box */
  overflow-wrap: break-word;
  text-decoration: underline;
}

.news-flash a:hover {
  color: var(--white);
}

.news-flash img {
  display: block;
  max-height: 140px;
  margin-bottom: 0.6rem;
  object-fit: cover;
}

/* subtle breathing glow; removed for reduced-motion users
   (the global prefers-reduced-motion block already
   neutralises both keyframes below) */
@keyframes nf-glow {
  0%,
  100% {
    box-shadow:
      0 10px 28px rgba(0, 0, 0, 0.55),
      0 0 14px rgba(217, 255, 79, 0.12);
  }
  50% {
    box-shadow:
      0 10px 28px rgba(0, 0, 0, 0.55),
      0 0 26px rgba(217, 255, 79, 0.35);
  }
}

@keyframes nf-blink {
  50% {
    opacity: 0.15;
  }
}

/* ================================
   Content sections
================================ */

.content-section p {
  text-align: justify;
  hyphens: auto;                 /* evens out the gaps by breaking words */
  overflow-wrap: break-word;     /* safety net for very long words/URLs */
  text-wrap: pretty;              /* nicer line breaks (progressive enhancement) */
}

.content-section {
  min-height: 80vh;
  padding-block: clamp(2rem, 10vw, 6rem);
  padding-inline: var(--panel-padding);
  border-bottom: 2px solid var(--border);
}

.eyebrow {
  margin: 0 0 2rem;
  color: var(--muted-text);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.content-section img {
    border: 1px solid grey;
    box-shadow: 7px 6px 10px rgb(150, 150, 150);
    margin: 0 20px 10px 0;
}

/* ===== General content image float LEFT/RIGHT ===== */
.float-left {
  float: left;
  top: 0;
  left: 0;
  max-width: 200px;
}

.float-right {
  float: right;
  top: 0;
  right: 0;
  max-width: 200px;
}

/* ===== General content image float LEFT/RIGHT - END ===== */

.content-section h1,
.content-section h2 {
  max-width: 720px;
  margin: 0 0 2rem;
  font-size: clamp(2.5rem, 5vw, 5.5rem);
  font-weight: 400;
  line-height: 1;
}

.content-section h1 {
  display: block;
  max-width: 720px;
  margin: 0 0 2rem;
  font-family: "STIX Two Math", serif;
  font-size: clamp(2.5rem, 5vw, 5.5rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.04em;
  white-space: normal;
}

.venue {
  margin: 0 10%;
}

.venue li {
    color: var(--link);
    font-size: 1.2rem;
    font-weight: 700;
    padding:  20px 0;
}

.venue img {
    margin: 20px 0 0 0;
    max-height: 276px;
}

.accessibility-image {
  float: right;
  max-width: 300px;      /* stop huge images dominating the text */
  margin: 0 0 1rem 1rem;  /* space below and to its left (between image and text) */
}

.content-section img.accessibility-image {
  float: right;
  margin: 0 0 1rem 1.5rem;
}

/* ================================
   Feature cards
================================ */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 5rem;
}

.feature-card {
  min-height: 280px;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition:
    background-color var(--transition),
    transform var(--transition);
}

.feature-card:hover {
  background-color: var(--accent);
  transform: translateY(-6px);
}

.feature-number {
  display: block;
  margin-bottom: 5rem;
  color: var(--muted-text);
  font-size: 0.8rem;
}

.feature-card h3 {
  margin: 0 0 1rem;
  font-size: 1.3rem;
  font-weight: 400;
}

.feature-card p {
  margin: 0;
  color: var(--muted-text);
  font-size: 0.9rem;
}

/* ================================
   Project list
================================ */

.project-list {
  margin-top: 4rem;
  border-top: 1px solid var(--border);
}

.project-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  min-width: 0;
  padding: 2rem 0;
  color: inherit;
  text-align: left;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition:
    padding var(--transition),
    background-color var(--transition);
}

.project-item:hover {
  padding-inline: 1rem;
  color: inherit;
  background-color: var(--accent);
}

.project-category {
  margin: 0 0 0.5rem;
  color: var(--muted-text);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-item h3 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: clamp(1.8rem, 3vw, 3rem);
  font-weight: 400;
  letter-spacing: -0.04em;
}

.project-arrow {
  display: none;
}

/* ================================
   Contact and footer
================================ */

.contact-section {
  min-height: 70vh;
}

.button {
  display: inline-block;
  margin-top: 2rem;
  padding: 1rem 1.4rem;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--text);
  border-radius: var(--radius);
  transition:
    color var(--transition),
    background-color var(--transition);
}

.button:hover {
  color: var(--background);
  background-color: var(--text);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 2rem;
  padding-inline: var(--panel-padding);
  color: var(--muted-text);
  font-size: 0.75rem;
}

/* ================================
   Team table
================================ */

#team .document-content {
  width: 100%;
  max-width: 100%;
  font-family: "Trebuchet MS", Arial, sans-serif;
  line-height: 1.5;
}

#team .document-content table {
  width: 100% !important;
  max-width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

#team .document-content td,
#team .document-content th {
  width: auto !important;
  padding: 1rem;
  vertical-align: top;
  overflow-wrap: break-word;
  border-bottom: 1px solid var(--table-border);
}

#team .document-content td:first-child,
#team .document-content th:first-child {
  width: 38% !important;
}

#team .document-content td:last-child,
#team .document-content th:last-child {
  width: 62% !important;
}

#team .document-content p {
  margin: 0 0 0.75rem;
}

#team .document-content p:last-child {
  margin-bottom: 0;
}

#team .document-content .document-section-heading {
  width: 100% !important;
  padding: 1rem 0 0.5rem;
  border-bottom: 2px solid var(--heading-border);
  font-size: 1.05rem;
  font-weight: 700;
}

#team .document-content .document-section-heading p {
  margin: 0;
}

#kins-kins-popup {
  display: none;
}


/* ===== Custom changes pre-mobile layout ===== */

.more-feats-audience {
  float: left;
  margin: 0 20px 10px 0;
  
}

.traverse-stage {
  float: left;
  margin: 0 20px 10px 0;
}

/* ================================
   Mobile layout
================================ */

@media (max-width: 980px) {

      /* ---- Mobile header logo shrinking---- */

    .mobile-logo {
        display: flex;
        align-items: center;
        width: 10rem;
        transition: width 300ms ease;
    }

    /* Override the .logo base styles (absolute positioning,
       display:none) that leak onto this image */
    .mobile-logo img {
        position: static;
        z-index: auto;
        display: block;
        width: 100%;
        height: auto;
        transition: width 300ms ease;
    }

     .navigation-container {
        /* your existing rules: width: 100%, min-height: 70px,
           padding: 0 1rem, justify-content: flex-end, border: none */
        margin-bottom: 0;    /* ← ADD THIS LINE to the existing rule */
    }

    /* ---- Shrinking header ---- */

    .site-header,
    .navigation-container {
        transition: min-height 300ms ease;
    }

    .site-header.header-shrunk .navigation-container {
        min-height: 50px;
        padding: 0 0.75rem;
    }

    .site-header.header-shrunk .mobile-logo {
        width: 6.5rem;   /* narrower logo = shorter bar */
    } 

    .site-header.header-shrunk .mobile-menu-toggle {
        width: 42px;
        height: 42px;
    }

  /* ==== Shrinking logo header - END ===== */

  body {
    overscroll-behavior-x: none;
    touch-action: pan-y;
  }

  .split-layout {
    display: block;
  }

  .visual-panel {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    height: auto;
    min-height: 550px;
    aspect-ratio: 4 / 5;
  }

  .content-panel {
    position: static;
    min-height: auto;
    overflow: visible;
  }

  .content-section {
    min-height: auto;
    margin: 0 0.5rem;
    border: 0;
  }

  .content-wrapper {
    padding-top: 0;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .feature-card {
    min-height: 220px;
  }

  .site-footer {
    flex-direction: column;
  }

  .more-feats {
    text-align: center;
  }

/* ===== Image more feats ===== */
  .more-feats-audience {
    width: 195px;
  }

  .visual-content {
    top: 100px;
  }

  .visual-content h1 {
    text-shadow: 2px 3px 3px #333;
  }

  .visual-content h2 {
    text-shadow: 2px 2px 3px #333;
  }

  .visual-content p {
    color: #f0f0f0;
    text-shadow: 1px 2px 2px #333;
  }

  .nwtc-logo-img {
    bottom: 1rem;
    left: 1rem;
    height: clamp(4rem, 10vw, 8rem);
  }

  .mitos-logo-img {
    right: 1rem;
    bottom: 1rem;
    left: auto;
    height: clamp(3rem, 8vw, 6rem);
  }

  .logo {
    top: 1rem;
    left: 1rem;
    display: none;
    height: clamp(4rem, 12vw, 8rem);
    margin: 0;
  }

  /* ---- NEWS FLASH on mobile ----
     Back into normal document flow: it renders
     right BETWEEN the visual panel and the
     content panel (that is where the <aside>
     sits in the HTML). Full width with small
     side margins, same striking look. Because
     it is in-flow, it can never cover the
     title or the logos. */
  .news-flash {
    position: static;
    top: auto;
    right: auto;
    bottom: auto;
    z-index: auto;
    width: auto;
    max-width: none;
    margin: 1rem 0.5rem 0;
    padding: 1rem 1.1rem;
  }

  .news-flash :is(h1, h2, h3, h4) {
    font-size: clamp(1.1rem, 4.5vw, 1.35rem);
  }

  .news-flash p {
    font-size: 0.95rem;
  }
}

/* ================================
   Smaller mobile screens
================================ */

@media (max-width: 800px) {
  .nwtc-logo-img {
    bottom: 1rem;
    left: 1rem;
    height: clamp(5rem, 20vw, 10rem);
  }

  .mitos-logo-img {
    right: 1rem;
    bottom: 1rem;
    left: auto;
    height: clamp(3.5rem, 12vw, 7rem);
  }
}

/* ================================
   Responsive team table
================================ */

@media (max-width: 650px) {

  :root {
    --panel-padding: clamp(1.5rem, 2vw, 4rem);
  }

  .content-section p {
    text-align: left;
    hyphens: none;                /* avoid hyphens in the narrow column too */
  }

  /* ===== Content image float LEFT / RIGHT ===== */
  .content-section img.float-left {
    padding: 0;
    margin: 0 1rem 0.4rem 0;
    max-width: 120px;
  }

  .float-right {
    float: right;
    margin: 0 0 0.4rem 1rem;
    max-width: 120px;
  }
  /* ===== Content image float - END ===== */

 .more-feats-audience {
   /*display: block;*/
   float: left;
   width: 50%;
   margin: 0 15px 0 0;
  }

  #panel {
   padding: 30px 20px;
  }

  #team .document-content {
    font-size: 0.9rem;
    line-height: 1.35;
  }

  #team .document-content table {
    display: table;
  }

  #team .document-content tbody {
    display: table-row-group;
  }

  #team .document-content tr {
    display: table-row;
  }

  #team .document-content td,
  #team .document-content th {
    display: table-cell;
    padding: 0.45rem 0.3rem;
    vertical-align: top;
    overflow-wrap: break-word;
    word-break: normal;
  }

  #team .document-content td:first-child,
  #team .document-content th:first-child,
  #team .document-content td:last-child,
  #team .document-content th:last-child {
    width: 50% !important;
  }

  #team .document-content td:first-child,
  #team .document-content th:first-child {
    font-weight: 500;
  }

  #team .document-content p {
    margin-bottom: 0.45rem;
  }

  #team .document-content .document-section-heading {
    padding: 0.9rem 0 0.45rem;
    font-size: 1rem;
  }

/* ===== Accessibility image ===== */

  .content-section img.accessibility-image {
    float: none;
    display: block;
    max-width: 100%;
    margin: 0 0 1rem;
  }

  .accessibility-image p {
    text-align: left;   /* or "start" */
  }

  /* NEWS FLASH on small phones:
     slightly tighter padding. */
  .news-flash {
    margin: 0.75rem 0.5rem 0;
    padding: 0.9rem 1rem;
  }
}

/* ================================
   Reduced motion
================================ */

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .js-enabled .reveal {
    opacity: 1;
    transform: none;
  }
}

.more-feats-audience {
  float: left;
  margin: 0 20px 10px 0;
}
