/* ==========================================================
   MoreTech BMP360 — FOUNDATION
   Layer: 1 (Core)
   Version: 2.0.0
   ──────────────────────────────────────────────────────────
   Depends on: 00-tokens.css
   Contains:
     §1  Reset & Base
     §2  Typography System
     §3  Links
     §4  Button System
     §5  Section Rhythm
     §6  Card Base
     §7  Eyebrow / Badge Patterns
     §8  Utility Classes
     §9  Page Loader
     §10 Responsive Foundation
   ========================================================== */


/* ==========================================================
   §1  RESET & BASE
   ========================================================== */

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

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

html,
body {
  overflow-x: hidden;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--mt-font-sans);
  font-size: 16px;
  line-height: var(--mt-leading-normal);
  color: var(--mt-text-body);
  background: var(--mt-surface-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* Selection */
::selection {
  background: rgba(var(--mt-brand-primary-rgb), 0.15);
  color: var(--mt-text-heading);
}


/* ==========================================================
   §2  TYPOGRAPHY SYSTEM
   ========================================================== */

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.6em;
  font-weight: var(--mt-weight-bold);
  line-height: var(--mt-leading-snug);
  color: var(--mt-text-heading);
  letter-spacing: var(--mt-tracking-tight);
}

h1 { font-size: clamp(2.2rem, 4vw, var(--mt-text-4xl));  font-weight: var(--mt-weight-black); }
h2 { font-size: clamp(1.8rem, 3.2vw, var(--mt-text-3xl)); font-weight: var(--mt-weight-black); }
h3 { font-size: clamp(1.4rem, 2.4vw, var(--mt-text-2xl)); }
h4 { font-size: var(--mt-text-xl); }
h5 { font-size: var(--mt-text-lg); }
h6 { font-size: var(--mt-text-md); }

p {
  margin: 0 0 1em;
  color: var(--mt-text-body);
  line-height: var(--mt-leading-relaxed);
}

/* Lead text */
.lead,
.text-lead {
  font-size: var(--mt-text-md);
  line-height: var(--mt-leading-relaxed);
  color: var(--mt-text-muted);
  max-width: 760px;
}

/* Small / fine print */
small,
.text-sm {
  font-size: var(--mt-text-sm);
}

/* Responsive typography (screen density) */
@media (max-width: 1440px), (max-height: 900px) {
  body { font-size: 15.5px; }
}
@media (max-width: 1366px), (max-height: 800px) {
  body { font-size: 15px; }
}
@media (max-width: 1280px), (max-height: 768px) {
  body { font-size: 14.5px; }
}


/* ==========================================================
   §3  LINKS
   ========================================================== */

/* Content links only — header excluded */
main a,
.section a,
.section-sm a {
  color: var(--mt-brand-primary);
  text-decoration: none;
  transition: color var(--mt-duration-fast) ease;
}

main a:hover,
.section a:hover,
.section-sm a:hover {
  color: var(--mt-brand-primary-hover);
}

/* Header lock — inherit from module */
.site-header a {
  color: inherit;
}

/* Focus visible (accessibility) */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--mt-border-focus);
  outline-offset: 2px;
  border-radius: var(--mt-radius-xs);
}


/* ==========================================================
   §4  BUTTON SYSTEM
   ========================================================== */

/* Base */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--mt-font-sans);
  font-weight: var(--mt-weight-semibold);
  font-size: var(--mt-text-sm);
  line-height: 1;
  padding: 12px 28px;
  border-radius: var(--mt-radius-full);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition:
    transform var(--mt-duration-fast) var(--mt-ease-default),
    box-shadow var(--mt-duration-normal) var(--mt-ease-default),
    background var(--mt-duration-fast) ease,
    border-color var(--mt-duration-fast) ease,
    color var(--mt-duration-fast) ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(1px);
}

/* Primary */
.btn-primary {
  background: var(--mt-brand-primary);
  border-color: var(--mt-brand-primary);
  color: var(--mt-text-inverse);
  box-shadow: 0 4px 14px rgba(var(--mt-brand-primary-rgb), 0.3);
}

