:root {
  --primary: #0B2654;
  --secondary: #666;
  --accent: #DF6AA8;
  --light-bg: #fafafa;
  --soft-bg: #D7D0EA;
  --white: #ffffff;
  --border: #e5e5e5;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  
  /* Compact spacing scale */
  --space-xs: .25rem;
  --space-s:  .5rem;
  --space-m:  1rem;
  --space-l:  1.5rem;
  --space-xl: 2rem;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--light-bg);
  color: var(--primary);
  line-height: 1.5;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 16px;
}

/* Hero section with full bleed background */
.hero-section {
  position: relative;
  background-image: url('img/founders_img_desktop.jpg');
  background-size: cover;
  background-position: center 35%;
  background-repeat: no-repeat;
  background-attachment: fixed;
  transform: scaleX(-1);
}

/* Responsive background images */
@media (max-width: 1023px) {
  .hero-section {
    background-image: url('img/founders_img_tablet.jpg');
  }
}

@media (max-width: 767px) {
  .hero-section {
    background-image: url('img/founders_img_mobile.jpg');
    background-attachment: scroll; /* Better performance on mobile */
  }
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, 
    rgba(11, 38, 84, 0.85) 0%,
    rgba(11, 38, 84, 0.65) 30%,
    rgba(11, 38, 84, 0.4) 70%,
    rgba(11, 38, 84, 0.3) 100%),
  linear-gradient(45deg,
    rgba(11, 38, 84, 0.1) 0%,
    rgba(223, 106, 168, 0.05) 50%,
    rgba(11, 38, 84, 0.1) 100%);
  z-index: 1;
}

.hero-section .container {
  position: relative;
  z-index: 2;
  transform: scaleX(-1);
}

/* White card backgrounds for content in hero section */
.hero-section .header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: var(--space-xl);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.hero-section .content-section {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: var(--space-xl);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 1rem;
  flex: 1 0 auto;
  position: relative;
}

/* Reduce top spacing for the white section after hero */
.hero-section + .container {
  padding-top: 0.5rem;
}

/* Reduce spacing in hero main-content */
.hero-section .main-content {
  gap: 1rem 2rem;
}

/* Desktop-specific image alignment */
@media (min-width: 1920px) {
  .hero-section {
    background-position: center 20%;
  }
}

/* Subtle background texture */
.container::before {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  right: -50%;
  bottom: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(223, 106, 168, 0.05) 1px, transparent 0);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: -1;
}

.header {
  text-align: left;
  margin-bottom: var(--space-l);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.logo {
  max-width: 120px;
  width: 100%;
  height: auto;
  flex-shrink: 0;
}

.title-group {
  text-align: left;
}

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

.tagline {
  font-size: 1.3rem;
  color: var(--accent);
  font-weight: 700;
  margin: 0;
  font-style: italic;
}

.main-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas: 
    "copy form"
    "epcheck epcheck";
  gap: 1rem 2rem;
  align-items: start;
}

.content-section {
  grid-area: copy;
}

.form-section {
  grid-area: form;
}

.epcheck-section {
  grid-area: epcheck;
  margin-top: var(--space-m);
}

.description {
  font-size: 1.1rem;
  color: var(--secondary);
  margin: 0 0 1rem 0;
  line-height: 1.5;
  text-align: left;
}

.cta {
  font-size: 1.1rem;
  color: var(--primary);
  font-weight: 600;
  margin: 1rem 0 0 0;
  text-align: left;
}

/* Services preview */
.services-hint {
  margin: 1.5rem 0 0 0;
  padding: 1rem 0;
  border-top: 1px solid rgba(223, 106, 168, 0.1);
}

.services-label {
  font-size: 0.9rem;
  color: var(--secondary);
  margin: 0 0 0.5rem 0;
  font-weight: 500;
}

.services-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.services-tags span {
  background: rgba(223, 106, 168, 0.1);
  color: var(--primary);
  padding: 0.25rem 0.75rem;
  border-radius: 16px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid rgba(223, 106, 168, 0.2);
}

.contact-form {
  background: var(--soft-bg);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: var(--shadow);
  height: fit-content;
}

/* Form disclaimer - subtle */
.form-disclaimer {
  text-align: center;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(11, 38, 84, 0.1);
}

.form-disclaimer small {
  color: var(--secondary);
  font-size: 0.75rem;
  opacity: 0.8;
}

.form-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--primary);
  text-align: center;
}

.form-group {
  margin-bottom: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
  color: var(--primary);
}

.required {
  color: var(--accent);
}

input, textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid rgba(11, 38, 84, 0.2);
  border-radius: 6px;
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  background: var(--white);
}

input:focus, textarea:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 2px rgba(223, 106, 168, 0.1);
}

/* Error message styling */
.error-message {
  display: none;
  color: var(--accent);
  font-size: 0.8rem;
  margin-top: 0.25rem;
  font-weight: 500;
}

