/* ==========================================================================
   STIX — Südtirol Internet Exchange Point
   Static stylesheet.

   Colours, font sizes and spacings below match the original site:
     accent red   #da291c    lime accent  #aceb2f
     body         Open Sans 14px/26px #888
     headings     Montserrat 600 #000  (h1 65 / h2 45 / h3 35 / h4 25 / h5 20)
     grid         1100px      header 100px      mobile header 70px
     dark bg      #171819     footer bg    #141515
   ========================================================================== */

:root {
  --accent: #da291c;
  --lime: #aceb2f;
  --text: #888888;
  --heading: #000000;
  --dark-bg: #171819;
  --footer-bg: #141515;
  --font-heading: Montserrat, Arial, sans-serif;
  --font-body: "Open Sans", Arial, sans-serif;
  --grid: 1100px;
  --header-h: 100px;
  --mobile-header-h: 70px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  line-height: 26px;
  color: var(--text);
  background: #ffffff;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  margin: 20px 0;
  font-family: var(--font-heading);
  color: var(--heading);
  font-weight: 600;
  line-height: 1.3em;
}

h1 { font-size: 65px; }
h2 { font-size: 45px; }
h3 { font-size: 35px; }
h4 { font-size: 25px; }
h5 { font-size: 20px; }
h6 { font-size: 14px; color: #555555; }

p { margin: 10px 0; }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease-in-out;
}

img { max-width: 100%; height: auto; display: block; }

ul, ol { padding-left: 1.3em; }

.grid {
  width: var(--grid);
  max-width: 100%;
  margin: 0 auto;
  padding: 0 15px;
}

/* ==========================================================================
   Header — transparent over the hero, solid black once stuck
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  height: var(--header-h);
  background: transparent;
  transition: background-color 0.3s ease, height 0.3s ease;
}

.site-header .grid {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header.stuck {
  background: #000000;
  height: 70px;
}

.site-logo {
  flex: 0 0 auto;
  display: block;
}

.site-logo img {
  width: auto;
  height: 72px;
  transition: height 0.3s ease;
}

.site-header.stuck .site-logo img { height: 48px; }

/* The dark-text logo exists only for the white (Impressum) header. Everywhere
   else the header is dark or transparent, so the white logo is used. */
.site-logo .logo-dark { display: none; }

.site-header.header-solid .logo-light { display: none; }
.site-header.header-solid .logo-dark { display: block; }
.site-header.header-solid.stuck .logo-light { display: block; }
.site-header.header-solid.stuck .logo-dark { display: none; }

.main-nav { display: flex; align-items: center; flex: 0 1 auto; }

