/* ================================================================
   MATRION SOLUTIONS — SHARED INNER PAGES CSS
   Modern Maroon Edition · 2025
   ================================================================ */

/* Fonts loaded via <link> in HTML for non-blocking performance */

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

/* Prevent white flash on navigation — match the dark hero background */
html { background: #0A0202; font-display: swap; }

body {
  font-family: 'DM Sans', sans-serif;
  color: #0F0F0F;
  background: #0A0202;
  overflow-x: hidden;
  line-height: 1.6;
  font-size: max(0.9rem, 14px);
}

h1,h2,h3,h4,h5,h6 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

p { color: #555; line-height: 1.75; }

a { color: inherit; text-decoration: none; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

::selection { background: rgba(165,0,0,0.12); color: #7A0000; }

/* ── NAVBAR ── */
.p-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(26, 3, 3, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(165,0,0,0.28);
  padding: 0;
  transition: all 0.3s ease;
}
.p-nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 40px;
  display: flex; align-items: center; justify-content: space-between;
  height: 70px;
}
.p-nav-logo {
  display: flex; align-items: center; gap: 10px; text-decoration: none;
}
.p-nav-logo img { height: 34px; width: 34px; object-fit: contain; }
.p-nav-logo-name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.15rem; font-weight: 800; color: #fff; letter-spacing: -0.02em;
}
.p-nav-logo-name span { color: #A50000; }
.p-nav-links { display: flex; align-items: center; gap: 4px; }
.p-nav-link {
  font-size: 0.875rem; font-weight: 500; color: rgba(255,255,255,0.7);
  padding: 8px 14px; border-radius: 8px; transition: all 0.2s;
  text-decoration: none;
}
.p-nav-link:hover { color: #fff; background: rgba(255,255,255,0.07); }
.p-nav-link.active { color: #fff; }
.p-nav-cta {
  display: inline-flex; align-items: center; gap: 7px;
  background: #A50000; color: #fff !important;
  padding: 9px 20px; border-radius: 10px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700; font-size: 0.85rem;
  transition: all 0.25s; margin-left: 8px;
}
.p-nav-cta:hover { background: #C00000; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(165,0,0,0.35); }

.p-hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 4px; }
.p-hamburger span { display: block; width: 22px; height: 2px; background: rgba(255,255,255,0.8); border-radius: 2px; transition: all 0.3s; }

/* ── PAGE HERO ── */
.p-hero {
  background: #0A0202;
  padding: 140px 0 80px;
  position: relative; overflow: hidden;
}
.p-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 80% at 60% 40%, rgba(165,0,0,0.25), transparent 65%);
  pointer-events: none;
}
.p-hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(165,0,0,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(165,0,0,0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 100% 100% at center, black 20%, transparent 80%);
  pointer-events: none;
}
.p-hero-inner {
  position: relative; z-index: 1;
  max-width: 1200px; margin: 0 auto; padding: 0 40px;
}
.p-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(165,0,0,0.14);
  border: 1px solid rgba(165,0,0,0.28);
  border-radius: 100px; padding: 5px 14px;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em;
  color: #FF8080; text-transform: uppercase; margin-bottom: 20px;
}
.p-eyebrow .dot {
  width: 6px; height: 6px; background: #FF6060;
  border-radius: 50%; animation: pdot 2s ease-in-out infinite;
}
@keyframes pdot { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.3;transform:scale(0.6)} }
.p-hero-title {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 800; color: #fff; margin-bottom: 16px;
}
.p-hero-title em { font-style: normal; color: #FF8080; }
.p-hero-sub {
  font-size: 1.05rem; color: rgba(255,255,255,0.55); max-width: 560px; line-height: 1.75;
}

/* ── SECTION LABELS ── */
.s-label {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: #A50000; margin-bottom: 12px;
}
.s-label::before { content: ''; width: 18px; height: 2px; background: #A50000; border-radius: 2px; }
.s-title {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 800; color: #0F0F0F; margin-bottom: 14px;
}
.s-sub { font-size: 1rem; color: #666; line-height: 1.7; max-width: 540px; }

/* ── CARDS ── */
.p-card {
  background: #FAF8F8; border: 1px solid #EDE4E4;
  border-radius: 20px; padding: 32px;
  transition: all 0.3s cubic-bezier(0.23,1,0.32,1);
}
.p-card:hover {
  border-color: rgba(165,0,0,0.22);
  box-shadow: 0 16px 48px rgba(165,0,0,0.07), 0 4px 12px rgba(0,0,0,0.04);
  transform: translateY(-4px);
  background: #fff;
}

/* ── ICON BOX ── */
.p-icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: rgba(165,0,0,0.09); border: 1px solid rgba(165,0,0,0.18);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px; transition: all 0.3s;
}
.p-icon i, .p-icon svg, .p-icon svg.svg-icon { color: #A50000 !important; fill: #A50000 !important; font-size: 1.25rem; width: 1.25rem !important; height: 1.25rem !important; }
.p-card:hover .p-icon { background: #A50000; border-color: #A50000; }
.p-card:hover .p-icon i, .p-card:hover .p-icon svg, .p-card:hover .p-icon svg.svg-icon { color: #fff !important; fill: #fff !important; }

/* ── CHIPS / TAGS ── */
.p-chip {
  display: inline-block;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.03em;
  color: #A50000; background: rgba(165,0,0,0.07);
  border: 1px solid rgba(165,0,0,0.14);
  padding: 4px 12px; border-radius: 100px;
  transition: all 0.2s;
}
.p-chip:hover { background: #A50000; color: #fff; border-color: #A50000; }

/* ── STATS BAND ── */
.p-stats {
  background: #0A0202; padding: 64px 0;
  position: relative; overflow: hidden;
}
.p-stats::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 80% at 50% 50%, rgba(165,0,0,0.12), transparent 70%);
  pointer-events: none;
}
.p-stats-grid {
  display: grid; grid-template-columns: repeat(4,1fr);
  gap: 1px; background: rgba(255,255,255,0.04);
  border-radius: 16px; overflow: hidden;
  position: relative; z-index: 1;
}
.p-stat-item {
  text-align: center; padding: 40px 20px;
  background: #0A0202;
  transition: background 0.3s;
}
.p-stat-item:hover { background: rgba(165,0,0,0.08); }
.p-stat-num {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 2.8rem; font-weight: 800; color: #fff;
  letter-spacing: -0.05em; line-height: 1; margin-bottom: 8px;
}
.p-stat-num em { font-style: normal; color: #A50000; }
.p-stat-label { font-size: 0.82rem; color: rgba(255,255,255,0.38); font-weight: 500; }

/* ── CTA STRIP ── */
.p-cta {
  background: linear-gradient(135deg, #FAF8F8 0%, #F2EAEA 100%);
  border-top: 1px solid #EDE4E4; padding: 80px 0;
}
.p-cta-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 48px; flex-wrap: wrap;
}
.p-cta-title {
  font-size: clamp(1.7rem, 2.8vw, 2.2rem); font-weight: 800;
  color: #0F0F0F; margin-bottom: 10px;
}
.p-cta-sub { font-size: 0.95rem; color: #777; max-width: 420px; }
.p-cta-btns { display: flex; gap: 12px; flex-wrap: wrap; flex-shrink: 0; }

/* ── BUTTONS ── */
.btn-main {
  display: inline-flex; align-items: center; gap: 9px;
  background: #A50000; color: #fff;
  padding: 15px 28px; border-radius: 12px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700; font-size: 0.9rem;
  transition: all 0.3s; border: none; cursor: pointer;
  box-shadow: 0 4px 20px rgba(165,0,0,0.22);
  text-decoration: none;
}
.btn-main:hover { background: #C00000; transform: translateY(-2px); box-shadow: 0 8px 28px rgba(165,0,0,0.32); }

.btn-outline {
  display: inline-flex; align-items: center; gap: 9px;
  background: transparent; color: #A50000;
  padding: 14px 26px; border-radius: 12px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700; font-size: 0.9rem;
  border: 2px solid rgba(165,0,0,0.22);
  transition: all 0.3s; cursor: pointer;
  text-decoration: none;
}
.btn-outline:hover { background: rgba(165,0,0,0.06); border-color: #A50000; transform: translateY(-2px); }

/* ── FOOTER ── */
.p-footer {
  background: #120202; padding: 72px 0 0;
  border-top: 1px solid rgba(165,0,0,0.28);
}
.p-footer-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px; margin-bottom: 48px;
}
.pf-brand {}
.pf-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.pf-logo img { height: 30px; width: 30px; object-fit: contain; }
.pf-logo-name {
  font-family: 'Plus Jakarta Sans', sans-serif; font-size: 1.1rem;
  font-weight: 800; color: #fff; letter-spacing: -0.02em;
}
.pf-logo-name span { color: #A50000; }
.pf-desc { font-size: 0.85rem; color: rgba(255,255,255,0.38); line-height: 1.7; max-width: 240px; margin-bottom: 22px; }
.pf-socials { display: flex; gap: 8px; }
.pf-social {
  width: 34px; height: 34px; border-radius: 9px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.45); font-size: 0.82rem;
  text-decoration: none; transition: all 0.2s;
}
.pf-social:hover { background: #A50000; border-color: #A50000; color: #fff; transform: translateY(-2px); }
.pf-col h5 {
  font-family: 'Plus Jakarta Sans', sans-serif; font-size: 0.72rem;
  font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(255,255,255,0.28); margin-bottom: 18px;
}
.pf-col ul { list-style: none; }
.pf-col ul li { margin-bottom: 10px; }
.pf-col ul li a { font-size: 0.85rem; color: rgba(255,255,255,0.5); transition: color 0.2s; }
.pf-col ul li a:hover { color: #fff; }
.pf-contact-item {
  display: flex; align-items: flex-start; gap: 9px;
  font-size: 0.83rem; color: rgba(255,255,255,0.42); margin-bottom: 10px;
}
.pf-contact-item i { color: #A50000; font-size: 0.78rem; margin-top: 3px; flex-shrink: 0; }
.pf-contact-item a { color: rgba(255,255,255,0.5); }
.pf-contact-item a:hover { color: #fff; }
.p-footer-bar {
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: 20px 0;
  display: flex; justify-content: space-between; align-items: center;
  gap: 20px; flex-wrap: wrap;
}
.p-footer-bar p { font-size: 0.78rem; color: rgba(255,255,255,0.22); }
.p-footer-links { display: flex; gap: 22px; }
.p-footer-links a { font-size: 0.78rem; color: rgba(255,255,255,0.32); transition: color 0.2s; }
.p-footer-links a:hover { color: rgba(255,255,255,0.65); }

/* ── DIVIDER ── */
.section-divider { height: 1px; background: linear-gradient(90deg, transparent, #EDE4E4, transparent); margin: 0; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .p-nav-links { display: none; }
  .p-nav-links.open {
    display: flex; flex-direction: column;
    position: fixed; top: 70px; left: 0; right: 0;
    background: rgba(26,3,3,0.99);
    padding: 20px 0; gap: 4px; z-index: 999;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  }
  .p-nav-links.open .p-nav-link {
    padding: 12px 24px; width: 100%; text-align: center; border-radius: 0;
  }
  .p-nav-links.open .p-nav-cta {
    margin: 8px 24px 4px; border-radius: 10px; justify-content: center;
  }
  .p-hamburger { display: flex; }
  .p-footer-grid { grid-template-columns: 1fr 1fr; }
  .p-stats-grid { grid-template-columns: 1fr 1fr; }
  .container { padding: 0 24px; }
  .p-hero-inner { padding: 0 24px; }
  .p-nav-inner { padding: 0 24px; }
  .p-cta-inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 600px) {
  .p-footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .p-stat-num { font-size: 2.2rem; }
  .p-footer-bar { flex-direction: column; align-items: flex-start; }
}

/* ================================================================
   INNER PAGES — COMPREHENSIVE MOBILE RESPONSIVE
   ================================================================ */

/* ── TABLET (max 900px) already handled above, add extras ── */
@media (max-width: 900px) {
  /* Services page */
  .svc-layout { grid-template-columns:1fr !important; gap:32px; }
  .svc-layout.flip { direction:ltr; }
  .svc-metrics { grid-template-columns:1fr 1fr; }
  /* About page */
  .story-grid { grid-template-columns:1fr !important; gap:40px; }
  .values-grid { grid-template-columns:1fr 1fr !important; }
  .team-grid { grid-template-columns:1fr !important; }
  .why-grid { grid-template-columns:1fr !important; }
  .tech-about-grid { grid-template-columns:1fr 1fr !important; }
  /* Contact page */
  .contact-layout { grid-template-columns:1fr !important; }
  .form-row { grid-template-columns:1fr !important; }
  /* Portfolio */
  .projects-grid { grid-template-columns:1fr 1fr !important; }
  /* CTA */
  .p-cta-inner { flex-direction:column; align-items:flex-start; gap:28px; }
  .p-cta-btns { flex-direction:column; width:100%; }
  .btn-main, .btn-outline { width:100%; justify-content:center; }
  /* Stats */
  .p-stats-grid { grid-template-columns:1fr 1fr; }
  /* Footer */
  .p-footer-grid { grid-template-columns:1fr 1fr; }
}

/* ── SMALL PHONE (max 640px) ── */
@media (max-width: 640px) {
  /* Hero */
  .p-hero { padding:120px 0 60px; }
  .p-hero-title { font-size:1.9rem; }
  .p-hero-sub { font-size:0.95rem; }
  /* Section titles */
  .s-title { font-size:1.65rem; }
  /* About */
  .values-grid { grid-template-columns:1fr !important; }
  .tech-about-grid { grid-template-columns:1fr !important; }
  .team-card { flex-direction:column; gap:16px; }
  .team-avatar { width:52px; height:52px; border-radius:14px; }
  /* Services */
  .svc-visual { padding:28px 20px; }
  .svc-metrics { grid-template-columns:1fr 1fr; }
  /* Portfolio */
  .projects-grid { grid-template-columns:1fr !important; }
  .portfolio-filters { gap:8px; }
  .filter-btn { padding:8px 14px; font-size:0.78rem; }
  /* Contact */
  .contact-form-wrap { padding:28px 20px; }
  .contact-info-card { padding:24px 20px; }
  .faq-card { padding:24px 20px; }
  /* Stats */
  .p-stats-grid { grid-template-columns:1fr 1fr; }
  .p-stat-num { font-size:2.2rem; }
  .p-stat-item { padding:28px 12px; }
  /* Footer */
  .p-footer-grid { grid-template-columns:1fr !important; gap:28px; }
  .p-footer-bar { flex-direction:column; align-items:flex-start; gap:10px; }
  .p-footer-links { gap:16px; }
  /* Sections padding */
  .about-story, .values-section, .team-section, .tech-about { padding:64px 0; }
  .why-section { padding:64px 0; }
  .services-list { padding:56px 0; }
  .svc-section { margin-bottom:56px; padding-bottom:56px; }
  .portfolio-section { padding:56px 0; }
  .contact-section { padding:56px 0; }
  .p-cta { padding:56px 0; }
  /* Nav */
  .p-nav-inner { padding:0 20px; }
  /* Container */
  .container { padding:0 20px; }
}

/* ── VERY SMALL (iPhone SE 375px / 320px) ── */
@media (max-width: 380px) {
  .p-hero-title { font-size:1.7rem; }
  .p-hero-sub { font-size:0.9rem; }
  .s-title { font-size:1.5rem; }
  .p-stat-num { font-size:1.9rem; }
  .p-nav-logo-name { font-size:1rem; }
  .btn-main, .btn-outline { font-size:0.85rem; padding:13px 20px; }
  .svc-title { font-size:1.5rem; }
  .proj-body { padding:18px 16px; }
  .contact-form-wrap { padding:22px 16px; }
  .p-stats-grid { grid-template-columns:1fr 1fr; }
  /* tighten timeline on tiny screens */
  .tl-item { gap:14px; }
  .tl-dot { width:34px; height:34px; font-size:0.72rem; }
}
