/* ============================================================
   XDIGITAL — shared design system
   Light-but-dark · warm bone canvas + ink anchors · electric violet
   ============================================================ */

/* ---- Fonts ---- */
/* Archivo = artistic display · Archivo = UI/body */

:root {
  /* surfaces */
  --bone: #efebe3;
  --bone-2: #e7e2d8;
  --paper: #fbf9f5;
  --ink: #131019;
  --ink-2: #1c1824;
  --ink-soft: #36313f;

  /* text */
  --t-strong: #131019;
  --t-body: #423d4b;
  --t-muted: #7a7480;
  --t-on-dark: #efeaf6;
  --t-on-dark-mut: #a59fb3;

  /* brand — RED */
  --violet: #d92d20;
  --violet-bright: #f04438;
  --violet-deep: #8a1c14;
  --violet-tint: #fbe0dd;
  --violet-tint-2: #f5c9c4;

  /* legacy accent tokens — site is red / white / black only, so these map to red */
  --blue: var(--violet);
  --blue-bright: var(--violet-bright);
  --blue-deep: var(--violet-deep);
  --blue-tint: var(--violet-tint);
  --teal: var(--violet);
  --teal-bright: var(--violet-bright);
  --teal-deep: var(--violet-deep);
  --teal-tint: var(--violet-tint);

  /* lines */
  --line: rgba(19, 16, 25, 0.14);
  --line-soft: rgba(19, 16, 25, 0.08);
  --line-dark: rgba(239, 234, 246, 0.16);

  /* layout */
  --maxw: 1280px;
  --gutter: clamp(20px, 5vw, 72px);
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 24px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bone);
  color: var(--t-body);
  font-family: "Archivo", system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* subtle paper grain over everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: "Archivo", "Archivo", sans-serif;
  color: var(--t-strong);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; }
