/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Nunito:wght@600;700;800&display=swap');

:root {
  /* Brand Colors */
  --color-primary: #D97B3A;
  /* Warm Ochre */
  --color-primary-dark: #C46829;
  --color-secondary: #2B5F7F;
  /* Lake Blue */
  --color-secondary-light: #4A7A9D;

  /* Neutral Colors (Light Mode) */
  --color-text: #1F2937;
  /* Gray 800 */
  --color-text-muted: #4B5563;
  /* Gray 600 */
  --color-background: #FFFFFF;
  --color-surface: #F3F4F6;
  /* Gray 100 */
  --color-border: #E5E7EB;
  /* Gray 200 */

  /* Spacing */
  --spacing-xs: 0.5rem;
  /* 8px */
  --spacing-sm: 1rem;
  /* 16px */
  --spacing-md: 1.5rem;
  /* 24px */
  --spacing-lg: 2rem;
  /* 32px */
  --spacing-xl: 4rem;
  /* 64px */

  /* Typography */
  --font-heading: 'Nunito', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

  /* Border Radius */
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  --radius-full: 9999px;
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
  :root {
    --color-text: #F9FAFB;
    /* Gray 50 */
    --color-text-muted: #9CA3AF;
    /* Gray 400 */
    --color-background: #111827;
    /* Gray 900 */
    --color-surface: #1F2937;
    /* Gray 800 */
    --color-border: #374151;
    /* Gray 700 */

    /* Adjust Secondary for contrast */
    --color-secondary: #4A7A9D;
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-background);
  line-height: 1.5;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
  margin-bottom: var(--spacing-sm);
}

a {
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s;
}

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

/* Utility Classes */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  transition: all 0.2s ease;
  font-family: var(--font-heading);
  cursor: pointer;
  border: none;
}

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

.btn-primary:hover {
  background-color: var(--color-primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: var(--color-surface);
  color: var(--color-text);
}

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

.section {
  padding: var(--spacing-xl) 0;
  scroll-margin-top: 100px;
  /* Header height (80px) + 20px buffer */
}

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  z-index: 100;
  transition: background-color 0.3s ease;
}

@media (prefers-color-scheme: dark) {
  header {
    background: rgba(17, 24, 39, 0.9);
  }
}

header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: 0.05em;
  color: var(--color-primary);
}

.logo-blob {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: white;
  border-radius: 41% 59% 47% 53% / 54% 42% 58% 46%;
  padding: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  width: 48px;
  height: 48px;
}

.logo img {
  height: 32px;
  width: auto;
  border-radius: 0;
  padding: 0;
  background: none;
  box-shadow: none;
}


/* Location Badge */
.location-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: white;
  color: var(--color-text);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: var(--spacing-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}

.location-badge strong {
  color: var(--color-primary);
  font-weight: 700;
}

@media (prefers-color-scheme: dark) {
  .location-badge {
    background-color: var(--color-surface);
    border-color: var(--color-border);
  }
}

/* Animations */
@keyframes bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-15px);
  }
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* Hero Section */
.hero {
  padding-top: calc(80px + var(--spacing-xl));
  /* Header height + spacing */
  background: radial-gradient(circle at top right, var(--color-surface), var(--color-background));
}

.hero-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-xl);
  align-items: center;
}

@media (min-width: 768px) {
  .hero-container {
    grid-template-columns: 1fr 1fr;
  }
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: var(--spacing-sm);
  line-height: 1.1;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 3.5rem;
  }
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  margin-bottom: var(--spacing-md);
  max-width: 600px;
}

.hero-actions {
  display: flex;
  gap: var(--spacing-sm);
}

.hero-logo-blob {
  background-color: white;
  border-radius: 48% 52% 43% 57% / 51% 42% 58% 49%;
  padding: var(--spacing-xl);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.06);
  max-width: 450px;
  margin: 0 auto;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: bounce 3s ease-in-out infinite;
}

.hero-logo {
  max-width: 80% !important;
  width: auto !important;
  height: auto;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  background: none;
}

/* Mockup Visual */
.mockup-container {
  position: relative;
  width: 100%;
  max-width: 350px;
  margin: 0 auto;
}

.mockup-screen {
  background: white;
  border-radius: 2rem;
  box-shadow: var(--shadow-lg);
  border: 8px solid #2d2d2d;
  aspect-ratio: 732/1630;
  overflow: hidden;
  position: relative;
  transform: translateZ(0);
  /* Fix for Safari border-radius clipping */
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  /* Additional fix */
}

@media (prefers-color-scheme: dark) {
  .mockup-screen {
    border-color: #4b5563;
    /* Lighter border in dark mode */
  }
}

