/* ============================================
   RED Educode - Main Stylesheet
   ============================================ */

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

:root {
  --primary: #860100;
  --primary-light: #a81a19;
  --primary-dark: #5c0100;
  --primary-rgb: 134, 1, 0;
  --white: #ffffff;
  --off-white: #f9f9f9;
  --light-gray: #f2f2f2;
  --medium-gray: #e0e0e0;
  --text-muted: #6b7280;
  --text-dark: #1f2937;
  --near-black: #111827;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --transition: 0.3s ease;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-dark);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul, ol {
  list-style: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--near-black);
}

h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.5rem); }
h4 { font-size: 1.125rem; }

p {
  margin-bottom: 1rem;
  color: var(--text-muted);
}

/* --- Utilities --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.section--gray {
  background: var(--off-white);
}

.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.section-title {
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin-bottom: 3rem;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

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

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.75rem;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-lg);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

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

.btn--primary:hover {
  background: var(--primary-light);
  border-color: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn--outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn--outline:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
}

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

.btn--white:hover {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
  transform: translateY(-2px);
}

.btn--lg {
  padding: 1rem 2.25rem;
  font-size: 1.05rem;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 0;
  transition: all var(--transition);
}

.nav.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-md);
  padding: 0.6rem 0;
}

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

.nav__logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--white);
  transition: color var(--transition);
}

.nav.scrolled .nav__logo {
  color: var(--near-black);
}

.nav__logo img {
  height: 38px;
  width: auto;
}

/* Logo swap: white on transparent, dark on scrolled */
.nav__logo .logo-dark {
  display: none;
}

.nav.scrolled .nav__logo .logo-white {
  display: none;
}

.nav.scrolled .nav__logo .logo-dark {
  display: block;
}

/* Interior pages always show dark logo */
.nav--interior .nav__logo .logo-white {
  display: none;
}

.nav--interior .nav__logo .logo-dark {
  display: block;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav__link {
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  transition: color var(--transition);
  position: relative;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width var(--transition);
}

.nav__link:hover::after,
.nav__link.active::after {
  width: 100%;
}

.nav.scrolled .nav__link {
  color: var(--text-dark);
}

.nav__link:hover {
  color: var(--white);
}

.nav.scrolled .nav__link:hover {
  color: var(--primary);
}

.nav__cta {
  padding: 0.55rem 1.35rem;
  background: var(--white);
  color: var(--primary) !important;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition);
}

.nav__cta::after {
  display: none;
}

.nav__cta:hover {
  background: var(--primary) !important;
  color: var(--white) !important;
  transform: translateY(-1px);
}

.nav.scrolled .nav__cta {
  background: var(--primary);
  color: var(--white) !important;
}

.nav.scrolled .nav__cta:hover {
  background: var(--primary-light);
}

/* Interior pages nav style */
.nav--interior {
  background: var(--white);
  box-shadow: var(--shadow-sm);
  padding: 0.6rem 0;
}

.nav--interior .nav__logo {
  color: var(--near-black);
}

.nav--interior .nav__link {
  color: var(--text-dark);
}

.nav--interior .nav__link:hover {
  color: var(--primary);
}

.nav--interior .nav__cta {
  background: var(--primary);
  color: var(--white) !important;
}

.nav--interior .nav__cta:hover {
  background: var(--primary-light);
}

/* Hamburger */
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
}

.nav__hamburger span {
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all var(--transition);
}

.nav.scrolled .nav__hamburger span,
.nav--interior .nav__hamburger span {
  background: var(--near-black);
}

.nav__hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav__hamburger.active span:nth-child(2) {
  opacity: 0;
}

.nav__hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu */
@media (max-width: 768px) {
  .nav__hamburger {
    display: flex;
  }

  .nav__links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--white);
    flex-direction: column;
    justify-content: center;
    gap: 1.75rem;
    padding: 2rem;
    box-shadow: var(--shadow-xl);
    transition: right var(--transition);
  }

  .nav__links.open {
    right: 0;
  }

  .nav__link {
    color: var(--text-dark) !important;
    font-size: 1.05rem;
  }

  .nav__link:hover {
    color: var(--primary) !important;
  }

  .nav__cta {
    background: var(--primary) !important;
    color: var(--white) !important;
    width: 100%;
    text-align: center;
    padding: 0.75rem 1.5rem;
  }

  .mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
  }

  .mobile-overlay.active {
    opacity: 1;
    pointer-events: all;
  }

  .hero .container {
    padding: 0 2rem;
  }
}

@media (max-width: 480px) {
  .hero .container {
    padding: 0 1.5rem;
  }
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--near-black);
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.85) 0%, rgba(17, 24, 39, 0.92) 100%);
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 680px;
  padding: 8rem 0 5rem;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1.5rem;
  backdrop-filter: blur(4px);
}

