/* ============================================================
   Matrix Data Technology — Stylesheet
   Edit the variables in :root to retheme the entire site.
   ============================================================ */

/* ---- Design Tokens ---------------------------------------- */
:root {
  /* Brand colors */
  --color-dark:        #0d2d3a;   /* nav, hero, footer background */
  --color-mid:         #1a4a5c;   /* hero gradient mid */
  --color-accent:      #e07b39;   /* orange — decorative use only (icons, borders, highlights) */
  --color-accent-dark: #c0621f;   /* darker orange — decorative hover */
  --color-accent-text: #8a4010;   /* WCAG AA compliant: 5.5:1 on white — use for ALL text and interactive elements */

  /* Backgrounds */
  --color-bg:          #ffffff;
  --color-bg-alt:      #f4f6f7;
  --color-bg-card:     #ffffff;
  --color-border:      #e0e5e8;

  /* Text */
  --color-text:        #1a1a1a;
  --color-text-muted:  #444444;
  --color-text-light:  #595959;   /* minimum 4.5:1 on white */

  /* Focus */
  --color-focus:       #0060df;   /* blue focus ring — clearly distinct from brand orange */

  /* Sizing */
  --radius-sm:   6px;
  --radius-md:   10px;
  --nav-height:  88px;
  --max-content: 1100px;
  --max-prose:   720px;
  --max-box:     760px;

  --transition: 0.15s ease;
}

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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
               Helvetica, Arial, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
}

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

a {
  color: var(--color-accent-text);
  text-decoration: underline;
  transition: color var(--transition);
}

a:hover { color: var(--color-dark); }

/* Global focus-visible — consistent, high-contrast ring */
:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ---- Skip Link -------------------------------------------- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--color-dark);
  color: #fff;
  padding: 10px 20px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  z-index: 9999;
  transition: top 0s;
}

.skip-link:focus {
  top: 0;
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

/* ---- Navigation ------------------------------------------- */
.site-nav {
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
}

.nav-inner {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
  transition: opacity var(--transition);
}

.nav-logo:hover { opacity: 0.8; }

.nav-logo img {
  height: 72px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  color: var(--color-accent-text);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  padding: 4px 2px;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}

.nav-links a:hover {
  color: var(--color-dark);
  border-bottom-color: var(--color-dark);
}

.nav-links a[aria-current="page"] {
  color: var(--color-dark);
  border-bottom-color: var(--color-accent);
}

/* ---- Hero -------------------------------------------------- */
.hero {
  background: linear-gradient(
    135deg,
    var(--color-dark) 0%,
    var(--color-mid)  60%,
    #1e5a6e           100%
  );
  color: #fff;
  padding: 96px 24px 88px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(1.9rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 20px;
}

.hero p {
  font-size: 1.15rem;
  line-height: 1.75;
  color: rgba(255,255,255,0.92);
  max-width: 580px;
  margin: 0 auto 36px;
}

/* ---- Buttons ---------------------------------------------- */
.btn {
  display: inline-block;
  padding: 13px 30px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background var(--transition), color var(--transition),
              border-color var(--transition), transform var(--transition);
}

.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--color-accent-text);
  color: #fff;
  border-color: var(--color-accent-text);
}

.btn-primary:hover {
  background: var(--color-dark);
  border-color: var(--color-dark);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--color-accent-text);
  border-color: var(--color-accent-text);
}

.btn-outline:hover {
  background: var(--color-accent-text);
  color: #fff;
}

.hero .btn-outline {
  color: #fff;
  border-color: rgba(255,255,255,0.8);
}

.hero .btn-outline:hover {
  background: rgba(255,255,255,0.15);
  border-color: #fff;
}

/* ---- Page Sections ---------------------------------------- */
.section     { padding: 72px 24px; }
.section-alt { background: var(--color-bg-alt); }

.section-inner {
  max-width: var(--max-content);
  margin: 0 auto;
}

.section-title {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 700;
  color: var(--color-accent-text);
  margin-bottom: 20px;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

/* ---- Homepage intro --------------------------------------- */
.home-intro { padding: 72px 24px; }
.home-intro .section-inner { max-width: var(--max-prose); }

.home-intro p {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  margin-bottom: 22px;
  line-height: 1.8;
}

.home-intro p:last-of-type { margin-bottom: 0; }

.cta-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 32px;
}

