/* ==========================================================================
   MARIKINA ERGOSTEP STUDIO & COMMUNITY LIVING LAB
   Theme Palette: Warm Terracotta & Deep Indigo (#c2410c & #1e1b4b / #0284c7)
   Strict WCAG AAA compliant contrast on light backgrounds.
   No CDN fonts, Pure SVG graphics, High-end Glassmorphic/Card Styling.
   ========================================================================== */

:root {
  /* Unique Warm Terracotta & Maritime Indigo Palette */
  --primary: #c2410c;         /* Rich Terracotta Clay */
  --primary-hover: #9a3412;   /* Deep Burnt Amber / Rust */
  --primary-dark: #7c2d12;
  --primary-light: #fff7ed;   /* Light Terracotta Tint */
  --primary-border: #fed7aa;

  --secondary: #1e293b;      /* Slate Navy */
  --secondary-accent: #0284c7;/* Vibrant Azure / Pacific Blue */
  --secondary-light: #f0f9ff;

  --text-main: #0f172a;       /* Slate 900 for ultra-crisp readable body */
  --text-muted: #334155;      /* Slate 700 - high contrast WCAG AAA */
  --text-light: #64748b;      /* Slate 500 for subtle metadata */
  --text-inverted: #ffffff;

  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-warm-tint: #fffbf5;

  --border-light: #e2e8f0;
  --border-medium: #cbd5e1;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 14px -2px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 28px -4px rgba(194, 65, 12, 0.12);
  --shadow-hover: 0 18px 36px -6px rgba(15, 23, 42, 0.14);

  --font-stack: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --container-max: 1200px;
}

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

html {
  font-family: var(--font-stack);
  font-size: 16px;
  scroll-behavior: smooth;
  color: var(--text-main);
  background-color: var(--bg-page);
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.65;
  color: var(--text-main);
  background-color: var(--bg-page);
}

a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease, text-decoration 0.2s ease;
}

a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* Accessibility Skip Link */
.skip-link {
  position: absolute;
  top: -60px;
  left: 20px;
  background: var(--primary);
  color: #ffffff;
  padding: 10px 18px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  z-index: 10000;
  transition: top 0.2s ease;
  text-decoration: none;
}
.skip-link:focus {
  top: 15px;
  outline: 3px solid #000;
}

/* Layout Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* Typography Utility */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-main);
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.02em;
}
h1 { font-size: 2.75rem; margin-bottom: 1.25rem; }
h2 { font-size: 2rem; margin-bottom: 1rem; }
h3 { font-size: 1.35rem; margin-bottom: 0.75rem; }
p { margin-bottom: 1rem; color: var(--text-muted); }
p.lead { font-size: 1.2rem; line-height: 1.7; color: var(--text-main); }

/* Header & Navigation */
.site-header {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
}
.brand-link:hover {
  text-decoration: none;
}
.brand-logo-svg {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}
.brand-text-wrap {
  display: flex;
  flex-direction: column;
}
.brand-name {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--text-main);
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.brand-tagline {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  text-decoration: none;
}
.nav-link:hover, .nav-link.active {
  color: var(--primary);
  background: var(--primary-light);
  text-decoration: none;
}
.header-cta {
  background: var(--primary);
  color: #ffffff !important;
  padding: 9px 18px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.9rem;
  transition: background 0.2s ease, transform 0.2s ease;
}
.header-cta:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  text-decoration: none;
}

/* Mobile Toggle */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 8px;
  cursor: pointer;
  color: var(--text-main);
}

/* Hero Section */
.hero-section {
  position: relative;
  padding: 72px 0 64px;
  background: radial-gradient(circle at 85% 15%, #ffedd5 0%, #fff7ed 40%, #ffffff 80%);
  border-bottom: 1px solid var(--border-light);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffedd5;
  color: var(--primary-hover);
  border: 1px solid #fed7aa;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 20px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 28px;
  margin-bottom: 32px;
}
.hero-stats-row {
  display: flex;
  gap: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border-medium);
}
.stat-item {
  display: flex;
  flex-direction: column;
}
.stat-number {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--primary);
  line-height: 1.1;
}
.stat-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Interactive Visual Graphic / Canvas Card */
.hero-card-visual {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-lg);
  position: relative;
}
.hero-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
}
.sensor-metric {
  background: var(--bg-warm-tint);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.sensor-icon-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #ffedd5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
  text-decoration: none;
}
.btn-primary {
  background: var(--primary);
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(194, 65, 12, 0.25);
}
.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(194, 65, 12, 0.35);
  text-decoration: none;
}
.btn-secondary {
  background: #ffffff;
  color: var(--text-main) !important;
  border-color: var(--border-medium);
}
.btn-secondary:hover {
  background: var(--bg-subtle);
  border-color: var(--text-muted);
  transform: translateY(-2px);
  text-decoration: none;
}
.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

/* Section Common */
.section {
  padding: 72px 0;
}
.section-alt {
  background-color: #ffffff;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}
.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 50px;
}
.section-badge {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary-hover);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 12px;
}
.section-title {
  margin-bottom: 14px;
}
.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
}

