/* ==========================================================================
   Stackmac — site styles
   Lightweight, system fonts, no external assets
   ========================================================================== */

/* ---------- Custom properties ---------- */
:root {
  --navy: #1e1b4b;
  --navy-dark: #171438;
  --blue: #4f46e5;
  --blue-light: #eef0fe;
  --accent: #a855f7;
  --ink: #241f45;
  --muted: #5b5878;
  --line: #e3e2f2;
  --bg: #ffffff;
  --bg-soft: #f6f6fc;
  --radius: 10px;
  --shadow: 0 4px 16px rgba(49, 46, 129, 0.08);
  --maxw: 1100px;
}

/* ---------- Reset / base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 4.5rem; /* offset for fixed header */
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
}

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

h1, h2, h3 {
  line-height: 1.2;
  color: var(--navy);
  margin: 0 0 0.5rem;
}

h1 { font-size: 2.4rem; letter-spacing: -0.02em; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.15rem; }

p {
  margin: 0 0 1rem;
}

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

a:hover,
a:focus {
  text-decoration: underline;
}

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

/* ---------- Layout helpers ---------- */
.container {
  width: min(var(--maxw), 92%);
  margin-inline: auto;
}

section {
  padding: 4rem 0;
}

.section-head {
  max-width: 640px;
  margin-bottom: 2rem;
}

.kicker {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 0.4rem;
}

/* ---------- Header / navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--navy);
}

.brand:hover { text-decoration: none; }

.brand img {
  display: block;
  width: 34px;
  height: 34px;
  border-radius: 8px;
}

.nav-toggle {
  position: absolute; /* hide native checkbox */
  appearance: none;
  opacity: 0;
  pointer-events: none;
}

.nav-label {
  display: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 6px;
}

.nav-label:hover { background: var(--blue-light); }

.nav-label svg {
  display: block;
  width: 26px;
  height: 26px;
  stroke: var(--navy);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
}

.site-nav ul {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  display: block;
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
}

.site-nav a:hover {
  background: var(--blue-light);
  text-decoration: none;
  color: var(--navy);
}

/* ---------- Hero ---------- */
.hero {
  padding: 5rem 0;
  background:
    radial-gradient(600px 300px at 85% -10%, rgba(168, 85, 247, 0.12), transparent 60%),
    linear-gradient(180deg, var(--bg-soft), var(--bg));
}

.hero-inner {
  max-width: 720px;
}

.hero .eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  background: var(--blue-light);
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.hero h1 {
  margin-bottom: 0.75rem;
}

.hero p.lead {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 560px;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.btn {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
}

.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--blue);
  color: #fff;
}

