/* ===========================================================
   Callitrix one-pager
   Same system as rtloc.com (site/css/style.css), in the
   Callitrix violet → indigo palette taken from the logo.
   =========================================================== */
:root {
  --navy:   #110e3a;
  --navy-2: #221c66;
  --violet: #9c39f7;
  --violet-2: #b06cff;
  --indigo: #5862e4;
  --indigo-2: #6b56e9;
  --lilac:  #c9b5ff;
  --lilac-2:#e2d8ff;

  --ink:    #141133;
  --muted:  #5f5d78;
  --line:   #e9e6f5;
  --bg:     #ffffff;
  --bg-soft:#f6f5fc;

  --radius: 18px;
  --radius-lg: 28px;
  --shadow-sm: 0 4px 18px rgba(34, 20, 92, .08);
  --shadow:    0 24px 60px rgba(34, 20, 92, .16);
  --shadow-lg: 0 40px 90px rgba(17, 14, 58, .30);

  --maxw: 1180px;
  --ease: cubic-bezier(.22,.61,.36,1);
  --display: "Poppins", "Segoe UI", system-ui, -apple-system, sans-serif;
  --body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
section[id], footer[id] { scroll-margin-top: 72px; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

.grad-text {
  background: linear-gradient(100deg, var(--lilac), #ffffff 75%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

.eyebrow {
  display: inline-block;
  font-family: var(--display);
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--indigo-2);
  padding: .35em .9em;
  border-radius: 999px;
  background: rgba(107,86,233,.09);
  margin-bottom: 1.1rem;
}
.eyebrow--light { color: var(--lilac-2); background: rgba(255,255,255,.12); }

/* ---------- Buttons ---------- */
.btn {
  --pad: .9em 1.5em;
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font-family: var(--display); font-weight: 600; font-size: .98rem;
  padding: var(--pad); border-radius: 999px; cursor: pointer;
  border: 1.5px solid transparent; transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, color .25s;
  white-space: nowrap;
}
.btn--lg { --pad: 1.05em 1.9em; font-size: 1.02rem; }
.btn--sm { --pad: .62em 1.15em; font-size: .9rem; }
.btn--solid {
  background: linear-gradient(120deg, var(--violet), var(--indigo));
  color: #fff; box-shadow: 0 12px 26px rgba(107,86,233,.34);
}
.btn--solid:hover { transform: translateY(-3px); box-shadow: 0 18px 36px rgba(107,86,233,.44); }
.btn--ghost { background: rgba(255,255,255,.06); color: #fff; border-color: rgba(255,255,255,.55); }
.btn--ghost:hover { background: #fff; color: var(--indigo-2); transform: translateY(-3px); }
.btn--spaced { margin-top: 2rem; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  transition: background .3s var(--ease), box-shadow .3s var(--ease), padding .3s var(--ease);
  padding: 18px 0;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.brand { display: inline-flex; align-items: center; }
.brand-logo { height: 40px; width: auto; }
.brand-logo--dark { display: none; }
.nav { display: flex; align-items: center; gap: 2rem; }
.nav a {
  font-family: var(--display); font-weight: 500; font-size: .96rem; color: #eeeafc;
  transition: color .2s; opacity: .92;
}
.nav a:hover { opacity: 1; color: #fff; }
.nav .btn { color: #fff; }

.site-header.scrolled {
  background: rgba(255,255,255,.86);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  box-shadow: 0 6px 24px rgba(34,20,92,.08);
  padding: 12px 0;
}
.site-header.scrolled .brand-logo--light { display: none; }
.site-header.scrolled .brand-logo--dark { display: block; }
.site-header.scrolled .nav a { color: var(--ink); }
.site-header.scrolled .nav a:hover { color: var(--indigo-2); }
.site-header.scrolled .nav .btn--solid { color: #fff; }

/* ---------- Mobile menu toggle ---------- */
.nav-toggle {
  display: none;
  flex-direction: column; justify-content: center; gap: 5px;
  width: 42px; height: 42px; padding: 0 9px;
  background: none; border: 0; cursor: pointer;
}
.nav-toggle span {
  display: block; height: 2px; border-radius: 2px; background: #fff;
  transition: transform .25s var(--ease), opacity .2s var(--ease), background .3s;
}
.site-header.scrolled .nav-toggle span { background: var(--ink); }
.site-header.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-header.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.site-header.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh;
  display: flex; align-items: center;
  padding: 130px 0 90px;
  color: #fff; overflow: hidden; isolation: isolate;
  background: linear-gradient(150deg, var(--navy) 0%, #34249a 52%, var(--indigo) 100%);
}
.hero-bg { position: absolute; inset: 0; z-index: -1; }
.glow { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; }
.glow--1 { width: 620px; height: 620px; top: -160px; right: -120px;
  background: radial-gradient(circle, var(--violet) 0%, transparent 70%); }
.glow--2 { width: 520px; height: 520px; bottom: -200px; left: -140px;
  background: radial-gradient(circle, #4a3fd6 0%, transparent 70%); opacity: .5; }
.grid-overlay {
  position: absolute; inset: 0; opacity: .35;
  background-image:
    linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 54px 54px;
  -webkit-mask-image: radial-gradient(ellipse at 60% 40%, #000 30%, transparent 78%);
          mask-image: radial-gradient(ellipse at 60% 40%, #000 30%, transparent 78%);
}
.hero-grid {
  display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 3rem;
}
.hero-title {
  font-family: var(--display); font-weight: 800; line-height: 1.04;
  font-size: clamp(2.6rem, 5.2vw, 4.2rem); letter-spacing: -.02em;
  margin-bottom: 1.3rem; text-wrap: balance;
}
.hero-lead {
  font-size: clamp(1.05rem, 1.5vw, 1.22rem); color: #dcd6f6;
  max-width: 33em; margin-bottom: 2rem;
}
.hero-lead strong { color: #fff; font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 2.6rem; }
.hero-stats {
  display: flex; gap: 2.4rem; list-style: none; flex-wrap: wrap;
  border-top: 1px solid rgba(255,255,255,.16); padding-top: 1.5rem; max-width: 36em;
}
.hero-stats b {
  display: block; font-family: var(--display); font-weight: 700;
  font-size: 1.35rem; color: #fff; line-height: 1.15;
}
.hero-stats span { font-size: .86rem; color: #c3bbea; letter-spacing: .02em; }

.hero-divider {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 90px; z-index: 2;
  background: var(--bg);
  clip-path: polygon(0 100%, 100% 100%, 100% 38%, 0 100%);
}

/* ---------- Hero stack illustration ---------- */
.stack {
  position: relative; display: grid; gap: 1.4rem;
  max-width: 440px; width: 100%; justify-self: end;
  filter: drop-shadow(0 30px 50px rgba(0,0,0,.25));
}
.stack-line {
  position: absolute; left: 47px; top: 40px; bottom: 40px; width: 2px;
  background: rgba(255,255,255,.16); overflow: hidden; border-radius: 2px;
}
.stack-line span {
  position: absolute; left: 0; width: 100%; height: 34%;
  background: linear-gradient(transparent, var(--lilac), transparent);
  animation: flow 3.2s var(--ease) infinite;
}
@keyframes flow { from { top: -34%; } to { top: 100%; } }
.stack-card {
  position: relative; display: flex; align-items: center; gap: 1.1rem;
  padding: 1.15rem 1.3rem; border-radius: var(--radius);
  background: rgba(255,255,255,.09);
  border: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.stack-card--2 { margin-left: 1.6rem; }
.stack-card--3 { margin-left: 3.2rem; }
.stack-card b {
  display: block; font-family: var(--display); font-weight: 600; font-size: 1.05rem; color: #fff;
}
.stack-card code {
  display: block; font-family: var(--mono); font-size: .8rem; color: var(--lilac-2); opacity: .85;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.stack-card > div { min-width: 0; }

.ico {
  flex: none; display: inline-grid; place-items: center;
  width: 46px; height: 46px; border-radius: 13px;
  background: linear-gradient(135deg, var(--violet), var(--indigo));
  box-shadow: 0 10px 22px rgba(107,86,233,.35);
}
.ico svg {
  width: 24px; height: 24px; fill: none; stroke: #fff;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.ico--lg { width: 54px; height: 54px; border-radius: 15px; margin-bottom: 1.4rem; }
.ico--lg svg { width: 27px; height: 27px; }

/* ---------- Generic sections + cards ---------- */
.section { padding: clamp(70px, 9vw, 130px) 0; background: var(--bg); }
.section--soft { background: var(--bg-soft); }
.section-head { max-width: 40em; margin-bottom: clamp(2.2rem, 4vw, 3.4rem); }
.section-head h2,
.feature-copy h2 {
  font-family: var(--display); font-weight: 700; letter-spacing: -.02em;
  font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1.08; margin-bottom: 1.1rem;
  color: var(--ink); text-wrap: balance;
}
.section-head p { font-size: 1.1rem; color: var(--muted); }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.cards--2 { grid-template-columns: repeat(2, 1fr); }
.card {
  padding: 2rem 1.9rem 2.1rem; border-radius: var(--radius-lg);
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card h3 {
  font-family: var(--display); font-weight: 600; font-size: 1.28rem;
  color: var(--ink); margin-bottom: .6rem; line-height: 1.25;
}
.card p { color: var(--muted); font-size: 1rem; }
.card-num {
  display: inline-block; font-family: var(--display); font-weight: 700; font-size: 2.4rem;
  line-height: 1; margin-bottom: 1.1rem;
  background: linear-gradient(120deg, var(--violet), var(--indigo));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ---------- Feature sections ---------- */
.feature { padding: clamp(70px, 9vw, 130px) 0; background: var(--bg); }
.feature--alt { background: var(--bg-soft); }
.feature-grid {
  display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(2rem, 5vw, 5rem);
}
.feature-copy p { font-size: 1.1rem; color: var(--muted); max-width: 34em; margin-bottom: 1.7rem; }
.feature-copy p strong { color: var(--indigo-2); font-weight: 600; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: .7rem; }
.chips li {
  font-family: var(--display); font-weight: 500; font-size: .88rem; color: var(--navy-2);
  padding: .5em 1.05em; border-radius: 999px; background: #fff;
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}

/* Ranging illustration (expertise) */
.feature-visual { position: relative; max-width: 480px; width: 100%; margin: 0 auto; }
.feature-visual::before {
  content: ""; position: absolute; inset: 6% 6%; z-index: 0; border-radius: 40% 60% 58% 42% / 50%;
  background: radial-gradient(circle at 50% 45%, rgba(156,57,247,.16), rgba(88,98,228,.07) 60%, transparent 72%);
  filter: blur(8px);
}
.ranging { position: relative; z-index: 1; width: 100%; height: auto; overflow: visible; }
.ranging-grid { fill: none; stroke: #dcd7f0; stroke-width: 1; stroke-dasharray: 3 6; }
.ranging-links line {
  stroke: url(#g-brand); stroke-width: 1.6; stroke-dasharray: 6 7; opacity: .7;
  animation: dash 1.6s linear infinite;
}
@keyframes dash { to { stroke-dashoffset: -26; } }
.ranging-anchors rect { fill: #fff; stroke: var(--indigo); stroke-width: 2.4; }
.tag { fill: url(#g-brand); stroke: #fff; stroke-width: 3; }
.pulse {
  fill: none; stroke: var(--violet); stroke-width: 2;
  transform-origin: 228px 226px; transform-box: view-box;
  animation: pulse 2.6s var(--ease) infinite;
}
.pulse--2 { animation-delay: 1.3s; }
@keyframes pulse { from { transform: scale(1); opacity: .7; } to { transform: scale(4.2); opacity: 0; } }
.ranging-label rect { fill: var(--navy); }
.ranging-label text {
  fill: #fff; font-family: var(--mono); font-size: 13px; text-anchor: middle;
}

/* RTLOC product card */
.product-card {
  display: block; position: relative; overflow: hidden;
  padding: 2.4rem 2.2rem 2rem; border-radius: var(--radius-lg);
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.product-card::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px;
  background: linear-gradient(90deg, #2297d1, #095a9e);
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.product-logo { width: 62%; max-width: 260px; margin: 0 auto 2rem; }
.product-stats {
  list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
  border-top: 1px solid var(--line); padding-top: 1.5rem; text-align: center;
}
.product-stats b {
  display: block; font-family: var(--display); font-weight: 700; font-size: 1.3rem;
  color: #095a9e; line-height: 1.15;
}
.product-stats span { font-size: .84rem; color: var(--muted); }
.product-url {
  display: block; margin-top: 1.6rem; text-align: center;
  font-family: var(--display); font-weight: 600; font-size: .92rem; color: #095a9e;
}

/* ---------- Contact / footer ---------- */
.contact {
  position: relative; color: #eeeafc; overflow: hidden; isolation: isolate;
  background: linear-gradient(160deg, var(--navy) 0%, #3a2aa6 120%);
  padding: clamp(64px, 8vw, 100px) 0 36px;
}
.contact-bg { position: absolute; inset: 0; z-index: -1; }
.glow--3 { width: 560px; height: 560px; top: -180px; right: -120px;
  background: radial-gradient(circle, var(--violet) 0%, transparent 70%); filter: blur(80px); opacity: .4; }
.contact-inner {
  display: grid; grid-template-columns: 1.1fr 1.4fr; gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start; padding-bottom: 3rem;
}
.contact-logo { height: 48px; width: auto; margin-bottom: 1.4rem; }
.contact-lead p { font-size: 1.15rem; color: #d6cff3; max-width: 24em; margin-bottom: 1.8rem; }
.contact-info { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem 1.5rem; }
.info-block h3 {
  font-family: var(--display); font-weight: 600; font-size: .82rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--lilac); margin-bottom: .85rem;
}
.info-block a, .info-block p { display: block; color: #e2ddf7; font-size: 1rem; margin-bottom: .4rem; }
.info-block a { transition: color .2s; }
.info-block a:hover { color: #fff; }
.contact-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: .8rem;
  border-top: 1px solid rgba(255,255,255,.14); padding-top: 1.6rem;
  font-size: .86rem; color: #aaa1d6;
}
.contact-tagline { font-family: var(--display); font-style: italic; color: #d6cff3; }

/* ---------- 404 ---------- */
.notfound { min-height: 100svh; }
.notfound .hero-copy { max-width: 36em; }

/* ---------- Reveal animation ---------- */
.js .reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .hero-grid, .feature-grid, .contact-inner { grid-template-columns: 1fr; }
  .feature-grid--reverse .feature-copy { order: 2; }
  .feature-grid--reverse .product-card { order: 1; }
  .stack { justify-self: start; margin-top: 1rem; }
  .cards { grid-template-columns: 1fr; max-width: 560px; }
  .cards--2 { grid-template-columns: 1fr; }
  .feature-visual { max-width: 400px; }
  .product-card { max-width: 520px; width: 100%; margin: 0 auto; }
}
@media (max-width: 680px) {
  /* Nav collapses into a panel behind the hamburger. */
  .nav-toggle { display: flex; }
  .header-inner { position: relative; }
  .nav {
    display: none;
    /* Offsets match .container's gutter — left/right resolve against the
       padding box, so 0 would sit flush to the screen edge. */
    position: absolute; top: calc(100% + 12px); left: 20px; right: 20px; z-index: 65;
    flex-direction: column; align-items: stretch; gap: .1rem;
    padding: .6rem; border-radius: 16px;
    background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow);
  }
  .site-header.nav-open .nav { display: flex; }
  .nav a:not(.btn),
  .site-header.scrolled .nav a:not(.btn) {
    color: var(--ink); opacity: 1; padding: .72rem .8rem; border-radius: 10px;
  }
  .nav a:not(.btn):hover { background: var(--bg-soft); }
  .nav .btn { margin-top: .5rem; justify-content: center; }

  .brand-logo { height: 34px; }
  .hero-stats { gap: 1.4rem; }
  .hero-stats b { font-size: 1.15rem; }
  .stack-card--2 { margin-left: 1rem; }
  .stack-card--3 { margin-left: 2rem; }
  .contact-info { grid-template-columns: 1fr 1fr; }
  .container { padding: 0 20px; }
}
@media (max-width: 440px) {
  .contact-info { grid-template-columns: 1fr; }
  .hero-actions .btn { flex: 1; }
  .product-stats b { font-size: 1.1rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .stack-line span, .ranging-links line, .pulse { animation: none; }
  .pulse { opacity: 0; }
}
