:root {
  font-family: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  color: #111;
  background-color: #fff;
  --accordion-border: #e0e0e0;
}

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

body {
  margin: 0;
  min-height: 100vh;
  /* Gradient: pure white at top, light gray at bottom over 10 viewport heights */
  background: linear-gradient(to bottom, #ffffff 0%, #ffffff 100%);
  background-attachment: fixed;
  /* Locks gradient to viewport, not content height */
  background-size: 100% 1000vh;
  /* Gradient spans 10 viewport heights (1000vh) */
  color: inherit;
  overflow-x: hidden;
  font-size: clamp(0.95rem, 0.9rem + 0.3vw, 1.05rem);
  line-height: 1.6;
}

main {
  padding: 0.5rem min(6vw, 2.5rem) 5rem;
  max-width: 1200px;
  /* Added constraint for large screens */
  margin: 0 auto;
}

.hero {
  position: relative;
  height: 95vh;
  width: 100%;
  overflow: hidden;
}

.hero-image {
  width: 100%;
  height: 65vh;
  object-fit: cover;
  display: block;
}

/* Viewport height media queries to ensure only TRIIN stays on image, UJOK below */
/* Base styles - mobile */
.hero-text {
  position: absolute;
  left: 0;
  bottom: 23vh;
  /* Adjusted so TRIIN is on 65vh image, UJOK below */
  width: 100%;
  padding: 1rem min(6vw, 2.5rem);
  background: none;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  text-align: center;
}

/* For very short viewports (mobile landscape, etc.) */
@media (max-height: 500px) {
  .hero-image {
    height: 50vh;
  }

  .hero-text {
    bottom: 17vh;
    /* TRIIN on 50vh image */
  }

  .hero-text span>div {
    font-size: clamp(1.8rem, 7vw, 3rem);
  }
}

/* For short viewports */
@media (min-height: 501px) and (max-height: 700px) {
  .hero-image {
    height: 58vh;
  }

  .hero-text {
    bottom: 20vh;
    /* TRIIN on 58vh image */
  }
}

/* Standard height viewports */
@media (min-height: 701px) and (max-height: 900px) {
  .hero-image {
    height: 65vh;
  }

  .hero-text {
    bottom: 23vh;
    /* TRIIN on 65vh image */
  }
}

/* Tall viewports */
@media (min-height: 901px) {
  .hero-image {
    height: 68vh;
  }

  .hero-text {
    bottom: 24vh;
    /* TRIIN on 68vh image */
  }
}

/* Desktop base */
@media (min-width: 1024px) {
  .hero-image {
    height: 70vh;
  }

  .hero-text {
    bottom: 10vh;
    /* TRIIN on 70vh image, UJOK below */
  }

  .accordion-content {
    padding-left: 1.5rem;
    padding-right: 1rem;
  }
}

/* Desktop with short height */
@media (min-width: 1024px) and (max-height: 700px) {
  .hero-image {
    height: 60vh;
  }

  .hero-text {
    bottom: 15vh;
    /* TRIIN on 60vh image, UJOK below */
  }
}

/* Desktop with tall height */
@media (min-width: 1024px) and (min-height: 1000px) {
  .hero-image {
    height: 72vh;
  }

  .hero-text {
    bottom: 13vh;
    /* TRIIN on 72vh image, UJOK below */
  }
}

.hero-text span {
  display: block;
  width: 100%;
  text-align: center;
}

.hero-text span>div {
  display: block;
  font-weight: 600;
  color: #000;
  letter-spacing: 0.3rem;
  font-size: clamp(2.3rem, 8vw, 4rem);
}

.hero-text .hero-role {
  font-size: clamp(0.9rem, 3vw, 1.2rem);
  letter-spacing: 0.25rem;
  margin-top: 0.5rem;
}

/* Navigation */
.primary-nav {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1000;
}

.menu-toggle {
  width: 3rem;
  height: 3rem;
  border: none;
  background: transparent;
  border-radius: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  cursor: pointer;
  box-shadow: none;
}

.flag-icon {
  display: block;
  width: 1.7rem;
  height: auto;
}

.nav-panel {
  position: absolute;
  top: calc(100% + 0.75rem);
  right: 0;
  display: none;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem;
  background-color: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(17, 17, 17, 0.2);
  border-radius: 0.75rem;
  width: min(70vw, 12rem);
  box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, 0.15);
  color: #111;
}

