:root {
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 80px;
  --space-10: 96px;
  --space-11: 128px;
  --space-gutter: 64px;
  --space-section-compact: var(--space-8);
  --space-section-default: var(--space-10);
  --space-section-feature: var(--space-11);
  --page: min(1320px, calc(100vw - (var(--space-gutter) * 2)));
  --shell: min(1320px, calc(100vw - (var(--space-gutter) * 2)));
}

.page-section,
main > section:not(.opening) {
  max-width: none;
}

.opening-inner {
  width: var(--page);
  max-width: none;
}

/* Homepage: one deliberate rhythm from the hero through the final callout. */
.page-thomas-home .brand-story {
  margin-top: var(--space-section-feature);
}

.page-thomas-home .development-path,
.page-thomas-home .ecosystem {
  padding-top: var(--space-section-feature);
  padding-bottom: var(--space-section-feature);
}

.page-thomas-home .capability,
.page-thomas-home .investment,
.page-thomas-home .featured-projects,
.page-thomas-home .news {
  padding-top: var(--space-section-default);
  padding-bottom: var(--space-section-default);
}

.page-thomas-home .callout {
  padding-top: var(--space-section-compact);
  padding-bottom: var(--space-section-compact);
}

/* Semiconductor: generous editorial sections with compact supporting breaks. */
.page-bandan .overview-copy {
  padding-top: var(--space-section-feature);
  padding-bottom: var(--space-section-feature);
}

.page-bandan .pipeline,
.page-bandan .products,
.page-bandan .plasma-copy,
.page-bandan .vision-media,
.page-bandan .vision-copy,
.page-bandan .partnership {
  padding-top: var(--space-section-default);
  padding-bottom: var(--space-section-default);
}

.page-bandan .technology-quote {
  padding-top: var(--space-section-compact);
  padding-bottom: var(--space-section-compact);
}

/* Real estate: measured spacing around immersive media and project sections. */
.page-batdongsan .philosophy-media,
.page-batdongsan .philosophy-copy,
.page-batdongsan .segments,
.page-batdongsan .projects,
.page-batdongsan .capability,
.page-batdongsan .contact {
  padding-top: var(--space-section-default);
  padding-bottom: var(--space-section-default);
}

/* Minerals: consistent pacing through the industrial value chain. */
.page-khoangsan .overview-copy,
.page-khoangsan .pillars,
.page-khoangsan .processing,
.page-khoangsan .products,
.page-khoangsan .partnership {
  padding-top: var(--space-section-default);
  padding-bottom: var(--space-section-default);
}

/* Petroleum: equal breathing room for pillars, projects, safety and contact. */
.page-xangdau .overview-copy,
.page-xangdau .core-pillars,
.page-xangdau .featured-projects,
.page-xangdau .safety,
.page-xangdau .partnership {
  padding-top: var(--space-section-default);
  padding-bottom: var(--space-section-default);
}

/* AI and media: the most editorial page uses the feature interval throughout. */
.page-aitruyenthong .strategy,
.page-aitruyenthong .ai-content,
.page-aitruyenthong .media-section,
.page-aitruyenthong .applications,
.page-aitruyenthong .contact {
  padding-top: var(--space-section-feature);
  padding-bottom: var(--space-section-feature);
}

/* M&A: restrained, boardroom-like rhythm across each strategic module. */
.page-muasapnhap .overview-copy,
.page-muasapnhap .strategies,
.page-muasapnhap .governance-top,
.page-muasapnhap .target-sectors,
.page-muasapnhap .investment-portal {
  padding-top: var(--space-section-default);
  padding-bottom: var(--space-section-default);
}

@media (max-width: 1024px) {
  :root {
    --space-gutter: 32px;
    --space-section-compact: var(--space-7);
    --space-section-default: var(--space-9);
    --space-section-feature: var(--space-10);
    --page: min(960px, calc(100vw - (var(--space-gutter) * 2)));
    --shell: min(960px, calc(100vw - (var(--space-gutter) * 2)));
  }
}

@media (max-width: 620px) {
  :root {
    --space-gutter: 20px;
    --space-section-compact: var(--space-7);
    --space-section-default: var(--space-8);
    --space-section-feature: var(--space-9);
    --page: calc(100vw - (var(--space-gutter) * 2));
    --shell: calc(100vw - (var(--space-gutter) * 2));
  }
}
