/* =============================================================================
   THE 60-MINUTE CLINICIAN MBA — BASE STYLES
   Production-ready CSS implementation of the design system

   Usage: Import after design-tokens.css
   @import url('design-tokens.css');
   @import url('base.css');
   ============================================================================= */

/* =============================================================================
   RESET & BASE
   ============================================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  font-family: var(--font-body);
  font-size: var(--body-base-size);
  font-weight: var(--primitive-weight-regular);
  line-height: var(--body-base-leading);
  color: var(--color-text-primary);
  background-color: var(--color-surface-page);
}

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;
}

/* =============================================================================
   TYPOGRAPHY
   ============================================================================= */

h1, .h1 {
  font-family: var(--font-heading);
  font-size: var(--heading-1-size);
  font-weight: var(--heading-1-weight);
  line-height: var(--heading-1-leading);
  color: var(--color-text-navy);
  letter-spacing: var(--primitive-tracking-tight);
  margin-bottom: var(--space-lg);
}

h2, .h2 {
  font-family: var(--font-heading);
  font-size: var(--heading-2-size);
  font-weight: var(--heading-2-weight);
  line-height: var(--heading-2-leading);
  color: var(--color-text-navy);
  margin-bottom: var(--space-md);
}

h3, .h3 {
  font-family: var(--font-heading);
  font-size: var(--heading-3-size);
  font-weight: var(--heading-3-weight);
  line-height: var(--heading-3-leading);
  color: var(--color-text-navy);
  margin-bottom: var(--space-md);
}

h4, .h4 {
  font-family: var(--font-subheading);
  font-size: var(--heading-4-size);
  font-weight: var(--heading-4-weight);
  line-height: var(--heading-4-leading);
  color: var(--color-text-navy);
  margin-bottom: var(--space-sm);
}

p {
  margin-bottom: var(--space-md);
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--color-text-link);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-text-link-hover);
}

strong {
  font-weight: var(--primitive-weight-semibold);
}

em {
  font-style: italic;
}

small {
  font-size: var(--body-sm-size);
}

/* Text Utilities */
.text-lg {
  font-size: var(--body-lg-size);
  line-height: var(--body-lg-leading);
}

.text-sm {
  font-size: var(--body-sm-size);
  line-height: var(--body-sm-leading);
}

.text-xs {
  font-size: var(--body-xs-size);
  line-height: var(--body-xs-leading);
}

.text-accent {
  font-family: var(--font-subheading);
  font-style: italic;
}

.overline {
  display: block;
  font-family: var(--font-heading);
  font-size: var(--primitive-text-xs);
  font-weight: var(--primitive-weight-semibold);
  color: var(--color-gold);
  text-transform: uppercase;
  letter-spacing: var(--primitive-tracking-caps);
  margin-bottom: var(--space-sm);
}

/* =============================================================================
   LAYOUT
   ============================================================================= */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

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

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

.section {
  padding-top: var(--section-padding-y);
  padding-bottom: var(--section-padding-y);
}

.section--sm {
  padding-top: var(--section-padding-y-sm);
  padding-bottom: var(--section-padding-y-sm);
}

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

.section--dark {
  background-color: var(--color-surface-navy);
  color: var(--color-text-inverse);
}

.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4,
.section--dark .h1,
.section--dark .h2,
.section--dark .h3,
.section--dark .h4 {
  color: var(--color-text-inverse);
}

.section--dark a {
  color: var(--color-gold);
}

.section--dark a:hover {
  color: var(--color-gold-light);
}

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

/* Grid */
.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
  .grid--3,
  .grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: 1fr;
  }
}

/* =============================================================================
   BUTTONS
   ============================================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  font-family: var(--button-font-family);
  font-size: var(--primitive-text-base);
  font-weight: var(--button-font-weight);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: var(--primitive-tracking-wide);
  padding: var(--button-padding-md);
  border-radius: var(--button-radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--button-transition);
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(45, 95, 138, 0.3);
}

.btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Primary */
.btn--primary {
  background-color: var(--color-gold);
  border-color: var(--color-gold);
  color: var(--color-navy);
}

.btn--primary:hover {
  background-color: var(--color-gold-dark);
  border-color: var(--color-gold-dark);
  color: white;
  box-shadow: var(--primitive-shadow-gold-md);
}

.btn--primary:active {
  transform: translateY(1px);
}