.nav-panel a {
  display: block;
  padding: 0.4rem 0.6rem;
  border-radius: 999px;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.16rem;
  font-size: clamp(0.75rem, 2.5vw, 0.9rem);
  color: #111;
  text-align: center;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-panel a:hover,
.nav-panel a:focus-visible {
  background-color: #111;
  color: #fff;
}

.primary-nav.open .nav-panel {
  display: flex;
}

.language-picker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.language-picker .lang-link {
  border: none;
  background: transparent;
  padding: 0.15rem;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.language-picker .lang-link.is-active {
  opacity: 1;
  transform: translateY(-1px);
}

/* Section Layout */
.content-block {
  /* border-top: 1px solid #111; Removed global border, moving to accordion style */
  padding: 0.5rem 0;
}

/*
.content-block:first-of-type {
  margin-top: clamp(1rem, 12vw, 2rem);
}
*/

.content-label {
  font-size: clamp(0.95rem, 3vw, 1.15rem);
  text-transform: uppercase;
  letter-spacing: 0.3rem;
  margin-bottom: 0.65rem;
  display: none;
  /* Hidden as per request to only show H1s */
}

/* ACCORDION STYLES */
.accordion-item {
  /*border-top: 1px solid #000;*/
  overflow: hidden;
}

.accordion-item:last-child {
  /*border-bottom: 1px solid #000;*/
}

.accordion-header {
  width: 100%;
  background: none;
  border: none;
  padding: 1.5rem 0;
  display: flex;
  align-items: flex-start;
  /* Aligns icon with top of multi-line text */
  gap: 1.5rem;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.2s;
  color: inherit;
  /* Fix for iOS blue color */
}

.accordion-header:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

.accordion-header h1,
.accordion-header h2,
.accordion-header h3,
.accordion-header h4 {
  margin: 0;
  font-size: clamp(1.2rem, 4vw, 1.8rem);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.2;
}

.accordion-icon {
  font-size: 1.5rem;
  line-height: 1;
  font-weight: 300;
  flex-shrink: 0;
  transition: transform 0.3s ease;
  width: 1.5rem;
  text-align: center;
}

/* Hide icons for nested items but keep space for alignment */
.accordion-item.nested .accordion-icon,
.accordion-item.nested-h3 .accordion-icon,
.accordion-item.nested-h4 .accordion-icon {
  visibility: hidden;
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out, opacity 0.3s ease;
  opacity: 0;
}

/* Open State */
.accordion-item.is-open>.accordion-icon {
  transform: rotate(45deg);
  /* Turns + into x */
}

.accordion-item.is-open>.accordion-content {
  max-height: 5000px;
  /* Increased to accommodate nested items */
  opacity: 1;
  padding-bottom: 2rem;
}

.accordion-content p {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1rem;
  line-height: 1.7;
  color: #444;
  max-width: 65ch;
}

/* Nested Accordion (H2) */
.accordion-item.nested {
  border-top: 1px solid #eee;
  border-bottom: none;
  margin-left: 0;
}

.accordion-item.nested:last-child {
  border-bottom: 1px solid #eee;
}

.accordion-item.nested .accordion-header {
  padding: 1rem 0;
}

.accordion-item.nested .accordion-header h2 {
  /* Actually H2 content, but keeping structure */
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: none;
}

.accordion-item.nested .accordion-content {
  padding-left: 3rem;
  padding-bottom: 1rem;
}

/* Deeply Nested Accordion (H3) */
.accordion-item.nested-h3 {
  border-top: 1px solid #f5f5f5;
  border-bottom: none;
  margin-left: 0;
}

.accordion-item.nested-h3:last-child {
  border-bottom: 1px solid #f5f5f5;
}

.accordion-item.nested-h3 .accordion-header {
  padding: 0.75rem 0;
}

.accordion-item.nested-h3 .accordion-header h3 {
  /* Actually H3 content */
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: none;
}

.accordion-item.nested-h3 .accordion-content {
  padding-left: 3rem;
  padding-bottom: 1rem;
}

/* Deepest Nested Accordion (H4) */
.accordion-item.nested-h4 {
  border-top: 1px solid #f9f9f9;
  border-bottom: none;
  margin-left: 0;
}

.accordion-item.nested-h4:last-child {
  border-bottom: 1px solid #f9f9f9;
}

.accordion-item.nested-h4 .accordion-header {
  padding: 0.5rem 0;
}

.accordion-item.nested-h4 .accordion-header h4 {
  /* Actually H4 content */
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: none;
}

.accordion-item.nested-h4 .accordion-content {
  padding-left: 3rem;
  padding-bottom: 1rem;
}

/* Footer */
.page-links {
  position: fixed;
  bottom: 1.5rem;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 2rem;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  padding-bottom: 0.5rem;
  pointer-events: none;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.page-links.hidden {
  opacity: 0;
  visibility: hidden;
}

.page-links .meet-me-btn {
  padding: 0.75rem 2.5rem;
  background: rgba(255, 255, 255, 0.50);
  color: #0a0063;
  border: 2px solid #111;
  border-radius: 999px;
  font-family: inherit;
  font-size: clamp(0.85rem, 2.5vw, 1rem);
  font-weight: 500;
  letter-spacing: 0.15rem;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(17, 17, 17, 0.2);
  pointer-events: auto;
}

.page-links .meet-me-btn:hover,
.page-links .meet-me-btn:focus-visible {
  background: #fff;
  color: #111;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(17, 17, 17, 0.3);
}

body {
  padding-bottom: 5rem;
}

/* Copyright Footer */
.copyright-footer {
  padding: 1rem min(6vw, 2.5rem) 2rem;
  margin-top: 3rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.copyright-footer p {
  margin: 0;
  font-size: 0.75rem;
  color: #888;
  letter-spacing: 0.05em;
}