/* =========================================================
   MXC Digital Systems — style.css
   ========================================================= */

:root {
  --color-primary:    #1B2A4A;
  --color-secondary:  #2B5BA8;
  --color-accent:     #4A9FD4;
  --color-dark:       #1A1A2E;
  --color-white:      #FFFFFF;
  --color-gray-light: #F4F7FC;
  --color-gray-mid:   #6B7280;
  --color-border:     #E2E8F0;

  --gradient-brand: linear-gradient(135deg, #1B2A4A 0%, #2B5BA8 100%);

  --radius-card: 8px;
  --radius-btn: 6px;
  --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.08);

  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-dark);
  background: var(--color-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--color-secondary);
  text-decoration: none;
}

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

/* ---------- Skip link (a11y) ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-white);
  color: var(--color-primary);
  padding: 12px 16px;
  z-index: 1000;
  border-radius: 0 0 var(--radius-btn) 0;
}
.skip-link:focus {
  left: 0;
}

/* ---------- Screen-reader only ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Focus visibility ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-soft);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand img {
  height: 54px;
  width: auto;
}

.brand-name {
  color: var(--color-primary);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  display: none;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.main-nav a {
  color: var(--color-primary);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 8px 14px;
  border-radius: var(--radius-btn);
  transition: background-color 0.2s ease;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  background: var(--color-gray-light);
}

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid rgba(27, 42, 74, 0.35);
  border-radius: var(--radius-btn);
  color: var(--color-primary);
  padding: 8px 10px;
  font-size: 1rem;
  cursor: pointer;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: 0.98rem;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.btn-primary {
  background: var(--color-white);
  color: var(--color-primary);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.btn-secondary {
  background: var(--color-secondary);
  color: var(--color-white);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  background: var(--color-accent);
  transform: translateY(-2px);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--gradient-brand);
  color: var(--color-white);
  overflow: hidden;
  padding: 96px 0 110px;
}

.hero .container {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.hero h1 {
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  line-height: 1.15;
  margin: 0 0 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.hero p.lead {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.88);
  margin: 0 0 34px;
  max-width: 560px;
}

.circuit-deco {
  position: absolute;
  right: -60px;
  top: -40px;
  width: 520px;
  height: 520px;
  opacity: 0.22;
  z-index: 1;
  pointer-events: none;
}

/* ---------- Sections ---------- */
section {
  padding: 88px 0;
}

.section-alt {
  background: var(--color-gray-light);
}

.section-brand {
  background: var(--gradient-brand);
  color: var(--color-white);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-accent);
  margin: 0 0 10px;
}

.section-brand .eyebrow {
  color: rgba(255, 255, 255, 0.75);
}

h2 {
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  font-weight: 800;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}

.section-intro {
  color: var(--color-gray-mid);
  max-width: 620px;
  margin: 0 0 48px;
  font-size: 1.05rem;
}

.section-brand .section-intro {
  color: rgba(255, 255, 255, 0.85);
}

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

.value-card {
  text-align: left;
}

.value-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-card);
  background: var(--color-gray-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  color: var(--color-secondary);
}

.value-card h3 {
  font-size: 1.15rem;
  margin: 0 0 8px;
  font-weight: 700;
}

.value-card p {
  color: var(--color-gray-mid);
  margin: 0;
  font-size: 0.98rem;
}

.service-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 32px 26px;
  box-shadow: var(--shadow-soft);
}

.service-card h3 {
  font-size: 1.15rem;
  margin: 0 0 10px;
  font-weight: 700;
  color: var(--color-primary);
}

.service-card p {
  color: var(--color-gray-mid);
  margin: 0;
  font-size: 0.98rem;
}

/* ---------- Products ---------- */
.products-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 28px;
  align-items: stretch;
}

.product-card {
  border-radius: var(--radius-card);
  padding: 40px;
  box-shadow: var(--shadow-soft);
}

.product-card.featured {
  background: var(--gradient-brand);
  color: var(--color-white);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.product-card.featured .product-tag {
  display: inline-block;
  background: rgba(255, 255, 255, 0.16);
  color: var(--color-white);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
  width: fit-content;
}

.product-card.featured h3 {
  font-size: 1.6rem;
  margin: 0 0 12px;
}

.product-card.featured .vertexa-logo {
  width: 150px;
  max-width: 100%;
  height: auto;
  margin: 6px 0 22px;
}

.product-card.featured p {
  color: rgba(255, 255, 255, 0.88);
  margin: 0 0 24px;
  max-width: 460px;
}

.product-card.upcoming {
  position: relative;
  background: var(--color-gray-light);
  border: 1px dashed var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-card.upcoming .blur-content {
  filter: blur(4px);
  opacity: 0.6;
  text-align: center;
}

.product-card.upcoming .blur-content h3 {
  margin: 0 0 8px;
  color: var(--color-primary);
}

.product-card.upcoming .overlay-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--color-primary);
  background: rgba(244, 247, 252, 0.35);
  font-size: 0.98rem;
}

/* ---------- Contact ---------- */
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
  align-items: start;
}

.contact-info a {
  color: var(--color-white);
  font-weight: 600;
}

.contact-info p {
  color: rgba(255, 255, 255, 0.85);
  max-width: 380px;
}

.contact-form {
  display: grid;
  gap: 16px;
}

.contact-form label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--color-white);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-btn);
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: 0.98rem;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.contact-form textarea {
  min-height: 130px;
  resize: vertical;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-dark);
  color: rgba(255, 255, 255, 0.75);
  padding: 40px 0;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-brand img {
  height: 38px;
  width: auto;
}

.footer-links {
  display: flex;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.92rem;
}

.footer-links a:hover {
  color: var(--color-white);
}

.footer-copy {
  width: 100%;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 10px;
}

/* ---------- Legal pages ---------- */
.legal-page {
  padding: 72px 0 96px;
}

.legal-page .container {
  max-width: 780px;
}

.legal-page h1 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin: 0 0 8px;
  color: var(--color-primary);
}

.legal-updated {
  color: var(--color-gray-mid);
  font-size: 0.9rem;
  margin: 0 0 40px;
}

.legal-page h2 {
  font-size: 1.25rem;
  margin: 40px 0 12px;
  color: var(--color-primary);
}

.legal-page p,
.legal-page li {
  color: #333;
  font-size: 0.98rem;
}

.legal-page ul {
  padding-left: 22px;
}

.legal-page a.back-link {
  display: inline-block;
  margin-bottom: 28px;
  font-weight: 600;
}

/* ---------- Fade-in on scroll ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-3 {
    grid-template-columns: 1fr;
  }
  .products-grid {
    grid-template-columns: 1fr;
  }
  .contact-wrap {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .circuit-deco {
    width: 360px;
    height: 360px;
    right: -100px;
  }
}

@media (max-width: 720px) {
  .main-nav {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--color-primary);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .main-nav.is-open {
    max-height: 320px;
  }
  .main-nav ul {
    flex-direction: column;
    padding: 12px 24px 20px;
    gap: 4px;
  }
  .main-nav a {
    color: var(--color-white);
  }
  .main-nav a:hover,
  .main-nav a:focus-visible {
    background: rgba(255, 255, 255, 0.14);
  }
  .nav-toggle {
    display: inline-block;
  }
  section {
    padding: 64px 0;
  }
  .hero {
    padding: 64px 0 80px;
  }
}

@media (min-width: 560px) {
  .brand-name {
    display: inline-block;
  }
}
