/* ══════════════════════════════════════════
   ClearPoint IT — Design Tokens
   ══════════════════════════════════════════ */
:root {
  --ink: #0d1117;
  --paper: #f5f2ed;
  --cloud: #e8f0fe;
  --accent: #1a73e8;
  --accent-dark: #0d47a1;
  --muted: #6b7280;
  --rule: rgba(13, 17, 23, 0.12);
}

/* ══════════════════════════════════════════
   Reset
   ══════════════════════════════════════════ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--paper);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ══════════════════════════════════════════
   Navigation
   ══════════════════════════════════════════ */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 5vw;
  background: rgba(245, 242, 237, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}

.nav-logo {
  font-family: 'DM Serif Display', serif;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color .2s;
}

.nav-links a:hover {
  color: var(--accent);
}

/* ══════════════════════════════════════════
   Buttons
   ══════════════════════════════════════════ */
.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 3px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: all .2s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 20px rgba(26, 115, 232, 0.3);
}

.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(26, 115, 232, 0.38);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--rule);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* ══════════════════════════════════════════
   Hero
   ══════════════════════════════════════════ */
#hero {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 120px 6vw 80px;
  gap: 3rem;
  position: relative;
  overflow: hidden;
}

#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 80% 40%, rgba(26, 115, 232, 0.12) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 20% 80%, rgba(26, 115, 232, 0.06) 0%, transparent 60%);
  pointer-events: none;
}

.hero-text {
  position: relative;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(26, 115, 232, 0.1);
  padding: 6px 14px;
  border-radius: 2px;
  margin-bottom: 1.8rem;
  animation: fadeUp .8s ease both;
}

.hero-headline {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2.6rem, 4.5vw, 4.2rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--ink);
  animation: fadeUp .8s .1s ease both;
}

.hero-headline em {
  font-style: italic;
  color: var(--accent);
}

.hero-sub {
  margin-top: 1.5rem;
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 46ch;
  animation: fadeUp .8s .2s ease both;
}

.hero-cta {
  margin-top: 2.5rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  animation: fadeUp .8s .3s ease both;
}

/* ── Hero Graphic ── */
.hero-graphic {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  animation: fadeIn 1s .4s ease both;
}

.hero-graphic svg {
  width: 100%;
  max-width: 400px;
}

/* ══════════════════════════════════════════
   SVG Diagram Animations
   ══════════════════════════════════════════ */
.ring-outer {
  animation: spin 10s linear infinite;
  transform-origin: 250px 220px;
}

.ring-mid {
  animation: spin 14s linear infinite reverse;
  transform-origin: 250px 220px;
}

.ring-inner {
  animation: pulse-ring 2.5s ease-in-out infinite;
  transform-origin: 250px 220px;
}

.cloud-icon {
  animation: cloud-bob 3s ease-in-out infinite;
}

.node {
  animation: node-glow 2s ease-in-out infinite;
}

.node:nth-of-type(2) {
  animation-delay: .35s;
}

.node:nth-of-type(3) {
  animation-delay: .7s;
}

.node:nth-of-type(4) {
  animation-delay: 1.05s;
}

.node:nth-of-type(5) {
  animation-delay: 1.4s;
}

.node:nth-of-type(6) {
  animation-delay: 1.75s;
}

.dash-line {
  stroke-dasharray: 8 6;
  animation: dash-flow 1.2s linear infinite;
}

.dash-line:nth-of-type(2) {
  animation-delay: .2s;
}

.dash-line:nth-of-type(3) {
  animation-delay: .4s;
}

.dash-line:nth-of-type(4) {
  animation-delay: .6s;
}

.dash-line:nth-of-type(5) {
  animation-delay: .8s;
}

.dash-line:nth-of-type(6) {
  animation-delay: 1s;
}

.orbit-dot {
  animation: orbit 6s linear infinite;
  transform-origin: 250px 220px;
}

/* ── About Shield Animations ── */
.shield-outer {
  animation: shield-breathe 4s ease-in-out infinite;
  transform-origin: 190px 170px;
}

.shield-inner {
  animation: shield-breathe 4s .5s ease-in-out infinite;
  transform-origin: 190px 170px;
}

.shield-check {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: draw-check 1.2s .6s ease forwards;
}

/* ══════════════════════════════════════════
   Shared Section Styles
   ══════════════════════════════════════════ */
section {
  padding: 100px 5vw;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.8rem;
}

.section-title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2rem, 3.5vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  max-width: 18ch;
}

.section-title em {
  font-style: italic;
  color: var(--accent);
}

.divider {
  width: 48px;
  height: 2px;
  background: var(--accent);
  margin: 2rem 0;
}

/* ══════════════════════════════════════════
   Services
   ══════════════════════════════════════════ */
