/* ============================================================
   M80 Design Language (MDL) v1.0
   Greentu Platform — Mobile First CSS
   ============================================================ */

/* --- Design Tokens --- */
:root {
  --m80-primary: #1D4ED8;
  --m80-primary-hover: #1E40AF;
  --m80-secondary: #16A34A;
  --m80-warning: #F59E0B;
  --m80-bg: #FAFAFA;
  --m80-card: #FFFFFF;
  --m80-text: #111827;
  --m80-text-secondary: #6B7280;
  --m80-border: #E5E7EB;
  --m80-radius-card: 16px;
  --m80-radius-button: 12px;
  --m80-radius-input: 12px;
  --m80-shadow: 0 1px 3px rgba(0, 0, 0, .08);
  --m80-gap: 24px;
  --m80-section-gap: 48px;
  --m80-container-padding: 16px;
  --m80-container-max: 480px;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

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

/* --- Container --- */
.m80-container {
  width: 100%;
  max-width: var(--m80-container-max);
  margin: 0 auto;
  padding: var(--m80-container-padding);
}

/* --- Sections --- */
.m80-section {
  margin-bottom: var(--m80-section-gap);
}

/* --- Typography --- */
.m80-hero-title {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--m80-text);
}

.m80-title {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--m80-text);
}

.m80-section-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--m80-text);
  margin-bottom: var(--m80-gap);
}

.m80-body {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--m80-text);
}

.m80-caption {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--m80-text-secondary);
}

/* --- Card --- */
.m80-card {
  background: var(--m80-card);
  padding: 20px;
  border: 1px solid var(--m80-border);
  border-radius: var(--m80-radius-card);
  box-shadow: var(--m80-shadow);
}

.m80-card + .m80-card {
  margin-top: 16px;
}

/* --- Button --- */
.m80-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  padding: 0 24px;
  border-radius: var(--m80-radius-button);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
  border: none;
  outline: none;
  min-width: 48px;
  min-height: 48px;
}

.m80-button-primary {
  background: var(--m80-primary);
  color: #FFFFFF;
}

.m80-button-primary:hover {
  background: var(--m80-primary-hover);
}

.m80-button-secondary {
  background: var(--m80-card);
  color: var(--m80-text);
  border: 1px solid var(--m80-border);
}

.m80-button-secondary:hover {
  border-color: var(--m80-primary);
  color: var(--m80-primary);
}

.m80-button-full {
  width: 100%;
}

/* --- Divider --- */
.m80-divider {
  width: 100%;
  height: 1px;
  background: var(--m80-border);
  border: none;
  margin: var(--m80-section-gap) 0;
}

/* --- Hero Section --- */
.m80-hero {
  text-align: center;
  padding: 60px 0 40px;
}

.m80-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--m80-border);
  background: var(--m80-card);
  font-size: 13px;
  font-weight: 500;
  color: var(--m80-text-secondary);
  margin-bottom: 20px;
}

.m80-hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--m80-secondary);
}

.m80-hero .m80-hero-title {
  margin-bottom: 16px;
}

.m80-hero-subtitle {
  font-size: 16px;
  line-height: 1.7;
  color: var(--m80-text-secondary);
  margin-bottom: 32px;
}

.m80-hero-cta {
  margin-bottom: 24px;
}

.m80-hero-scroll {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.4;
  animation: m80-fade-bounce 2s ease-in-out infinite;
}

@keyframes m80-fade-bounce {
  0%, 100% { opacity: 0.3; transform: translateY(0); }
  50% { opacity: 0.6; transform: translateY(4px); }
}

/* --- Platform Map Cards --- */
.m80-platform-card {
  background: var(--m80-card);
  padding: 24px 20px;
  border: 1px solid var(--m80-border);
  border-radius: var(--m80-radius-card);
  box-shadow: var(--m80-shadow);
  transition: border-color 0.2s ease;
}

.m80-platform-card:hover {
  border-color: var(--m80-primary);
}

.m80-platform-card + .m80-platform-card {
  margin-top: 16px;
}

.m80-platform-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.m80-platform-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.m80-platform-card-icon svg {
  width: 24px;
  height: 24px;
  stroke-width: 2;
}

.m80-platform-card-icon--blue {
  background: #EFF6FF;
  color: var(--m80-primary);
}

.m80-platform-card-icon--green {
  background: #F0FDF4;
  color: var(--m80-secondary);
}

.m80-platform-card-icon--amber {
  background: #FFFBEB;
  color: #D97706;
}

.m80-platform-card-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--m80-text);
  line-height: 1.3;
}

.m80-platform-card-sub {
  font-size: 13px;
  color: var(--m80-text-secondary);
}

