/* 
  The Contemporary Mathematics School 
  Design System: Summit Proof
*/

:root {
  /* Color Palette */
  --bg-primary: #F7FAF8;
  --text-primary: #061B3A;
  --brand-primary: #0253A1;
  --brand-secondary: #0664AE;
  --ui-signal: #027BBE;
  --border-color: #D8DDD7;
  --soft-accent: #89B7D7;
  --premium-depth: #553C5F;
  --cta-color: #B85C2A;
  
  /* Typography */
  --font-main: 'Inter', sans-serif;
  
  /* Layout */
  --container-width: 1140px;
  --spacing-sm: 1rem;
  --spacing-md: 2.5rem;
  --spacing-lg: 5rem;
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Typography & Base */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.5rem; }

p { margin-bottom: 1rem; }

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

ul { list-style: none; }

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.8rem;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  font-size: 1rem;
}

.btn-primary {
  background-color: var(--cta-color);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(184, 92, 42, 0.3);
}
.btn-primary:hover {
  background-color: #9B4A1E;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(184, 92, 42, 0.4);
}

.btn-secondary {
  background-color: transparent;
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.3);
}
.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: #FFFFFF;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: rgba(247, 250, 248, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  padding: 1rem 0;
  transition: all var(--transition-fast);
}

.navbar.scrolled {
  padding: 0.75rem 0;
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 10px rgba(6, 27, 58, 0.05);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--brand-primary);
}
.logo i {
  color: var(--ui-signal);
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}
.nav-links a:hover {
  color: var(--brand-primary);
}

.navbar .btn-primary {
  padding: 0.6rem 1.2rem;
  font-size: 0.9rem;
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 90vh;
  background: linear-gradient(135deg, #061B3A 0%, #0253A1 52%, #027BBE 100%);
  color: #FFFFFF;
  padding: 8rem 0 6rem 0; /* padding accounts for navbar offset */
  display: flex;
  align-items: center;
}

.hero-container {
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
  width: 100%;
}

.hero-brand-header {
  width: 100%;
}

.hero-split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  width: 100%;
}

.hero-column {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
}

.hero-column.right-column {
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  padding-left: 4rem;
}

.badge {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.badge-dark {
  background-color: var(--cta-color);
  color: #FFFFFF;
  border: none;
}

.hero-title {
  font-family: var(--font-main);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  color: #FFFFFF;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.hero-brand-header .hero-title {
  color: var(--cta-color);
}

.hero-profile-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 2rem;
  width: 100%;
}

.hero-image-wrapper {
  margin-bottom: 0.75rem;
  width: 100%;
  max-width: 420px;
  height: 260px;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--transition-smooth);
}

.hero-img:hover {
  transform: scale(1.05);
}

.hero-profile-caption {
  font-size: 0.9rem;
  color: var(--soft-accent);
  font-weight: 600;
  text-align: center;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--border-color);
  margin-bottom: 1.5rem;
  font-weight: 300;
  line-height: 1.6;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--soft-accent);
  font-weight: 600;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--border-color);
  margin-bottom: 1.5rem;
  font-weight: 300;
  line-height: 1.65;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/* General Sections */
.section {
  padding: var(--spacing-lg) 0;
}
.bg-light {
  background-color: #FFFFFF;
}

.section-header {
  margin-bottom: var(--spacing-md);
  max-width: 700px;
}
.section-header.text-center {
  margin-left: auto;
  margin-right: auto;
}
.divider {
  height: 3px;
  width: 60px;
  background-color: var(--ui-signal);
  margin: 1rem 0 1.5rem;
}
.text-center .divider {
  margin-left: auto;
  margin-right: auto;
}

/* Mission Section */
.mission-section {
  background-color: var(--bg-primary);
}
.lead-text {
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--brand-primary);
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.5;
}

/* Grid & Cards */
.grid {
  display: grid;
  gap: 2rem;
}
.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.card {
  background-color: #FFFFFF;
  border: 1px solid var(--border-color);
  border-top: 4px solid var(--brand-primary);
  padding: 2.5rem 2rem;
  border-radius: 4px;
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}
.card-hover:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(6, 27, 58, 0.05);
}