/* Feature Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-border);
}
.card-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
}
.card-title {
  font-size: 1.25rem;
  margin-bottom: 12px;
}
.card-body {
  color: var(--text-muted);
  flex-grow: 1;
  font-size: 0.95rem;
}
.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  font-weight: 700;
  font-size: 0.9rem;
}

/* Interactive Ergonomic Audit Tool / Planner */
.audit-tool-box {
  background: #ffffff;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-md);
  max-width: 880px;
  margin: 0 auto;
}
.tool-step {
  display: none;
}
.tool-step.active {
  display: block;
  animation: fadeIn 0.3s ease-in-out;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 24px 0 32px;
}
.option-label {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 20px;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  cursor: pointer;
  background: var(--bg-page);
  transition: all 0.2s ease;
}
.option-label:hover {
  border-color: var(--primary-border);
  background: var(--primary-light);
}
.option-label input[type="radio"],
.option-label input[type="checkbox"] {
  accent-color: var(--primary);
  width: 18px;
  height: 18px;
  margin-top: 2px;
}
.option-info {
  display: flex;
  flex-direction: column;
}
.option-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
}
.option-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
}
.tool-nav-btns {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
}

/* Result Box */
.result-card {
  background: var(--primary-light);
  border: 2px dashed var(--primary);
  border-radius: var(--radius-lg);
  padding: 30px;
  margin-top: 20px;
}
.result-title {
  color: var(--primary-hover);
  font-size: 1.4rem;
  margin-bottom: 12px;
}
.recommendation-list {
  list-style: none;
  margin: 16px 0;
}
.recommendation-list li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 12px;
  color: var(--text-main);
  font-weight: 500;
}
.recommendation-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--primary);
  font-weight: 900;
}

/* Workshop Schedule / Community Grid */
.schedule-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.schedule-table th, .schedule-table td {
  padding: 18px 24px;
  text-align: left;
}
.schedule-table th {
  background: var(--bg-subtle);
  font-weight: 800;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-medium);
}
.schedule-table tr:not(:last-child) td {
  border-bottom: 1px solid var(--border-light);
}
.schedule-table tr:hover td {
  background: var(--bg-warm-tint);
}
.badge-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
}
.badge-orange { background: #ffedd5; color: #9a3412; }
.badge-blue { background: #e0f2fe; color: #0369a1; }
.badge-green { background: #dcfce7; color: #15803d; }

/* Contact & Booking Section */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.contact-details-box {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-md);
}
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}
.contact-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-text strong {
  display: block;
  font-size: 0.88rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.contact-text span {
  font-size: 1.05rem;
  color: var(--text-main);
  font-weight: 600;
}

/* Forms */
.form-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-md);
}
.form-group {
  margin-bottom: 20px;
}
.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}
.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text-main);
  background: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(194, 65, 12, 0.18);
}
textarea.form-control {
  min-height: 110px;
  resize: vertical;
}
.form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.form-check input {
  margin-top: 3px;
  accent-color: var(--primary);
}

/* Footer */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 64px 0 32px;
  margin-top: auto;
  border-top: 1px solid #1e293b;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
.footer-brand .brand-name {
  color: #ffffff;
}
.footer-brand .brand-tagline {
  color: #fb923c;
}
.footer-heading {
  color: #ffffff;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
  font-weight: 800;
}
.footer-links {
  list-style: none;
}
.footer-links li {
  margin-bottom: 10px;
}
.footer-links a {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}
.footer-links a:hover {
  color: #fb923c;
  text-decoration: underline;
}
.footer-disclaimer {
  padding: 20px 24px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  margin-bottom: 32px;
  font-size: 0.82rem;
  line-height: 1.6;
  color: #cbd5e1;
}
.footer-disclaimer strong {
  color: #f97316;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid #1e293b;
  font-size: 0.82rem;
  color: #64748b;
}

/* Legal & Informational Pages Styling */
.page-header {
  padding: 56px 0 40px;
  background: radial-gradient(circle at 90% 10%, #ffedd5 0%, #fff7ed 50%, #ffffff 90%);
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 48px;
}
.legal-content-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 48px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 64px;
}
.legal-content-card h2 {
  font-size: 1.5rem;
  margin-top: 36px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary-light);
  color: var(--text-main);
}
.legal-content-card h2:first-of-type {
  margin-top: 0;
}
.legal-content-card h3 {
  font-size: 1.2rem;
  margin-top: 24px;
  margin-bottom: 10px;
}
.legal-content-card p, .legal-content-card ul, .legal-content-card ol {
  margin-bottom: 16px;
  color: var(--text-muted);
  font-size: 1rem;
}
.legal-content-card ul, .legal-content-card ol {
  padding-left: 24px;
}
.legal-content-card li {
  margin-bottom: 8px;
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  h1 { font-size: 2.1rem; }
  h2 { font-size: 1.6rem; }
  .cards-grid { grid-template-columns: 1fr; }
  .options-grid { grid-template-columns: 1fr; }
  .site-nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    padding: 20px;
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-lg);
  }
  .site-nav.open { display: flex; }
  .mobile-nav-toggle { display: block; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  .audit-tool-box { padding: 24px 18px; }
  .legal-content-card { padding: 28px 20px; }
}
