/* FLOW2GATHER - Simplified Version */

/* ========== FONTS ========== */

/* cormorant-garamond-regular - latin */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 400;
  src: url('fonts/cormorant-garamond-v9-latin-regular.eot');
  src: local(''),
       url('fonts/cormorant-garamond-v9-latin-regular.eot?#iefix') format('embedded-opentype'),
       url('fonts/cormorant-garamond-v9-latin-regular.woff2') format('woff2'),
       url('fonts/cormorant-garamond-v9-latin-regular.woff') format('woff'),
       url('fonts/cormorant-garamond-v9-latin-regular.ttf') format('truetype'),
       url('fonts/cormorant-garamond-v9-latin-regular.svg#CormorantGaramond') format('svg');
}

/* big-shoulders-inline-display-regular - latin */
@font-face {
  font-family: 'Big Shoulders Inline Display';
  font-style: normal;
  font-weight: 400;
  src: url('fonts/big-shoulders-inline-display-v1-latin-regular.eot');
  src: local(''),
       url('fonts/big-shoulders-inline-display-v1-latin-regular.eot?#iefix') format('embedded-opentype'),
       url('fonts/big-shoulders-inline-display-v1-latin-regular.woff2') format('woff2'),
       url('fonts/big-shoulders-inline-display-v1-latin-regular.woff') format('woff'),
       url('fonts/big-shoulders-inline-display-v1-latin-regular.ttf') format('truetype'),
       url('fonts/big-shoulders-inline-display-v1-latin-regular.svg#BigShouldersInlineDisplay') format('svg');
}

/* ========== RESET & BASE ========== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #dae9f2; /* light blue-gray background */
  font-family: 'Cormorant Garamond', serif;
  font-size: 16px;
  line-height: 1.5;
  width: 100vw;
  overflow-x: hidden;
}

p {
  margin: 0;
}

/* ========== EMAIL OBFUSCATION ========== */

.cryptedmail:after {
  content: attr(data-name1) attr(data-name2) "@" attr(data-domain1) "2" attr(data-domain2) "." attr(data-tld);
}

.cryptedmail {
  color: #1d4ed8; /* blue text */
  text-decoration: none;
}

.cryptedmail:hover {
  text-decoration: underline;
}

/* ========== GRID LAYOUT ========== */

.container {
  width: 100%;
  margin: 0 auto;
}

.grid-layout {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: minmax(0, 50px); /* Flexible rows up to 50px max */
  gap: 0;
  min-height: 100vh;
  align-items: start; /* Align all grid items to start of their rows */
}

/* ========== LOGO SECTION ========== */

.logo {
  grid-column: 2 / span 10;
  grid-row: 1 / 7;
  display: flex;
  align-items: flex-start; /* Align to top */
  justify-content: center;
  justify-self: center;
  width: 100%;
  height: 100%; /* Set explicit height to fill grid rows */
  overflow: hidden; /* Prevent overflow */
}

.logo img {
  width: 100%; /* Fill container width */
  height: 100%; /* Fill container height */
  object-fit: contain; /* Scale to fit within bounds while maintaining aspect ratio */
}

/* ========== TEXT SECTIONS ========== */

.text-section {
  grid-column: 3 / span 8;
  grid-row: 7;
  text-align: center;
  padding: 0;
  position: relative; /* Create positioning context */
  top: 0.625rem; /* ~1/5 of max row height (50px) */
}

/* Dutch text - visible by default */
.text-nl {
  opacity: 1;
  transition: opacity 0.8s ease-in-out;
}

/* English text - hidden by default */
.text-uk {
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
}

/* When English is active */
.text-uk.active {
  opacity: 1;
}

.text-nl.active {
  opacity: 0;
}

.text-container {
  position: relative;
}

/* Responsive text wrapper */
.text-wrapper {
  grid-column: 3 / span 8;
  grid-row: 7;
  position: relative; /* Create positioning context for mobile */
}

.text-section:nth-child(2) {
  position: absolute; /* Position second text section over first at mobile */
  top: 0.625rem; /* Offset by padding amount instead of using padding */
  left: 0;
  width: 100%;
  pointer-events: none; /* Don't block clicks on flags */
}

.text-section:nth-child(2) * {
  pointer-events: auto; /* Re-enable clicks on children */
}

/* ========== FLAGS ========== */

.flags {
  grid-column: 6 / span 2;
  grid-row: 13;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  align-self: end; /* Position at bottom of row 13 */
  gap: 0.5rem;
  list-style: none;
}

