/* ==========================================================================
   VirtueSoft Solutions — Design System
   Concept: "Systems blueprint" — precise, structural, quietly confident.
   The small square motif from the logo mark is repeated throughout as a
   structural device (list markers, connectors, node points) rather than
   decoration.
   ========================================================================== */

:root {
  /* Color — midnight + cyan-teal, tuned from the brand mark */
  --navy: #0E1526;
  --navy-soft: #16203A;
  --blue: #1C7580;
  --blue-deep: #145A63;
  --cyan: #4FD1C9;
  --ink: #101828;
  --slate: #565F6E;
  --slate-light: #8A93A3;
  --line: #DDE3EC;
  --paper: #F5F7FA;
  --white: #FFFFFF;

  /* Type */
  --font-head: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-body: 'Source Sans 3', 'Segoe UI', sans-serif;

  /* Layout */
  --maxw: 1180px;
  --gutter: 28px;
  --radius: 6px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--navy);
  margin: 0;
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 4.2vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 2.6vw, 2.3rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1rem; max-width: 62ch; color: var(--slate); }

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

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

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

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

/* Skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--navy);
  color: var(--white);
  padding: 10px 16px;
  z-index: 200;
}
.skip-link:focus { left: 0; }

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

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand img { height: 34px; width: auto; }
.brand-text {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--navy);
  letter-spacing: -0.01em;
}
.brand-text span { color: var(--blue); }

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 34px;
  margin: 0;
  padding: 0;
}
.main-nav a {
  color: var(--ink);
  font-weight: 600;
  font-size: 0.96rem;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--navy);
  border-bottom-color: var(--blue);
}

.nav-cta {
  background: var(--blue);
  color: var(--white) !important;
  padding: 11px 22px;
  border-radius: 6px;
  font-weight: 600;
  border-bottom: none !important;
  transition: background-color 0.15s ease;
}
.nav-cta:hover { background: var(--blue-deep); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 10px;
  cursor: pointer;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--navy);
  position: relative;
  transition: transform 0.2s ease;
}
.nav-toggle span::before,
.nav-toggle span::after { content: ""; position: absolute; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  padding: 13px 26px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 0.98rem;
  font-family: var(--font-body);
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-deep); color: var(--white); }
.btn-outline { border-color: rgba(255,255,255,0.4); color: var(--white); }
.btn-outline:hover { border-color: var(--white); background: rgba(255,255,255,0.08); color: var(--white); }
.btn-outline-dark { border-color: var(--line); color: var(--navy); }
.btn-outline-dark:hover { border-color: var(--blue); color: var(--blue); }

/* ---------- Hero ---------- */
.hero {
  background: var(--white);
  color: var(--ink);
  padding: 76px 0 64px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.hero-eyebrow {
  color: var(--blue);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 14px;
}
.hero h1 { color: var(--navy); margin-bottom: 20px; }
.hero p.lede {
  color: var(--slate);
  font-size: 1.12rem;
  max-width: 46ch;
  margin-bottom: 32px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 40px; }

.hero-stats {
  display: flex;
  gap: 36px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}
.hero-stats .stat-num {
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--navy);
}
.hero-stats .stat-label {
  font-size: 0.85rem;
  color: var(--slate-light);
}

.hero-graphic { position: relative; }

/* fade-in-up: one orchestrated hero load sequence only */
.hero-eyebrow, .hero h1, .hero p.lede, .hero-actions, .hero-stats, .hero-graphic {
  opacity: 0;
  animation: rise 0.7s ease forwards;
}
.hero-eyebrow { animation-delay: 0.05s; }
.hero h1 { animation-delay: 0.15s; }
.hero p.lede { animation-delay: 0.28s; }
.hero-actions { animation-delay: 0.4s; }
.hero-stats { animation-delay: 0.52s; }
.hero-graphic { animation-delay: 0.3s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-eyebrow, .hero h1, .hero p.lede, .hero-actions, .hero-stats, .hero-graphic {
    animation: none; opacity: 1;
  }
}

/* ---------- Page hero (interior pages) ---------- */
.page-hero {
  background: var(--white);
  color: var(--ink);
  padding: 56px 0;
  border-bottom: 1px solid var(--line);
}
.page-hero .eyebrow { color: var(--blue); font-weight: 600; margin-bottom: 10px; }
.page-hero h1 { color: var(--navy); }
.page-hero p { color: var(--slate); margin-top: 14px; max-width: 60ch; }

/* ---------- Sections ---------- */
section { padding: 84px 0; }
.section-alt { background: var(--paper); }
.section-head {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 40px;
  margin-bottom: 48px;
  align-items: end;
}
.section-head h2 { margin-bottom: 0; }
.section-head .lede { max-width: 52ch; }
.section-tag {
  color: var(--blue);
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 10px;
  display: block;
}

/* ---------- Spec list (services / structural list, not cards) ---------- */
.spec-list { border-top: 1px solid var(--line); }
.spec-item {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 28px;
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
}
.spec-item .marker {
  width: 14px;
  height: 14px;
  background: var(--blue);
  margin-top: 6px;
}
.spec-item h3 { margin-bottom: 8px; }
.spec-item p { margin-bottom: 0; }

/* ---------- Ledger stats row ---------- */
.ledger {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.ledger-cell {
  padding: 30px 26px;
  border-right: 1px solid var(--line);
}
.ledger-cell:last-child { border-right: none; }
.ledger-cell .num {
  font-family: var(--font-head);
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--navy);
  display: block;
}
.ledger-cell .label { color: var(--slate); font-size: 0.92rem; }

