/* ==========================================================================
   THE SEVENTH CENTER GLOBAL BASE STYLES
   Reset · Typography · Layout · Utilities · Accessibility
   ========================================================================== */

/* --------------------------------------------------------------------------
   MODERN CSS RESET
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  height: 100%;
  /* Reserve scrollbar width so content never shifts when overflow:hidden is toggled */
  scrollbar-gutter: stable;
  /* Prevent any element leak from creating a horizontal scrollbar */
  overflow-x: clip;
}

body {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: 1.7;
  color: var(--text-color);
  background-color: var(--third-background-color);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100%;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

ul, ol {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
}

table {
  border-collapse: collapse;
}

/* --------------------------------------------------------------------------
   TYPOGRAPHY SYSTEM
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-heading-color);
  line-height: 1.25;
  font-weight: 600;
}

h1 {
  font-size: clamp(2.25rem, 5.5vw, var(--font-size-6xl));
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.75rem, 3.5vw, var(--font-size-training));
  letter-spacing: -0.015em;
}

h3 {
  font-size: clamp(1.25rem, 2.5vw, var(--font-size-subheading));
  letter-spacing: -0.01em;
}

h4 {
  font-size: clamp(1.1rem, 2vw, var(--font-size-xl));
}

h5 {
  font-size: var(--font-size-lg);
}

h6 {
  font-size: var(--font-size-base);
}

p {
  font-size: var(--font-size-lg);
  color: var(--text-dark-grey);
  line-height: 1.8;
}

strong {
  font-weight: 600;
  color: var(--text-color-two);
}

em {
  font-style: italic;
}

/* --------------------------------------------------------------------------
   FOCUS & ACCESSIBILITY
   -------------------------------------------------------------------------- */
:focus-visible {
  outline: 3px solid var(--primary-color);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
  /* Box-shadow ensures visibility on both light and dark backgrounds (WCAG 2.4.11) */
  box-shadow: 0 0 0 5px rgba(7, 84, 90, 0.18), 0 0 0 3px #fff;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--spacing-lg);
  z-index: 99999;
  background: var(--primary-color);
  color: var(--text-white);
  padding: 0.75rem 1.5rem;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  font-weight: 600;
  font-size: var(--font-size-sm);
  transition: top var(--transition-fast);
  text-decoration: none;
  letter-spacing: 0.025em;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   CONTAINER & LAYOUT
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 4rem);
}

.container--narrow {
  max-width: 860px;
}

.container--wide {
  max-width: 1440px;
}

/* --------------------------------------------------------------------------
   SECTION SYSTEM
   -------------------------------------------------------------------------- */
.section {
  padding-block: clamp(3rem, 6vw, 5rem);
}

.section--lg {
  padding-block: clamp(4rem, 8vw, 7rem);
}

.section--sm {
  padding-block: clamp(2rem, 4vw, 3rem);
}

.section--white {
  background-color: var(--third-background-color);
}

.section--warm {
  background-color: var(--sixth-background-color);
}

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

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

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

.section--primary {
  background-color: var(--primary-color);
}

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

/* --------------------------------------------------------------------------
   SECTION HEADERS
   -------------------------------------------------------------------------- */
.section-header {
  margin-bottom: var(--spacing-4xl);
}

.section-header--center {
  text-align: center;
  max-width: 720px;
  margin-inline: auto;
  margin-bottom: var(--spacing-4xl);
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-family: var(--font-body);
  font-size: var(--font-size-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary-color-one);
  margin-bottom: var(--spacing-md);
}

.section-label::before {
  content: '';
  display: block;
  width: 20px;
  height: 2px;
  background-color: var(--primary-color-two);
  border-radius: var(--radius-pill);
}

.section-title {
  font-family: var(--font-heading);
  color: var(--text-heading-color);
  line-height: 1.2;
  margin-bottom: var(--spacing-xl);
}

.section-title--white {
  color: var(--text-white);
}

.section-desc {
  font-size: var(--font-size-lg);
  color: var(--text-dark-grey);
  line-height: 1.8;
  max-width: 600px;
}

.section-header--center .section-desc {
  margin-inline: auto;
}

.section-desc--white {
  color: rgba(255, 255, 255, 0.82);
}

/* --------------------------------------------------------------------------
   GRID SYSTEM
   -------------------------------------------------------------------------- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-3xl);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-3xl);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-2xl);
}

.grid-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.grid-split--reversed .grid-split__content {
  order: -1;
}

/* --------------------------------------------------------------------------
   FLEX UTILITIES
   -------------------------------------------------------------------------- */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.flex-col { flex-direction: column; }
.align-start { align-items: flex-start; }
.align-center { align-items: center; }

.gap-xs { gap: var(--spacing-xs); }
.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.gap-lg { gap: var(--spacing-lg); }
.gap-xl { gap: var(--spacing-xl); }
.gap-2xl { gap: var(--spacing-2xl); }
.gap-3xl { gap: var(--spacing-3xl); }