.main-nav > ul {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav > ul > li > a {
  display: inline-block;
  padding: 0 18px;
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 23px;
}

.main-nav > ul > li > a:hover,
.main-nav > ul > li > a.active { color: var(--accent); }

.lang-select { position: relative; margin-left: 16px; }

.lang-current {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 0;
  padding: 6px 4px;
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
}

.lang-current i {
  display: block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
}

.lang-current:hover,
.lang-select.open .lang-current { color: var(--accent); }

.lang-menu {
  position: absolute;
  top: 100%;
  right: 0;
  display: block;
  min-width: 76px;
  margin: 0;
  padding: 10px 0;
  list-style: none;
  text-align: center;
  background: #2b2b2b;
  border-top: 3px solid var(--accent);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.lang-select.open .lang-menu,
.lang-select:hover .lang-menu,
.lang-select:focus-within .lang-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-menu a {
  display: block;
  padding: 8px 16px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.lang-menu a:hover { color: var(--accent); }

/* Solid variant: used on the Impressum page, which has no background image
   behind the header, so the menu needs dark text on white. */
.site-header.header-solid { background: #ffffff; }

.site-header.header-solid .main-nav > ul > li > a,
.site-header.header-solid .lang-current { color: #000000; }

.site-header.header-solid .main-nav > ul > li > a:hover,
.site-header.header-solid .main-nav > ul > li > a.active,
.site-header.header-solid .lang-current:hover { color: var(--accent); }

.site-header.header-solid .nav-toggle { color: #000000; }

.site-header.header-solid.stuck { background: #000000; }

.site-header.header-solid.stuck .main-nav > ul > li > a,
.site-header.header-solid.stuck .lang-current,
.site-header.header-solid.stuck .nav-toggle { color: #ffffff; }

.site-header.header-solid.stuck .main-nav > ul > li > a.active { color: var(--accent); }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  color: #ffffff;
  font-size: 26px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
}

/* ==========================================================================
   Buttons — pill shaped, uppercase, expanding fill on hover
   ========================================================================== */

.btn {
  position: relative;
  display: inline-block;
  vertical-align: middle;
  padding: 16px 32px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25em;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border-radius: 2em;
  border: 2px solid var(--accent);
  background: transparent;
  color: #ffffff;
  overflow: hidden;
  cursor: pointer;
  transition: color 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

.btn > span { position: relative; z-index: 2; }

.btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: var(--accent);
  transform: translate(-50%, -50%);
  transition: width 0.5s ease, height 0.5s ease;
  z-index: 1;
}

.btn:hover { color: #ffffff; }

.btn:hover::before { width: 320%; height: 700%; }

.btn-solid { background: var(--accent); color: #ffffff; }

.btn-dark { color: var(--heading); }

.btn-dark:hover { color: #ffffff; }

/* ==========================================================================
   Giant faint background word + vertical grid lines
   ========================================================================== */

.bg-word {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  display: flex;
  align-items: flex-start;
  z-index: 0;
}

.bg-word-hero span { padding-top: 130px; }
.bg-word-about span { padding-top: 25px; }

.bg-word span {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 245px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.02);
  padding-left: 5.5%;
  white-space: nowrap;
}

.grid-lines {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.grid-lines i {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(253, 252, 248, 0.15);
}

.grid-lines i:nth-child(1) { left: 25%; }
.grid-lines i:nth-child(2) { left: 50%; }
.grid-lines i:nth-child(3) { left: 75%; }

/* ==========================================================================
   Homepage hero
   ========================================================================== */

.hero-home {
  position: relative;
  background: var(--dark-bg) center top no-repeat;
  background-size: cover;
  background-attachment: fixed;
  padding: 300px 0 290px;
  overflow: hidden;
}

.hero-home-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 40px;
}

.hero-home-text { flex: 0 0 52%; padding-right: 60px; text-align: right; }

.hero-home-text h1 { margin: 0; color: #ffffff; font-size: 60px; }

.hero-home-text .subtitle {
  margin: 19px 0 0;
  color: #ffffff;
  font-size: 22px;
  font-style: italic;
  font-weight: 400;
  line-height: 35px;
}

.hero-home-buttons { margin-top: 51px; }

.hero-home-buttons .btn { margin: 0 20px 20px 0; }

.hero-home-logo { flex: 1 1 auto; padding-top: 9em; }

.hero-home-logo img { width: 250px; margin-left: auto; }

/* ==========================================================================
   Inner page title banner
   ========================================================================== */

.page-title {
  position: relative;
  height: 465px;
  background: var(--dark-bg) top center no-repeat;
  background-attachment: fixed;
  display: flex;
  align-items: center;
  padding-top: var(--header-h);
}

.page-title .grid { position: relative; z-index: 1; }

.page-title h1 { margin: 0; color: #ffffff; font-size: 45px; }

.page-title-plain {
  height: 229px;
  background: #f8f8f8;
  align-items: center;
  padding: var(--header-h) 0 0;
}

.page-title-plain h1 { color: var(--heading); }

.separator {
  display: block;
  width: 50px;
  border-bottom: 2px solid var(--accent);
}

.page-title-plain .separator { margin-top: 15px; }

/* ==========================================================================
   Sections
   ========================================================================== */

.section { position: relative; padding: 82px 0 60px; }

.section-dark { background: var(--dark-bg); }

.section-dark h1, .section-dark h2, .section-dark h3,
.section-dark h4, .section-dark h5 { color: #ffffff; }

.section-grey { background: #f8f8f8; }

/* the three "how to join" cards deliberately overlap the hero above */
.section-steps {
  background: var(--dark-bg);
  margin-top: -152px;
  padding: 0 0 40px;
  position: relative;
  z-index: 2;
}

.section-about {
  position: relative;
  background: var(--dark-bg);
  padding: 200px 0 90px;
  overflow: hidden;
}

.section-partners {
  position: relative;
  background: var(--dark-bg) center center no-repeat;
  background-size: cover;
  background-attachment: fixed;
  padding: 82px 0 60px;
}

.section-partners h3 { color: #ffffff; }

.section-title { margin-bottom: 40px; }

.section-title.center { text-align: center; }

.section-title.center .separator { margin: 15px auto 0; }

.section-title h2, .section-title h3 { margin: 0; }

.section-title .subtitle {
  margin: 13px 0 0;
  font-family: var(--font-body);
  font-size: 18px;
  font-style: italic;
  font-weight: 400;
  line-height: 28px;
  color: #888888;
}

.section-dark .section-title .subtitle { color: #ffffff; }

.section-title .lead { display: block; margin: 28px 0 0; line-height: 26px; }

.section-dark .section-title .lead { color: #d4d4d4; }

/* emphasised phrases, lighter than the surrounding body text */
.hl { color: #d4d4d4; }

/* ---------- Steps ---------- */

.steps {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.step { padding: 0 20px; text-align: center; }

.step img { height: 100px; width: auto; margin: 0 auto 20px; }

.step h4 { margin: 7px 0 0; color: #ffffff; }
.step p { margin-top: 19px; color: #ffffff; }

/* ---------- About row ---------- */

.about-row {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
}

.about-row > .about-col { flex: 0 1 50%; max-width: 50%; }

.about-bullets {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, auto);
  grid-auto-flow: column;
  gap: 0 30px;
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
}

.about-bullets li {
  position: relative;
  padding-left: 15px;
  margin-bottom: 10px;
  color: #ffffff;
}

.about-bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 5px;
  height: 5px;
  background: var(--accent);
}

/* ---------- Feature cards ---------- */

.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 54px 0;
}

.feature { padding: 30px 43px; text-align: center; }

.feature img { width: 100px; height: auto; margin: 0 auto 20px; }

.feature h5 { margin: 0 0 10px; }

.feature p { margin: 0; }

/* ---------- Partner logos ---------- */

.partners {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 60px;
  margin-top: 15px;
}

.partner {
  position: relative;
  display: block;
  width: 216px;
  height: 160px;
}

.partner img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-height: 160px;
  width: auto;
  transition: opacity 0.3s ease;
}

.partner .hover-img { opacity: 0; }
.partner:hover .base-img { opacity: 0; }
.partner:hover .hover-img { opacity: 1; }

/* ==========================================================================
   Content pages
   ========================================================================== */

.content { padding: 80px 0; }

.content-narrow { width: 930px; max-width: 100%; margin: 0 auto; }

/* the About page runs its body text across the full grid */
.content-full { width: 100%; }

.content h2, .content h3, .content h4, .content h5 { color: var(--heading); }

.content h4 { margin-top: 40px; }

.content code {
  background: #f2f2f2;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 13px;
}

.content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
}

.content table th,
.content table td {
  text-align: center;
  padding: 9px 12px;
  border: 1px solid #e2e2e2;
}

.content table th {
  font-weight: 700;
  color: var(--heading);
  background: #f4f4f4;
}

/* Documents list: left aligned with a tinted header row */
.content table.docs-table th,
.content table.docs-table td { text-align: left; }

.content table.docs-table th { background: #dfeffc; }

.content table.docs-table a { color: #1c5d99; }

.content table.docs-table a:hover { color: var(--accent); }

/* ---------- Participants status table (original custom widget) ---------- */

table.partecipants {
  border-spacing: 0;
  border-collapse: collapse;
  max-width: 32em;
  margin: 0 auto;
}

table.partecipants tr { border: none; }

table.partecipants td {
  border: none;
  background: none;
  text-align: left;
  padding: 0;
}

table.partecipants td.ips { text-align: left; padding-left: 1em; }

table.partecipants td.status {
  text-align: left;
  line-height: 1;
  font-size: 80%;
  padding-left: 1em;
  padding-bottom: 2em;
}

table.partecipants td.status span.yes::after {
  content: "\2714";
  color: #aaaa00;
}

table.partecipants td.status span.no::after {
  content: "\2718";
  color: #ee0000;
}

table.partecipants td.status span.unknown::after { content: "-"; }

table.partecipants a { font-weight: bold; color: #333333; }

table.partecipants a:hover { color: var(--accent); }

.lang-de-DE, .lang-en-US, .lang-it-IT { display: none; }

/* ==========================================================================
   Contact page
   ========================================================================== */

.contact-section {
  background: #f8f8f8 center center no-repeat;
  background-size: cover;
  background-attachment: fixed;
  padding: 80px 0;
}

.contact-row { display: flex; flex-wrap: wrap; gap: 50px; }

.contact-details { flex: 0 1 300px; }

.contact-block { margin-bottom: 60px; }

.contact-block h5 { margin: 0; }

.contact-block p { margin-top: 14px; }

.contact-form-col { flex: 0 1 560px; }

.contact-form-col h5 { margin: 0 0 20px; }

.map-embed iframe {
  display: block;
  width: 100%;
  height: 450px;
  border: 0;
}

.field { margin-bottom: 14px; }

.field input,
.field textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #e0e0e0;
  background: #ffffff;
  border-radius: 3px;
  font-family: var(--font-body);
  font-size: 14px;
  color: #555555;
}

.field textarea { resize: vertical; }

.field input::placeholder,
.field textarea::placeholder { color: #aaaaaa; }

.field input:focus,
.field textarea:focus { outline: 0; border-color: var(--accent); }

/* Honeypot: hidden from people, visible to naive bots. Deliberately not
   display:none, which some bots detect and skip. */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.recaptcha-box { margin: 18px 0 4px; }

.newsletter-form-wrap .recaptcha-box { margin: 14px 0 0; }

/* The widget is a fixed-size iframe; let narrow columns scroll rather than
   blow out the layout. */
.recaptcha-box > div { max-width: 100%; }

.form-success,
.form-error {
  display: none;
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 3px;
  font-size: 13px;
}

.form-success { background: #e5f6ea; color: #1e7c37; }
.form-error { background: #fdeaea; color: #b31212; }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer { background: var(--footer-bg); color: #888888; }

.footer-top { padding: 70px 0 40px; }

.footer-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.footer-col img { margin-bottom: 20px; }

.footer-col p { margin: 0 0 4px; }

.widget-title {
  position: relative;
  margin: 0 0 24px;
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 600;
}

.footer-col ul { list-style: none; padding: 0; margin: 0; }

.footer-col ul li { margin-bottom: 8px; }

.footer-col a { color: #888888; }

.footer-col a:hover { color: var(--accent); }

.newsletter-form {
  display: flex;
  align-items: center;
  margin-top: 16px;
  max-width: 250px;
  border: 1px solid #3a3d43;
}

.newsletter-form input[type="email"] {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 13px;
}

.newsletter-form input[type="email"]::placeholder { color: #777777; }

.newsletter-form input[type="email"]:focus { outline: 0; }

.newsletter-form button {
  border: 0;
  background: transparent;
  color: #ffffff;
  font-size: 17px;
  line-height: 1;
  padding: 0 12px;
  cursor: pointer;
}

.newsletter-form button:hover { color: var(--lime); }

.footer-bottom {
  border-top: 1px solid #26282b;
  padding: 26px 0;
  text-align: center;
  font-size: 13px;
  color: #6f6f6f;
}

/* ==========================================================================
   Back to top
   ========================================================================== */

.back-to-top {
  position: fixed;
  right: 25px;
  bottom: 25px;
  z-index: 150;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #ffffff;
  font-size: 13px;
  line-height: 1;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.back-to-top.visible { opacity: 1; visibility: visible; }

.back-to-top:hover { background: #b82217; color: #ffffff; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1440px) {
  .bg-word span { font-size: 260px; }
}

@media (max-width: 1280px) {
  .bg-word span { font-size: 245px; }
}

@media (max-width: 1100px) {
  .grid { width: 100%; padding: 0 25px; }
  .grid-lines { display: none; }
  .features { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1024px) {
  .hero-home-logo { display: none; }
  .hero-home-text { flex: 1 1 100%; padding-right: 0; }
}

@media (max-width: 1000px) {
  .hero-home,
  .section-partners,
  .page-title,
  .contact-section { background-attachment: scroll; }

  .hero-home-text { text-align: left; }

  .site-header { height: var(--mobile-header-h); background: #000000; }
  .site-header.stuck { height: var(--mobile-header-h); }
  .site-logo img,
  .site-header.stuck .site-logo img { height: 48px; }

  .nav-toggle { display: block; }

  .main-nav {
    position: absolute;
    top: var(--mobile-header-h);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    background: #000000;
    padding: 10px 25px 20px;
  }

  .main-nav.open { display: flex; }

  .main-nav ul { flex-direction: column; align-items: flex-start; }

  .main-nav > ul > li > a { padding: 10px 0; }

  .lang-select { margin: 10px 0 0 0; align-self: flex-start; }

  .hero-home { padding: 160px 0 200px; }
  .hero-home-text h1 { font-size: 44px; }

  .section-steps { margin-top: -120px; }
  .section-about { padding-top: 120px; }

  .steps { grid-template-columns: 1fr; gap: 50px; }
  .step,
  .step:nth-child(2),
  .step:nth-child(3) { text-align: center; padding: 0; }
  .step img,
  .step:nth-child(3) img { margin-left: auto; margin-right: auto; }

  .about-row > .about-col { flex: 1 1 100%; }

  .page-title { height: 340px; }
  .page-title h1 { font-size: 34px; }

  h1 { font-size: 44px; }
  h2 { font-size: 34px; }
  h3 { font-size: 28px; }

  .footer-cols { grid-template-columns: repeat(2, 1fr); gap: 40px 30px; }
}

@media (max-width: 680px) {
  .hero-home-text h1 { font-size: 40px; }
  .hero-home-text .subtitle { font-size: 18px; line-height: 30px; }
  .bg-word span { font-size: 140px; }

  .features { grid-template-columns: 1fr; }
  .feature { padding: 30px 0; }

  .footer-cols { grid-template-columns: 1fr; }

  .partners { gap: 30px; }
  .partner { height: 120px; }
  .partner img { max-height: 120px; }

  .page-title { height: 260px; padding-bottom: 40px; }
  .page-title h1 { font-size: 28px; }

  .content { padding: 50px 0; }
  .contact-row { gap: 40px; }
}
