/* ============================================================
   DevMatrix Custom Software & Cloud — Main Stylesheet
   Compatible with Royal Elementor Theme & Royal Addons
   Author: Royal Technologies (https://www.royaltechbd.com)
   ============================================================ */

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

:root {
  --navy:       #0b0f19;
  --navy-d:     #050811;
  --navy-l:     #131a2c;
  --emerald:    #10b981;
  --emerald-d:  #059669;
  --emerald-lt: #ecfdf5;
  --cyan:       #06b6d4;
  --slate:      #334155;
  --muted:      #64748b;
  --light-bg:   #f8fafc;
  --white:      #ffffff;
  --border:     #e2e8f0;
  --radius:     12px;
  --shadow:     0 10px 30px rgba(11, 15, 25, 0.08);
  --transition: all 0.28s ease;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  color: var(--slate);
  background: #ffffff;
  line-height: 1.65;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.section { padding: 90px 0; }
.section-alt { background: var(--light-bg); }

/* Section Header */
.section-header { text-align: center; max-width: 680px; margin: 0 auto 55px; }
.section-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--emerald);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(28px, 3.8vw, 42px);
  font-weight: 900;
  color: var(--navy);
  line-height: 1.2;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}
.section-title span { color: var(--emerald); }
.section-desc { font-size: 16px; color: var(--muted); line-height: 1.7; }

/* Buttons */
.btn-emerald {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--emerald);
  color: #ffffff !important;
  font-size: 14px;
  font-weight: 800;
  padding: 13px 26px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35);
}
.btn-emerald:hover {
  background: var(--emerald-d);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

.btn-outline-white {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.08);
  color: #ffffff;
  border: 1.5px solid rgba(255,255,255,0.3);
  font-size: 14px;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
}
.btn-outline-white:hover {
  background: #ffffff;
  color: var(--navy);
}

/* ============================================================
   HERO SECTION (#home)
   ============================================================ */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  background: var(--navy-d);
  overflow: hidden;
  padding: 100px 0 110px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: url('../images/hero.jpg') center/cover no-repeat;
  opacity: 0.18;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(5, 8, 17, 0.96) 0%, rgba(11, 15, 25, 0.88) 60%, rgba(5, 8, 17, 0.94) 100%);
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 60px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 22px;
}

.hero-title {
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 900;
  color: #ffffff;
  line-height: 1.15;
  letter-spacing: -1px;
  margin-bottom: 20px;
}
.hero-title span { color: var(--emerald); }

.hero-desc {
  font-size: 17.5px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 580px;
}

.hero-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

/* Code Terminal Widget */
.terminal-window {
  background: #0d1322;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0,0,0,0.5);
  font-family: 'JetBrains Mono', Consolas, monospace;
}