/* --------------------------------------------------------------------------
   TEXT UTILITIES
   -------------------------------------------------------------------------- */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-primary { color: var(--primary-color); }
.text-white { color: var(--text-white) !important; }
.text-muted { color: var(--text-muted); }
.text-dark { color: var(--text-heading-color); }
.text-sm { font-size: var(--font-size-sm); }
.text-lg { font-size: var(--font-size-lg); }
.text-xl { font-size: var(--font-size-xl); }
.font-heading { font-family: var(--font-heading); }
.font-serif { font-family: var(--font-heading); }

/* --------------------------------------------------------------------------
   SPACING UTILITIES
   -------------------------------------------------------------------------- */
.mt-auto { margin-top: auto; }
.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.mb-xl { margin-bottom: var(--spacing-xl); }
.mb-2xl { margin-bottom: var(--spacing-2xl); }
.mb-3xl { margin-bottom: var(--spacing-3xl); }
.mt-lg { margin-top: var(--spacing-lg); }
.mt-xl { margin-top: var(--spacing-xl); }
.mt-2xl { margin-top: var(--spacing-2xl); }
.mt-3xl { margin-top: var(--spacing-3xl); }
.pt-0 { padding-top: 0 !important; }

/* --------------------------------------------------------------------------
   IMAGE UTILITIES
   -------------------------------------------------------------------------- */
.img-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.img-round {
  border-radius: var(--radius-4xl);
  overflow: hidden;
}

.img-circle {
  border-radius: var(--radius-circle);
  overflow: hidden;
}

.aspect-ratio-16-9 {
  position: relative;
  padding-bottom: 56.25%;
  overflow: hidden;
}

.aspect-ratio-4-3 {
  position: relative;
  padding-bottom: 75%;
  overflow: hidden;
}

.aspect-ratio-3-2 {
  position: relative;
  padding-bottom: 66.67%;
  overflow: hidden;
}

.aspect-ratio-1-1 {
  position: relative;
  padding-bottom: 100%;
  overflow: hidden;
}

.aspect-ratio-16-9 > *, 
.aspect-ratio-4-3 > *, 
.aspect-ratio-3-2 > *,
.aspect-ratio-1-1 > * {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --------------------------------------------------------------------------
   BREADCRUMB
   -------------------------------------------------------------------------- */
.breadcrumb {
  padding-block: var(--spacing-xl);
  border-bottom: 1px solid var(--border-bottom);
  background: var(--third-background-color);
}

.breadcrumb__list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--spacing-xs);
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

.breadcrumb__list li {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.breadcrumb__list li:not(:last-child)::after {
  content: '/';
  color: var(--text-color-three);
  margin-left: var(--spacing-xs);
}

.breadcrumb__list a {
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.breadcrumb__list a:hover {
  color: var(--primary-color);
}

.breadcrumb__list li:last-child span {
  color: var(--primary-color);
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   FADE-IN ANIMATIONS (triggered by Intersection Observer)
   -------------------------------------------------------------------------- */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.fade-up.in-view {
  opacity: 1;
  transform: translateY(0);
}

.fade-up--d1 { transition-delay: 0.1s; }
.fade-up--d2 { transition-delay: 0.2s; }
.fade-up--d3 { transition-delay: 0.3s; }
.fade-up--d4 { transition-delay: 0.4s; }
.fade-up--d5 { transition-delay: 0.5s; }

/* --------------------------------------------------------------------------
   SCROLLBAR STYLING (Webkit)
   -------------------------------------------------------------------------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--secondary-background-color); }
::-webkit-scrollbar-thumb { background: var(--primary-color-two); border-radius: var(--radius-pill); }
::-webkit-scrollbar-thumb:hover { background: var(--primary-color); }

/* --------------------------------------------------------------------------
   SELECTION
   -------------------------------------------------------------------------- */
::selection {
  background-color: var(--fifth-background-color);
  color: var(--primary-color);
}

/* --------------------------------------------------------------------------
   PRINT STYLES
   -------------------------------------------------------------------------- */
@media print {
  .site-header,
  .site-footer,
  .mobile-menu,
  .mobile-overlay,
  .skip-link {
    display: none !important;
  }
  body {
    font-size: 12pt;
    color: #000;
  }
  a::after {
    content: ' (' attr(href) ')';
    font-size: 0.8em;
    color: #666;
  }
}

/* --------------------------------------------------------------------------
   RESPONSIVE BREAKPOINTS
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-split { grid-template-columns: 1fr; gap: var(--spacing-3xl); }
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3,
  .grid-4 { grid-template-columns: 1fr; }
  
  .grid-split--reversed .grid-split__content {
    order: 0;
  }
  
  .section-header--center {
    text-align: left;
  }
  
  .section-header--center .section-desc {
    margin-inline: 0;
  }
  
  .section-header--center .section-label {
    margin-inline: 0;
  }
}
