/*
 * About Us redesign (/about), loaded after style_index_min.css. Every rule is scoped to main.sd-about.
 * Dark hero as the other redesigned dark panels, then the company timeline: dates on one side, events in
 * cards on the other, alternating. While scrolling, the green line fills and each step appears
 * (about_timeline.js); without the script or with reduced motion everything is shown at once.
 */

/* ------------------------------------------------------------------ Tokens */

.sd-about {
  --sd-text: #1B2333;
  --sd-muted: #5F6A7D;
  --sd-ground: #F2F4F7;
  --sd-card: #FFFFFF;
  --sd-line: #D9DFE7;
  --sd-navy: #111827;
  --sd-green: #50D878;
  --sd-green-text: #157A43;
  --sd-tl-dot: 3.25rem;
  --sd-tl-gap: 2.5rem;
  --sd-tl-progress: 0px;
  display: flow-root;
  background: var(--sd-ground);
  /* Steps that slide in from the side must not widen the page on phones */
  overflow-x: clip;
}

/* style_index_min.css gives every section a 100px bottom margin; spacing here is set per block */
.sd-about section {
  margin-bottom: 0;
}

/* ------------------------------------------------------------------ Hero */

.sd-about-hero {
  position: relative;
  overflow: hidden;
  padding: 4.5rem 0 5rem;
  background-color: var(--sd-navy);
  background-image:
    radial-gradient(ellipse 50% 90% at 50% 0%, rgba(80, 216, 120, 0.16) 0%, transparent 70%),
    radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 100% 100%, 22px 22px;
}

.sd-about-hero::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(80, 216, 120, 0.55) 50%, transparent 100%);
}

.sd-about-hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

/* Rocket in a white circle, slowly floating */
.sd-about-hero-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 0 0 8px rgba(80, 216, 120, 0.15), 0 16px 32px -12px rgba(0, 0, 0, 0.6);
  animation: sd-about-float 4s ease-in-out infinite;
}

@keyframes sd-about-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.sd-about-title {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -1px;
  color: #FFFFFF;
}

.sd-about-lead {
  margin: 0;
  max-width: 36rem;
  font-size: 1.125rem;
  line-height: 1.55;
  color: #C9D2E0;
  text-wrap: balance;
}

/* ------------------------------------------------------------------ Timeline */

.sd-about-story {
  position: relative;
  padding: 2.5rem 0 5rem;
}

.sd-timeline {
  position: relative;
  max-width: 62rem;
  margin: 0 auto;
  padding: 2.5rem 0;
  list-style: none;
}

/* Grey track down the middle and the green fill that grows while scrolling */
.sd-timeline::before,
.sd-timeline::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 4px;
  margin-left: -2px;
  border-radius: 4px;
}

.sd-timeline::before {
  bottom: 0;
  background: var(--sd-line);
}

.sd-timeline::after {
  height: var(--sd-tl-progress);
  background: linear-gradient(180deg, rgba(80, 216, 120, 0) 0%, var(--sd-green) 6rem);
  box-shadow: 0 0 12px rgba(80, 216, 120, 0.6);
}

/* Each step: card | dot | date, mirrored on every other step */
.sd-tl-item {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--sd-tl-dot) minmax(0, 1fr);
  grid-template-areas: "card dot date";
  column-gap: var(--sd-tl-gap);
  align-items: center;
}

.sd-tl-item + .sd-tl-item {
  margin-top: 1.5rem;
}

.sd-tl-item:nth-child(even) {
  grid-template-areas: "date dot card";
}

.sd-tl-card { grid-area: card; }
.sd-tl-dot { grid-area: dot; }
.sd-tl-date { grid-area: date; }

/* Date: large year, month in green */
.sd-tl-date {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.sd-tl-item:nth-child(even) .sd-tl-date {
  align-items: flex-end;
  text-align: right;
}

.sd-tl-year {
  font-size: 2.25rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--sd-text);
}

.sd-tl-month {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sd-green-text);
}

/* Dot on the line with the step icon; turns green when the step is reached */
.sd-tl-dot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--sd-tl-dot);
  height: var(--sd-tl-dot);
  border: 4px solid var(--sd-ground);
  border-radius: 50%;
  background: var(--sd-green);
  color: var(--sd-navy);
  font-size: 1.125rem;
  box-shadow: 0 0 0 4px rgba(80, 216, 120, 0.25);
}

/* Event card with a small pointer towards the line */
.sd-tl-card {
  position: relative;
  padding: 1.375rem 1.5rem;
  border: 1px solid #E3E8EF;
  border-radius: 1rem;
  background: var(--sd-card);
  box-shadow: 0 1px 2px rgba(27, 35, 51, 0.06), 0 16px 32px -20px rgba(27, 35, 51, 0.4);
  transition: transform .3s ease, box-shadow .3s ease;
}

.sd-tl-card::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -7px;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  border-top: 1px solid #E3E8EF;
  border-right: 1px solid #E3E8EF;
  background: inherit;
  transform: rotate(45deg);
}

.sd-tl-item:nth-child(even) .sd-tl-card::after {
  right: auto;
  left: -7px;
  transform: rotate(-135deg);
}

.sd-tl-item:nth-child(odd) .sd-tl-card {
  text-align: right;
}

.sd-tl-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 2px 4px rgba(27, 35, 51, 0.06), 0 24px 40px -20px rgba(27, 35, 51, 0.5);
}