.hero__badge span {
  width: 6px;
  height: 6px;
  background: #34d399;
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero__title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.hero__title em {
  font-style: normal;
  background: linear-gradient(135deg, #fca5a5, #fecaca);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__text {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero__stats {
  display: flex;
  gap: 2.5rem;
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.hero__stat {
  text-align: left;
}

.hero__stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--white);
}

.hero__stat-label {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 0.2rem;
}

/* --- Page Header (interior pages) --- */
.page-header {
  padding: 8rem 0 3rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  text-align: center;
}

.page-header h1 {
  color: var(--white);
  margin-bottom: 0.75rem;
}

.page-header p {
  color: rgba(255, 255, 255, 0.75);
  max-width: 550px;
  margin: 0 auto;
  font-size: 1.1rem;
}

/* --- Features --- */
.features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.feature-card {
  padding: 2rem;
  background: var(--white);
  border-radius: var(--radius-xl);
  border: 1px solid var(--light-gray);
  transition: all var(--transition);
}

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

.feature-card__icon {
  width: 48px;
  height: 48px;
  background: rgba(var(--primary-rgb), 0.08);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.feature-card__icon svg {
  width: 24px;
  height: 24px;
  color: var(--primary);
}

.feature-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.feature-card p {
  font-size: 0.9rem;
  margin-bottom: 0;
  line-height: 1.6;
}

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

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

/* --- About --- */
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about__image {
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.about__image img {
  width: 100%;
  height: 400px;
  object-fit: cover;
}

.about__list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.about__list-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: var(--text-dark);
}

.about__list-item svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--primary);
  margin-top: 2px;
}

@media (max-width: 768px) {
  .about__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about__image img {
    height: 280px;
  }
}

/* --- Pricing --- */
.pricing__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.pricing-card {
  position: relative;
  padding: 2.5rem;
  background: var(--white);
  border-radius: var(--radius-2xl);
  border: 1px solid var(--medium-gray);
  transition: all var(--transition);
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.pricing-card--featured {
  border-color: var(--primary);
  border-width: 2px;
  box-shadow: var(--shadow-lg);
}

.pricing-card__badge {
  position: absolute;
  top: -14px;
  right: 24px;
  padding: 0.35rem 1.25rem;
  background: var(--primary);
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 100px;
}

.pricing-card__name {
  font-size: 1.5rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 0.5rem;
}

.pricing-card__desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.pricing-card__price {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  margin-bottom: 0.25rem;
}

.pricing-card__currency {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}

.pricing-card__amount {
  font-size: 3rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.pricing-card__period {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 500;
}

.pricing-card__billing {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.pricing-card__divider {
  height: 1px;
  background: var(--light-gray);
  margin: 1.5rem 0;
}

.pricing-card__section-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.pricing-card__list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.pricing-card__list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--text-dark);
  line-height: 1.5;
}

.pricing-card__list li svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--primary);
  margin-top: 2px;
}

.pricing-card .btn {
  width: 100%;
  margin-top: 1rem;
}

.pricing__footnote {
  text-align: center;
  max-width: 800px;
  margin: 2.5rem auto 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.7;
}

@media (max-width: 768px) {
  .pricing__grid {
    grid-template-columns: 1fr;
    max-width: 450px;
  }
}

/* --- CTA Section --- */
.cta-section {
  padding: 5rem 0;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  text-align: center;
}

.cta-section h2 {
  color: var(--white);
  margin-bottom: 1rem;
}

.cta-section p {
  color: rgba(255, 255, 255, 0.75);
  max-width: 500px;
  margin: 0 auto 2rem;
  font-size: 1.1rem;
}

/* --- Schedule Table --- */
.schedule-container {
  overflow-x: auto;
  border-radius: var(--radius-xl);
  border: 1px solid var(--medium-gray);
  box-shadow: var(--shadow-sm);
}

.schedule-container table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

.schedule-container thead {
  background: var(--primary);
}

.schedule-container th {
  padding: 1rem 1.25rem;
  text-align: left;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--white);
  white-space: nowrap;
}

.schedule-container td {
  padding: 0.85rem 1.25rem;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--light-gray);
  color: var(--text-dark);
}

.schedule-container tbody tr:nth-child(even) {
  background: var(--off-white);
}

.schedule-container tbody tr:hover {
  background: rgba(var(--primary-rgb), 0.04);
}

.schedule-container tbody tr.schedule-break {
  background: rgba(var(--primary-rgb), 0.06);
}

.schedule-container tbody tr.schedule-break td {
  font-weight: 600;
  color: var(--primary);
}

/* --- Markdown Content (Terms) --- */
.markdown-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 0;
}

.markdown-content h1 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--light-gray);
}

