/* ============================================================
   SECTION — content sections, two-column layout, media, index
   ============================================================ */

/* ----------------------------------------------------------
   SECTION BLOCK
   ---------------------------------------------------------- */

.section-block {
  display: flex;
  flex-direction: column;
  gap: var(--inner-gap);
}

/* ----------------------------------------------------------
   SECTION HEADER — two-column: label + content
   ---------------------------------------------------------- */

.section-header {
  display: flex;
  gap: var(--col-gap);
  align-items: flex-start;
  border-top: 1px solid var(--color-border);
}

/* ----------------------------------------------------------
   SECTION LABEL — left column, mono, uppercase
   ---------------------------------------------------------- */

.section-label {
  flex: 0 0 var(--label-col);
  height: 56px;
  padding: 24px 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
}

.section-label span {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--text-label);
  line-height: var(--lh-label);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--color-black);
}

/* ----------------------------------------------------------
   SECTION CONTENT — right column
   ---------------------------------------------------------- */

.section-content {
  flex: 1;
  min-width: 0;
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  gap: var(--heading-body-gap);
}

/* Sub-section headers (h3): section-label--spacer sibling gets no top padding */
.section-label--spacer ~ .section-content {
  padding-top: 0;
}

/* Body content group: para + spec-grid + CTA — 48px inner gap */
.body-content-group {
  display: flex;
  flex-direction: column;
  gap: var(--inner-gap);
}

/* ----------------------------------------------------------
   MEDIA BLOCK
   ---------------------------------------------------------- */

.media-block {
  width: 100%;
  aspect-ratio: 933 / 453;
  overflow: hidden;
  display: block;
}

.media-block img,
.media-block video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ----------------------------------------------------------
   INDEX SECTION
   ---------------------------------------------------------- */

.index-section {
  display: flex;
  flex-direction: column;
  gap: var(--index-gap);
}

.index-heading-row {
  display: flex;
  gap: var(--col-gap);
  align-items: center;
}

.index-heading-spacer {
  flex: 0 0 var(--label-col);
  height: 56px;
}

/* ----------------------------------------------------------
   INDEX TABLE
   ---------------------------------------------------------- */

.index-table {
  display: flex;
  flex-direction: column;
}

.index-row {
  display: flex;
  gap: var(--col-gap);
  align-items: flex-start;
  border-top: 1px solid var(--color-border);
  padding-top: var(--sub-gap);
}

.index-row__category {
  flex: 0 0 var(--label-col);
  font-family: var(--font-beausite);
  font-weight: 400;
  font-size: var(--text-body);
  line-height: var(--lh-body);
  letter-spacing: var(--ls-body);
}