.btn-primary:hover { background: #4338ca; }

.btn-ghost {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}

.btn-ghost:hover { background: var(--navy); color: #fff; }

/* ---------- Cards / service grids ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.card .icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--blue-light);
  margin-bottom: 0.9rem;
}

.card .icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--blue);
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card h3 { margin-bottom: 0.4rem; }
.card p { color: var(--muted); font-size: 0.95rem; margin: 0; }

/* Center the trailing DevOps card in the services grid */
.card--center {
  grid-column: 1 / -1;
  justify-self: center;
  max-width: 340px;
  text-align: center;
}
.card--center .icon {
  margin-inline: auto;
}

/* ---------- Service detail sections ---------- */
.service {
  background: var(--bg-soft);
}

.service .body {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.service ul.features {
  list-style: none;
  margin: 0;
  padding: 0;
}

.service ul.features li {
  display: flex;
  gap: 0.6rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
}

.service ul.features li:last-child { border-bottom: none; }

.check {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  border-radius: 50%;
  background: rgba(168, 85, 247, 0.15);
}

.check svg {
  width: 13px;
  height: 13px;
  stroke: var(--accent);
  stroke-width: 2.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Stats strip ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  background: var(--navy);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  margin-top: 2rem;
}

.stats div { text-align: center; }

.stats strong {
  display: block;
  font-size: 1.7rem;
  color: #fff;
  letter-spacing: -0.02em;
}

.stats span {
  font-size: 0.85rem;
  color: #a9a4d6;
}

/* ---------- Contact ---------- */
.contact .body {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2.5rem;
  align-items: start;
}

.contact-details address {
  font-style: normal;
  color: var(--muted);
  line-height: 1.9;
}

.contact-details a { color: var(--blue); }

form .field {
  margin-bottom: 1rem;
}

label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
  color: var(--navy);
}

input,
select,
textarea {
  width: 100%;
  padding: 0.65rem 0.8rem;
  font: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

textarea { resize: vertical; min-height: 120px; }

.form-note {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0.75rem 0 1rem;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-dark);
  color: #c9c6ec;
  padding: 3rem 0 1.5rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.site-footer h4 {
  color: #fff;
  font-size: 0.95rem;
  margin: 0 0 0.75rem;
}

.site-footer p,
.site-footer li {
  font-size: 0.9rem;
  color: #a5a0d4;
}

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

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 0.6rem;
}

.footer-brand img {
  width: 30px;
  height: 30px;
  border-radius: 7px;
}

.social-links {
  display: flex;
  gap: 0.6rem;
  list-style: none;
  margin: 0.9rem 0 0;
  padding: 0;
}

.social-links a {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.social-links a:hover { background: var(--blue); text-decoration: none; }

.social-links svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-list li { padding: 0.25rem 0; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 1.25rem;
  font-size: 0.85rem;
  color: #918bc4;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ---------- Responsive: mobile nav ---------- */
@media (max-width: 760px) {
  h1 { font-size: 1.9rem; }
  h2 { font-size: 1.45rem; }

  .nav-label { display: block; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    display: none;
  }

  .site-nav ul {
    flex-direction: column;
    padding: 0.75rem 4%;
  }

  .site-nav a { padding: 0.75rem 0.5rem; }

  .nav-toggle:checked ~ .site-nav { display: block; }

  .nav-toggle:checked ~ .nav-label .bars { display: none; }
  .nav-label .cross { display: none; }
  .nav-toggle:checked ~ .nav-label .cross { display: block; }

  .hero { padding: 3.25rem 0; }
  section { padding: 3rem 0; }

  .service .body,
  .contact .body { grid-template-columns: 1fr; gap: 1.75rem; }

  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* ==========================================================================
   Graphical enhancements — pure CSS + inline SVG, zero JavaScript
   ========================================================================== */

/* ---------- Keyframes ---------- */
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

@keyframes dash {
  to { stroke-dashoffset: -24; }
}

@keyframes marquee {
  to { transform: translateX(-100%); }
}

@keyframes sheen {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(300%); }
}

/* ---------- Header accent ---------- */
.site-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--accent), var(--blue));
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 5rem 0;
  background:
    radial-gradient(700px 340px at 85% -10%, rgba(168, 85, 247, 0.16), transparent 60%),
    radial-gradient(600px 300px at -10% 110%, rgba(79, 70, 229, 0.12), transparent 60%),
    linear-gradient(180deg, var(--bg-soft), var(--bg));
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(49, 46, 129, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(49, 46, 129, 0.05) 1px, transparent 1px);
  background-size: 36px 36px;
  -webkit-mask-image: radial-gradient(70% 70% at 50% 30%, #000 40%, transparent 100%);
  mask-image: radial-gradient(70% 70% at 50% 30%, #000 40%, transparent 100%);
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3rem;
  align-items: center;
  max-width: none;
}

.hero-copy { max-width: 640px; }

.hero-ticks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
}

.hero-ticks li { display: flex; align-items: center; gap: 0.45rem; }

.hero-ticks li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.18);
}

.hero-visual {
  position: relative;
  padding: 1.5rem;
  border-radius: 18px;
  background:
    radial-gradient(300px 160px at 70% 0%, rgba(129, 140, 248, 0.25), transparent 70%),
    linear-gradient(160deg, #2a2660, #171438);
  border: 1px solid rgba(129, 140, 248, 0.3);
  box-shadow: 0 24px 60px rgba(23, 20, 56, 0.35);
}

.hero-visual .scene { display: block; width: 100%; height: auto; }

.hero-visual .orbit {
  fill: none;
  stroke: rgba(129, 140, 248, 0.45);
  stroke-width: 1.5;
  stroke-dasharray: 4 8;
  animation: spin 26s linear infinite;
  transform-origin: 210px 84px;
}

.hero-visual .orbit-dot {
  animation: spin 14s linear infinite;
  transform-origin: 210px 84px;
}

.hero-visual .orbit-dot-2 {
  animation-duration: 9s;
  animation-direction: reverse;
}

.hero-visual .cloud { animation: floaty 6s ease-in-out infinite; }
.hero-visual .globe { animation: floaty 7s ease-in-out infinite reverse; }

.hero-visual .flow {
  fill: none;
  stroke: #818cf8;
  stroke-width: 2.5;
  stroke-dasharray: 5 7;
  animation: dash 1.4s linear infinite;
}

.hero-visual .led { animation: blink 2.2s ease-in-out infinite; }
.hero-visual .led-2 { animation-delay: 0.5s; }
.hero-visual .led-3 { animation-delay: 1s; }
.hero-visual .sat { animation: blink 1.8s ease-in-out infinite; }

.chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--navy);
  font-size: 0.8rem;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(23, 20, 56, 0.3);
  animation: floaty 5s ease-in-out infinite;
}