.error-message:not(:empty) {
  display: block;
}

/* Input validation states */
input.error, textarea.error {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(223, 106, 168, 0.2);
}

input:invalid, textarea:invalid {
  border-color: var(--accent);
}

input:invalid:not(:focus), textarea:invalid:not(:focus) {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(223, 106, 168, 0.2);
}

textarea {
  resize: vertical;
  min-height: 70px;
}

/* Enhanced submit button with micro-interactions */
.submit-btn {
  background: var(--primary);
  color: var(--white);
  border: none;
  padding: 0.7rem 1.5rem;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.submit-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.6s ease;
}

.submit-btn:hover::before {
  left: 100%;
}

.submit-btn:hover, .submit-btn:focus {
  background: var(--accent);
  transform: translateY(-1px);
}

.submit-btn:active {
  transform: translateY(0);
}

.community-project {
  text-align: center;
  padding: 2rem;
  background: rgba(223, 106, 168, 0.05);
  border-radius: 12px;
  border: 1px solid rgba(223, 106, 168, 0.1);
  box-shadow: var(--shadow);
}

/* Enhanced community project - inline badge */
.community-badge {
  background: rgba(223, 106, 168, 0.15);
  color: var(--accent);
  padding: 0.2rem 0.5rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid rgba(223, 106, 168, 0.3);
  margin-right: 0.5rem;
}

.project-intro {
  font-size: 1rem;
  color: var(--secondary);
  margin: 0 0 0.75rem 0;
  line-height: 1.5;
}

/* Enhanced project link with micro-interactions */
.project-link {
  display: inline-block;
  color: var(--primary);
  text-decoration: none;
  font-size: 1rem;
  line-height: 1.5;
  transition: all 0.2s ease;
  padding: 0.5rem 0;
  position: relative;
}

.project-link::after {
  content: '';
  position: absolute;
  bottom: 0.5rem;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.project-link:hover::after,
.project-link:focus::after {
  width: 100%;
}

.project-link:hover,
.project-link:focus {
  color: var(--accent);
}

.project-link strong {
  color: var(--accent);
  font-weight: 700;
}

.social-section {
  text-align: center;
  margin-top: var(--space-xl);
}

.social-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--primary);
}

.socials {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
}

.social-link {
  color: var(--secondary);
  font-size: 1.5rem;
  transition: all 0.2s ease;
  text-decoration: none;
  padding: 0.5rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.social-link:hover, .social-link:focus {
  color: var(--accent);
  transform: translateY(-1px);
  background: rgba(223, 106, 168, 0.1);
}

.footer {
  text-align: center;
  padding: 1.5rem 1rem 1rem;
  color: var(--secondary);
  font-size: 0.8rem;
  background: var(--light-bg);
  flex-shrink: 0;
}

.acknowledgement {
  margin-bottom: 0.5rem;
  font-style: italic;
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .submit-btn::before,
  .project-link::after {
    display: none;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --primary: #000000;
    --secondary: #333333;
    --border: #666666;
  }
  
  input:focus, textarea:focus {
    border-width: 2px;
  }
}

/* Focus visible for keyboard navigation */
.social-link:focus-visible,
.submit-btn:focus-visible,
input:focus-visible,
textarea:focus-visible,
.project-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Responsive design */
@media (max-width: 1024px) {
  .container {
    max-width: 800px;
    padding: 1.5rem 1rem 1rem;
  }
  
  .main-content {
    gap: 1.5rem 2rem;
  }
  
  .contact-form {
    padding: 1.5rem;
  }

  .community-project {
    padding: 1.5rem;
  }
}

@media (max-width: 768px) {
  .main-content {
    grid-template-columns: 1fr;
    grid-template-areas:
      "copy"
      "form"
      "epcheck";
    gap: 2rem;
  }
  
  .epcheck-section {
    margin-top: 0;
  }
  
  .header {
    text-align: center;
    margin-bottom: 1.5rem;
  }
  
  .header-top {
    justify-content: center;
    margin-bottom: 1rem;
  }
  
  .description,
  .cta {
    text-align: center;
  }
  
  .community-project {
    text-align: center;
    padding: 1.5rem;
  }
  
  .social-section {
    text-align: center;
    margin-top: 2rem;
  }
  
  .socials {
    justify-content: center;
  }

  .services-tags {
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 1rem 0.75rem 0.75rem;
  }
  
  .header-top {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .title-group {
    text-align: center;
  }
  
  .contact-form {
    padding: 1rem;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .logo {
    max-width: 80px;
  }
  
  .socials {
    gap: 1rem;
  }
  
  .description,
  .cta {
    font-size: 0.95rem;
  }
  
  .community-project {
    padding: 1rem;
  }
  
  .project-intro {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
  }
  
  .project-link {
    font-size: 0.9rem;
    padding: 0.25rem 0;
  }
}