.index-row__items {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.index-subitem {
  display: flex;
  align-items: center;
  padding: var(--sub-gap) 0;
  border-bottom: 1px solid var(--color-border-light);
  font-family: var(--font-beausite);
  font-weight: 400;
  font-size: var(--text-body);
  line-height: var(--lh-body);
  letter-spacing: var(--ls-body);
}

.index-subitem:first-child {
  padding-top: 0;
}

.index-subitem:last-child {
  border-bottom: none;
}

/* ----------------------------------------------------------
   1000px (ranged: does not affect 1200+)
   ---------------------------------------------------------- */

/* CTA after body text: net 48px gap at desktop (section-content gap is 80px; offset by -32px) */
@media (min-width: 1000px) {
  .section-content > .cta-tertiary,
  .section-content > button.cta-tertiary {
    margin-top: calc(var(--inner-gap) - var(--heading-body-gap));
  }
}

@media (min-width: 1000px) and (max-width: 1199px) {
  .section-label,
  .typeset-spec-label__left {
    flex: 0 0 148px;
  }

  .index-heading-spacer {
    flex: 0 0 148px;
  }

  .index-row__category {
    flex: 0 0 148px;
  }

  .media-block {
    aspect-ratio: 640 / 453;
  }
}

/* ----------------------------------------------------------
   1200px (ranged: does not affect 1440+)
   ---------------------------------------------------------- */

@media (min-width: 1200px) and (max-width: 1439px) {
  .section-label,
  .typeset-spec-label__left {
    flex: 0 0 181px;
  }

  .index-heading-spacer {
    flex: 0 0 181px;
  }

  .index-row__category {
    flex: 0 0 181px;
  }

  .media-block {
    aspect-ratio: 773 / 453;
  }
}

/* ----------------------------------------------------------
   1920px
   ---------------------------------------------------------- */

@media (min-width: 1920px) {
  .section-label,
  .typeset-spec-label__left {
    flex: 0 0 459px;
  }

  .section-label span {
    font-size: 17px;
  }

  .index-heading-spacer {
    flex: 0 0 459px;
  }

  .index-row__category {
    flex: 0 0 459px;
    font-size: 20px;
    letter-spacing: -0.6px;
  }

  .index-subitem {
    font-size: 20px;
    letter-spacing: -0.6px;
  }

  .media-block {
    aspect-ratio: 1253 / 609;
  }
}

/* ----------------------------------------------------------
   TABLET (441px – 999px)
   ---------------------------------------------------------- */

@media (max-width: 999px) {

  /* Label col: ~32% of content width matches Figma at 768, 834, 900px */
  .section-label,
  .typeset-spec-label__left {
    flex: 0 0 32%;
  }

  .index-heading-spacer {
    flex: 0 0 32%;
  }

  .index-row__category {
    flex: 0 0 32%;
  }

  /* Fixed height matches Figma's 453px image height across all tablet widths */
  .media-block {
    aspect-ratio: auto;
    height: 453px;
  }
}

/* ----------------------------------------------------------
   TABLET-ONLY (ranged: does not affect mobile)
   ---------------------------------------------------------- */

@media (min-width: 441px) and (max-width: 999px) {

  /* Initial 16px gap below nav bar — scoped to first section only,
     so images within sections get no extra spacing */
  .section-block:first-child {
    margin-top: 16px;
  }
}

/* ----------------------------------------------------------
   MOBILE (≤ 440px)
   ---------------------------------------------------------- */

@media (max-width: 440px) {

  .section-block {
    gap: 0;
  }

  .section-header {
    flex-direction: column;
    gap: 0;
    border-top: none;
    padding: 16px 16px 0; /* 16px top + 16px side margins for the full intro block */
  }

  /* Sections 02+ start with border flush to top — no preceding white space */
  .section-block + .section-block .section-header {
    padding-top: 0;
  }

  .section-label {
    flex: none;
    width: 100%; /* full width inside the padded parent */
    margin: 0;
    height: auto;
    padding: 16px 0 0;
    border-top: 1px solid var(--color-border);
    align-items: flex-start;
  }

  /* Empty spacer labels (sub-section headers with no text) */
  .section-label--spacer {
    display: none;
  }

  .section-label span {
    font-size: 14px;
    line-height: 1.2;
  }

  .section-content {
    padding: 0; /* parent section-header provides the 16px horizontal margin */
    margin-top: 48px;
    gap: 28px;
  }

  .body-content-group {
    gap: 28px;
  }

  .heading-display {
    font-size: 40px;
    line-height: 1;
    letter-spacing: -1.6px;
  }

  .heading-h2 {
    font-size: 40px;
    line-height: 1;
    letter-spacing: -1.6px;
  }

  .heading-h3 {
    font-size: 32px;
    letter-spacing: -1.28px;
  }

  .media-block {
    aspect-ratio: 361 / 464;
    width: calc(100% - 32px);
    margin: 40px auto 0;
  }

  /* Section 02 image: left-biased crop to match Figma's left-[-24.15%] positioning */
  #about .media-block img {
    object-position: left center;
  }

  .index-section {
    padding: 0 16px;
    gap: 28px;
    margin-top: 40px;
  }

  .index-heading-row {
    flex-direction: column;
    gap: 0;
    align-items: flex-start;
  }

  .index-heading-spacer {
    display: none;
  }

  .index-row {
    gap: 0;
    justify-content: space-between;
  }

  .index-row__category {
    flex: 0 0 41%;
    min-width: 0;
  }

  .index-row__items {
    flex: 0 0 59%;
    min-width: 0;
  }
}
