/* ==========================================================================
   Lucidity IT Solutions — design tokens
   Light theme is the default (:root). Dark theme values are layered on
   top two ways: a `prefers-color-scheme` media query (no-JS fallback) and
   explicit [data-theme] attributes (set by js/main.js, persisted so a
   manual choice overrides the system setting).
   ========================================================================== */

:root {
  /* ---- static brand tokens (do not flip between themes) ---- */
  --navy-950: #0a1a2c;      /* deepest navy — footer, "always dark" surfaces */
  --accent:     #4a90d9;    /* clarity blue, from the logo */
  --on-dark: #f5f8fb;              /* light text/elements on permanently-dark surfaces */
  --on-dark-muted: rgba(245, 248, 251, 0.7);
  --line-on-dark: rgba(245, 248, 251, 0.16);

  /* ---- theme-aware tokens (redefined for dark below) ---- */
  --bg:         #f5f8fb;   /* page background */
  --bg-alt:     #e9eff6;   /* alternating section background */
  --text:       #16202f;   /* body copy */
  --text-muted: #55636f;   /* secondary copy */
  --text-muted-2: #8a97a3; /* tertiary / fine print */
  --fg-strong:  #123258;   /* headings, primary borders & icons — dark navy on light, near-white on dark */
  --fg-strong-alt: #1c4a82;/* hover state for fg-strong elements */
  --accent-text: #2f6db3;  /* accent used as running text (taglines, hover links) */
  --line:       rgba(18, 50, 88, 0.14);
  --header-bg:  rgba(245, 248, 251, 0.9);
  --band-bg:    #123258;   /* background of permanently-dark bands (CTA / reasons) */
  --btn-primary-bg:       #123258;
  --btn-primary-bg-hover: #1c4a82;
  --btn-primary-text:     #f5f8fb;

  /* type */
  --font-display: "Libre Franklin", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* layout */
  --container: 1120px;
  --gutter: 1.5rem;
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --radius-pill: 999px;
  --shadow-soft: 0 20px 44px -24px rgba(18, 50, 88, 0.32);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg:         #0b1420;
    --bg-alt:     #101c2c;
    --text:       #e7edf5;
    --text-muted: #9fb0c2;
    --text-muted-2: #6d7f92;
    --fg-strong:  #eef3f9;
    --fg-strong-alt: #d7e6f5;
    --accent-text: #7db4e8;
    --line:       rgba(231, 237, 245, 0.14);
    --header-bg:  rgba(11, 20, 32, 0.86);
    --band-bg:    #16283f;
    --btn-primary-bg:       #4a90d9;
    --btn-primary-bg-hover: #6ba8e6;
    --btn-primary-text:     #0a1420;
    color-scheme: dark;
  }
}

[data-theme="dark"] {
  --bg:         #0b1420;
  --bg-alt:     #101c2c;
  --text:       #e7edf5;
  --text-muted: #9fb0c2;
  --text-muted-2: #6d7f92;
  --fg-strong:  #eef3f9;
  --fg-strong-alt: #d7e6f5;
  --accent-text: #7db4e8;
  --line:       rgba(231, 237, 245, 0.14);
  --header-bg:  rgba(11, 20, 32, 0.86);
  --band-bg:    #16283f;
  --btn-primary-bg:       #4a90d9;
  --btn-primary-bg-hover: #6ba8e6;
  --btn-primary-text:     #0a1420;
  color-scheme: dark;
}

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

html { scroll-behavior: smooth; }

@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 reveal ----
   Elements fade content becomes visible by default (progressive enhancement).
   Once js/main.js confirms IntersectionObserver support, it adds "js-ready"
   to <html> and these get their hidden starting state, then "is-visible"
   as each one scrolls into view. */
.reveal {
  transition: opacity 0.6s ease, transform 0.6s ease;
}
html.js-ready .reveal {
  opacity: 0;
  transform: translateY(18px);
}
html.js-ready .reveal.is-visible {
  opacity: 1;
  transform: none;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--fg-strong);
  letter-spacing: -0.015em;
}

h1 { font-size: clamp(2.3rem, 3vw + 1.4rem, 4rem); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 1.3vw + 1.3rem, 2.35rem); font-weight: 700; }
h3 { font-size: clamp(1.1rem, 0.4vw + 1rem, 1.3rem); font-weight: 600; }

p { margin: 0 0 1.1em; max-width: 62ch; }
p:last-child { margin-bottom: 0; }

a { color: inherit; }

.section p,
.card p { color: var(--text-muted); }

ul { margin: 0; padding: 0; }

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

/* ---- section rhythm ---- */

.section { padding: clamp(3.5rem, 6vw, 6.5rem) 0; }

.section--dark {
  background: var(--band-bg);
  color: var(--on-dark);
  transition: background-color 0.25s ease;
}
.section--dark h1,
.section--dark h2,
.section--dark h3 { color: var(--on-dark); }
.section--dark p { color: var(--on-dark-muted); }

.section--mist { background: var(--bg-alt); transition: background-color 0.25s ease; }

/* soft curved transitions in/out of the permanently-dark bands, so the
   color change reads as a flowing shape rather than a hard rectangle */
