/* =========================================================
   Simpuer Technologies — Design Tokens
   ========================================================= */
:root {
  --navy-900: #141A2E;
  --navy-800: #1C2540;
  --navy-700: #232D4B; /* UVA Jefferson Blue */
  --navy-600: #34406B;
  --steel-500: #47548C;
  --accent-500: #E57200; /* UVA Cavalier Orange */
  --accent-600: #B85A00;
  --warm-500: #E57200;
  --warm-600: #B85A00;

  --bg: #F7FAFC;
  --white: #FFFFFF;
  --text-900: #0B2436;
  --text-600: #48596A;
  --text-on-dark: #EAF2FA;
  --text-on-dark-muted: #A9C2D8;
  --border: #E2E8F0;
  --border-on-dark: rgba(255,255,255,0.14);

  --font-heading: 'Satoshi', sans-serif;
  --font-body: 'Satoshi', sans-serif;

  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 2px rgba(20,26,46,0.06), 0 1px 1px rgba(20,26,46,0.04);
  --shadow-md: 0 8px 24px rgba(20,26,46,0.10);
  --shadow-lg: 0 20px 48px rgba(20,26,46,0.16);

  --header-h: 80px;
  --duration: 200ms;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================================================
   Reset
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-900);
  background: var(--white);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { font-family: var(--font-heading); margin: 0; line-height: 1.2; color: var(--text-900); }
p { margin: 0; }
button { font: inherit; cursor: pointer; }
.icon { width: 20px; height: 20px; flex-shrink: 0; }

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent-500);
  color: var(--white);
  padding: 0.75rem 1.25rem;
  z-index: 1000;
  border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 3px solid var(--accent-500);
  outline-offset: 2px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

section { scroll-margin-top: var(--header-h); }

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  transition: transform var(--duration) var(--ease), background var(--duration) var(--ease), box-shadow var(--duration) var(--ease), border-color var(--duration) var(--ease);
  cursor: pointer;
  white-space: nowrap;
}
.btn-accent {
  background: var(--accent-500);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}
.btn-accent:hover { background: var(--accent-600); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.btn-warm {
  background: var(--warm-500);
  border-color: var(--warm-500);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(229, 114, 0, 0.35);
}
.btn-warm:hover {
  background: var(--warm-600);
  border-color: var(--warm-600);
  box-shadow: 0 6px 18px rgba(229, 114, 0, 0.45);
  transform: translateY(-1px);
}
.btn-outline {
  background: transparent;
  border-color: var(--border-on-dark);
  color: inherit;
}
.hero .btn-outline { border-color: rgba(255,255,255,0.35); color: var(--white); }
.hero .btn-outline:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.6); }
.services .btn-outline, .about .btn-outline { border-color: var(--border); color: var(--text-900); }
.btn-sm { padding: 0.5rem 1.1rem; font-size: 0.875rem; }
.btn-lg { padding: 0.9rem 1.85rem; font-size: 1rem; }
.btn-block { width: 100%; }

.btn-pill { border-radius: 999px; }
.btn-pill svg { width: 17px; height: 17px; }
.btn-pill.btn-accent {
  background: linear-gradient(135deg, var(--accent-500), var(--accent-600));
  box-shadow: 0 4px 14px rgba(229, 114, 0, 0.35);
}
.btn-pill.btn-accent:hover {
  background: linear-gradient(135deg, var(--accent-600), var(--navy-600));
  box-shadow: 0 6px 18px rgba(229, 114, 0, 0.45);
  transform: translateY(-1px) scale(1.03);
}
.btn-pill.btn-warm:hover {
  transform: translateY(-1px) scale(1.03);
}