::selection { background: var(--violet); color: #fff; }

/* ---- layout helpers ---- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(72px, 11vw, 160px) 0; position: relative; }
.section-tight { padding: clamp(56px, 8vw, 110px) 0; }

.dark { background: var(--ink); color: var(--t-on-dark); }
.dark h1, .dark h2, .dark h3, .dark h4 { color: #fff; }
.dark p { color: var(--t-on-dark-mut); }

/* ---- eyebrow / labels ---- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Archivo", sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--violet);
}
.dark .eyebrow { color: var(--violet-bright); }
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1.5px;
  background: currentColor;
  display: inline-block;
}

/* ---- type scale ---- */
.display {
  font-size: clamp(2.9rem, 8.5vw, 7.5rem);
  line-height: 0.92;
  letter-spacing: -0.035em;
  font-weight: 900;
}
.h2 { font-size: clamp(2.1rem, 5vw, 4.2rem); }
.h3 { font-size: clamp(1.5rem, 2.6vw, 2.3rem); letter-spacing: -0.02em; }
.lead {
  font-size: clamp(1.15rem, 1.8vw, 1.45rem);
  line-height: 1.5;
  color: var(--t-body);
  max-width: 46ch;
}
.dark .lead { color: var(--t-on-dark-mut); }
.muted { color: var(--t-muted); }
.serif-x { font-family: "Archivo", serif; }

/* big index numerals */
.numeral {
  font-family: "Archivo", sans-serif;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  line-height: 1;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  --bg: var(--ink);
  --fg: #fff;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 17px 28px;
  background: var(--bg);
  color: var(--fg);
  font-family: "Archivo", sans-serif;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
  border-radius: 8px;
  border: 1.5px solid var(--bg);
  cursor: pointer;
  transition: transform 0.4s var(--ease), background 0.3s, color 0.3s, box-shadow 0.4s var(--ease);
  white-space: nowrap;
}
.btn .arr { transition: transform 0.4s var(--ease); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 30px -12px rgba(19,16,25,0.5); }
.btn:hover .arr { transform: translateX(5px); }

.btn-violet { --bg: var(--violet); --fg: #fff; }
.btn-violet:hover { box-shadow: 0 14px 34px -12px rgba(217,45,32,0.6); }

.btn-ghost {
  background: transparent;
  color: var(--t-strong);
  border-color: var(--line);
}
.btn-ghost:hover { background: transparent; border-color: var(--ink); box-shadow: none; }
.dark .btn-ghost { color: #fff; border-color: var(--line-dark); }
.dark .btn-ghost:hover { border-color: #fff; }

.btn-lg { padding: 21px 34px; font-size: 1.08rem; }

/* text link with animated underline */
.link-x {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--violet);
  position: relative;
}
.dark .link-x { color: var(--violet-bright); }
.link-x::after {
  content: "";
  position: absolute;
  left: 0; bottom: -3px;
  width: 100%; height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}
.link-x:hover::after { transform: scaleX(1); }
.link-x .arr { transition: transform 0.4s var(--ease); }
.link-x:hover .arr { transform: translateX(4px); }

/* ============================================================
   Navigation
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background 0.4s var(--ease), border-color 0.4s, backdrop-filter 0.4s;
  border-bottom: 1px solid transparent;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
}
.nav.scrolled {
  background: rgba(239, 235, 227, 0.82);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom-color: var(--line-soft);
}
body[data-hero="dark"] .nav.scrolled {
  background: rgba(19, 16, 25, 0.9);
  border-bottom-color: var(--line-dark);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: "Archivo", sans-serif;
  font-weight: 800;
  font-size: 1.32rem;
  letter-spacing: -0.03em;
  color: var(--t-strong);
}
body[data-hero="dark"] .nav .logo { color: #fff; }
.logo-mark {
  width: 30px; height: 30px;
  flex: none;
  background: url("logo-dark.svg") center / contain no-repeat;
}
.footer .logo-mark,
body[data-hero="dark"] .nav .logo-mark {
  background-image: url("logo-light.svg");
}
.logo small {
  display: block;
  font-family: "Archivo", sans-serif;
  font-size: 0.5rem;
  font-weight: 600;
  letter-spacing: 0.34em;
  color: var(--violet);
  margin-top: 1px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 38px);
}
.nav-links a.nl {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--t-body);
  position: relative;
  white-space: nowrap;
  transition: color 0.25s;
}
body[data-hero="dark"] .nav .nav-links a.nl { color: var(--t-on-dark); }
.nav-links a.nl:hover { color: var(--violet); }
body[data-hero="dark"] .nav .nav-links a.nl:hover { color: #fff; }
.nav-links a.nl.active { color: var(--violet); }
body[data-hero="dark"] .nav .nav-links a.nl.active { color: var(--violet-bright); }
.nav-links a.nl::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -8px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nav-links a.nl:hover::after,
.nav-links a.nl.active::after { transform: scaleX(1); }

.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav .btn { padding: 12px 22px; font-size: 0.92rem; }

/* click-to-call link in nav */
.nav-phone {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: "Archivo", sans-serif; font-weight: 700; font-size: 0.9rem;
  color: var(--t-strong); white-space: nowrap;
  padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line);
  transition: border-color .25s, color .25s, background .25s;
}
.nav-phone svg { display: block; color: var(--violet); flex: none; }
.nav-phone:hover { border-color: var(--violet); color: var(--violet); }
body[data-hero="dark"] .nav .nav-phone { color: #fff; border-color: var(--line-dark); }
body[data-hero="dark"] .nav .nav-phone svg { color: var(--violet-bright); }
body[data-hero="dark"] .nav .nav-phone:hover { border-color: #fff; }
/* hide the nav phone only in the tight band where all 6 links + button are shown;
   it stays visible on wide desktop and on mobile (where the links collapse) */
@media (min-width: 901px) and (max-width: 1199px) { .nav-phone { display: none; } }
@media (max-width: 400px) { .nav-phone span { display: none; } .nav-phone { padding: 10px 12px; } }

/* footer legal links */
.foot-legal { display: inline-flex; align-items: center; gap: 8px; }
.foot-legal a { color: var(--t-on-dark-mut); transition: color .25s; }
.foot-legal a:hover { color: var(--violet-bright); }
.foot-sep { color: var(--t-on-dark-mut); opacity: .5; }

/* contact form: honeypot + error */
.bf-hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.bf-error { margin-top: 14px; font-size: 0.9rem; color: var(--violet); text-align: center; }
.bf-error a { color: var(--violet); text-decoration: underline; }

.burger {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
  position: relative;
}
.burger span {
  position: absolute;
  left: 11px; right: 11px;
  height: 2px;
  background: var(--t-strong);
  transition: 0.3s var(--ease);
}
body[data-hero="dark"] .nav .burger span { background: #fff; }
body[data-hero="dark"] .nav .burger { border-color: var(--line-dark); }
.burger span:nth-child(1) { top: 16px; }
.burger span:nth-child(2) { top: 22px; }
.burger span:nth-child(3) { top: 28px; }
body.menu-open .burger span:nth-child(1) { top: 21px; transform: rotate(45deg); }
body.menu-open .burger span:nth-child(2) { opacity: 0; }
body.menu-open .burger span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

/* mobile drawer */
.drawer {
  position: fixed;
  inset: 74px 0 0 0;
  z-index: 90;
  background: var(--ink);
  color: #fff;
  padding: 40px var(--gutter);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transform: translateY(-12px);
  opacity: 0;
  pointer-events: none;
  transition: 0.4s var(--ease);
}
body.menu-open .drawer { opacity: 1; transform: none; pointer-events: auto; }
.drawer a {
  font-family: "Archivo", sans-serif;
  font-weight: 700;
  font-size: 2rem;
  color: #fff;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.drawer a .n { font-size: 0.8rem; font-family: "Archivo"; color: var(--violet-bright); }
.drawer .btn { margin-top: 22px; justify-content: center; width: 100%; }

/* ============================================================
   X motif graphics
   ============================================================ */
.x-watermark {
  position: absolute;
  font-family: "Archivo", sans-serif;
  font-weight: 800;
  color: var(--violet);
  opacity: 0.06;
  pointer-events: none;
  user-select: none;
  line-height: 0.7;
  z-index: 0;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--t-body);
  background: var(--paper);
}
.dark .tag { border-color: var(--line-dark); background: rgba(255,255,255,0.04); color: var(--t-on-dark-mut); }
.tag .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--violet); }

/* ---- cards ---- */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(26px, 3vw, 40px);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), border-color 0.4s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 24px 50px -28px rgba(19,16,25,0.35); border-color: var(--violet-tint-2); }

/* ---- footer ---- */
.footer { background: var(--ink); color: var(--t-on-dark); padding: clamp(64px, 9vw, 120px) 0 40px; position: relative; overflow: hidden; }
.footer h2 { color: #fff; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 50px;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--line-dark);
}
.footer-col h5 {
  font-family: "Archivo";
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--t-on-dark-mut);
  margin: 0 0 18px;
  font-weight: 600;
}
.footer-col a { display: block; color: var(--t-on-dark); padding: 7px 0; transition: color 0.25s; }
.footer-col a:hover { color: var(--violet-bright); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  font-size: 0.85rem;
  color: var(--t-on-dark-mut);
  flex-wrap: wrap;
  gap: 16px;
}