.wave { display: block; line-height: 0; }
.wave svg { display: block; width: 100%; height: 64px; }
.wave path { fill: var(--band-bg); transition: fill 0.25s ease; }
@media (max-width: 700px) {
  .wave svg { height: 40px; }
}

/* horizon rule — the recurring structural motif */
.horizon {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.horizon::before,
.horizon::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.horizon::before { background: linear-gradient(to left, var(--line), transparent); }
.horizon::after { background: linear-gradient(to right, var(--line), transparent); }
.horizon__mark {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* ---- header / nav ---- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--fg-strong);
}

.brand__mark { width: 30px; height: 30px; flex-shrink: 0; }

.brand__name {
  font-family: var(--font-display);
  font-size: 1.14rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.nav__right {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  margin-left: auto;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav__links a {
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  position: relative;
  padding: 0.2rem 0;
}

.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: -2px;
  height: 1px;
  background: var(--accent);
  transition: right 0.2s ease;
}
.nav__links a:hover::after,
.nav__links a[aria-current="page"]::after { right: 0; }
.nav__links a[aria-current="page"] { color: var(--fg-strong); font-weight: 600; }

.nav__phone {
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--fg-strong);
  white-space: nowrap;
  transition: color 0.2s ease;
}
.nav__phone:hover { color: var(--accent-text); }

.nav__cta {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--accent);
  padding: 0.7rem 1.6rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  background: var(--accent);
  color: var(--navy-950);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}
.nav__cta:hover {
  background: #6ba8e6;
  border-color: #6ba8e6;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(18, 50, 88, 0.16);
}

/* ---- theme toggle ---- */

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--fg-strong);
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.2s ease, transform 0.15s ease;
}
.theme-toggle:hover { border-color: var(--fg-strong); transform: translateY(-1px); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }

.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
}
.nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--fg-strong);
  margin: 5px 0;
  transition: background-color 0.25s ease;
}

@media (max-width: 780px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0.5rem var(--gutter) 1.2rem;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.25s ease, opacity 0.2s ease;
  }
  .nav__links.is-open { max-height: 420px; opacity: 1; }
  .nav__links li { width: 100%; padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
  .nav__links li:last-child { border-bottom: none; padding-top: 1rem; }
  .nav__cta { width: 100%; justify-content: center; border-radius: var(--radius-sm); margin-top: 0.5rem; }
}

/* ---- hero ---- */

.hero {
  padding: clamp(3rem, 6vw, 5.5rem) 0 clamp(2.5rem, 5vw, 4rem);
  background: var(--bg);
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
}

.hero__tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  color: var(--accent-text);
  font-size: 1.05rem;
  margin-bottom: 0.9rem;
}

.hero__lede {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 46ch;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.8rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.7rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 0.97rem;
  font-weight: 600;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.btn--primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  border: 1px solid var(--btn-primary-bg);
}
.btn--primary:hover { background: var(--btn-primary-bg-hover); border-color: var(--btn-primary-bg-hover); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(18, 50, 88, 0.16); }
.btn--ghost {
  background: transparent;
  color: var(--fg-strong);
  border: 1px solid var(--line);
}
.btn--ghost:hover { border-color: var(--fg-strong); transform: translateY(-1px); }
.section--dark .btn--ghost { color: var(--on-dark); border-color: var(--line-on-dark); }
.section--dark .btn--ghost:hover { border-color: var(--on-dark); }
.section--dark .btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--navy-950);
}
.section--dark .btn--primary:hover { background: #6ba8e6; border-color: #6ba8e6; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.hero__art { width: 100%; height: auto; }

/* the one orchestrated motion moment on the site: a soft pulse behind the
   network hub graphic */
.hero-glow { animation: glow-breathe 9s ease-in-out infinite; }
@keyframes glow-breathe {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; }
}

@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__art { max-width: 300px; margin: 0 auto; }
}

/* ---- feature blocks (alternating text/graphic rows, not cards) ---- */

.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding-top: clamp(2.5rem, 5vw, 4rem);
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
}

.feature--reverse .feature__figure { order: 2; }
.feature--reverse .feature__body { order: 1; }

.feature__figure {
  padding: 1rem 0;
}
.feature__figure svg { width: 100%; height: auto; display: block; }

.feature__list {
  list-style: none;
  margin-top: 1.4rem;
  display: grid;
  gap: 0.65rem;
}
.feature__list li {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  color: var(--text);
  font-size: 0.98rem;
}
.feature__list li::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  transform: translateY(-3px);
}

@media (max-width: 780px) {
  .feature, .feature--reverse { grid-template-columns: 1fr; }
  .feature--reverse .feature__figure,
  .feature--reverse .feature__body { order: initial; }
  .feature__figure { max-width: 300px; margin: 0 auto; padding: 0.5rem 0; }
}

/* ---- reasons list ---- */

.reasons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.reasons > div {
  background: rgba(245, 248, 251, 0.06);
  border: 1px solid var(--line-on-dark);
  border-radius: var(--radius-md);
  padding: 1.6rem 1.8rem;
}

.reason__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--on-dark);
  margin-bottom: 0.35rem;
}