.terminal-header {
  background: #151d30;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.term-dot { width: 12px; height: 12px; border-radius: 50%; }
.term-dot.red { background: #ef4444; }
.term-dot.yellow { background: #f59e0b; }
.term-dot.green { background: #10b981; }
.terminal-title { margin-left: auto; font-size: 12px; color: #94a3b8; }

.terminal-body {
  padding: 24px;
  font-size: 13.5px;
  line-height: 1.7;
  color: #e2e8f0;
}
.term-comment { color: #64748b; }
.term-keyword { color: #f43f5e; font-weight: 700; }
.term-string { color: #10b981; }
.term-func { color: #38bdf8; }
.term-num { color: #fbbf24; }

/* ============================================================
   TECH STACK CAROUSEL / GRID
   ============================================================ */
.tech-bar {
  background: var(--navy);
  padding: 28px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.tech-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

.tech-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 15px;
  font-weight: 700;
  transition: var(--transition);
}
.tech-item:hover { color: var(--emerald); transform: translateY(-2px); }
.tech-item i { font-size: 22px; color: var(--emerald); }

/* ============================================================
   SOLUTIONS (#solutions / royalservices)
   ============================================================ */
.solutions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

.solution-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 28px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.solution-card:hover {
  transform: translateY(-8px);
  border-color: var(--emerald);
  box-shadow: 0 16px 40px rgba(16, 185, 129, 0.12);
}

.sol-icon-box {
  width: 56px;
  height: 56px;
  background: var(--emerald-lt);
  color: var(--emerald);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin-bottom: 22px;
  transition: var(--transition);
}
.solution-card:hover .sol-icon-box {
  background: var(--emerald);
  color: #ffffff;
}

.sol-title { font-size: 19px; font-weight: 800; color: var(--navy); margin-bottom: 12px; }
.sol-desc { font-size: 14px; color: var(--muted); line-height: 1.65; margin-bottom: 20px; }

.sol-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.sol-tag {
  background: var(--light-bg);
  color: var(--slate);
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
}

/* ============================================================
   ENGINEERING PROCESS (royaltimeline)
   ============================================================ */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.process-box {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  transition: var(--transition);
}
.process-box:hover {
  transform: translateY(-6px);
  border-color: var(--emerald);
}

.step-num {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--emerald);
  font-size: 18px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  border: 2px solid var(--emerald);
}
.process-box:hover .step-num {
  background: var(--emerald);
  color: #ffffff;
}

.process-box h4 { font-size: 17px; font-weight: 800; color: var(--navy); margin-bottom: 8px; }
.process-box p { font-size: 13.5px; color: var(--muted); line-height: 1.6; }

/* ============================================================
   TECH LEADERS (royalteam)
   ============================================================ */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.team-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  text-align: center;
  transition: var(--transition);
}
.team-card:hover { transform: translateY(-5px); border-color: var(--emerald); }

.team-img-box { position: relative; height: 280px; overflow: hidden; }
.team-img-box img { width: 100%; height: 100%; object-fit: cover; }

.team-body { padding: 22px; }
.team-name { font-size: 18px; font-weight: 800; color: var(--navy); margin-bottom: 4px; }
.team-role { font-size: 12px; font-weight: 700; color: var(--emerald); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px; }
.team-bio { font-size: 13.5px; color: var(--muted); }

/* ============================================================
   REVIEWS (royalreview)
   ============================================================ */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}

.review-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
}
.review-stars { color: #f59e0b; font-size: 14px; margin-bottom: 14px; display: flex; gap: 4px; }
.review-text { font-size: 14.5px; color: var(--slate); font-style: italic; line-height: 1.7; margin-bottom: 20px; }

.review-author { display: flex; align-items: center; gap: 14px; }
.review-avatar { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; border: 2px solid var(--emerald); }
.author-name { font-size: 15px; font-weight: 800; color: var(--navy); }
.author-co { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ============================================================
   PROJECT ESTIMATION FORM (#contact / royalform)
   ============================================================ */
.estimate-section {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-d) 100%);
  color: #ffffff;
  padding: 90px 0;
}

.estimate-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.estimate-info h2 { font-size: 38px; font-weight: 900; line-height: 1.2; margin-bottom: 16px; }
.estimate-info h2 span { color: var(--emerald); }
.estimate-info p { font-size: 16px; color: rgba(255,255,255,0.75); line-height: 1.7; margin-bottom: 28px; }

.estimate-form-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 14px;
  padding: 36px;
  backdrop-filter: blur(10px);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-group label { font-size: 12px; font-weight: 700; color: rgba(255,255,255,0.8); text-transform: uppercase; }

.form-group input,
.form-group select,
.form-group textarea {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 7px;
  padding: 12px 14px;
  color: #ffffff;
  font-family: inherit;
  font-size: 14px;
  outline: none;
}
.form-group select option { background: var(--navy); color: #fff; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--navy-d);
  color: rgba(255,255,255,0.7);
  padding: 70px 0 0;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.3fr;
  gap: 40px;
  margin-bottom: 50px;
}

.footer-brand .footer-logo-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.footer-logo-icon {
  width: 42px;
  height: 42px;
  background: var(--emerald);
  color: #ffffff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.footer-logo-text { font-size: 20px; font-weight: 900; color: #ffffff; }
.footer-logo-text span { color: var(--emerald); }

.footer-brand p { font-size: 13.5px; line-height: 1.7; color: rgba(255,255,255,0.55); margin-bottom: 20px; }

.footer-col h4 {
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
  text-transform: uppercase;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a {
  color: rgba(255,255,255,0.55);
  font-size: 13.5px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}
.footer-links a:hover { color: var(--emerald); padding-left: 4px; }

.footer-contact-items { display: flex; flex-direction: column; gap: 12px; }
.footer-c-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  color: rgba(255,255,255,0.55);
}
.footer-c-item i { color: var(--emerald); font-size: 16px; margin-top: 2px; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom p { font-size: 13px; color: rgba(255,255,255,0.4); }
.footer-bottom a { color: var(--emerald); font-weight: 600; }

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 40px;
  max-width: 460px;
  width: 90%;
  text-align: center;
}
.modal-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--emerald-lt);
  color: var(--emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 18px;
}

@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .process-grid { grid-template-columns: 1fr 1fr; }
  .estimate-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .process-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .tech-grid { justify-content: center; }
}

@media (max-width: 540px) {
  .footer-grid { grid-template-columns: 1fr; }
}