/* ---- Image callout ---------------------------------------- */
.image-callout {
  background: var(--color-bg-alt);
  padding: 52px 24px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ---- Services grid ---------------------------------------- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.service-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 28px 24px 24px;
  transition: box-shadow var(--transition), transform var(--transition);
}

.service-card:hover {
  box-shadow: 0 8px 28px rgba(0,0,0,0.08);
  transform: translateY(-3px);
}

.service-icon {
  width: 42px;
  height: 42px;
  color: var(--color-accent);
  margin-bottom: 16px;
}

.service-card h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 10px;
  line-height: 1.3;
}

.service-card p {
  font-size: 0.94rem;
  color: var(--color-text-muted);
  line-height: 1.75;
}

/* ---- Content box ------------------------------------------ */
.content-box {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 44px 52px;
  max-width: var(--max-box);
  margin: 0 auto;
}

.content-box p {
  font-size: 1rem;
  color: var(--color-text-muted);
  margin-bottom: 18px;
  line-height: 1.8;
}

.content-box p:last-child { margin-bottom: 0; }

.content-box h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-dark);
  margin: 32px 0 10px;
  padding-top: 8px;
  border-top: 1px solid var(--color-border);
}

.content-box h2:first-of-type { margin-top: 24px; }

.content-box ul, .content-box ol {
  margin: 6px 0 16px 22px;
  color: var(--color-text-muted);
  font-size: 0.97rem;
  line-height: 1.8;
}

.content-box li { margin-bottom: 6px; }

.content-box strong { color: var(--color-dark); }

.content-box code {
  background: var(--color-bg-alt);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.87em;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
}

.content-box a {
  color: var(--color-accent-text);
  text-decoration: underline;
}

.content-box a:hover { color: var(--color-dark); }

/* ---- Timeline (About) ------------------------------------- */
.timeline {
  position: relative;
  margin: 36px 0 8px 12px;
  padding-left: 28px;
  border-left: 3px solid var(--color-border);
  list-style: none;
}

.timeline-item {
  position: relative;
  margin-bottom: 32px;
}

.timeline-item:last-child { margin-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -40px;
  top: 5px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-accent);
  border: 3px solid var(--color-bg);
  box-shadow: 0 0 0 2px var(--color-accent);
}

.timeline-year {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-accent-text);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 2px;
}

.timeline-label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 6px;
  line-height: 1.3;
}

.timeline-desc {
  font-size: 0.93rem;
  color: var(--color-text-light);
  line-height: 1.7;
}

/* ---- Services page footer CTA ----------------------------- */
.cta-band {
  background: var(--color-bg-alt);
  padding: 52px 24px;
  text-align: center;
  border-top: 1px solid var(--color-border);
}

.cta-band p {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  margin-bottom: 22px;
}

/* ---- Footer ----------------------------------------------- */
.site-footer {
  background: var(--color-dark);
  color: rgba(255,255,255,0.75);
  text-align: center;
  padding: 32px 24px;
  font-size: 0.87rem;
  line-height: 1.8;
}

.site-footer a {
  color: rgba(255,255,255,0.85);
  margin: 0 10px;
  text-decoration: underline;
  transition: color var(--transition);
}

.site-footer a:hover { color: #fff; }

.footer-links { margin-top: 6px; }

/* ---- Responsive ------------------------------------------- */
@media (max-width: 768px) {
  .nav-links { gap: 18px; }
  .content-box { padding: 28px 22px; }
  .section { padding: 56px 20px; }
  .home-intro { padding: 56px 20px; }
  .hero { padding: 72px 20px 64px; }
  .cta-row { flex-direction: column; align-items: flex-start; }
  .cta-row .btn { width: 100%; text-align: center; }
  .service-grid { grid-template-columns: 1fr; }
  .timeline { margin-left: 4px; }
}

@media (max-width: 480px) {
  .nav-links { gap: 14px; }
  .nav-links a { font-size: 0.88rem; }
  .hero h1 { font-size: 1.75rem; }
  .hero p { font-size: 1rem; }
}

/* ---- Reduced motion --------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