/* =========================================================
   Header
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(28, 37, 64, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: box-shadow var(--duration) var(--ease);
}
.site-header.is-scrolled { box-shadow: var(--shadow-md); }

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}

.brand { display: flex; align-items: center; gap: 0.65rem; }
.brand-logo {
  width: auto;
  height: calc(var(--header-h) - 24px);
  flex-shrink: 0;
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}
.nav a {
  color: var(--text-on-dark);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding: 0.25rem 0;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: var(--accent-500);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--duration) var(--ease);
}
.nav a:hover::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: var(--space-4); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  padding: 0.4rem;
}
.nav-toggle .icon { width: 26px; height: 26px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-menu { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 0;
  background: var(--navy-800);
  border-top: 1px solid rgba(255,255,255,0.08);
}
.mobile-nav a {
  padding: var(--space-4) var(--space-6);
  color: var(--text-on-dark);
  font-weight: 500;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.mobile-nav .btn { margin: var(--space-4) var(--space-6); }
.mobile-nav.is-open { display: flex; }

@media (max-width: 860px) {
  .nav { display: none; }
  .header-actions .btn { display: none; }
  .nav-toggle { display: inline-flex; }
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  background: linear-gradient(160deg, var(--navy-900) 0%, var(--navy-700) 100%);
  color: var(--white);
  overflow: hidden;
  padding: clamp(4rem, 10vw, 8rem) 0 clamp(3.5rem, 8vw, 6rem);
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 900ms var(--ease);
  z-index: 0;
}
.hero-video.is-loaded { opacity: 0.8; }
@media (prefers-reduced-motion: reduce) {
  .hero-video { display: none; }
}
@media (max-width: 720px) {
  .hero-video { display: none; }
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(20,26,46,0.92) 0%, rgba(35,45,75,0.85) 100%);
  z-index: 1;
}
.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at top left, black 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}
.hero-inner { position: relative; z-index: 2; max-width: 780px; }

.eyebrow {
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--navy-700);
  margin-bottom: var(--space-4);
  display: block;
}
.hero .eyebrow { color: var(--accent-500); }
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 700;
  color: var(--white);
  margin-bottom: var(--space-6);
}
.hero .lead {
  font-size: 1.15rem;
  color: var(--text-on-dark-muted);
  max-width: 640px;
  margin-bottom: var(--space-8);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-4); margin-bottom: var(--space-12); }
.hero-badges { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.hero-badges span {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-on-dark);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.16);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
}

/* =========================================================
   Section shared
   ========================================================= */
.section-head { max-width: 640px; margin: 0 auto var(--space-16); text-align: center; }
.section-head h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); margin-bottom: var(--space-4); }
.section-sub { color: var(--text-600); font-size: 1.05rem; }
.section-head-light .eyebrow { color: var(--accent-500); }
.section-head-light h2 { color: var(--white); }
.section-head-light .section-sub { color: var(--text-on-dark-muted); }

.services, .about { padding: var(--space-24) 0; }

/* =========================================================
   Section banner images (Services / Technologies)
   ========================================================= */
.section-banner {
  margin-bottom: var(--space-16);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  aspect-ratio: 21 / 6;
  border: 1px solid var(--border);
}
.section-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.section-banner-dark { border-color: var(--border-on-dark); }

@media (max-width: 720px) {
  .section-banner { aspect-ratio: 4 / 3; }
}

/* =========================================================
   Services cards
   ========================================================= */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
}
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  transition: box-shadow var(--duration) var(--ease), transform var(--duration) var(--ease);
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.card-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius-md);
  background: linear-gradient(160deg, var(--navy-700), var(--steel-500));
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--space-6);
}
.card-icon svg { width: 26px; height: 26px; }
.card h3 { font-size: 1.25rem; margin-bottom: var(--space-3); }
.card > p { color: var(--text-600); margin-bottom: var(--space-4); }
.card-list li {
  padding-left: 1.4rem;
  position: relative;
  color: var(--text-600);
  font-size: 0.95rem;
  margin-bottom: var(--space-2);
}
.card-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55rem;
  width: 8px; height: 8px;
  border-radius: 2px;
  background: var(--accent-500);
}

/* =========================================================
   Technologies
   ========================================================= */