.m80-platform-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.m80-platform-card-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  background: var(--m80-bg);
  color: var(--m80-text-secondary);
  border: 1px solid var(--m80-border);
}

.m80-platform-card-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: var(--m80-radius-input);
  border: 1px solid var(--m80-border);
  background: var(--m80-bg);
  text-decoration: none;
  color: var(--m80-primary);
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.2s ease;
  min-height: 48px;
}

.m80-platform-card-link:hover {
  background: #EFF6FF;
}

.m80-platform-card-link svg {
  width: 16px;
  height: 16px;
}

/* --- Philosophy Cards --- */
.m80-philosophy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.m80-philosophy-card {
  background: var(--m80-card);
  padding: 20px 16px;
  border: 1px solid var(--m80-border);
  border-radius: var(--m80-radius-card);
  box-shadow: var(--m80-shadow);
  text-align: center;
}

.m80-philosophy-card-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--m80-bg);
}

.m80-philosophy-card-icon svg {
  width: 20px;
  height: 20px;
  color: var(--m80-primary);
  stroke-width: 2;
}

.m80-philosophy-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--m80-text);
  margin-bottom: 4px;
}

.m80-philosophy-card-desc {
  font-size: 12px;
  color: var(--m80-text-secondary);
  line-height: 1.5;
}

/* --- Insurance Services --- */
.m80-service-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--m80-card);
  padding: 16px 20px;
  border: 1px solid var(--m80-border);
  border-radius: var(--m80-radius-card);
  box-shadow: var(--m80-shadow);
  min-height: 48px;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.m80-service-card:hover {
  border-color: var(--m80-primary);
}

.m80-service-card + .m80-service-card {
  margin-top: 10px;
}

.m80-service-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #EFF6FF;
}

.m80-service-card-icon svg {
  width: 18px;
  height: 18px;
  color: var(--m80-primary);
  stroke-width: 2;
}

.m80-service-card-info {
  flex: 1;
}

.m80-service-card-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--m80-text);
}

.m80-service-card-sub {
  font-size: 12px;
  color: var(--m80-text-secondary);
}

.m80-service-coming {
  margin-top: 16px;
  padding: 14px 16px;
  background: var(--m80-bg);
  border: 1px dashed var(--m80-border);
  border-radius: var(--m80-radius-card);
}

.m80-service-coming-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--m80-text-secondary);
  margin-bottom: 6px;
}

.m80-service-coming-list {
  font-size: 13px;
  color: var(--m80-text-secondary);
}

/* --- Tree --- */
.m80-tree {
  background: var(--m80-card);
  padding: 20px;
  border: 1px solid var(--m80-border);
  border-radius: var(--m80-radius-card);
  box-shadow: var(--m80-shadow);
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 14px;
  line-height: 1.8;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.m80-tree-node {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--m80-text);
  white-space: nowrap;
}

.m80-tree-node--root {
  font-weight: 700;
  color: var(--m80-primary);
  font-size: 15px;
}

.m80-tree-node--branch {
  font-weight: 600;
  color: var(--m80-text);
}

.m80-tree-node--leaf {
  color: var(--m80-text-secondary);
}

.m80-tree-indent {
  display: inline-block;
  color: var(--m80-border);
  user-select: none;
}

/* --- Why Greentu Checklist --- */
.m80-checklist {
  list-style: none;
}

.m80-checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--m80-border);
  font-size: 15px;
  line-height: 1.6;
  min-height: 48px;
}

.m80-checklist-item:last-child {
  border-bottom: none;
}

.m80-checklist-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #F0FDF4;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.m80-checklist-icon svg {
  width: 14px;
  height: 14px;
  color: var(--m80-secondary);
  stroke-width: 2.5;
}

/* --- Footer --- */
.m80-footer {
  text-align: center;
  padding: 32px 0 24px;
  border-top: 1px solid var(--m80-border);
}

.m80-footer-powered {
  font-size: 13px;
  color: var(--m80-text-secondary);
  margin-bottom: 4px;
}

.m80-footer-powered strong {
  color: var(--m80-text);
  font-weight: 600;
}

.m80-footer-brand {
  font-size: 15px;
  font-weight: 600;
  color: var(--m80-text);
  margin-bottom: 8px;
}

.m80-footer-copy {
  font-size: 12px;
  color: var(--m80-text-secondary);
}

/* --- Animations (Only Fade, 0.2s) --- */
.m80-fade-in {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

/* --- Accessibility --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus visible for keyboard navigation */
:focus-visible {
  outline: 2px solid var(--m80-primary);
  outline-offset: 2px;
}

/* --- Screen Reader Only --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
