/* ============================================================
   Spark Scientific — single-page site styles
   Palette pulled from the logo:
     Spark orange  #F47B20   (accents, CTAs — use sparingly)
     Science blue  #1A7DC5   (brand base)
     Deep navy     #10344F   (headings, footer)
   ============================================================ */

:root {
  --orange:      #F47B20;
  --orange-deep: #D96612;
  --blue:        #1A7DC5;
  --blue-deep:   #10344F;
  --blue-tint:   #EFF6FC;
  --ink:         #26333D;
  --ink-soft:    #52626F;
  --line:        #DCE6EE;
  --bg:          #FFFFFF;

  --font-head: "Poppins", "Segoe UI", sans-serif;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;

  --radius: 12px;
  --container: 1080px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 { font-family: var(--font-head); color: var(--blue-deep); line-height: 1.2; }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); font-weight: 600; margin-bottom: 0.5em; }
h3 { font-size: 1.15rem; font-weight: 600; margin-bottom: 0.4em; }

a { color: var(--blue); }

.eyebrow {
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 0.8em;
}
/* small delta spark before section labels; currentColor via mask so the
   light contact-section variant tints automatically */
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 0.8em;
  height: 0.8em;
  margin-right: 0.5em;
  vertical-align: -0.08em;
  background: currentColor;
  -webkit-mask: url('data:image/svg+xml;utf8,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"%3E%3Cpath d="M12 0.5 C11 8 7.5 14.5 3.5 21 C8.5 17.8 10.2 17.2 12 17.2 C13.8 17.2 15.5 17.8 20.5 21 C16.5 14.5 13 8 12 0.5 Z"/%3E%3C/svg%3E') no-repeat center / contain;
  mask: url('data:image/svg+xml;utf8,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"%3E%3Cpath d="M12 0.5 C11 8 7.5 14.5 3.5 21 C8.5 17.8 10.2 17.2 12 17.2 C13.8 17.2 15.5 17.8 20.5 21 C16.5 14.5 13 8 12 0.5 Z"/%3E%3C/svg%3E') no-repeat center / contain;
}