.markdown-content h2 {
  font-size: 1.4rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

.markdown-content h3 {
  font-size: 1.15rem;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
}

.markdown-content p {
  color: var(--text-dark);
  margin-bottom: 1rem;
  line-height: 1.8;
}

.markdown-content ul, .markdown-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.markdown-content ul { list-style: disc; }
.markdown-content ol { list-style: decimal; }

.markdown-content li {
  margin-bottom: 0.4rem;
  line-height: 1.7;
  color: var(--text-dark);
}

.markdown-content strong {
  font-weight: 600;
}

.markdown-content a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.markdown-content a:hover {
  color: var(--primary-light);
}

.markdown-content blockquote {
  border-left: 3px solid var(--primary);
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  background: var(--off-white);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.markdown-content blockquote p {
  color: var(--text-muted);
  margin-bottom: 0;
}

.markdown-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.markdown-content table th,
.markdown-content table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border: 1px solid var(--medium-gray);
}

.markdown-content table th {
  background: var(--primary);
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.markdown-content table tbody tr:nth-child(even) {
  background: var(--off-white);
}

/* Schedule table mobile: card layout */
@media (max-width: 640px) {
  .markdown-content table {
    border: none;
  }

  .markdown-content table thead {
    display: none;
  }

  .markdown-content table tbody tr {
    display: block;
    background: var(--white);
    border: 1px solid var(--medium-gray);
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    padding: 1rem;
  }

  .markdown-content table tbody tr:nth-child(even) {
    background: var(--white);
  }

  .markdown-content table tbody tr td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.3rem 0;
    border: none;
    border-bottom: 1px solid var(--light-gray);
    font-size: 0.85rem;
  }

  .markdown-content table tbody tr td:last-child {
    border-bottom: none;
  }

  .markdown-content table tbody tr td::before {
    content: attr(data-label);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-muted);
    flex-shrink: 0;
    margin-right: 1rem;
  }

  .markdown-content table tbody tr td:first-child {
    font-weight: 700;
    color: var(--primary);
    font-size: 0.9rem;
  }
}

.markdown-content hr {
  border: none;
  height: 1px;
  background: var(--medium-gray);
  margin: 2rem 0;
}

/* Loading state */
.markdown-loading {
  text-align: center;
  padding: 4rem 0;
  color: var(--text-muted);
}

.markdown-loading::after {
  content: '';
  display: block;
  width: 32px;
  height: 32px;
  border: 3px solid var(--light-gray);
  border-top-color: var(--primary);
  border-radius: 50%;
  margin: 1rem auto 0;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --- Form Styles --- */
.form-container {
  max-width: 640px;
  margin: 0 auto;
}

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

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.4rem;
}

.form-label .required {
  color: var(--primary);
  margin-left: 2px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--medium-gray);
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--text-dark);
  transition: all var(--transition);
  outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: #b0b0b0;
}

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

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
}

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

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

/* Checkbox */
.form-check {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
  cursor: pointer;
}

.form-check input[type="checkbox"] {
  appearance: none;
  width: 20px;
  height: 20px;
  min-width: 20px;
  border: 2px solid var(--medium-gray);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  margin-top: 2px;
}

.form-check input[type="checkbox"]:checked {
  background: var(--primary);
  border-color: var(--primary);
}

.form-check input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 6px;
  width: 5px;
  height: 10px;
  border: solid var(--white);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.form-check-label {
  font-size: 0.9rem;
  color: var(--text-dark);
  line-height: 1.5;
}

.form-error {
  font-size: 0.8rem;
  color: var(--primary);
  margin-top: 0.25rem;
  display: none;
}

.form-group.error .form-input,
.form-group.error .form-select,
.form-group.error .form-textarea {
  border-color: var(--primary);
}

.form-group.error .form-error {
  display: block;
}

/* Form messages */
.form-message {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  display: none;
}

.form-message--success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.form-message--error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.form-message.show {
  display: block;
}

.btn--loading {
  opacity: 0.7;
  pointer-events: none;
  position: relative;
}

.btn--loading::after {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-left: 0.5rem;
}

/* --- Footer --- */
.footer {
  background: var(--near-black);
  color: rgba(255, 255, 255, 0.6);
  padding: 3.5rem 0 1.5rem;
}

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

.footer__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 1rem;
}

.footer__brand img {
  height: 32px;
}

.footer__desc {
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.5);
}

.footer__title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--white);
  margin-bottom: 1rem;
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer__links a {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.5);
  transition: color var(--transition);
}

.footer__links a:hover {
  color: var(--white);
}

.footer__bottom {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}

.footer__bottom a {
  color: rgba(255, 255, 255, 0.4);
  transition: color var(--transition);
}

.footer__bottom a:hover {
  color: var(--white);
}

@media (max-width: 768px) {
  .footer__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer__bottom {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}

/* --- Scroll Animations --- */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

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