.chip .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: blink 1.6s ease-in-out infinite;
}

.chip-uptime { top: 1.1rem; right: 1rem; }
.chip-deploy { bottom: 1.1rem; left: 1rem; animation-delay: 1.2s; color: #7c3aed; }

/* ---------- Buttons ---------- */
.btn-primary {
  background: linear-gradient(135deg, var(--blue), #4338ca);
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(79, 70, 229, 0.45);
}

/* ---------- Cards ---------- */
.card {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(79, 70, 229, 0.4);
  box-shadow: 0 14px 34px rgba(49, 46, 129, 0.16);
}

.card .icon {
  background: linear-gradient(135deg, var(--blue-light), rgba(168, 85, 247, 0.18));
  transition: transform 0.25s ease;
}

.card:hover .icon { transform: scale(1.08) rotate(-3deg); }

/* ---------- Tech strip (CSS marquee) ---------- */
.tech-strip {
  border-block: 1px solid var(--line);
  background: var(--bg-soft);
  overflow: hidden;
}

.marquee { display: flex; width: 100%; }

.marquee ul {
  display: flex;
  flex: none;
  list-style: none;
  margin: 0;
  padding: 0.8rem 0;
  animation: marquee 28s linear infinite;
}

.marquee li {
  position: relative;
  flex: none;
  margin-right: 3rem;
  padding-left: 3rem;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.marquee li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-radius: 50%;
  background: var(--accent);
}

.marquee:hover ul { animation-play-state: paused; }

/* ---------- Service visual panels ---------- */
.visual {
  margin-top: 1.5rem;
  padding: 1.25rem;
  border-radius: var(--radius);
  background:
    radial-gradient(240px 120px at 80% 0%, rgba(129, 140, 248, 0.18), transparent 70%),
    linear-gradient(160deg, #2a2660, #171438);
  border: 1px solid rgba(129, 140, 248, 0.25);
  box-shadow: var(--shadow);
}

.visual svg { display: block; width: 100%; height: auto; }

.visual .flow {
  fill: none;
  stroke: #818cf8;
  stroke-width: 2.5;
  stroke-dasharray: 5 7;
  animation: dash 1.4s linear infinite;
}

.visual .led { animation: blink 2.2s ease-in-out infinite; }
.visual .led-2 { animation-delay: 0.5s; }
.visual .led-3 { animation-delay: 1s; }
.visual .sat { animation: blink 1.8s ease-in-out infinite; }
.visual .cloud { animation: floaty 6s ease-in-out infinite; }
.visual .globe { animation: floaty 7s ease-in-out infinite reverse; }

/* ---------- Stats strip ---------- */
.stats {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(400px 200px at 85% 0%, rgba(168, 85, 247, 0.25), transparent 60%),
    radial-gradient(300px 180px at 10% 120%, rgba(79, 70, 229, 0.35), transparent 60%),
    linear-gradient(135deg, var(--navy), var(--navy-dark));
  border: 1px solid rgba(129, 140, 248, 0.25);
}

.stats::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  animation: sheen 6s ease-in-out infinite;
}

.stats strong {
  background: linear-gradient(120deg, #fff, #a5b4fc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Contact ---------- */
.contact {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(500px 260px at 90% -20%, rgba(168, 85, 247, 0.14), transparent 60%),
    radial-gradient(500px 260px at 0% 120%, rgba(79, 70, 229, 0.12), transparent 60%),
    var(--bg-soft);
}

.contact form {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

/* ---------- Reduced motion ---------- */
@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;
  }
}

/* ---------- Responsive additions ---------- */
@media (max-width: 760px) {
  .hero-inner { grid-template-columns: 1fr; gap: 2rem; }

  .hero-visual {
    width: 100%;
    max-width: 460px;
    margin-inline: auto;
  }

  .chip-uptime { top: 0.75rem; right: 0.5rem; }
  .chip-deploy { bottom: 0.75rem; left: 0.5rem; }
}
