/* TerraMomentum - Bento Grid Magazine Architecture CSS (tm-*) */
@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@400;700;900&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

:root {
  --tm-slate: #1e293b;
  --tm-steel: #334155;
  --tm-indigo: #6366f1;
  --tm-indigo-hover: #4f46e5;
  --tm-indigo-light: #eef2ff;
  --tm-bg: #f1f5f9;
  --tm-card: #ffffff;
  --tm-border: #e2e8f0;
  --tm-text: #334155;
  --tm-muted: #64748b;
  --tm-heading: #0f172a;
  --tm-radius: 14px;
  --tm-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --tm-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background-color: var(--tm-bg);
  color: var(--tm-text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Merriweather', Georgia, serif;
  color: var(--tm-heading);
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.01em;
}

a {
  color: var(--tm-indigo);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--tm-indigo-hover);
}

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

.tm-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.tm-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--tm-border);
}

.tm-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
}

.tm-logo-link {
  display: flex;
  align-items: center;
}

.tm-nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 30px;
}

.tm-nav-link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--tm-slate);
  padding: 8px 4px;
}

.tm-nav-link:hover, .tm-nav-link.active {
  color: var(--tm-indigo);
}

.tm-nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--tm-slate);
  color: #ffffff !important;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 10px 22px;
  border-radius: 8px;
  transition: all 0.2s ease;
  min-height: 44px;
}

.tm-nav-cta:hover {
  background-color: var(--tm-indigo);
  transform: translateY(-1px);
}

.tm-mobile-toggle {
  display: none;
  background: none;
  border: 1px solid var(--tm-border);
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
}

/* Buttons */
.tm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 0.98rem;
  padding: 14px 28px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 48px;
  border: 1px solid transparent;
}

.tm-btn-primary {
  background-color: var(--tm-indigo);
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}

.tm-btn-primary:hover {
  background-color: var(--tm-indigo-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.tm-btn-outline {
  background: transparent;
  color: var(--tm-slate) !important;
  border-color: var(--tm-border);
}

.tm-btn-outline:hover {
  border-color: var(--tm-slate);
  background-color: #ffffff;
}

/* Badges */
.tm-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background-color: var(--tm-indigo-light);
  color: var(--tm-indigo);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

/* Bento Grid Hero (Profile 3: Q-Z) */
.tm-bento-hero {
  padding: 60px 0 80px;
}

.tm-bento-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  margin-top: 24px;
}

.tm-bento-main {
  background: #ffffff;
  border: 1px solid var(--tm-border);
  border-radius: var(--tm-radius);
  padding: 50px 44px;
  box-shadow: var(--tm-shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.tm-bento-main h1 {
  font-size: 2.7rem;
  line-height: 1.2;
  margin: 18px 0 20px;
}

.tm-bento-side-stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.tm-bento-tile {
  background: #ffffff;
  border: 1px solid var(--tm-border);
  border-radius: var(--tm-radius);
  padding: 32px;
  box-shadow: var(--tm-shadow);
}

.tm-bento-tile-dark {
  background: #1e293b;
  color: #ffffff;
  border-color: #334155;
}

.tm-bento-tile-dark h3 {
  color: #ffffff;
}

/* Sections */
.tm-section {
  padding: 76px 0;
}

.tm-section-white {
  background-color: #ffffff;
  border-top: 1px solid var(--tm-border);
  border-bottom: 1px solid var(--tm-border);
}

.tm-section-header {
  text-align: center;
  max-width: 740px;
  margin: 0 auto 52px;
}

.tm-section-header h2 {
  font-size: 2.3rem;
  margin: 12px 0 16px;
}

/* 3 Cards Grid */
.tm-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.tm-card {
  background: #ffffff;
  border: 1px solid var(--tm-border);
  border-radius: var(--tm-radius);
  padding: 36px 30px;
  box-shadow: var(--tm-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.tm-card h3 {
  font-size: 1.35rem;
  margin: 16px 0 12px;
}

.tm-card p {
  color: var(--tm-muted);
  font-size: 0.98rem;
  line-height: 1.65;
}

/* Activity-Rest Matrix Module */
.tm-matrix-box {
  background: #ffffff;
  border: 1px solid var(--tm-border);
  border-radius: 16px;
  box-shadow: var(--tm-shadow-lg);
  padding: 44px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.tm-form-group {
  margin-bottom: 20px;
}

.tm-form-group label {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--tm-slate);
  margin-bottom: 8px;
}

.tm-form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--tm-border);
  border-radius: 8px;
  font-size: 1rem;
  background-color: #f8fafc;
  font-family: inherit;
  min-height: 46px;
}

.tm-form-input:focus {
  outline: none;
  border-color: var(--tm-indigo);
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.tm-matrix-results {
  background: #1e293b;
  color: #ffffff;
  border-radius: 12px;
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.tm-res-metric {
  font-size: 2.8rem;
  font-weight: 800;
  color: #818cf8;
  margin: 12px 0 6px;
}

/* Content Layout (450-700 words) */
.tm-content-layout {
  display: grid;
  grid-template-columns: 2.2fr 1fr;
  gap: 52px;
  margin-top: 36px;
}

.tm-content-body {
  background: #ffffff;
  border: 1px solid var(--tm-border);
  border-radius: 16px;
  padding: 48px;
  box-shadow: var(--tm-shadow);
}

.tm-content-body h2 {
  font-size: 1.85rem;
  margin: 36px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f1f5f9;
}

.tm-content-body h2:first-of-type {
  margin-top: 0;
}

.tm-content-body h3 {
  font-size: 1.35rem;
  margin: 28px 0 12px;
}

.tm-content-body p {
  font-size: 1.05rem;
  color: #334155;
  line-height: 1.8;
  margin-bottom: 20px;
}

.tm-content-body ul, .tm-content-body ol {
  margin: 16px 0 24px 24px;
}

.tm-content-body li {
  margin-bottom: 10px;
  color: #334155;
  line-height: 1.7;
}

.tm-quote-box {
  background: #f8fafc;
  border-left: 4px solid var(--tm-indigo);
  padding: 24px 28px;
  margin: 32px 0;
  border-radius: 0 10px 10px 0;
}

.tm-quote-box p {
  font-size: 1.08rem;
  font-style: italic;
  color: #1e293b;
  margin-bottom: 8px;
}

.tm-quote-box cite {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--tm-indigo);
  font-style: normal;
}

/* Tables */
.tm-table-responsive {
  overflow-x: auto;
  margin: 32px 0;
}

.tm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  text-align: left;
}

.tm-table th {
  background: #1e293b;
  color: #ffffff;
  padding: 14px 18px;
  font-weight: 700;
}

.tm-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--tm-border);
  color: #334155;
}

.tm-table tr:nth-child(even) {
  background-color: #f8fafc;
}

/* Sidebar */
.tm-sidebar-widget {
  background: #ffffff;
  border: 1px solid var(--tm-border);
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 28px;
  box-shadow: var(--tm-shadow);
}

.tm-sidebar-widget h4 {
  font-size: 1.15rem;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--tm-border);
}