.btn-primary:hover {
  background: var(--mt-brand-primary-hover);
  border-color: var(--mt-brand-primary-hover);
  color: var(--mt-text-inverse);
  box-shadow: 0 8px 24px rgba(var(--mt-brand-primary-rgb), 0.4);
}

/* Outline Primary */
.btn-outline-primary {
  background: transparent;
  border-color: var(--mt-brand-primary);
  color: var(--mt-brand-primary);
}

.btn-outline-primary:hover {
  background: var(--mt-brand-primary);
  color: var(--mt-text-inverse);
  box-shadow: 0 8px 24px rgba(var(--mt-brand-primary-rgb), 0.3);
}

/* Light */
.btn-light {
  background: var(--mt-neutral-0);
  border-color: var(--mt-neutral-0);
  color: var(--mt-text-heading);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.btn-light:hover {
  background: var(--mt-neutral-100);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Outline Light (dark backgrounds) */
.btn-outline-light {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.5);
  color: var(--mt-text-inverse);
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.8);
  color: var(--mt-text-inverse);
}

/* Ghost */
.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--mt-brand-primary);
  padding: 8px 16px;
}

.btn-ghost:hover {
  background: var(--mt-brand-primary-soft);
}

/* Demo / Action buttons (product pages) */
.btn-demo {
  background: var(--mt-gradient-primary);
  border-color: transparent;
  color: var(--mt-text-inverse) !important;
  box-shadow: 0 8px 22px rgba(var(--mt-brand-primary-rgb), 0.35);
  opacity: 1 !important;
  filter: none !important;
}

.btn-demo:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(var(--mt-brand-primary-rgb), 0.45);
  color: var(--mt-text-inverse) !important;
}

.btn-view {
  background: var(--mt-neutral-0);
  color: var(--mt-brand-primary);
  border: 2px solid var(--mt-brand-primary);
}

.btn-view:hover {
  background: var(--mt-brand-primary-soft);
  color: var(--mt-brand-primary);
}

/* Size variants */
.btn-sm {
  padding: 8px 18px;
  font-size: var(--mt-text-xs);
}

.btn-lg {
  padding: 16px 36px;
  font-size: var(--mt-text-base);
}


/* ==========================================================
   §5  SECTION RHYTHM
   ========================================================== */

.section {
  padding: var(--mt-section-py) 0;
}

.section-sm {
  padding: var(--mt-section-py-sm) 0;
}

/* Section headers (universal pattern) */
.section-header {
  max-width: 760px;
  margin-inline: auto;
  text-align: center;
  margin-bottom: var(--mt-space-16);
}

.section-title {
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
  font-weight: var(--mt-weight-black);
  letter-spacing: var(--mt-tracking-tight);
  color: var(--mt-text-heading);
  margin-bottom: var(--mt-space-4);
  position: relative;
}

.section-title-sm {
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  font-weight: var(--mt-weight-black);
  letter-spacing: var(--mt-tracking-tight);
  margin-bottom: var(--mt-space-3);
}

.section-subtitle {
  max-width: 760px;
  margin-inline: auto;
  font-size: var(--mt-text-md);
  line-height: var(--mt-leading-relaxed);
  color: var(--mt-text-muted);
  margin-bottom: var(--mt-space-12);
}

/* Section backgrounds (alternating rhythm) */
.section--light    { background: var(--mt-surface-page); }
.section--subtle   { background: var(--mt-surface-sunken); }
.section--gradient { background: var(--mt-gradient-surface); }
.section--dark {
  background: var(--mt-gradient-dark);
  color: var(--mt-text-inverse);
}


/* ==========================================================
   §6  CARD BASE
   ========================================================== */

.card-base {
  background: var(--mt-surface-raised);
  border: 1px solid var(--mt-border-default);
  border-radius: var(--mt-radius-xl);
  box-shadow: var(--mt-shadow-card);
  transition:
    transform var(--mt-duration-slow) var(--mt-ease-default),
    box-shadow var(--mt-duration-slow) var(--mt-ease-default);
}

.card-base:hover {
  transform: translateY(-6px);
  box-shadow: var(--mt-shadow-card-hover);
}