/* ---------- Process flow ---------- */
.flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
}
.flow-step { position: relative; padding: 0 24px 0 0; }
.flow-node {
  width: 12px; height: 12px;
  background: var(--blue);
  margin-bottom: 18px;
  position: relative;
}
.flow-connector {
  position: absolute;
  top: 6px;
  left: 12px;
  right: -12px;
  height: 1px;
  background: var(--line);
}
.flow-step:last-child .flow-connector { display: none; }
.flow-step .flow-index {
  font-family: var(--font-head);
  font-size: 0.85rem;
  color: var(--slate-light);
  margin-bottom: 6px;
  display: block;
}
.flow-step h3 { margin-bottom: 8px; font-size: 1.1rem; }
.flow-step p { font-size: 0.95rem; }

/* ---------- Case study list ---------- */
.case-list { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.case-row {
  background: var(--white);
  display: grid;
  grid-template-columns: 200px 1fr auto;
  gap: 28px;
  align-items: center;
  padding: 30px 32px;
}
.case-row .tag {
  color: var(--blue);
  font-weight: 600;
  font-size: 0.88rem;
}
.case-row h3 { margin-bottom: 8px; }
.case-row p { margin-bottom: 0; font-size: 0.96rem; }
.case-row .go { white-space: nowrap; font-weight: 600; }

/* Case study detail page */
.case-detail {
  border: 1px solid var(--line);
  padding: 40px;
  margin-bottom: 32px;
}
.case-detail .tag { color: var(--blue); font-weight: 600; font-size: 0.9rem; }
.case-detail h2 { margin: 10px 0 20px; }
.case-meta {
  display: flex;
  gap: 34px;
  margin: 22px 0;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.case-meta div span.label { display: block; font-size: 0.8rem; color: var(--slate-light); margin-bottom: 3px; }
.case-meta div span.value { font-weight: 600; color: var(--navy); }
.case-note {
  font-size: 0.86rem;
  color: var(--slate-light);
  border-left: 2px solid var(--line);
  padding-left: 14px;
  margin-top: 22px;
}

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--navy);
  color: var(--white);
  padding: 64px 0;
  text-align: left;
}
.cta-band .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}
.cta-band h2 { color: var(--white); margin-bottom: 8px; }
.cta-band p { color: #C7D7F7; margin-bottom: 0; }
.cta-band .btn-primary { background: var(--white); color: var(--navy); }
.cta-band .btn-primary:hover { background: var(--paper); color: var(--navy); }

/* ---------- Values / About grid ---------- */
.value-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.value-cell { background: var(--white); padding: 34px; }
.value-cell .marker { width: 12px; height: 12px; background: var(--blue); margin-bottom: 16px; }
.value-cell h3 { margin-bottom: 10px; }
.value-cell p { margin-bottom: 0; font-size: 0.96rem; }

.about-lead {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}
.about-lead .kicker { color: var(--blue); font-weight: 600; margin-bottom: 12px; display: block; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}
.contact-info dl {
  margin: 28px 0 0;
  border-top: 1px solid var(--line);
}
.contact-info dt {
  font-size: 0.82rem;
  color: var(--slate-light);
  margin-top: 20px;
}
.contact-info dd {
  margin: 4px 0 0;
  font-weight: 600;
  color: var(--navy);
  font-size: 1.05rem;
}

.form-field { margin-bottom: 20px; }
.form-field label {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 6px;
  color: var(--navy);
}
.form-field input,
.form-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--paper);
}
.form-field input:focus,
.form-field textarea:focus {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
  background: var(--white);
}
.form-note { font-size: 0.85rem; color: var(--slate-light); margin-top: 14px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  color: #C7D7F7;
  padding: 56px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1fr;
  gap: 40px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255,255,255,0.22);
}
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-brand img { height: 30px; }
.footer-brand-text { font-family: var(--font-head); font-weight: 700; color: var(--white); }
.site-footer h4 { color: var(--white); font-size: 0.95rem; margin-bottom: 16px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer a { color: #C7D7F7; }
.site-footer a:hover { color: var(--white); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 22px;
  font-size: 0.85rem;
  color: #BFD1F5;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-graphic { order: -1; max-width: 320px; }
  .section-head { grid-template-columns: 1fr; }
  .ledger { grid-template-columns: repeat(2, 1fr); }
  .ledger-cell:nth-child(2) { border-right: none; }
  .flow { grid-template-columns: 1fr 1fr; row-gap: 36px; }
  .value-grid { grid-template-columns: 1fr; }
  .about-lead { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .case-row { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .main-nav { position: fixed; inset: 62px 0 0 0; background: var(--white); padding: 20px var(--gutter); transform: translateX(100%); transition: transform 0.25s ease; overflow-y: auto; }
  .main-nav.open { transform: translateX(0); }
  .main-nav ul { flex-direction: column; gap: 4px; }
  .main-nav a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line) !important; }
  .nav-toggle { display: block; }
  .nav-cta { display: inline-block; margin-top: 10px; }
  .spec-item { grid-template-columns: 1fr; }
  .case-detail { padding: 24px; }
  .cta-band .container { flex-direction: column; align-items: flex-start; }
  .footer-grid { grid-template-columns: 1fr; }
}
