/* ==========================================================================
   DevSapience Technology Solutions — site stylesheet
   Single accent (teal), full light/dark support, no external dependencies.
   ========================================================================== */

:root {
  --bg:           #fafbfc;
  --bg-alt:       #f2f5f7;
  --surface:      #ffffff;
  --surface-2:    #f1f4f6;
  --line:         #dfe4e9;
  --line-strong:  #c8d1d8;
  --text:         #0b1220;
  --muted:        #55606e;
  --accent:       #0d7d6d;
  --accent-ink:   #075f53;
  --accent-soft:  rgba(13, 125, 109, 0.08);
  --accent-line:  rgba(13, 125, 109, 0.24);
  --shadow-sm:    0 1px 2px rgba(11, 18, 32, 0.05);
  --shadow-md:    0 8px 28px rgba(11, 18, 32, 0.08);
  --radius:       16px;
  --radius-sm:    10px;
  --maxw:         72rem;
  --header-h:     4.25rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:           #070c14;
    --bg-alt:       #0b111b;
    --surface:      #0e1520;
    --surface-2:    #161f2c;
    --line:         #232e3d;
    --line-strong:  #33404f;
    --text:         #e6ecf3;
    --muted:        #96a3b2;
    --accent:       #4fd1b8;
    --accent-ink:   #7ee0cc;
    --accent-soft:  rgba(79, 209, 184, 0.10);
    --accent-line:  rgba(79, 209, 184, 0.26);
    --shadow-sm:    0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md:    0 8px 28px rgba(0, 0, 0, 0.45);
  }
}

:root[data-theme="dark"] {
  --bg:           #070c14;
  --bg-alt:       #0b111b;
  --surface:      #0e1520;
  --surface-2:    #161f2c;
  --line:         #232e3d;
  --line-strong:  #33404f;
  --text:         #e6ecf3;
  --muted:        #96a3b2;
  --accent:       #4fd1b8;
  --accent-ink:   #7ee0cc;
  --accent-soft:  rgba(79, 209, 184, 0.10);
  --accent-line:  rgba(79, 209, 184, 0.26);
  --shadow-sm:    0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md:    0 8px 28px rgba(0, 0, 0, 0.45);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
  font-size: 0.92em;
}

img, svg { max-width: 100%; }

a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 100;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip:focus { left: 0; }

/* -- Layout ------------------------------------------------------------ */

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: 1.5rem;
}
@media (max-width: 560px) { .wrap { padding-inline: 1.15rem; } }

section.band { padding: 4.5rem 0; }
section.band.tight { padding: 3rem 0; }
section.band.alt { background: var(--bg-alt); border-block: 1px solid var(--line); }

/* -- Header ------------------------------------------------------------ */

header.site {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
@supports (backdrop-filter: blur(1px)) {
  header.site {
    background: color-mix(in srgb, var(--bg) 86%, transparent);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
  }
}

.navbar {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text);
  flex: none;
}
/* The mark carries its own detail (heartbeat stem, mouse, circuit trace), so it
   is drawn straight onto the page rather than boxed into a tile — a 34px tile
   left it too little room to read. */