/* ---- reveal animation ---- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }
.reveal.d4 { transition-delay: 0.32s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---- divider with X ---- */
.x-rule {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--line);
}
.x-rule::before, .x-rule::after { content: ""; height: 1px; background: var(--line); flex: 1; }
.x-rule span { color: var(--violet); font-weight: 700; font-family: "Archivo"; }

/* ---- sticky mobile CTA ---- */
.sticky-cta {
  position: fixed;
  left: 16px; right: 16px; bottom: 16px;
  z-index: 95;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 17px 24px;
  background: var(--violet);
  color: #fff;
  font-family: "Archivo", sans-serif;
  font-weight: 600;
  font-size: 1.02rem;
  border-radius: 8px;
  box-shadow: 0 16px 36px -12px rgba(217,45,32,0.6);
  transform: translateY(140%);
  transition: transform 0.5s var(--ease);
}
.sticky-cta.show { transform: none; }
.sticky-cta .arr { transition: transform 0.4s var(--ease); }
.sticky-cta:active .arr { transform: translateX(4px); }
body.menu-open .sticky-cta { transform: translateY(140%); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav .nav-cta .btn { display: none; }
  .burger { display: block; }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .sticky-cta { display: flex; }
}

/* ============ shared footer watermark (was inline) ============ */
.foot-x { font-size: 48vh; top: -10%; right: -4%; color: var(--violet-bright); opacity: 0.06; }

