/* ============================================
   CTAT Ingeniería S.A.S. — Base Styles
   Reset + Global Typography + Utilities
   ============================================ */

/* ── Modern Reset ── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: var(--navbar-height);
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-body);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-tight);
  color: var(--text-primary);
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }

p {
  color: var(--text-secondary);
  line-height: var(--lh-body);
  max-width: 72ch;
}

a {
  color: var(--accent-teal);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

a:hover {
  color: var(--accent-teal-light);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: none;
  outline: none;
  background: none;
}

button {
  cursor: pointer;
}

/* ── Selection ── */
::selection {
  background-color: rgba(14, 165, 233, 0.30);
  color: var(--text-primary);
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f0f7ff;
}

::-webkit-scrollbar-thumb {
  background: #bae6fd;
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: #7dd3fc;
}

/* ── Layout Utilities ── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.container--narrow {
  max-width: var(--container-narrow);
}

.container--wide {
  max-width: var(--container-wide);
}

.section {
  padding-top: var(--space-section);
  padding-bottom: var(--space-section);
  position: relative;
}

.section--alt {
  background-color: var(--bg-secondary);
}

.section--dark {
  background-color: var(--bg-tertiary);
}

/* ── Text Utilities ── */
.text-gradient {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-accent {
  color: var(--accent-teal);
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-uppercase {
  text-transform: uppercase;
  letter-spacing: var(--ls-wider);
}

.text-mono {
  font-family: var(--font-mono);
}

/* ── Flex/Grid Utilities ── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }
.gap-2xl { gap: var(--space-2xl); }

/* ── Accessibility ── */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  padding: var(--space-sm) var(--space-md);
  background: var(--accent-teal);
  color: var(--text-inverse);
  z-index: var(--z-toast);
  transition: top var(--duration-fast);
}

.skip-link:focus {
  top: 0;
}

/* ── Section Header ── */
.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto var(--space-3xl);
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-md);
  background: rgba(14, 165, 233, 0.08);
  border: 1px solid rgba(14, 165, 233, 0.20);
  border-radius: var(--radius-full);
  font-size: var(--fs-badge);
  font-weight: var(--fw-medium);
  color: var(--accent-teal);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  margin-bottom: var(--space-lg);
}

.section-badge .material-symbols-outlined {
  font-size: 18px;
}

.section-title {
  margin-bottom: var(--space-md);
}

.section-subtitle {
  font-size: var(--fs-body-lg);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.section-line {
  width: 60px;
  height: 3px;
  background: var(--gradient-teal);
  border-radius: var(--radius-full);
  margin: var(--space-lg) auto 0;
  transition: width var(--duration-slow) var(--ease-out);
}

.section-header.revealed .section-line {
  width: 120px;
}

/* ── Responsive ── */
@media (max-width: 767px) {
  .hide-mobile { display: none !important; }
  
  .section-header {
    margin-bottom: var(--space-2xl);
  }
}

@media (min-width: 768px) {
  .hide-desktop { display: none !important; }
}