.brand .mark {
  width: 42px; height: 42px;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.brand .mark svg { width: 42px; height: 42px; display: block; }
@media (max-width: 480px) {
  .brand .mark, .brand .mark svg { width: 36px; height: 36px; }
}
.brand .word { display: flex; flex-direction: column; line-height: 1.12; }
.brand .word b {
  font-size: 1.02rem;
  font-weight: 750;
  letter-spacing: -0.018em;
}
.brand .word span {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}
@media (max-width: 400px) { .brand .word span { display: none; } }

.nav-right { display: flex; align-items: center; gap: 0.4rem; }

nav.links { display: flex; align-items: center; gap: 0.15rem; }
nav.links a {
  display: inline-block;
  padding: 0.42rem 0.75rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 550;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}
nav.links a:hover { color: var(--text); background: var(--surface-2); }
nav.links a[aria-current="page"] { color: var(--accent-ink); background: var(--accent-soft); }

#menu-btn { display: none; }

.icon-btn {
  width: 36px; height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  border-radius: 9px;
  cursor: pointer;
  padding: 0;
  flex: none;
}
.icon-btn:hover { color: var(--text); border-color: var(--line-strong); }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn .moon { display: none; }
:root[data-theme="dark"] .icon-btn .moon { display: block; }
:root[data-theme="dark"] .icon-btn .sun  { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-btn .moon { display: block; }
  :root:not([data-theme="light"]) .icon-btn .sun  { display: none; }
}

@media (max-width: 860px) {
  nav.links {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 0.6rem 1.15rem 1rem;
    box-shadow: var(--shadow-md);
  }
  nav.links.open { display: flex; }
  nav.links a { padding: 0.7rem 0.75rem; font-size: 0.98rem; }
  #menu-btn { display: inline-flex; }
}

/* -- Typography -------------------------------------------------------- */

h1, h2, h3, h4 { margin: 0; letter-spacing: -0.022em; text-wrap: balance; }

h1 { font-size: clamp(2.05rem, 5.2vw, 3.3rem); font-weight: 800; line-height: 1.1; }
h2 { font-size: clamp(1.55rem, 3.4vw, 2.1rem); font-weight: 780; line-height: 1.18; }
h3 { font-size: 1.12rem; font-weight: 700; line-height: 1.35; letter-spacing: -0.012em; }
h4 { font-size: 0.98rem; font-weight: 700; }

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

.lede {
  font-size: clamp(1.02rem, 1.7vw, 1.16rem);
  color: var(--muted);
  max-width: 62ch;
  text-wrap: pretty;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin-bottom: 0.85rem;
}
.eyebrow::before {
  content: "";
  width: 1.4rem; height: 1px;
  background: var(--accent);
  flex: none;
}

.section-head { max-width: 60ch; margin-bottom: 2.5rem; }
.section-head p { margin-top: 0.7rem; color: var(--muted); }

.prose { max-width: 68ch; }
.prose p { color: var(--muted); }
.prose h3 { margin: 2rem 0 0.55rem; color: var(--text); }
.prose ul { margin: 0 0 1rem; padding-left: 1.15rem; color: var(--muted); }
.prose li { margin-bottom: 0.45rem; }
.prose strong { color: var(--text); font-weight: 650; }

/* -- Buttons ----------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.68rem 1.25rem;
  border-radius: 10px;
  font-size: 0.93rem;
  font-weight: 620;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 15px; height: 15px; flex: none; }

.btn.primary { background: var(--accent); color: #ffffff; }
.btn.primary:hover { background: var(--accent-ink); }
:root[data-theme="dark"] .btn.primary { color: #06110e; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn.primary { color: #06110e; }
}

.btn.ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line-strong);
}
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.9rem; }

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-weight: 620;
  color: var(--accent-ink);
  text-decoration: none;
}
.arrow-link:hover { gap: 0.55rem; }
.arrow-link svg { width: 14px; height: 14px; }

/* -- Hero -------------------------------------------------------------- */

.hero {
  position: relative;
  padding: clamp(3.5rem, 8vw, 6.5rem) 0 clamp(3rem, 6vw, 5rem);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60rem 28rem at 15% -10%, var(--accent-soft), transparent 65%),
    linear-gradient(to bottom, var(--surface-2), transparent 45%);
  pointer-events: none;
  z-index: 0;
}
.hero .wrap { position: relative; z-index: 1; }
.hero h1 { max-width: 20ch; }
.hero .lede { margin-top: 1.15rem; font-size: clamp(1.05rem, 1.9vw, 1.24rem); }

/* Inner pages carry a shorter hero than the home page. */
.hero.page { padding: clamp(2.75rem, 6vw, 4.25rem) 0 clamp(2.25rem, 4.5vw, 3.25rem); }
.hero.page h1 { font-size: clamp(1.85rem, 4.4vw, 2.85rem); max-width: 24ch; }
.hero.page .lede { font-size: clamp(1rem, 1.7vw, 1.14rem); }

/* -- Score formula ------------------------------------------------------ */

.formula {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.7rem;
  margin: 1.5rem 0 0.9rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.1rem;
  font-variant-numeric: tabular-nums;
}
.formula > b { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.03em; }
.formula .op { color: var(--muted); font-size: 1.2rem; }
.formula .term { display: flex; flex-direction: column; line-height: 1.25; }
.formula .term em {
  font-style: normal;
  font-size: 1.12rem;
  font-weight: 720;
  color: var(--accent-ink);
  white-space: nowrap;
}
.formula .term span {
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* -- Stat strip -------------------------------------------------------- */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 3.5rem;
}
.stats div { background: var(--surface); padding: 1.35rem 1.4rem; }
.stats b {
  display: block;
  font-size: 1.6rem;
  font-weight: 780;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.stats span {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.83rem;
  color: var(--muted);
}

/* -- Cards ------------------------------------------------------------- */

.grid { display: grid; gap: 1.1rem; }
.grid.two   { grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(16.5rem, 1fr)); }
.grid.four  { grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem;
}
.card h3 { margin-bottom: 0.45rem; }
.card p { color: var(--muted); font-size: 0.94rem; }
.card .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem; height: 2rem;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 0.8rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  margin-bottom: 0.95rem;
}
.card .ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem; height: 2.35rem;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  margin-bottom: 1rem;
}
.card .ico svg { width: 18px; height: 18px; }