/* Secondary */
.btn--secondary {
  background-color: transparent;
  border-color: var(--color-navy);
  color: var(--color-navy);
}

.btn--secondary:hover {
  background-color: var(--color-navy);
  color: white;
}

/* Ghost */
.btn--ghost {
  background-color: transparent;
  border-color: white;
  color: white;
}

.btn--ghost:hover {
  background-color: white;
  color: var(--color-navy);
}

/* Sizes */
.btn--sm {
  font-size: var(--primitive-text-sm);
  padding: var(--button-padding-sm);
}

.btn--lg {
  font-size: var(--primitive-text-md);
  padding: var(--button-padding-lg);
}

.btn--block {
  width: 100%;
}

.btn:disabled,
.btn--disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* =============================================================================
   CARDS
   ============================================================================= */

.card {
  background: var(--color-surface-raised);
  border-radius: var(--card-radius);
  padding: var(--card-padding);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.card--elevated {
  box-shadow: var(--card-shadow);
}

.card--elevated:hover {
  box-shadow: var(--card-shadow-hover);
}

.card--feature {
  text-align: center;
  border: 1px solid var(--color-border-default);
}

.card--feature:hover {
  border-color: var(--color-gold);
  box-shadow: var(--primitive-shadow-gold-sm);
  transform: translateY(-4px);
}

.card--highlight {
  background: var(--color-cream);
  border-left: 4px solid var(--color-gold);
  border-radius: 0 var(--card-radius) var(--card-radius) 0;
}

.card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: var(--color-gold-muted);
  border-radius: var(--primitive-radius-lg);
  margin-bottom: var(--space-md);
}

.card__icon svg {
  width: 28px;
  height: 28px;
  color: var(--color-gold-dark);
}

.card__title {
  font-family: var(--font-heading);
  font-size: var(--primitive-text-lg);
  font-weight: var(--primitive-weight-semibold);
  color: var(--color-navy);
  margin-bottom: var(--space-sm);
}

.card__description {
  font-size: var(--primitive-text-base);
  color: var(--color-text-secondary);
  line-height: 1.6;
}

/* =============================================================================
   FORMS
   ============================================================================= */

.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  font-family: var(--font-body);
  font-size: var(--primitive-text-sm);
  font-weight: var(--primitive-weight-semibold);
  color: var(--color-navy);
  margin-bottom: var(--space-sm);
}

.form-input {
  width: 100%;
  padding: var(--input-padding);
  font-family: var(--font-body);
  font-size: var(--primitive-text-base);
  color: var(--color-text-primary);
  background: white;
  border: var(--input-border-width) solid var(--color-border-default);
  border-radius: var(--input-radius);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus {
  outline: none;
  border-color: var(--color-teal);
  box-shadow: var(--input-focus-ring);
}

.form-input::placeholder {
  color: var(--color-text-muted);
}

.form-input--error {
  border-color: var(--color-error);
}

.form-input--error:focus {
  box-shadow: 0 0 0 3px rgba(199, 91, 57, 0.15);
}

textarea.form-input {
  min-height: 120px;
  resize: vertical;
}

.form-hint {
  font-size: var(--primitive-text-sm);
  color: var(--color-text-tertiary);
  margin-top: var(--space-xs);
}

.form-error {
  font-size: var(--primitive-text-sm);
  color: var(--color-error);
  margin-top: var(--space-xs);
}

/* =============================================================================
   SECTION HEADER
   ============================================================================= */

.section-header {
  text-align: center;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--space-2xl);
}

.section-header--left {
  text-align: left;
  margin-left: 0;
}

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

.section-header__subtitle {
  font-family: var(--font-subheading);
  font-size: var(--primitive-text-lg);
  font-style: italic;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-lg);
}

.section-header .gold-line {
  margin-left: auto;
  margin-right: auto;
}

.section-header--left .gold-line {
  margin-left: 0;
}

/* =============================================================================
   GOLD LINE ACCENT
   ============================================================================= */

.gold-line {
  width: var(--gold-line-width);
  height: var(--gold-line-height);
  background-color: var(--color-gold);
}

.gold-line--wide {
  width: 100%;
  height: 2px;
}

.gold-line--center {
  margin-left: auto;
  margin-right: auto;
}

/* =============================================================================
   BLOCKQUOTE
   ============================================================================= */

.quote {
  position: relative;
  background: var(--color-cream);
  border-left: 4px solid var(--color-gold);
  padding: var(--space-xl);
  border-radius: 0 var(--primitive-radius-lg) var(--primitive-radius-lg) 0;
}