.technologies {
  position: relative;
  background: var(--navy-900);
  padding: var(--space-24) 0;
  overflow: hidden;
}
.tech-bg-image {
  position: absolute;
  inset: 0;
  background-image: url('../assets/services-software-development.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.32;
  z-index: 0;
}
.tech-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(20,26,46,0.94) 0%, rgba(35,45,75,0.9) 100%);
  z-index: 0;
}
.tech-grid-bg {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.07) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse at bottom right, black 0%, transparent 70%);
  z-index: 1;
}
.technologies > .container { position: relative; z-index: 2; }
.tech-list {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border-on-dark);
  border: 1px solid var(--border-on-dark);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.tech-item {
  background: var(--navy-800);
  padding: var(--space-8) var(--space-6);
  transition: background var(--duration) var(--ease);
}
.tech-item:hover { background: var(--navy-700); }
.tech-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.08);
  color: var(--accent-500);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--space-4);
}
.tech-icon svg { width: 22px; height: 22px; }
.tech-item h3 { font-size: 1.02rem; color: var(--white); margin-bottom: var(--space-2); }
.tech-item p { font-size: 0.875rem; color: var(--text-on-dark-muted); }

@media (max-width: 960px) {
  .tech-list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .tech-list { grid-template-columns: 1fr; }
}

/* =========================================================
   About
   ========================================================= */
.about-inner {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: var(--space-16);
  align-items: center;
}
.about-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  aspect-ratio: 4 / 4.5;
  border: 1px solid var(--border);
}
.about-image img { width: 100%; height: 100%; object-fit: cover; }
.about-copy h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); margin: var(--space-4) 0 var(--space-6); }
.about-copy p { color: var(--text-600); margin-bottom: var(--space-4); font-size: 1.05rem; }

@media (max-width: 860px) {
  .about-inner { grid-template-columns: 1fr; }
}

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  position: relative;
  background: var(--navy-900);
  color: var(--text-on-dark-muted);
  padding: var(--space-16) 0 var(--space-8);
  overflow: hidden;
}
.footer-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(20,26,46,0.95) 0%, rgba(35,45,75,0.92) 100%);
  z-index: 0;
}
.footer-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at top left, black 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}
.site-footer > .container { position: relative; z-index: 2; }

.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1.2fr;
  gap: var(--space-12);
  padding-bottom: var(--space-12);
  border-bottom: 1px solid var(--border-on-dark);
}
.footer-brand { display: flex; flex-direction: column; gap: var(--space-4); align-items: flex-start; }
.footer-brand img { width: auto; height: 110px; opacity: 0.4; }
.footer-brand p { color: var(--white); font-family: var(--font-heading); font-weight: 600; }
.footer-brand p span { display: block; color: var(--text-on-dark-muted); font-weight: 400; font-size: 0.85rem; margin-top: 0.35rem; font-family: var(--font-body); }
.footer-links { display: flex; flex-direction: column; gap: var(--space-3); }
.footer-links a:hover, .footer-contact a:hover, .footer-legal a:hover { color: var(--white); }

.footer-contact { display: flex; flex-direction: column; gap: var(--space-4); }
.footer-contact li { display: flex; align-items: flex-start; gap: var(--space-3); }
.footer-contact svg { width: 20px; height: 20px; color: var(--accent-500); margin-top: 2px; flex-shrink: 0; }
.footer-contact .label { display: block; font-size: 0.75rem; color: var(--text-on-dark-muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.15rem; }
.footer-contact a, .footer-contact span:not(.label) { color: var(--white); font-weight: 500; font-size: 0.9rem; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
  padding-top: var(--space-6);
  font-size: 0.85rem;
}
.footer-legal { display: flex; gap: var(--space-6); }

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

/* =========================================================
   Back to top
   ========================================================= */
.back-to-top {
  position: fixed;
  right: var(--space-6);
  bottom: var(--space-6);
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--navy-700);
  color: var(--white);
  border: none;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity var(--duration) var(--ease), transform var(--duration) var(--ease), background var(--duration) var(--ease);
  z-index: 90;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--accent-500); }
.back-to-top svg { width: 20px; height: 20px; }

/* =========================================================
   Scroll reveal
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms var(--ease), transform 600ms var(--ease);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 720px) {
  .cards-grid { grid-template-columns: 1fr; }
}
@media (min-width: 721px) and (max-width: 960px) {
  .cards-grid { grid-template-columns: 1fr 1fr; }
}