/* ============ BLOG ARTICLE PAGES ============ */
.article-head { padding-top: 150px; padding-bottom: clamp(26px, 4vw, 44px); }
.prose-wrap { max-width: 720px; margin: 0 auto; }
.article-back { display: inline-flex; align-items: center; gap: 8px; font-family: "Archivo"; font-weight: 600; font-size: .9rem; color: var(--t-muted); margin-bottom: 26px; transition: color .3s; }
.article-back:hover { color: var(--violet); }
.a-cat { display: inline-block; font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--violet-deep); background: var(--violet-tint); padding: 6px 12px; border-radius: 8px; }
.article-head h1 { font-family: "Archivo", sans-serif; font-weight: 900; font-size: clamp(2.1rem, 5.4vw, 3.7rem); line-height: 1.04; letter-spacing: -.025em; color: var(--t-strong); margin: 18px 0 0; }
.article-meta { margin-top: 20px; font-family: "Archivo"; font-weight: 600; font-size: .86rem; color: var(--t-muted); display: flex; gap: 11px; align-items: center; }
.article-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--t-muted); display: inline-block; }

.prose { font-size: 1.12rem; line-height: 1.75; color: var(--t-body); }
.prose > * + * { margin-top: 1.25em; }
.prose .lead-p { font-size: 1.3rem; line-height: 1.5; color: var(--t-strong); font-weight: 500; }
.prose h2 { font-family: "Archivo"; font-weight: 800; font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.15; letter-spacing: -.02em; color: var(--t-strong); margin-top: 1.9em; }
.prose h3 { font-family: "Archivo"; font-weight: 700; font-size: 1.22rem; color: var(--t-strong); margin-top: 1.5em; }
.prose strong { color: var(--t-strong); font-weight: 700; }
.prose em { font-style: italic; }
.prose a { color: var(--violet); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-top: .55em; }
.prose li::marker { color: var(--violet); }
.prose blockquote { border-left: 3px solid var(--violet); padding: 2px 0 2px 22px; margin: 1.6em 0; font-family: "Archivo"; font-weight: 600; font-size: 1.24rem; line-height: 1.42; color: var(--t-strong); }
.prose hr { border: none; border-top: 1px solid var(--line); margin: 2.4em 0; }

.a-takeaways { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); padding: clamp(22px, 3vw, 30px); margin-top: 2.2em; }
.a-takeaways h4 { font-family: "Archivo"; font-weight: 800; font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--violet); margin-bottom: 14px; }
.a-takeaways ul { margin: 0; padding-left: 1.15em; }
.a-takeaways li { margin-top: .5em; color: var(--t-body); font-size: 1rem; line-height: 1.55; }
.a-takeaways li::marker { content: "✕  "; color: var(--violet); font-family: "Archivo"; font-weight: 800; }

.a-cta { background: var(--ink); color: #fff; border-radius: var(--r-lg); padding: clamp(30px, 4vw, 48px); position: relative; overflow: hidden; margin-top: 52px; }
.a-cta .bc-inner { position: relative; z-index: 2; }
.a-cta h3 { font-family: "Archivo"; font-weight: 900; font-size: clamp(1.6rem, 3.2vw, 2.3rem); line-height: 1.06; letter-spacing: -.02em; color: #fff; }
.a-cta p { color: var(--t-on-dark-mut); margin-top: 14px; max-width: 46ch; }
.a-cta .btn { margin-top: 26px; }

.a-more-h { font-family: "Archivo"; font-weight: 800; font-size: 1.4rem; letter-spacing: -.02em; color: var(--t-strong); margin: 56px 0 18px; }
.a-more { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.a-more-card { display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); padding: 24px 24px 22px; transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .4s; }
.a-more-card:hover { transform: translateY(-5px); box-shadow: 0 24px 48px -28px rgba(19,16,25,.38); border-color: var(--violet-tint-2); }
.a-more-card .a-cat { align-self: flex-start; margin-bottom: 14px; }
.a-more-card h4 { font-family: "Archivo"; font-weight: 800; font-size: 1.12rem; line-height: 1.15; letter-spacing: -.02em; color: var(--t-strong); }
.a-more-card span.rd { margin-top: 14px; font-size: .82rem; font-weight: 600; color: var(--t-muted); }

@media (max-width: 680px) {
  .prose { font-size: 1.06rem; }
  .prose .lead-p { font-size: 1.18rem; }
  .a-more { grid-template-columns: 1fr; }
  .article-head { padding-top: 120px; }
}
