/**
 * DeKarma Landing Page & Web Platform Styles
 * Front Porch Design System Tokens & WCAG 2.1 AA Compliant Styles
 */

:root {
  /* Brand Primitives */
  --color-terracotta: #C96F4A;
  --color-terracotta-hover: #B55F3D;
  --color-terracotta-dark: #97442F;
  --color-terracotta-soft: #F6DED4;
  --color-pine: #1F3D2B;
  --color-pine-light: #286052;
  --color-pine-dark: #173D35;
  --color-cream: #FAF6F0;
  --color-cream-dark: #F2E8D7;
  --color-gold: #B45309;
  --color-gold-soft: #FEF3C7;
  --color-gold-light: #D4A03A;
  --color-sage: #2D6A4F;
  --color-sage-soft: #E2F0E4;
  --color-ember: #D94F3D;
  --color-ember-soft: #F8E1DA;
  --color-stone: #4B5563;
  --color-ink: #1F2923;
  --color-ink-faint: #6B7280;
  --color-cloud: #F0EBE3;
  --color-white: #FFFFFF;
  --color-digital-blue: #2563EB;
  --color-digital-blue-soft: #EFF6FF;
  --color-border: #E9E2D5;
  --color-border-light: #F2ECE1;

  /* Typography */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  
  /* Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 6px rgba(31, 61, 43, 0.04);
  --shadow-md: 0 6px 16px rgba(31, 61, 43, 0.07);
  --shadow-lg: 0 12px 32px rgba(31, 61, 43, 0.10);
  --shadow-card: 0 4px 14px rgba(31, 61, 43, 0.06);
  --shadow-hover: 0 8px 24px rgba(31, 61, 43, 0.12);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-cream);
  color: var(--color-ink);
  line-height: 1.6;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

/* Accessible focus ring */
:focus-visible {
  outline: 3px solid var(--color-terracotta);
  outline-offset: 3px;
}

a {
  color: var(--color-terracotta);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--color-terracotta-hover);
  text-decoration: underline;
}

/* Accessibility Skip Link */
.skip-link {
  position: absolute;
  top: -60px;
  left: 16px;
  background: var(--color-pine);
  color: var(--color-white);
  padding: 12px 20px;
  z-index: 9999;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 16px;
  color: var(--color-white);
  text-decoration: none;
}

/* Navbar */
.navbar-custom {
  background-color: rgba(250, 246, 240, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 1030;
}

.brand-logo-img {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  margin-right: 12px;
}

.brand-title {
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--color-pine);
  letter-spacing: -0.02em;
}

.nav-link-custom {
  color: var(--color-ink);
  font-weight: 500;
  padding: 8px 14px !important;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.nav-link-custom:hover,
.nav-link-custom.active {
  color: var(--color-terracotta);
  background-color: var(--color-terracotta-soft);
  text-decoration: none;
}

/* Buttons */
.btn-primary-custom {
  background-color: var(--color-terracotta);
  color: var(--color-white) !important;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-terracotta);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  min-width: 48px;
}

.btn-primary-custom:hover {
  background-color: var(--color-terracotta-hover);
  border-color: var(--color-terracotta-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

.btn-secondary-custom {
  background-color: var(--color-pine);
  color: var(--color-white) !important;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-pine);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  min-width: 48px;
}

.btn-secondary-custom:hover {
  background-color: var(--color-pine-light);
  border-color: var(--color-pine-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

.btn-outline-custom {
  background-color: transparent;
  color: var(--color-pine) !important;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--color-pine);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
}

.btn-outline-custom:hover {
  background-color: var(--color-pine);
  color: var(--color-white) !important;
  transform: translateY(-1px);
  text-decoration: none;
}

.btn-outline-terracotta {
  background-color: transparent;
  color: var(--color-terracotta) !important;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--color-terracotta);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
}

.btn-outline-terracotta:hover {
  background-color: var(--color-terracotta);
  color: var(--color-white) !important;
  transform: translateY(-1px);
  text-decoration: none;
}

/* Badges */
.badge-custom {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge-sage {
  background-color: var(--color-sage-soft);
  color: var(--color-sage);
  border: 1px solid rgba(45, 106, 79, 0.2);
}

.badge-terracotta {
  background-color: var(--color-terracotta-soft);
  color: var(--color-terracotta-dark);
  border: 1px solid rgba(201, 111, 74, 0.2);
}

.badge-gold {
  background-color: var(--color-gold-soft);
  color: var(--color-gold);
  border: 1px solid rgba(180, 83, 9, 0.2);
}

.badge-pine {
  background-color: var(--color-cloud);
  color: var(--color-pine);
  border: 1px solid var(--color-border);
}

/* Hero Section */
.hero-section {
  padding: 60px 0 40px;
  background: radial-gradient(circle at 80% 20%, rgba(246, 222, 212, 0.5) 0%, rgba(250, 246, 240, 1) 70%);
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  color: var(--color-pine);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: var(--color-stone);
  line-height: 1.6;
  margin-bottom: 28px;
  max-width: 600px;
}

.hero-microcopy {
  font-size: 0.9rem;
  color: var(--color-stone);
  margin-top: 14px;
}

/* Phone Mockup */
.mockup-container {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.phone-card {
  background-color: var(--color-white);
  border: 8px solid var(--color-pine);
  border-radius: 40px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 360px;
  overflow: hidden;
  position: relative;
}

.phone-notch {
  width: 120px;
  height: 20px;
  background-color: var(--color-pine);
  margin: 0 auto 12px;
  border-radius: 0 0 14px 14px;
}

.phone-screen-content {
  padding: 16px 20px 24px;
  background-color: var(--color-cream);
}

.task-item-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}

/* Dual User Paths Section */
.user-path-card {
  background-color: var(--color-white);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-card);
}

.user-path-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--color-terracotta);
}

