/* ============================================================
   ROOT TECH SOLUTIONS — style.css
   Clean, scalable CSS with custom properties
   ============================================================ */

/* ---------- Fonts ---------- */
@import url("https://fonts.googleapis.com/css2?family=Domine:wght@400;700&family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,700;1,9..40,400&display=swap");

/* ---------- Design Tokens ---------- */
:root {
  --font-primary: "Domine", serif;
  --font-secondary: "DM Sans", sans-serif;

  --color-brand:       #0ea5e9;  /* sky-500 */
  --color-brand-dark:  #0284c7;  /* sky-600 */
  --color-dark:        #111827;  /* gray-900 */
  --color-text:        #0a0a0a;
  --color-muted:       #4b5563;  /* gray-600 */
  --color-subtle:      #5c5f6a;
  --color-border:      #e5e7eb;
  --color-surface:     #f9fafb;  /* gray-50 */
  --color-white:       #ffffff;

  --gradient-primary: linear-gradient(135deg, hsl(217 91% 60%) 0%, hsl(230 80% 50%) 100%);
  --gradient-card-header: linear-gradient(180deg, hsl(217 91% 55%) 0%, hsl(225 80% 35%) 100%);

  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,.12);
  --shadow-btn: 0 4px 16px rgba(14,165,233,.35);

  --radius-sm:  .5rem;
  --radius-md:  .75rem;
  --radius-lg:  1rem;
  --radius-xl:  1.5rem;
  --radius-full: 9999px;

  --max-w: 1200px;
  --max-w-wide: 1400px;

  --transition: .2s ease;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-secondary);
  color: var(--color-text);
  background: var(--color-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a   { color: inherit; text-decoration: none; }
ul  { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ---------- Utility ---------- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1rem;
}

.main-header { font-family: var(--font-primary); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-family: var(--font-secondary);
  font-size: .9375rem;
  font-weight: 500;
  padding: .75rem 1.5rem;
  border-radius: var(--radius-full);
  transition: background var(--transition), box-shadow var(--transition), opacity var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-brand);
  color: var(--color-white);
  box-shadow: var(--shadow-btn);
}
.btn-primary:hover { background: var(--color-brand-dark); }
.btn-full { width: 100%; }

/* ---------- SpanTitle Badge ---------- */
.span-title {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  font-size: .8125rem;
  font-weight: 700;
  color: var(--color-subtle);
}
.span-icon { width: 34px; height: 34px; object-fit: contain; flex-shrink: 0; }
.span-badge {
  border: 1.5px solid var(--color-subtle);
  border-radius: var(--radius-full);
  padding: .35rem 1rem;
  letter-spacing: .04em;
}

/* ---------- Section headings ---------- */
.section-heading {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  margin-top: 1rem;
  line-height: 1.2;
}
.section-heading.center { text-align: center; }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-white);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.navbar.scrolled {
  border-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.25rem 1rem;
  gap: 1.5rem;
}

.nav-logo { height: 3rem; width: auto; }

.nav-links {
  display: none;
  gap: 2rem;
}
.nav-link {
  font-size: .9375rem;
  color: var(--color-muted);
  transition: color var(--transition);
}
.nav-link:hover { color: var(--color-brand); }

.nav-cta { display: none; }

/* Hamburger */
.hamburger {
  display: flex;
  align-items: center;
  color: var(--color-text);
  padding: .25rem;
}

/* Mobile Menu (full-screen drawer) */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--color-white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  transform: translateY(-100%);
  opacity: 0;
  transition: transform .35s ease, opacity .35s ease;
  pointer-events: none;
}
.mobile-menu.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}

.mobile-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  color: var(--color-text);
  padding: .25rem;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  font-size: 1.25rem;
  color: var(--color-muted);
}
.mobile-link:hover { color: var(--color-brand); }

/* Desktop nav */
@media (min-width: 768px) {
  .hamburger    { display: none; }
  .nav-links    { display: flex; }
  .nav-cta      { display: inline-flex; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero { width: 100%; padding-top: 4rem; }

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
  padding-bottom: 2rem;
}

.hero-left { display: flex; flex-direction: column; gap: 1.25rem; }

.hero-heading {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  margin-top: .5rem;
}

.hero-sub { color: var(--color-muted); max-width: 520px; }

.hero-right { display: flex; justify-content: center; }
.hero-img {
  width: 100%;
  max-width: 520px;
  border-radius: .75rem .75rem 0 0;
  box-shadow: var(--shadow-md);
}

/* Stats bar */
.stats-bar { background: var(--color-surface); padding: 2.5rem 1rem; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1rem;
}
.stat-item { display: flex; flex-direction: column; align-items: center; gap: .25rem; padding: 1.25rem; }
.stat-value {
  font-family: var(--font-primary);
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--color-brand);
}
.stat-label { font-size: .9375rem; color: var(--color-muted); text-align: center; }

@media (min-width: 640px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr 1fr; gap: 6rem; }
  .hero-right { justify-content: flex-end; }
  .hero-img { max-width: 90%; }
}

/* ============================================================
   SERVICES
   ============================================================ */
.services { padding: 5rem 0; }

.services-header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 3.5rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}