.tm-sidebar-list {
  list-style: none;
}

.tm-sidebar-list li {
  margin-bottom: 12px;
}

.tm-sidebar-list a {
  color: var(--tm-slate);
  font-weight: 600;
  font-size: 0.95rem;
}

.tm-sidebar-list a:hover {
  color: var(--tm-indigo);
}

/* Team Grid */
.tm-team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 36px;
}

.tm-team-card {
  background: #ffffff;
  border: 1px solid var(--tm-border);
  border-radius: var(--tm-radius);
  overflow: hidden;
  box-shadow: var(--tm-shadow);
}

.tm-team-img-wrap {
  width: 100%;
  height: 240px;
  overflow: hidden;
  background-color: #1e293b;
}

.tm-team-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tm-team-info {
  padding: 24px;
}

.tm-team-role {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--tm-indigo);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

/* Footer */
.tm-footer {
  background-color: #0f172a;
  color: #94a3b8;
  padding: 70px 0 30px;
  border-top: 1px solid #1e293b;
}

.tm-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 48px;
  margin-bottom: 56px;
}

.tm-footer-col h4 {
  color: #ffffff;
  font-size: 1.05rem;
  margin-bottom: 22px;
}

.tm-footer-desc {
  font-size: 0.92rem;
  line-height: 1.7;
  margin-top: 16px;
}

.tm-footer-links {
  list-style: none;
}

.tm-footer-links li {
  margin-bottom: 12px;
}

.tm-footer-links a {
  color: #94a3b8;
  font-size: 0.92rem;
}

.tm-footer-links a:hover {
  color: #ffffff;
}

.tm-footer-legal-box {
  background: #1e293b;
  border-radius: 8px;
  padding: 18px;
  font-size: 0.85rem;
  line-height: 1.6;
  border: 1px solid #334155;
  color: #cbd5e1;
}

.tm-footer-legal-box strong {
  color: #ffffff;
}

.tm-footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 30px;
  border-top: 1px solid #1e293b;
  font-size: 0.88rem;
}

/* Cookie Bar */
.tm-cookie-bar {
  position: fixed;
  bottom: 24px;
  left: 24px;
  right: 24px;
  max-width: 580px;
  background: #0f172a;
  color: #ffffff;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  z-index: 999;
  display: none;
  border: 1px solid #334155;
}

.tm-cookie-actions {
  display: flex;
  gap: 12px;
  margin-top: 14px;
}

/* Responsive */
@media (max-width: 992px) {
  .tm-bento-grid {
    grid-template-columns: 1fr;
  }
  .tm-grid-3, .tm-team-grid {
    grid-template-columns: 1fr;
  }
  .tm-matrix-box {
    grid-template-columns: 1fr;
  }
  .tm-content-layout {
    grid-template-columns: 1fr;
  }
  .tm-footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .tm-nav-menu {
    display: none;
    position: absolute;
    top: 78px;
    left: 0;
    right: 0;
    background: #ffffff;
    flex-direction: column;
    padding: 24px;
    border-bottom: 1px solid var(--tm-border);
    box-shadow: var(--tm-shadow-lg);
  }
  .tm-nav-menu.tm-active {
    display: flex;
  }
  .tm-mobile-toggle {
    display: block;
  }
  .tm-bento-main h1 {
    font-size: 2.1rem;
  }
  .tm-footer-grid {
    grid-template-columns: 1fr;
  }
  .tm-footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}