.card-icon {
  font-size: 2rem;
  color: var(--ui-signal);
  margin-bottom: 1.5rem;
  height: 60px;
  width: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(2, 123, 190, 0.1);
  border-radius: 50%;
}

/* Olympia Fellows Section */
.olympia-section {
  background-color: var(--text-primary);
  color: #FFFFFF;
  overflow: hidden;
  padding: 6rem 0;
}
.olympia-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.feature-list {
  margin-top: 2rem;
}
.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  font-weight: 600;
}
.feature-list i {
  color: var(--cta-color);
  margin-top: 0.25rem;
}

.olympia-visual {
  position: relative;
  height: 400px;
  background: var(--brand-primary);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.abstract-shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
}
.shape-1 {
  width: 200px;
  height: 200px;
  background: var(--brand-primary);
  top: -50px;
  left: -50px;
}
.shape-2 {
  width: 300px;
  height: 300px;
  background: var(--premium-depth);
  bottom: -100px;
  right: -50px;
}

/* Footer */
.footer {
  background-color: var(--text-primary);
  color: var(--bg-primary);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand h3 {
  color: var(--cta-color);
}

.footer-links h4 {
  color: var(--soft-accent);
  margin-bottom: 1.5rem;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-links ul li {
  margin-bottom: 0.75rem;
}
.footer-links ul li a {
  color: var(--border-color);
}
.footer-links ul li a:hover {
  color: #FFFFFF;
}

.footer-disclaimer {
  padding: 1.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
  color: var(--soft-accent);
}

.footer-bottom {
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

/* Form Section */
.form-section {
  position: relative;
  background-color: #FFFFFF;
}

.form-wrapper {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  background: var(--bg-primary);
  padding: 3rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 30px rgba(6, 27, 58, 0.03);
}

.premium-form {
  transition: opacity var(--transition-fast) ease;
}

.premium-form.hidden {
  opacity: 0;
  pointer-events: none;
  position: absolute;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 600px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.form-group label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.form-group label .required {
  color: var(--cta-color);
}

.form-group input,
.form-group textarea,
.form-group select {
  font-family: var(--font-main);
  font-size: 1rem;
  padding: 0.8rem 1rem;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  background-color: #FFFFFF;
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(6, 27, 58, 0.4);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--ui-signal);
  box-shadow: 0 0 0 3px rgba(2, 123, 190, 0.15);
}

.select-wrapper {
  position: relative;
}

.select-wrapper select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg fill='%23061B3A' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 2rem;
}

#submit-btn {
  display: inline-flex;
  gap: 0.75rem;
  align-items: center;
  min-width: 180px;
}

#submit-btn .spinner {
  display: inline-block;
}

#submit-btn .spinner.hidden {
  display: none;
}

/* Form Feedback */
.form-feedback {
  text-align: center;
  padding: 2rem 0;
  animation: fadeIn 0.5s ease forwards;
}

.form-feedback.hidden {
  display: none;
}

.feedback-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.feedback-icon {
  font-size: 4rem;
  color: var(--ui-signal);
}

.feedback-content h3 {
  font-size: 2rem;
  color: var(--brand-primary);
  margin: 0;
}

.feedback-content p {
  color: var(--text-primary);
  font-size: 1.1rem;
  max-width: 500px;
  line-height: 1.6;
}

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

/* Methodology Section */
.methodology-section {
  background-color: #FFFFFF;
}

.methodology-content {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text-primary);
}

.methodology-content p {
  margin-bottom: 2rem;
}

.methodology-content .lead-paragraph {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--brand-primary);
  line-height: 1.7;
}

.methodology-content p:last-child {
  margin-bottom: 0;
  font-weight: 600;
  border-left: 3px solid var(--ui-signal);
  padding-left: 1.5rem;
}

/* Responsive */
@media (max-width: 992px) {
  .hero-split-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .hero-column.right-column {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 3rem;
  }
  .olympia-wrapper {
    grid-template-columns: 1fr;
  }
  .olympia-visual {
    height: 300px;
  }
}

@media (max-width: 768px) {
  .nav-links, .navbar .btn-primary {
    display: none;
  }
  .hero-ctas {
    flex-direction: column;
    width: 100%;
  }
  .hero-ctas .btn {
    width: 100%;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