#services {
  background: #fff;
  border-top: 1px solid var(--rule);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2px;
  margin-top: 3.5rem;
  border: 2px solid var(--rule);
}

.service-card {
  padding: 2.5rem 2rem;
  background: #fff;
  border-right: 1px solid var(--rule);
  position: relative;
  overflow: hidden;
  transition: background .25s;
}

.service-card:last-child {
  border-right: none;
}

.service-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: var(--accent);
  transition: width .35s ease;
}

.service-card:hover {
  background: var(--cloud);
}

.service-card:hover::after {
  width: 100%;
}

.service-icon {
  width: 48px;
  height: 48px;
  background: rgba(26, 115, 232, 0.1);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.service-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 1.8;
}

.service-card h3 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.service-card p {
  font-size: 0.93rem;
  color: var(--muted);
  line-height: 1.65;
}

/* ══════════════════════════════════════════
   About
   ══════════════════════════════════════════ */
#about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6vw;
  align-items: center;
  background: var(--ink);
  color: var(--paper);
}

#about .section-label {
  color: #93c5fd;
}

#about .section-title {
  color: var(--paper);
}

#about .divider {
  background: #93c5fd;
}

.about-body {
  font-size: 1rem;
  color: rgba(245, 242, 237, 0.75);
  line-height: 1.8;
}

.about-body p+p {
  margin-top: 1.2rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 3rem;
}

.stat {
  border: 1px solid rgba(245, 242, 237, 0.15);
  padding: 1.5rem;
  border-radius: 4px;
}

.stat-num {
  font-family: 'DM Serif Display', serif;
  font-size: 2.2rem;
  color: #93c5fd;
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  color: rgba(245, 242, 237, 0.5);
  margin-top: 0.4rem;
  letter-spacing: 0.04em;
}

.about-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-visual svg {
  width: 100%;
  max-width: 380px;
  opacity: 0.92;
}

/* ══════════════════════════════════════════
   Contact
   ══════════════════════════════════════════ */
#contact {
  border-top: 1px solid var(--rule);
}

.contact-inner {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}

.contact-inner .section-title {
  max-width: 100%;
  margin: 0 auto;
}

.contact-inner .divider {
  margin: 2rem auto;
}

.contact-form {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  text-align: left;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group.full {
  grid-column: 1 / -1;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.form-group input,
.form-group textarea,
.form-group select {
  padding: 12px 14px;
  border: 1.5px solid var(--rule);
  border-radius: 3px;
  background: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
  appearance: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.12);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-submit {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  margin-top: 0.5rem;
}

.contact-alt {
  margin-top: 2.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.contact-alt a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.contact-alt a:hover {
  text-decoration: underline;
}

/* ══════════════════════════════════════════
   Footer
   ══════════════════════════════════════════ */
footer {
  background: var(--ink);
  color: rgba(245, 242, 237, 0.45);
  padding: 2.5rem 5vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
}

footer span {
  color: rgba(245, 242, 237, 0.7);
  font-family: 'DM Serif Display', serif;
  font-size: 1rem;
}

/* ══════════════════════════════════════════
   Keyframe Animations
   ══════════════════════════════════════════ */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(22px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse-ring {

  0%,
  100% {
    opacity: .5;
    transform: scale(1);
  }

  50% {
    opacity: 1;
    transform: scale(1.08);
  }
}

@keyframes cloud-bob {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes node-glow {

  0%,
  100% {
    opacity: .6;
    filter: drop-shadow(0 0 0 rgba(26, 115, 232, 0));
  }

  50% {
    opacity: 1;
    filter: drop-shadow(0 0 6px rgba(26, 115, 232, 0.5));
  }
}

@keyframes dash-flow {
  to {
    stroke-dashoffset: -28;
  }
}

@keyframes orbit {
  to {
    transform: rotate(360deg);
  }
}

@keyframes shield-breathe {

  0%,
  100% {
    transform: scale(1);
    opacity: .9;
  }

  50% {
    transform: scale(1.03);
    opacity: 1;
  }
}

@keyframes draw-check {
  to {
    stroke-dashoffset: 0;
  }
}

/* ══════════════════════════════════════════
   Scroll Reveal
   ══════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ══════════════════════════════════════════
   Responsive
   ══════════════════════════════════════════ */
@media (max-width: 780px) {
  #hero {
    grid-template-columns: 1fr;
    padding-top: 100px;
  }

  .hero-graphic {
    display: none;
  }

  #about {
    grid-template-columns: 1fr;
  }

  .about-visual {
    display: none;
  }

  .contact-form {
    grid-template-columns: 1fr;
  }

  footer {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

  .nav-links {
    display: none;
  }
}