.user-path-card.requester-card {
  border-top: 6px solid var(--color-terracotta);
}

.user-path-card.helper-card {
  border-top: 6px solid var(--color-pine);
}

.path-icon-wrapper {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 20px;
}

.path-icon-requester {
  background-color: var(--color-terracotta-soft);
  color: var(--color-terracotta);
}

.path-icon-helper {
  background-color: var(--color-sage-soft);
  color: var(--color-pine);
}

/* Section Headings */
.section-wrapper {
  padding: 64px 0;
}

.section-wrapper-alt {
  padding: 64px 0;
  background-color: var(--color-cloud);
}

.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 48px;
}

.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 700;
  color: var(--color-pine);
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.section-description {
  font-size: 1.1rem;
  color: var(--color-stone);
  line-height: 1.6;
}

/* Six-Step Process Cards */
.step-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
  height: 100%;
  box-shadow: var(--shadow-card);
  position: relative;
  transition: transform 0.2s ease;
}

.step-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  background-color: var(--color-terracotta);
  color: var(--color-white);
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 14px;
}

/* Karma Reciprocal Cycle Card */
.karma-cycle-box {
  background: var(--color-white);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-card);
}

.karma-node {
  background-color: var(--color-cream);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  height: 100%;
}

.karma-node-icon {
  font-size: 2rem;
  color: var(--color-terracotta);
  margin-bottom: 10px;
}

/* Category Cards */
.category-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
  height: 100%;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.category-card:hover {
  border-color: var(--color-terracotta);
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.category-icon-box {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background-color: var(--color-terracotta-soft);
  color: var(--color-terracotta);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 16px;
}

/* Feature & Trust Cards */
.trust-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 28px;
  height: 100%;
  box-shadow: var(--shadow-card);
}

.trust-icon-box {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background-color: var(--color-sage-soft);
  color: var(--color-sage);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 18px;
}

/* Testimonial Cards */
.story-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 28px;
  height: 100%;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.story-quote {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--color-ink);
  font-style: italic;
  margin-bottom: 20px;
}

.story-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.story-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-pill);
  background-color: var(--color-terracotta-soft);
  color: var(--color-terracotta-dark);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* What DeKarma Is / Is Not Table / Grid */
.is-not-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
  height: 100%;
}

.is-not-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--color-ember);
  margin-bottom: 12px;
}

/* Accordion Customization */
.accordion-custom .accordion-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md) !important;
  margin-bottom: 12px;
  overflow: hidden;
  background-color: var(--color-white);
}

.accordion-custom .accordion-button {
  background-color: var(--color-white);
  color: var(--color-pine);
  font-weight: 600;
  font-size: 1.05rem;
  padding: 18px 24px;
  border: none;
  box-shadow: none;
}

.accordion-custom .accordion-button:not(.collapsed) {
  background-color: var(--color-cream);
  color: var(--color-terracotta);
}

.accordion-custom .accordion-body {
  padding: 20px 24px;
  color: var(--color-stone);
  line-height: 1.7;
}

/* Breadcrumbs */
.breadcrumb-custom {
  padding: 12px 0;
  margin-bottom: 24px;
}

.breadcrumb-custom .breadcrumb-item a {
  color: var(--color-stone);
  font-size: 0.9rem;
}

.breadcrumb-custom .breadcrumb-item.active {
  color: var(--color-pine);
  font-weight: 600;
  font-size: 0.9rem;
}

/* Callout Alert / Notice */
.notice-box {
  background-color: var(--color-gold-soft);
  border-left: 4px solid var(--color-gold);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 18px 20px;
  margin: 24px 0;
  color: var(--color-ink);
}

.notice-box-info {
  background-color: var(--color-sage-soft);
  border-left: 4px solid var(--color-sage);
}

/* Footer */
.footer-custom {
  background-color: var(--color-pine);
  color: var(--color-cloud);
  padding: 64px 0 32px;
  border-top: 1px solid var(--color-border);
}

.footer-brand-title {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--color-cream);
}

.footer-heading {
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-cream);
  margin-bottom: 18px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: #D1D5DB;
  font-size: 0.95rem;
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: var(--color-terracotta-soft);
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid rgba(240, 235, 227, 0.15);
  margin-top: 48px;
  padding-top: 24px;
  font-size: 0.85rem;
  color: #9CA3AF;
}

/* Media Queries for Accessibility & Responsiveness */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 991.98px) {
  .hero-section {
    padding: 40px 0 24px;
    text-align: center;
  }
  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }
  .mockup-container {
    margin-top: 36px;
  }
}

@media print {
  .navbar-custom,
  .footer-custom,
  .btn-primary-custom,
  .btn-secondary-custom,
  .skip-link {
    display: none !important;
  }
  body {
    background-color: #fff;
    color: #000;
  }
}