.app-header {
  height: 40px;
  background: var(--color-primary);
  display: flex;
  align-items: center;
  padding: 0 1rem;
  gap: 6px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
}

.app-body {
  padding: 1rem;
  background: var(--color-surface);
  height: 100%;
}

.app-hero {
  height: 120px;
  background: var(--color-secondary);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  opacity: 0.8;
}

.app-row {
  height: 40px;
  background: white;
  border-radius: var(--radius-md);
  margin-bottom: 0.5rem;
  box-shadow: var(--shadow-sm);
}

@media (prefers-color-scheme: dark) {
  .app-row {
    background: var(--color-background);
  }
}

/* Mission Section */
.mission {
  background: var(--color-surface);
}

.mission-grid {
  display: grid;
  gap: var(--spacing-xl);
}

@media (min-width: 768px) {
  .mission-grid {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background-color: rgba(217, 123, 58, 0.1);
  /* Primary with opacity */
  color: var(--color-primary);
  font-weight: 700;
  font-size: 0.875rem;
  border-radius: var(--radius-full);
  margin-bottom: var(--spacing-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mission-text h2 {
  font-size: 2rem;
  color: var(--color-secondary);
}

.mission-text p {
  margin-bottom: var(--spacing-sm);
  color: var(--color-text-muted);
}

.mission-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-md);
}

.stat-card {
  background: var(--color-background);
  padding: var(--spacing-md);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-primary);
  font-family: var(--font-heading);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  font-weight: 600;
}

/* How It Works */
.section-header {
  text-align: center;
  margin-bottom: var(--spacing-xl);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.section-header h2 {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--color-secondary);
}

.section-header p {
  font-size: 1.125rem;
  color: var(--color-text-muted);
}

.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-md);
}

@media (min-width: 768px) {
  .steps-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.step-card {
  background: var(--color-background);
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  /* Contains the giant number */
  position: relative;
}

.step-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
}

.step-number {
  font-family: var(--font-heading);
  font-size: 6rem;
  /* Larger */
  font-weight: 900;
  color: rgba(43, 95, 127, 0.05);
  /* Very subtle */
  position: absolute;
  top: -1rem;
  right: -0.5rem;
  line-height: 1;
  z-index: 0;
  /* Behind content */
  pointer-events: none;
}

.step-card h3 {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-sm);
  position: relative;
  z-index: 1;
}

.step-card p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  position: relative;
  z-index: 1;
}

/* Contact Section */
.cta-section {
  text-align: left;
}

.cta-box {
  background: linear-gradient(135deg, var(--color-secondary), var(--color-secondary-light));
  padding: 0;
  border-radius: var(--radius-lg);
  color: white;
  overflow: hidden;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.contact-text {
  padding: var(--spacing-xl);
}

.contact-text h2 {
  color: white;
  margin-bottom: var(--spacing-sm);
}

.contact-text p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: var(--spacing-md);
  font-size: 1.125rem;
}

.contact-form {
  background: transparent;
  padding: var(--spacing-xl);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

@media (prefers-color-scheme: dark) {
  .contact-form {
    background: transparent;
  }
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 1rem;
  background: white;
  color: #1f2937;
  /* Force dark text on white background */
  transition: all 0.2s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--color-text-muted);
  opacity: 0.7;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-secondary-light);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.btn-block {
  width: 100%;
}

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

.form-status {
  margin-top: 1rem;
  font-size: 0.9rem;
  text-align: center;
}

.form-status.success {
  color: #10B981;
}

.form-status.error {
  color: #EF4444;
}

/* Contact Section Specific Button */
.contact-form .btn-primary {
  background: white;
  color: var(--color-secondary);
}

.contact-form .btn-primary:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Footer */
footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding-top: var(--spacing-xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
}

@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

.footer-logo {
  margin-bottom: var(--spacing-sm);
  display: inline-flex;
  gap: 0.75rem;
  /* Match header logo gap */
}

.footer-logo-blob {
  background: white;
  border-radius: 41% 59% 47% 53% / 54% 42% 58% 46%;
  /* Matched to main logo */
  padding: 0px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  /* No animation */
}

.footer-logo-blob img {
  width: 24px;
  height: auto;
}

.footer-tagline {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  max-width: 300px;
}

.footer-col h4 {
  color: var(--color-secondary);
  font-size: 1.125rem;
  margin-bottom: var(--spacing-md);
  font-weight: 700;
}

.footer-links {
  list-style: none;
  display: grid;
  gap: 0.75rem;
}

.footer-links a {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  transition: color 0.2s;
}

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