.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-icon-wrap {
  width: 60px;
  height: 60px;
  background: var(--color-dark);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Small spacer (replicates React's w-10 h-10 div) */
.card-spacer { width: 2.5rem; height: 2.5rem; }

.card-title {
  font-family: var(--font-primary);
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: .5rem;
}

.card-desc { color: var(--color-muted); font-size: .9375rem; line-height: 1.65; }

@media (min-width: 768px) {
  .services-header { flex-direction: row; align-items: flex-end; justify-content: space-between; }
  .cards-grid      { grid-template-columns: repeat(3, 1fr); }
  .cards-grid .card:last-child { grid-column: span 3; max-width: 380px; }
}
@media (min-width: 1024px) {
  .cards-grid { grid-template-columns: repeat(4, 1fr); }
  .cards-grid .card:last-child { grid-column: auto; max-width: none; }
}

/* ============================================================
   ABOUT
   ============================================================ */
.about { background: var(--color-surface); padding: 5rem 0; }

.about-inner {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.about-text {
  color: var(--color-muted);
  font-size: clamp(1rem, 2vw, 1.375rem);
  max-width: 56rem;
  line-height: 1.75;
}
.about-text strong { color: var(--color-text); }

.about-link { color: var(--color-brand); font-weight: 500; }
.about-link:hover { text-decoration: underline; }

@media (min-width: 768px) {
  .about-inner { flex-direction: row; justify-content: space-between; align-items: flex-start; gap: 4rem; }
}

/* ============================================================
   FAQ
   ============================================================ */
.faq { padding: 6rem 0; }

.faq-inner { max-width: 768px; margin: 0 auto; }

.faq-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 2.5rem;
  gap: .75rem;
}

.faq-list { display: flex; flex-direction: column; gap: 0; }

.faq-item { border-bottom: 1.5px solid var(--color-border); }

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  width: 100%;
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  padding: 1.25rem 0;
  line-height: 1.5;
  transition: color var(--transition);
}
.faq-question:hover { color: var(--color-brand); }

.faq-icon {
  font-size: 1.375rem;
  font-weight: 300;
  flex-shrink: 0;
  line-height: 1;
  transition: transform .25s ease;
}
.faq-question[aria-expanded="true"] .faq-icon { transform: rotate(45deg); color: var(--color-brand); }

.faq-answer {
  font-size: .9375rem;
  color: var(--color-muted);
  line-height: 1.7;
  overflow: hidden;
  max-height: 0;
  transition: max-height .35s ease, padding .35s ease;
  padding: 0;
}
.faq-answer.open {
  max-height: 300px;
  padding-bottom: 1.25rem;
}

/* ============================================================
   CTA
   ============================================================ */
.cta {
  max-width: var(--max-w-wide);
  margin: 0 auto;
}

.cta-inner {
  background: var(--color-dark);
  color: var(--color-white);
  text-align: center;
  padding: 5rem 1.5rem;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.cta-heading {
  font-size: clamp(1.875rem, 4vw, 3.5rem);
  max-width: 54rem;
  line-height: 1.15;
}

.cta-sub { color: #d1d5db; max-width: 42rem; font-size: 1rem; }

/* ============================================================
   WHITE GAP (between CTA and footer)
   ============================================================ */
.white-gap { height: 2.5rem; background: var(--color-white); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--color-dark);
  color: #d1d5db;
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 1.5rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.footer-logo {
  font-family: var(--font-primary);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: .75rem;
}
.footer-tagline { font-size: .875rem; margin-bottom: 1.25rem; }

.footer-cols {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.footer-col-title {
  font-size: .9375rem;
  font-weight: 600;
  color: var(--color-white);
  margin-bottom: .75rem;
}

.footer-links { display: flex; flex-direction: column; gap: .5rem; font-size: .875rem; }
.footer-links a:hover { color: var(--color-white); }

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: .625rem;
  font-size: .875rem;
  margin-bottom: .75rem;
}

.footer-socials { display: flex; gap: .875rem; margin-top: .5rem; }
.social-link { transition: color var(--transition); }
.social-link:hover { color: var(--color-white); }

.footer-copy { text-align: center; font-size: .875rem; color: #6b7280; margin-top: 2.5rem; }

@media (min-width: 768px) {
  .footer-inner  { flex-direction: row; justify-content: space-between; align-items: flex-start; }
  .footer-brand  { min-width: 220px; }
  .footer-cols   { flex-direction: row; gap: 3rem; }
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-md);
  transform: translateY(12px);
  transition: transform .25s ease;
}
.modal-overlay.open .modal { transform: translateY(0); }

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  color: var(--color-muted);
  padding: .25rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition);
}
.modal-close:hover { color: var(--color-text); }

.modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

/* Form */
.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block;
  font-size: .9375rem;
  font-weight: 500;
  margin-bottom: .375rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: .625rem .875rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-secondary);
  font-size: .9375rem;
  color: var(--color-text);
  background: var(--color-white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px rgba(14,165,233,.15);
}
.form-group textarea { resize: none; }
.form-group input::placeholder,
.form-group textarea::placeholder { color: #9ca3af; }

.form-response {
  margin-top: 1rem;
  font-size: .9375rem;
  font-weight: 600;
  min-height: 1.5rem;
}
.form-response.success { color: #16a34a; }
.form-response.error   { color: #dc2626; }

/* Disabled state */
.form-group input:disabled,
.form-group textarea:disabled { opacity: .6; cursor: not-allowed; }
#submit-btn:disabled { opacity: .6; cursor: not-allowed; }

/* ============================================================
   RESPONSIVE FINE-TUNING
   ============================================================ */
@media (max-width: 480px) {
  .cta-inner { padding: 4rem 1.25rem; }
}
