/* ABOUTME: Styles for the Rólunk (About Us) standalone page.
   ABOUTME: Hero statement, about narrative section, and team member grid. */

/* ===========================
   Hero
   =========================== */

.rolunk-hero {
  position: relative;
  z-index: 1;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}

.rolunk-hero__topbar {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 0.8em 1em;
  flex-shrink: 0;
}

.rolunk-hero__logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-decoration: none;
}

.rolunk-hero__menu {
  font-family: var(--font-primary);
  font-size: 2.1rem;
  background: none;
  border: none;
  cursor: pointer;
}

/* Title — fills remaining space, text vertically centered */
.rolunk-hero__text {
  flex: 1 0 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 1rem;
}

.rolunk-hero__line {
  display: block;
  width: fit-content;
  margin: 0 auto;
  font-family: var(--font-primary);
  font-size: clamp(2.5rem, 5.5vw, 5rem);
  font-style: normal;
  font-weight: 400;
  line-height: 1.15;
}

.rolunk-hero__line--shift {
  will-change: transform;
}

/* Image grid — pinned to bottom, fixed height */
.rolunk-hero__images {
  display: grid;
  grid-template-columns: 1fr 1fr 2fr 1fr 1fr;
  width: 100%;
  height: 40vh;
  flex-shrink: 0;
  transition: grid-template-columns 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.rolunk-hero__cell {
  padding: 1rem;
  overflow: hidden;
  min-height: 0;
}

.rolunk-hero__cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ===========================
   Section Tag (reusable label)
   =========================== */

.rolunk-tag {
  display: inline-block;
  font-family: 'Satoshi', var(--font-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  background: var(--color-black);
  color: var(--color-bg);
  padding: 0.25em 0.7em;
  margin-bottom: var(--space-lg);
}

/* ===========================
   Full-width Image
   =========================== */

.rolunk-image {
  position: relative;
  z-index: 1;
  padding: 1rem;
}

.rolunk-image img {
  width: 100%;
  display: block;
  object-fit: cover;
}

/* ===========================
   About Section (6-col grid: 2fr | 4fr)
   =========================== */

.rolunk-about {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 2fr 4fr;
}

.rolunk-about__tag {
  padding: 1rem;
}

.rolunk-about__intro {
  padding: 1rem;
}

.rolunk-about__intro p {
  font-family: var(--font-primary);
  font-size: clamp(1.6rem, 2.8vw, 2.4rem);
  font-weight: 400;
  line-height: 1.25;
  margin: 0;
}

/* ===========================
   Dark mode transition (triggered by values section)
   =========================== */

body {
  transition: background-color 0.8s ease, color 0.8s ease;
}

body.is-dark {
  background-color: var(--color-black);
  color: var(--color-bg);
}

body.is-dark .bg-lines__line {
  border-right-color: rgba(255, 255, 255, 0.08);
}

.bg-lines.is-hidden {
  opacity: 0;
}

/* ===========================
   Values (hover-interactive list)
   =========================== */

.rolunk-values {
  position: relative;
  z-index: 1;
}

.rolunk-values__heading {
  font-family: var(--font-primary);
  font-size: clamp(3.5rem, 8vw, 8.5rem);
  font-weight: 400;
  line-height: 1.05;
  margin: 0;
  padding: 1rem;
}

.rolunk-values__body {
  display: grid;
  grid-template-columns: 2fr 1fr 3fr;
}

/* Left: description text, switches on hover */
.rolunk-values__desc {
  padding: 1rem;
  position: relative;
  grid-column: 1;
}

/* Middle column: empty spacer */

.rolunk-values__desc p {
  font-family: var(--font-secondary);
  font-size: clamp(1rem, 1.2vw, 1.15rem);
  font-weight: 400;
  line-height: 1.75;
  margin: 0;
  position: absolute;
  left: 1rem;
  right: 1rem;
  pointer-events: none;
  clip-path: inset(0 0 100% 0);
  opacity: 0;
  transform: translateY(0.5rem);
  transition: clip-path 0.6s cubic-bezier(0.25, 0.1, 0.25, 1),
              opacity 0.6s cubic-bezier(0.25, 0.1, 0.25, 1),
              transform 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.rolunk-values__desc p.is-active {
  pointer-events: auto;
  clip-path: inset(0 0 0 0);
  opacity: 1;
  transform: translateY(0);
}

/* Right: numbered value titles */
.rolunk-values__list {
  padding: 1rem;
  grid-column: 3;
}

.rolunk-values__item {
  padding: 0.6rem 0;
  cursor: pointer;
  display: flex;
  align-items: baseline;
  transition: opacity 0.3s ease;
  position: relative;
}

/* Animated top border line */
.rolunk-values__item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: currentColor;
  opacity: 0.2;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.8s cubic-bezier(0.25, 0.1, 0.25, 1),
              left 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* Animated bottom border on last item */
.rolunk-values__item:last-child::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: currentColor;
  opacity: 0.2;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.8s cubic-bezier(0.25, 0.1, 0.25, 1),
              left 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* On hover, extend lines to the left viewport edge with 1rem padding */
.rolunk-values__item:hover::before {
  left: calc(var(--extend-left, 0) + 1rem);
}

.rolunk-values__item:last-child::after {
  left: 0;
}

/* Stagger the line animations */
.rolunk-values__item:nth-child(1)::before { transition-delay: 0s; }
.rolunk-values__item:nth-child(2)::before { transition-delay: 0.15s; }
.rolunk-values__item:nth-child(3)::before { transition-delay: 0.3s; }
.rolunk-values__item:nth-child(4)::before { transition-delay: 0.45s; }
.rolunk-values__item:last-child::after    { transition-delay: 0.6s; }

/* Lines appear when parent reveal is visible */
.reveal-up.is-visible .rolunk-values__item::before,
.reveal-up.is-visible .rolunk-values__item:last-child::after {
  transform: scaleX(1);
}

/* Inactive items are faded */
.rolunk-values__list:hover .rolunk-values__item {
  opacity: 0.25;
}

.rolunk-values__list:hover .rolunk-values__item:hover {
  opacity: 1;
}

.rolunk-values__list:not(:hover) .rolunk-values__item {
  opacity: 1;
}

.rolunk-values__title {
  font-family: 'Satoshi', var(--font-secondary);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 400;
  line-height: 1.15;
  margin: 0;
}

/* Scroll reveal animation */
.reveal-up {
  opacity: 0;
  transform: translateY(2rem);
  transition: opacity 0.8s cubic-bezier(0.25, 0.1, 0.25, 1),
              transform 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.reveal-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===========================
   Team Section — scroll-driven name reveal
   =========================== */

.our-team {
  position: relative;
  z-index: 1;
  height: 400vh;
}

.our-team__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

.our-team__track {
  will-change: transform;
}

.our-team__name-holder {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
  padding: 0;
  height: 20vh;
  opacity: 0.3;
  transition: opacity 0.5s ease;
}

.our-team__name-holder.is-active {
  opacity: 1;
}

.our-team__cell {
  padding: 1rem;
  display: flex;
  align-items: flex-end;
}

.our-team__cell--role {
  grid-column: span 1;
  justify-content: flex-start;
  font-family: 'Satoshi', var(--font-secondary);
  font-size: clamp(0.7rem, 0.85vw, 0.85rem);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.our-team__cell--name {
  grid-column: span 4;
  justify-content: center;
  font-family: var(--font-primary);
  font-size: clamp(3rem, 6vw, 6rem);
  font-weight: 400;
  line-height: 1;
}

.our-team__cell--link {
  grid-column: span 1;
  justify-content: flex-end;
}

.our-team__linkedin {
  font-family: 'Satoshi', var(--font-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  color: inherit;
  border: 1px solid currentColor;
  padding: 0.35em 0.7em;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.our-team__linkedin:hover {
  opacity: 1;
}

.our-team__image {
  height: 0;
  overflow: hidden;
  display: flex;
  justify-content: center;
}

.our-team__image img {
  width: 28%;
  height: 100%;
  object-fit: cover;
  display: block;
}

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

@media (max-width: 768px) {
  /* Hero: simplify image grid */
  .rolunk-hero__images {
    grid-template-columns: 1fr 1fr 1fr;
    height: 30vh;
  }

  .rolunk-hero__cell {
    padding: 0.5rem;
  }

  /* Hide outer cells on mobile to keep it clean */
  .rolunk-hero__cell:first-child,
  .rolunk-hero__cell:last-child {
    display: none;
  }

  .rolunk-about {
    grid-template-columns: 1fr;
  }

  /* Values: stack description above list */
  .rolunk-values__body {
    grid-template-columns: 1fr;
  }

  .rolunk-values__desc {
    position: static;
  }

  .rolunk-values__desc p {
    position: static;
    clip-path: none;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    margin-bottom: 1rem;
  }

  /* Show all descriptions on mobile since hover doesn't work on touch */
  .rolunk-values__desc p:not(:first-child) {
    display: none;
  }

  .rolunk-values__list {
    grid-column: 1;
  }

  /* Disable hover fade on mobile */
  .rolunk-values__list:hover .rolunk-values__item {
    opacity: 1;
  }

  /* Team section: make static, no scroll animation */
  .our-team {
    height: auto;
  }

  .our-team__sticky {
    position: static;
    height: auto;
    overflow: visible;
  }

  .our-team__name-holder {
    grid-template-columns: 1fr 3fr 1fr;
    height: auto;
    padding: 1rem 0;
    opacity: 1;
    border-bottom: 1px solid currentColor;
  }

  .our-team__cell--name {
    grid-column: span 1;
    font-size: clamp(1.5rem, 5vw, 2.5rem);
  }

  .our-team__cell--role {
    grid-column: span 1;
  }

  .our-team__cell--link {
    grid-column: span 1;
  }

  /* Show all images with fixed height on mobile */
  .our-team__image {
    height: auto !important;
    overflow: visible;
  }

  .our-team__image img {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
  }
}

@media (max-width: 480px) {
  .rolunk-hero__line {
    font-size: clamp(1.8rem, 7vw, 2.5rem);
  }

  .rolunk-hero__cell {
    padding: 0.25rem;
  }

  .our-team__name-holder {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .our-team__cell {
    justify-content: center;
  }

  .our-team__cell--name {
    font-size: clamp(1.3rem, 7vw, 2rem);
  }
}