.quote::before {
  content: '"';
  position: absolute;
  top: var(--space-md);
  left: var(--space-lg);
  font-family: var(--font-subheading);
  font-size: 4rem;
  color: var(--color-gold-muted);
  line-height: 1;
}

.quote p {
  font-family: var(--font-subheading);
  font-size: var(--primitive-text-lg);
  font-style: italic;
  color: var(--color-navy);
  line-height: 1.6;
  margin-bottom: var(--space-md);
  padding-left: var(--space-xl);
}

.quote__footer {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding-left: var(--space-xl);
}

.quote__author {
  font-family: var(--font-heading);
  font-size: var(--primitive-text-base);
  font-weight: var(--primitive-weight-semibold);
  font-style: normal;
  color: var(--color-navy);
}

.quote__role {
  font-family: var(--font-body);
  font-size: var(--primitive-text-sm);
  color: var(--color-text-secondary);
}

/* =============================================================================
   UTILITIES
   ============================================================================= */

/* Text Alignment */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* Font Weights */
.font-normal { font-weight: var(--primitive-weight-regular); }
.font-medium { font-weight: var(--primitive-weight-medium); }
.font-semibold { font-weight: var(--primitive-weight-semibold); }
.font-bold { font-weight: var(--primitive-weight-bold); }

/* Text Colors */
.text-navy { color: var(--color-navy); }
.text-gold { color: var(--color-gold); }
.text-teal { color: var(--color-teal); }
.text-muted { color: var(--color-text-secondary); }
.text-white { color: white; }

/* Background Colors */
.bg-navy { background-color: var(--color-navy); }
.bg-gold { background-color: var(--color-gold); }
.bg-clinical { background-color: var(--color-clinical); }
.bg-cream { background-color: var(--color-cream); }
.bg-white { background-color: white; }

/* Spacing - Margin Top */
.mt-0 { margin-top: 0; }
.mt-xs { margin-top: var(--space-xs); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }

/* Spacing - Margin Bottom */
.mb-0 { margin-bottom: 0; }
.mb-xs { margin-bottom: var(--space-xs); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }

/* Spacing - Padding Y */
.py-sm { padding-top: var(--space-sm); padding-bottom: var(--space-sm); }
.py-md { padding-top: var(--space-md); padding-bottom: var(--space-md); }
.py-lg { padding-top: var(--space-lg); padding-bottom: var(--space-lg); }
.py-xl { padding-top: var(--space-xl); padding-bottom: var(--space-xl); }

/* Display */
.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }

/* Flex Utilities */
.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.flex-col { flex-direction: column; }
.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); }

/* Width */
.w-full { width: 100%; }
.max-w-content { max-width: var(--container-content); }
.max-w-narrow { max-width: var(--container-narrow); }

/* Screen Reader Only */
.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;
}

/* =============================================================================
   ANIMATIONS
   ============================================================================= */

.animate-fade-in {
  animation: fadeIn 0.5s ease-out forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-stagger > * {
  opacity: 0;
  animation: fadeIn 0.5s ease-out forwards;
}

.animate-stagger > *:nth-child(1) { animation-delay: 0.1s; }
.animate-stagger > *:nth-child(2) { animation-delay: 0.2s; }
.animate-stagger > *:nth-child(3) { animation-delay: 0.3s; }
.animate-stagger > *:nth-child(4) { animation-delay: 0.4s; }
.animate-stagger > *:nth-child(5) { animation-delay: 0.5s; }
.animate-stagger > *:nth-child(6) { animation-delay: 0.6s; }

.hover-lift {
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--primitive-shadow-lg);
}

.hover-underline {
  position: relative;
  text-decoration: none;
}

.hover-underline::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-gold);
  transition: width var(--transition-base);
}

.hover-underline:hover::after {
  width: 100%;
}

/* =============================================================================
   FOCUS STATES
   ============================================================================= */

:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(45, 95, 138, 0.3);
}

/* Buttons and interactive elements have their own focus styles defined inline */

/* =============================================================================
   PRINT STYLES
   ============================================================================= */

@media print {
  .section--dark {
    background: white !important;
    color: black !important;
  }

  .section--dark h1,
  .section--dark h2,
  .section--dark h3 {
    color: black !important;
  }

  .btn {
    border: 1px solid black !important;
  }

  .no-print {
    display: none !important;
  }
}