.sd-tl-card h4 {
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.35;
  font-weight: 800;
  letter-spacing: -0.2px;
  color: var(--sd-text);
}

.sd-tl-card p {
  margin: 0.5rem 0 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--sd-muted);
}

/* Last step (Founded!): dark card, larger glowing dot */
.sd-tl-item--highlight .sd-tl-card {
  border-color: var(--sd-navy);
  background: var(--sd-navy);
  background-image: radial-gradient(ellipse 80% 120% at 100% 0%, rgba(80, 216, 120, 0.22) 0%, transparent 70%);
}

.sd-tl-item--highlight .sd-tl-card::after {
  border-color: var(--sd-navy);
  background: var(--sd-navy);
}

.sd-tl-item--highlight .sd-tl-card h4 {
  font-size: 1.375rem;
  color: #FFFFFF;
}

.sd-tl-item--highlight .sd-tl-card p {
  color: #C9D2E0;
}

.sd-tl-item--highlight .sd-tl-dot {
  box-shadow: 0 0 0 6px rgba(80, 216, 120, 0.3), 0 0 24px rgba(80, 216, 120, 0.7);
}

/* ------------------------------------------------------------------ Scroll animation (about_timeline.js) */

/* Before a step is reached: grey dot, card and date waiting off to their side */
.sd-timeline--animated .sd-tl-item .sd-tl-dot {
  background: var(--sd-card);
  color: #9AA5B5;
  box-shadow: 0 0 0 4px rgba(27, 35, 51, 0.06);
  transform: scale(0.8);
  transition: background-color .4s ease, color .4s ease, box-shadow .4s ease, transform .5s cubic-bezier(.3, 1.6, .5, 1);
}

.sd-timeline--animated .sd-tl-item .sd-tl-card,
.sd-timeline--animated .sd-tl-item .sd-tl-date {
  opacity: 0;
  transition: opacity .6s ease, transform .7s cubic-bezier(.2, .8, .2, 1);
}

.sd-timeline--animated .sd-tl-item:nth-child(odd) .sd-tl-card,
.sd-timeline--animated .sd-tl-item:nth-child(even) .sd-tl-date {
  transform: translateX(-3rem);
}

.sd-timeline--animated .sd-tl-item:nth-child(even) .sd-tl-card,
.sd-timeline--animated .sd-tl-item:nth-child(odd) .sd-tl-date {
  transform: translateX(3rem);
}

/* Step reached: the dot pops green, the card and the date slide in */
.sd-timeline--animated .sd-tl-item.is-visible .sd-tl-dot {
  background: var(--sd-green);
  color: var(--sd-navy);
  box-shadow: 0 0 0 4px rgba(80, 216, 120, 0.25);
  transform: none;
}

.sd-timeline--animated .sd-tl-item--highlight.is-visible .sd-tl-dot {
  box-shadow: 0 0 0 6px rgba(80, 216, 120, 0.3), 0 0 24px rgba(80, 216, 120, 0.7);
}

.sd-timeline--animated .sd-tl-item.is-visible .sd-tl-card,
.sd-timeline--animated .sd-tl-item.is-visible .sd-tl-date {
  opacity: 1;
  transform: none;
}

.sd-timeline--animated .sd-tl-item.is-visible .sd-tl-date {
  transition-delay: .12s;
}

/* ------------------------------------------------------------------ Phones: line on the left, date above the card */

@media (max-width: 767.98px) {
  .sd-about {
    --sd-tl-dot: 2.75rem;
    --sd-tl-gap: 1rem;
  }

  .sd-about-hero {
    padding: 3rem 0 3.5rem;
  }

  .sd-about-story {
    padding-top: 1.5rem;
  }

  .sd-about-lead {
    font-size: 1rem;
  }

  .sd-timeline {
    padding: 1.5rem 0;
  }

  .sd-timeline::before,
  .sd-timeline::after {
    left: calc(var(--sd-tl-dot) / 2);
  }

  .sd-tl-item,
  .sd-tl-item:nth-child(even) {
    grid-template-columns: var(--sd-tl-dot) minmax(0, 1fr);
    grid-template-areas:
      "dot date"
      ". card";
    row-gap: 0.625rem;
  }

  .sd-tl-item:nth-child(even) .sd-tl-date {
    align-items: flex-start;
    text-align: left;
  }

  .sd-tl-item:nth-child(odd) .sd-tl-card {
    text-align: left;
  }

  /* Pointer always towards the line on the left */
  .sd-tl-card::after,
  .sd-tl-item:nth-child(even) .sd-tl-card::after {
    top: 1.375rem;
    right: auto;
    left: -7px;
    margin-top: 0;
    transform: rotate(-135deg);
  }

  .sd-tl-year {
    font-size: 1.75rem;
  }

  .sd-tl-card {
    padding: 1.125rem 1.25rem;
  }

  /* Everything slides in from the right on phones */
  .sd-timeline--animated .sd-tl-item:nth-child(n) .sd-tl-card,
  .sd-timeline--animated .sd-tl-item:nth-child(n) .sd-tl-date {
    transform: translateX(1.5rem);
  }

  .sd-timeline--animated .sd-tl-item.is-visible .sd-tl-card,
  .sd-timeline--animated .sd-tl-item.is-visible .sd-tl-date {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sd-about-hero-icon {
    animation: none;
  }

  .sd-tl-card {
    transition: none;
  }

  .sd-tl-card:hover {
    transform: none;
  }
}