::selection { background: var(--orange); color: #fff; }
.eyebrow-light { color: #FFB57E; }

.section { padding: 88px 0; }
.section-tint { background: var(--blue-tint); }
.section-sub { color: var(--ink-soft); max-width: 46em; margin-bottom: 2.5em; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1rem;
  padding: 13px 28px;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.btn-orange { background: var(--orange); color: #fff; }
.btn-orange:hover { background: var(--orange-deep); transform: translateY(-1px); }
.btn-ghost { color: var(--blue); border: 2px solid var(--blue); padding: 11px 26px; }
.btn-ghost:hover { background: var(--blue); color: #fff; }
.btn-small { padding: 8px 20px; font-size: 0.9rem; }
.btn-big { font-size: 1.15rem; padding: 16px 36px; }

/* ---------------- Header / nav ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}
.nav-links a:not(.btn) {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--blue-deep);
  text-decoration: none;
}
.nav-links a:not(.btn):hover { color: var(--orange); }

/* ---------------- Wordmark (recreated logo) ---------------- */
.wordmark {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.45rem;
  text-decoration: none;
  white-space: nowrap;
}
.wm-spark { color: var(--orange); }
.wm-sci { color: var(--blue); }
.wm-sci-light { color: #9CC9E8; }
.wm-i { position: relative; }
.spark-dot {
  position: absolute;
  width: 0.52em;
  height: 0.52em;
  left: 50%;
  top: -0.22em;
  transform: translateX(-50%);
  fill: var(--orange);
}

/* ---------------- Hero ---------------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 900px 500px at 85% 10%, #E4F0FA 0%, transparent 60%),
    var(--bg);
  padding: 110px 0 120px;
}
.hero-inner { position: relative; z-index: 2; max-width: 640px; }
.hero h1 em {
  font-style: normal;
  color: var(--blue);
  padding-bottom: 0.16em;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 14" preserveAspectRatio="none"><path d="M3 10 C60 3 140 3 197 8" fill="none" stroke="%23F47B20" stroke-width="5" stroke-linecap="round"/></svg>') no-repeat 0 100% / 100% 0.14em;
}
.hero-sub {
  margin: 1.4em 0 2em;
  font-size: 1.1rem;
  color: var(--ink-soft);
  max-width: 36em;
}
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-motif {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 520px;
  /* never wider than the space right of the left-anchored hero text */
  max-width: calc(100vw - 860px);
  z-index: 1;
}
@media (max-width: 1180px) {
  .hero-motif { display: none; }
}
.motif-lines line { stroke: var(--blue); stroke-opacity: 0.25; stroke-width: 2; }
.motif-converge line { stroke: var(--orange); stroke-opacity: 0.4; stroke-width: 2.5; stroke-dasharray: 2 9; stroke-linecap: round; }
.motif-pts circle { fill: var(--blue); fill-opacity: 0.35; }
.motif-spark { fill: var(--orange); }

@media (prefers-reduced-motion: no-preference) {
  .motif-pts circle { animation: twinkle 4.5s ease-in-out infinite; }
  .motif-pts circle:nth-child(2) { animation-delay: 1.1s; }
  .motif-pts circle:nth-child(3) { animation-delay: 2.3s; }
  .motif-pts circle:nth-child(4) { animation-delay: 0.6s; }
  .motif-pts circle:nth-child(5) { animation-delay: 3.2s; }
  .motif-pts circle:nth-child(6) { animation-delay: 1.7s; }
  .motif-pts circle:nth-child(7) { animation-delay: 2.8s; }
  .motif-pts circle:nth-child(8) { animation-delay: 2.1s; }
  .motif-pts circle:nth-child(9) { animation-delay: 0.9s; }
  .motif-spark { animation: twinkle 5s ease-in-out infinite; }
  .motif-spark.spark-main { animation-duration: 3.4s; }
  .motif-spark.spark-b { animation-delay: 1.8s; }
  .motif-spark.spark-c { animation-delay: 3.4s; }
}
@keyframes twinkle {
  0%, 100% { opacity: 0.45; }
  50%      { opacity: 1; }
}

/* Scroll-reveal: only hides content when the visitor allows motion */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
  .reveal.in { opacity: 1; transform: none; }
  .card-grid .reveal:nth-child(2) { transition-delay: 0.08s; }
  .card-grid .reveal:nth-child(3) { transition-delay: 0.16s; }
  .card-grid .reveal:nth-child(4) { transition-delay: 0.08s; }
  .card-grid .reveal:nth-child(5) { transition-delay: 0.16s; }
  .steps .reveal:nth-child(2) { transition-delay: 0.12s; }
  .steps .reveal:nth-child(3) { transition-delay: 0.24s; }
}

/* ---------------- Credentials strip ---------------- */
.cred-strip {
  background: var(--blue-deep);
  color: #fff;
  padding: 40px 0;
}
.cred-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.cred { text-align: center; }
.cred-num {
  display: block;
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 700;
  color: var(--orange);
  line-height: 1.15;
}
.cred-label {
  display: block;
  font-size: 0.88rem;
  color: #C8DCEC;
  margin-top: 4px;
}

/* ---------------- Service cards ---------------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.card {
  border: 1px solid var(--line);
  border-top: 4px solid var(--blue);
  border-radius: var(--radius);
  padding: 28px 26px;
  background: #fff;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-top-color 0.15s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(16, 52, 79, 0.10);
  border-top-color: var(--orange);
}
.card p { color: var(--ink-soft); font-size: 0.95rem; }
.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--blue-tint);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.card-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: var(--blue);
  stroke-width: 2;
}
.card-icon svg circle { fill: var(--orange); stroke: none; }
.card-icon { transition: background 0.15s ease, transform 0.15s ease; }
.card:hover .card-icon { background: #FDEBDC; transform: rotate(-5deg) scale(1.06); }

/* ---------------- Process steps ---------------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 2.5em;
}
.step { position: relative; }
.step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 21px;
  left: 60px;
  right: -20px;
  border-top: 2px dashed rgba(244, 123, 32, 0.5);
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 14px;
}
.step p { color: var(--ink-soft); font-size: 0.95rem; }

/* ---------------- About ---------------- */
.about-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 56px;
  align-items: start;
}
.about-text p { margin-bottom: 1em; color: var(--ink-soft); }
.about-photo img,
.photo-placeholder {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  object-fit: cover;
}
.photo-placeholder {
  background: var(--blue-tint);
  border: 2px dashed var(--blue);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--blue);
  font-family: var(--font-head);
  font-weight: 500;
}
.photo-placeholder svg { width: 34px; height: 34px; fill: var(--orange); }

.about-links {
  list-style: none;
  display: flex;
  gap: 24px;
  margin-top: 1.4em;
}
.about-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 500;
  text-decoration: none;
  color: var(--blue);
}
.about-links a:hover { color: var(--orange); }
.about-links svg { width: 20px; height: 20px; fill: currentColor; }

/* ---------------- Contact ---------------- */
.contact { background: linear-gradient(160deg, var(--blue-deep) 0%, #14486E 100%); }
.contact h2 { color: #fff; }
.contact-inner { text-align: center; max-width: 640px; }
.contact-sub { color: #C8DCEC; margin: 0 0 2em; }

/* ---------------- Footer ---------------- */
.site-footer {
  background: #0B2437;
  color: #9CB8CC;
  padding: 28px 0;
  font-size: 0.9rem;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-mark { font-family: var(--font-head); font-weight: 600; }
.footer-links {
  list-style: none;
  display: flex;
  gap: 20px;
}
.footer-links a { color: #9CB8CC; text-decoration: none; }
.footer-links a:hover { color: #fff; }

/* ---------------- Responsive ---------------- */
@media (max-width: 860px) {
  .section { padding: 64px 0; }
  .hero { padding: 72px 0 84px; }
  .hero-motif { display: none; }
  .cred-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .step:not(:last-child)::after { display: none; }
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .about-photo { max-width: 320px; }
  .nav-links li:not(:last-child) { display: none; }  /* keep just the CTA on phones */
  .footer-inner { flex-direction: column; text-align: center; }
}