/* -- Product cards ----------------------------------------------------- */

.product {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.9rem 1.9rem 1.6rem;
  overflow: hidden;
}
.product::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--accent);
}
.product .name { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.85rem; }
.product .name h3 { font-size: 1.32rem; font-weight: 780; }
.product .glyph {
  width: 2.4rem; height: 2.4rem;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.product .glyph svg { width: 19px; height: 19px; }
.product .role {
  font-size: 0.86rem;
  font-weight: 620;
  color: var(--accent-ink);
  margin-bottom: 0.7rem;
}
.product p { color: var(--muted); font-size: 0.95rem; }
.product ul {
  list-style: none;
  margin: 1.15rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}
.product li {
  position: relative;
  padding-left: 1.4rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.product li::before {
  content: "";
  position: absolute;
  left: 0.15rem; top: 0.62em;
  width: 6px; height: 6px;
  border-radius: 2px;
  background: var(--accent);
}
.product .foot {
  margin-top: auto;
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.24rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.tag.neutral {
  border-color: var(--line-strong);
  background: var(--surface-2);
  color: var(--muted);
}

.taglist { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 1.2rem; }
.taglist span {
  padding: 0.28rem 0.65rem;
  border-radius: 7px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 0.79rem;
  color: var(--muted);
  white-space: nowrap;
}

/* -- Split feature block ----------------------------------------------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 3.5rem;
  align-items: start;
}
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); gap: 2.2rem; } }

/* -- Tables ------------------------------------------------------------ */

.tablewrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 1.5rem 0;
  background: var(--surface);
}
table { border-collapse: collapse; width: 100%; font-size: 0.9rem; min-width: 30rem; }
th, td { text-align: left; padding: 0.72rem 1.05rem; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:last-child td { border-bottom: none; }
th {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface-2);
  white-space: nowrap;
}
td { color: var(--muted); }
td:first-child { color: var(--text); font-weight: 580; }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* -- Note -------------------------------------------------------------- */

.note {
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  font-size: 0.93rem;
  color: var(--muted);
}
.note strong { color: var(--text); }

/* -- People ------------------------------------------------------------ */

.person {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  max-width: 26rem;
}
.person .avatar {
  width: 3.1rem; height: 3.1rem;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--accent-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.02rem;
  font-weight: 750;
  letter-spacing: 0.02em;
  flex: none;
}
.person b { display: block; font-size: 1rem; font-weight: 700; }
.person span { display: block; font-size: 0.88rem; color: var(--muted); margin-top: 0.1rem; }

/* -- CTA --------------------------------------------------------------- */

.cta {
  position: relative;
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  border-radius: 20px;
  padding: clamp(2.2rem, 5vw, 3.2rem);
  text-align: center;
  overflow: hidden;
}
.cta h2 { max-width: 22ch; margin-inline: auto; }
.cta p { margin: 0.85rem auto 0; color: var(--muted); max-width: 52ch; }
.cta .btn-row { justify-content: center; }

/* -- Contact ----------------------------------------------------------- */

.contact-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.7rem;
}
.contact-card h3 { margin-bottom: 0.35rem; }
.contact-card p { color: var(--muted); font-size: 0.93rem; margin-bottom: 0.9rem; }
.contact-card a.big { font-size: 1.02rem; font-weight: 650; word-break: break-word; }

/* -- Footer ------------------------------------------------------------ */

footer.site {
  border-top: 1px solid var(--line);
  background: var(--bg-alt);
  padding: 3.5rem 0 2rem;
}
.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 2.5rem;
}
@media (max-width: 820px) {
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }
  .foot-grid > div:first-child { grid-column: 1 / -1; }
}
footer.site h4 {
  font-size: 0.71rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.9rem;
}
footer.site ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
footer.site ul a { font-size: 0.9rem; color: var(--muted); text-decoration: none; }
footer.site ul a:hover { color: var(--accent-ink); }
footer.site .blurb { font-size: 0.9rem; color: var(--muted); max-width: 34ch; margin-top: 1rem; }
.foot-bottom {
  margin-top: 3rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.84rem;
  color: var(--muted);
}
.foot-bottom a { color: var(--muted); text-decoration: none; }
.foot-bottom a:hover { color: var(--accent-ink); }