@media (max-width: 700px) {
  .reasons { grid-template-columns: 1fr; }
}

/* ---- stats bar ---- */

.section--stats { padding: clamp(2.25rem, 4vw, 3.25rem) 0; }

.stats-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.stat {
  padding: 0 2rem;
  border-left: 1px solid var(--line);
  text-align: center;
}
.stat:first-child { border-left: none; }
.stat__value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.9rem, 2.2vw, 2.6rem);
  color: var(--fg-strong);
  letter-spacing: -0.02em;
  line-height: 1;
  white-space: nowrap;
}
.stat__label {
  margin-top: 0.55rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

@media (max-width: 780px) {
  .stats-bar { grid-template-columns: 1fr; row-gap: 1.75rem; }
  .stat { border-left: none; padding: 0; }
  .stat:not(:first-child) { padding-top: 1.75rem; border-top: 1px solid var(--line); }
}

/* ---- process steps ---- */

.process {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.25rem;
  margin-top: 2.6rem;
}
.process__num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.5rem;
  color: var(--text-muted-2);
  line-height: 1;
  margin-bottom: 0.8rem;
}
.process__step h3 { margin-bottom: 0.4rem; }
.process__step p { font-size: 0.95rem; }

@media (max-width: 900px) {
  .process { grid-template-columns: 1fr 1fr; gap: 2.4rem 1.75rem; }
}
@media (max-width: 560px) {
  .process { grid-template-columns: 1fr; gap: 2rem; }
}

/* ---- credential badges ---- */

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--fg-strong);
  background: var(--bg-alt);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.badge svg {
  width: 15px;
  height: 15px;
  color: var(--accent);
  flex-shrink: 0;
}
.section--dark .badge {
  background: rgba(245, 248, 251, 0.06);
  border-color: var(--line-on-dark);
  color: var(--on-dark);
}

/* ---- service categories (services page) ---- */

.service-group {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 1.5rem 3rem;
  padding: 1.9rem 2.2rem;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  margin-bottom: 1.1rem;
  box-shadow: var(--shadow-soft);
  transition: background-color 0.25s ease, border-color 0.25s ease;
}
.service-group:last-child { margin-bottom: 0; }

.service-group__list {
  list-style: none;
  display: grid;
  gap: 0.6rem;
}
.service-group__list li {
  padding-left: 1.1rem;
  position: relative;
  color: var(--text);
}
.service-group__list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55em;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

@media (max-width: 700px) {
  .service-group { grid-template-columns: 1fr; gap: 0.8rem; }
}

/* ---- CTA banner ---- */

.cta-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.cta-banner h2 { margin-bottom: 0.3rem; }

/* ---- contact ---- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}
.contact-detail {
  padding: 1.5rem 1.8rem;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  margin-bottom: 1.1rem;
  box-shadow: var(--shadow-soft);
  transition: background-color 0.25s ease, border-color 0.25s ease;
}
.contact-detail:last-child { margin-bottom: 0; }
.contact-detail dt {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}
.contact-detail dd {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--fg-strong);
}
.contact-detail dd a { text-decoration: none; }
.contact-detail dd a:hover { color: var(--accent-text); }

@media (max-width: 780px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* ---- values (about page) ---- */

.values { display: grid; gap: 1.1rem; }
.value-row {
  display: grid;
  grid-template-columns: 0.6fr 1.4fr;
  gap: 2rem;
  padding: 1.7rem 2rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  transition: background-color 0.25s ease, border-color 0.25s ease;
}
.value-row h3 { margin-bottom: 0.3rem; }
.value-row p { margin: 0; }

@media (max-width: 700px) {
  .value-row { grid-template-columns: 1fr; gap: 0.4rem; }
}

/* ---- footer (always dark, regardless of page theme) ---- */

.site-footer {
  background: var(--navy-950);
  color: var(--on-dark-muted);
  padding: 3rem 0 2rem;
  font-size: 0.9rem;
}
.footer__top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line-on-dark);
}
.footer__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--on-dark);
  text-decoration: none;
}
.footer__brand .brand__mark { width: 24px; height: 24px; }
.footer__brand .brand__name { font-size: 1.05rem; }

.footer__links { list-style: none; display: flex; gap: 1.8rem; }
.footer__links a { text-decoration: none; color: var(--on-dark-muted); }
.footer__links a:hover { color: var(--on-dark); }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.8rem;
  padding-top: 1.4rem;
}

/* ---- prose (privacy policy) ---- */

.prose h2 { margin-top: 2.2rem; }
.prose h2:first-child { margin-top: 0; }
.prose ul { margin: 0.8rem 0 1.4rem; padding-left: 1.2rem; }
.prose li { margin-bottom: 0.4rem; color: var(--text-muted); }
.prose { max-width: 72ch; }

/* ---- page hero (interior pages) ---- */

.page-hero { padding: clamp(2.8rem, 5vw, 4rem) 0 clamp(2rem, 4vw, 3rem); }
.page-hero p { color: var(--text-muted); font-size: 1.05rem; }

/* ---- utility ---- */

.mt-0 { margin-top: 0; }
.text-center { text-align: center; }