/* Touch: disable hover lifts */
@media (hover: none) {
  .card-base:hover,
  .module-card:hover,
  .capability-card:hover,
  .project-preview-card:hover,
  .service-node:hover,
  .process-flow-step:hover {
    transform: none !important;
    box-shadow: var(--mt-shadow-card) !important;
  }
}


/* ==========================================================
   §7  EYEBROW / BADGE PATTERNS
   ========================================================== */

.eyebrow,
.section-eyebrow {
  display: inline-block;
  font-size: var(--mt-text-xs);
  font-weight: var(--mt-weight-bold);
  letter-spacing: var(--mt-tracking-widest);
  text-transform: uppercase;
  color: var(--mt-brand-primary);
  margin-bottom: var(--mt-space-4);
}

.badge-primary {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: var(--mt-weight-semibold);
  letter-spacing: var(--mt-tracking-wide);
  padding: 6px 14px;
  border-radius: var(--mt-radius-full);
  background: var(--mt-gradient-primary);
  color: var(--mt-text-inverse);
}

/* Feature lists (shared by multiple modules) */
.feature-list,
.check-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-list li,
.check-list li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 10px;
  font-size: 0.95rem;
  color: var(--mt-text-body);
  line-height: 1.6;
}

.feature-list li::before,
.check-list li::before {
  content: "✔";
  position: absolute;
  left: 0;
  top: 0;
  font-weight: var(--mt-weight-bold);
  color: var(--mt-brand-primary);
}


/* ==========================================================
   §8  UTILITY CLASSES
   ========================================================== */

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

.text-muted  { color: var(--mt-text-muted) !important; }
.text-subtle { color: var(--mt-text-subtle) !important; }
.text-center { text-align: center; }

/* Container width control */
.container-narrow {
  max-width: 820px;
  margin-inline: auto;
}

.container-wide {
  max-width: 1400px;
  margin-inline: auto;
}

/* Decorative dividers */
.divider-gradient {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--mt-border-default), transparent);
  border: none;
  margin: var(--mt-space-16) auto;
}

.divider-glow {
  height: 4px;
  background: linear-gradient(
    90deg,
    rgba(var(--mt-brand-primary-rgb), 0.15),
    rgba(var(--mt-brand-primary-rgb), 0.7),
    rgba(var(--mt-brand-primary-rgb), 0.15)
  );
  border: none;
}

/* Visual atmosphere */
.glow-spot {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  background: var(--mt-gradient-glow);
}


/* ==========================================================
   §9  PAGE LOADER
   ========================================================== */

#page-loader {
  position: fixed;
  inset: 0;
  background: var(--mt-surface-dark);
  z-index: var(--mt-z-loader);
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.loader-logo {
  font-size: 1.6rem;
  font-weight: var(--mt-weight-bold);
  letter-spacing: 0.08em;
  color: var(--mt-neutral-200);
  margin-bottom: 18px;
}

.loader-line {
  width: 120px;
  height: 2px;
  background: rgba(255, 255, 255, 0.15);
  overflow: hidden;
  position: relative;
  margin: 0 auto;
}

.loader-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, var(--mt-brand-primary), transparent);
  animation: loaderMove 1.2s infinite;
}

@keyframes loaderMove {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%);  }
}


/* ==========================================================
   §10  RESPONSIVE FOUNDATION
   ========================================================== */

/* ── Tablet (≤991px) ── */
@media (max-width: 991px) {
  body {
    font-size: 15px;
    line-height: 1.55;
  }

  .section-title {
    font-size: 1.75rem;
  }
}

/* ── Mobile (≤767px) ── */
@media (max-width: 767px) {
  .section-title {
    font-size: 1.55rem;
  }

  .section-subtitle {
    font-size: 0.95rem;
  }

  .btn-lg {
    width: 100%;
    max-width: 320px;
  }
}

/* ── Small Mobile (≤575px) ── */
@media (max-width: 575px) {
  .section-title {
    font-size: 1.4rem;
  }

  .btn {
    padding: 10px 22px;
    font-size: 0.8rem;
  }
}