.footer-bottom {
  padding: var(--spacing-md) var(--spacing-md);
  padding-top: var(--spacing-lg);
  padding-bottom: var(--spacing-lg);
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.footer-bottom p {
  margin: 0;
}

.developer-attribution {
  display: flex;
  align-items: center;
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.speczo-link {
  display: flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s;
}

.speczo-link:hover {
  opacity: 0.8;
}

.speczo-icon {
  height: 1.25em;
  /* Slightly larger than text for visibility */
  width: auto;
  display: inline-block;
  /* Minimal gap between logo and text */
  margin-left: 0.4em;
  /* Spacing after 'Developed by' */
}

@media (max-width: 640px) {
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* Platform Section */
.platform-section {
  background: var(--color-surface);
  overflow: hidden;
}

.platform-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-xl);
  align-items: center;
  margin-bottom: var(--spacing-xl);
}

@media (min-width: 960px) {
  .platform-grid {
    grid-template-columns: 1fr 1fr;
  }

  .platform-grid.reverse .platform-content {
    order: 2;
  }
}

.platform-content h2 {
  font-size: 2rem;
  color: var(--color-secondary);
  margin-bottom: var(--spacing-sm);
}

.platform-content p {
  color: var(--color-text-muted);
  margin-bottom: var(--spacing-md);
  font-size: 1.125rem;
}

.feature-list {
  list-style: none;
  display: grid;
  gap: var(--spacing-sm);
}

.feature-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  color: var(--color-text);
  font-weight: 500;
}

.check-icon {
  width: 24px;
  height: 24px;
  background: rgba(16, 185, 129, 0.1);
  color: #10B981;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Desktop Mockup */
.desktop-mockup {
  background: white;
  border-radius: var(--radius-md);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--color-border);
  overflow: hidden;
  position: relative;
  aspect-ratio: 1.927;
  display: flex;
  flex-direction: column;
}

.browser-bar {
  height: 32px;
  background: #f3f4f6;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  padding: 0 1rem;
  gap: 6px;
  flex-shrink: 0;
}

@media (prefers-color-scheme: dark) {
  .desktop-mockup {
    background: var(--color-surface);
    border-color: #374151;
  }

  .browser-bar {
    background: #1f2937;
    border-color: #374151;
  }
}

.browser-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d1d5db;
}

.browser-dot:nth-child(1) {
  background: #ef4444;
}

.browser-dot:nth-child(2) {
  background: #f59e0b;
}

.browser-dot:nth-child(3) {
  background: #10b981;
}

.mockup-body {
  padding: 0;
  display: block;
  flex: 1;
  width: 100%;
  height: 100%;
  background: #f9fafb;
}

@media (prefers-color-scheme: dark) {
  .mockup-body {
    background: #111827;
  }
}

.mockup-sidebar {
  background: white;
  border-radius: 8px;
  height: 80%;
  box-shadow: var(--shadow-sm);
}

.mockup-main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mockup-header {
  height: 48px;
  background: white;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  width: 100%;
}

.mockup-content-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.mockup-card {
  height: 100px;
  background: white;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.mockup-sidebar,
.mockup-header,
.mockup-card {
  background: #1f2937;
}

/* Mobile Improvements */
@media (max-width: 768px) {

  /* Header & Logo */
  .logo {
    font-size: 1.25rem;
  }

  .logo-blob {
    width: 40px;
    height: 40px;
    padding: 5px;
  }

  .logo img {
    height: 24px;
  }

  .btn {
    text-align: center;
  }

  /* Mission Section - Stack Fact Chips */
  .mission-stats {
    grid-template-columns: 1fr;
  }

  /* Platform Section - Force Text Top on Mobile */
  /* Use Flexbox for robust reordering */
  .platform-grid {
    display: flex;
    flex-direction: column;
  }

  /* "Instructors" section is NOT reverse in HTML, so default is Visual then Content.
     We want Content then Visual. So column-reverse flips it. */
  .platform-grid:not(.reverse) {
    flex-direction: column-reverse;
  }

  /* Contact Section Spacing */
  .contact-text,
  .contact-form {
    padding-left: var(--spacing-md);
    padding-right: var(--spacing-md);
  }

  .contact-text {
    padding-top: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    /* Minimal gap bottom */
  }

  .contact-form {
    padding-top: 0;
    /* No gap top */
    padding-bottom: var(--spacing-md);
    gap: var(--spacing-sm)
  }

  .contact-text p {
    margin-bottom: var(--spacing-sm);
  }

  /* Footer Alignment */
  .footer-col {
    text-align: center;
  }

  .footer-logo {
    justify-content: center;
  }

  /* Use flex column for links to ensure centering works */
  .footer-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: var(--spacing-sm);
  }

  .developer-attribution {
    justify-content: center;
  }
}