.flags ul {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.flags li {
  display: inline-block;
}

.flags img {
  height: 0.75rem; /* 12px */
  width: auto;
  cursor: pointer;
  transition: transform 0.2s;
}

.flags img:hover {
  transform: scale(1.1);
}

/* ========== RESPONSIVE BREAKPOINTS ========== */

/* Small screens (640px and up) */
@media (min-width: 640px) {
  body {
    font-size: 1rem; /* 16px */
  }

  .container {
    max-width: 640px;
  }

  .logo {
    grid-column: 1 / span 6;
    grid-row: 2 / 8;
    align-self: start;
    justify-self: stretch;
    align-items: flex-start; /* Align image to top */
    justify-content: flex-start; /* Align image to left */
  }

  .logo img {
    width: 100% !important; /* Make image fill container width */
    height: auto !important; /* Maintain aspect ratio */
    max-width: none; /* Remove max-width constraint */
    max-height: none; /* Remove max-height constraint */
    object-fit: fill; /* Override scale-down */
  }

  .text-wrapper {
    grid-column: 7 / span 6;
    grid-row: 2;
    align-self: start;
    position: relative; /* Create positioning context */
  }

  .text-section:nth-child(2) {
    position: absolute; /* Position second text section over first */
    top: 0.625rem; /* Offset by padding amount instead of using padding */
    left: 0;
    width: 100%;
    pointer-events: none; /* Don't block clicks on flags */
  }

  .text-section:nth-child(2) * {
    pointer-events: auto; /* Re-enable clicks on children (email links) */
  }

  .flags {
    grid-column: 9 / span 2;
    grid-row: 7;
    align-self: end;
  }

  .flags img {
    height: 1rem; /* 16px */
  }
}

/* Medium screens (768px and up) */
@media (min-width: 768px) {
  body {
    font-size: 18px;
  }

  .container {
    max-width: 768px;
  }

  .logo {
    grid-column: 3 / span 8;
    grid-row: 1 / 11;
    align-self: start; /* Align to top of grid area */
  }

  .text-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 1.5rem;
    grid-column: 1 / span 12;
    grid-row: 10;
    align-content: start;
  }

  .text-section {
    grid-column: auto;
    padding-left: 0;
    align-self: start;
    top: 0; /* Reset top offset from mobile */
  }

  .text-section:nth-child(2) {
    position: static; /* Reset absolute positioning from 640px */
    pointer-events: auto; /* Reset pointer events */
  }

  .text-container {
    position: static;
  }

  .text-nl {
    grid-column: 1;
    padding-left: 0;
  }

  .text-uk {
    grid-column: 2;
    position: static;
    opacity: 1;
    padding-left: 1.5rem;
  }

  .flags {
    display: none; /* Hide flags on medium screens and up */
  }
}

/* Large screens (1024px and up) */
@media (min-width: 1024px) {
  body {
    font-size: 24px;
  }

  .container {
    max-width: 1024px;
  }

  .logo {
    grid-column: 4 / 10; /* Columns 4-9 (ending before 10) */
    grid-row: 3 / 15;
    align-self: start; /* Align to top of grid area */
  }

  .text-wrapper {
    display: contents; /* Remove wrapper grid, place children directly in parent grid */
  }

  .text-section {
    display: contents; /* Also remove text-section from flow */
    text-align: left;
  }

  .text-nl {
    grid-column: 1 / span 3;
    grid-row: 4;
    text-align: left;
    padding-left: 0;
    align-self: start;
  }

  .text-uk {
    grid-column: 10 / span 3;
    grid-row: 4;
    text-align: left;
    padding-left: 1rem;
    align-self: start;
  }
}

/* Extra large screens (1280px and up) */
@media (min-width: 1280px) {
  .container {
    max-width: 1280px;
  }

  .logo {
    grid-column: 4 / 10; /* Columns 4-9 */
    grid-row: 3 / 15;
    align-self: start; /* Align to top of grid area */
  }
}

/* ========== RESPONSIVE TEXT VISIBILITY ========== */

/* Hide certain paragraphs on small screens, show on large */
.hide-sm-show-lg {
  display: none;
}

@media (min-width: 1024px) {
  .hide-sm-show-lg {
    display: block;
  }

  .show-sm-hide-lg {
    display: none;
  }
}

/* Show on small, hide on medium, show on large */
.show-sm-hide-md-show-lg {
  display: block;
}

@media (min-width: 640px) {
  .show-sm-hide-md-show-lg {
    display: none;
  }
}

@media (min-width: 1024px) {
  .show-sm-hide-md-show-lg {
    display: block;
  }
}

/* Hide on small, show on medium, hide on large */
.hide-sm-show-md-hide-lg {
  display: none;
}

@media (min-width: 640px) {
  .hide-sm-show-md-hide-lg {
    display: block;
  }
}

@media (min-width: 1024px) {
  .hide-sm-show-md-hide-lg {
    display: none;
  }
}

/* Show on small and medium, hide on large */
.show-sm-hide-lg {
  display: block;
}

@media (min-width: 1024px) {
  .show-sm-hide-lg {
    display: none;
  }
}

/* Hide on medium, show on large */
.hide-md-show-lg {
  display: none;
}

@media (min-width: 768px) and (max-width: 1023px) {
  .hide-md-show-lg {
    display: none;
  }
}

@media (min-width: 1024px) {
  .hide-md-show-lg {
    display: block;
  }
}

/* Show on medium and large */
.show-md {
  display: none;
}

@media (min-width: 768px) {
  .show-md {
    display: block;
  }
}
