:root {
  --primary: #F3EEF9;
  --secondary: #A78BFA;
  --accent: #FCA5A5;
  --surface: #FFFFFF;
  --soft: #FAF8FE;
  --muted: #E8E3F4;
  --text: #111827;

  /* Pastel derivations (computed from tokens) */
--bg-a: color-mix(in srgb, var(--primary) 85%, black);

  --bg-b: color-mix(in srgb, var(--secondary) 30%, white);
  --bg-c: color-mix(in srgb, var(--accent) 30%, black);

  --panel: color-mix(in srgb, var(--surface) 95%, black);
  --panel-2: color-mix(in srgb, var(--text) 10%, transparent);

  --stroke: color-mix(in srgb, var(--text) 12%, transparent);
  --stroke-2: color-mix(in srgb, var(--text) 10%, transparent);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.10);

  color-scheme: light;
}

* { box-sizing: border-box; min-width: 0; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial;
  color: var(--text);
  background: var(--bg-a);
  line-height: 1.6;
}

/* Bulletproof long strings */
.hero-title, .brand-title, .topbar-title, .card h3, .card p, .company-block, .fact-v, a {
  overflow-wrap: anywhere;
  word-break: break-word;
}

a { color: inherit; }

h1,h2,h3 { margin: 0 0 0.65rem 0; line-height: 1.15; letter-spacing: -0.02em; }
p { margin: 0 0 1rem 0; }

.muted { color: color-mix(in srgb, var(--text) 70%, transparent); }

/* Background (NO image) */
.bg { position: fixed; inset: 0; z-index: -2; pointer-events: none; }
.bg-blob {
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 999px;
  filter: blur(45px);
  opacity: 0.75;
}
.bg-blob-a {
  top: -180px; left: -180px;
  background: radial-gradient(circle at 30% 30%, var(--bg-b), transparent 60%);
}
.bg-blob-b {
  bottom: -200px; right: -220px;
  background: radial-gradient(circle at 30% 30%, var(--bg-c), transparent 60%);
}
.bg-noise {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image:
    repeating-linear-gradient(0deg, rgba(0,0,0,0.55) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(0,0,0,0.55) 0 1px, transparent 1px 3px);
  mix-blend-mode: soft-light;
}
.bg-grid {
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background-image:
    linear-gradient(to right, rgba(0,0,0,0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0,0,0,0.06) 1px, transparent 1px);
  background-size: 110px 110px;
}

/* Layout */
.shell {
  width: min(1400px, 100%);
  margin: 0 auto;
  padding: 1.8rem 1.5rem 3rem;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1.25rem;
}

/* Sidebar */
.sidebar {
  position: sticky;
  top: 1.25rem;
  align-self: start;
  border-radius: 18px;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.brand {
  padding: 1.15rem 1.15rem 0.6rem;
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 0.85rem;
  align-items: center;
}

.logo {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--stroke-2);
  background: var(--panel-2);
}
.logo.hidden { display: none; }
.logo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.brand-kicker {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--text) 65%, transparent);
}
.brand-title { font-size: 1rem; font-weight: 850; }

.side-nav {
  display: grid;
  gap: 0.35rem;
  padding: 0.7rem 1.15rem 0.95rem;
}
.side-nav a {
  display: block;
  text-decoration: none;
  padding: 0.62rem 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--stroke-2);
  background: color-mix(in srgb, white 70%, var(--panel));
  font-weight: 750;
}
.side-nav a:hover { transform: translateY(-1px); }

.side-card {
  margin: 0 1.15rem 1rem;
  padding: 1rem;
  border-radius: 16px;
  border: 1px solid var(--stroke-2);
  background: var(--panel-2);
}

.side-note {
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 0.6rem;
  align-items: start;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 70%, white);
  margin-top: 0.2rem;
}

.side-photo {
  margin: 0 1.15rem 1.1rem;
  height: 140px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--stroke-2);
  background: var(--panel-2);
}
.side-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.side-footer {
  padding: 1rem 1.15rem 1.15rem;
  border-top: 1px solid var(--stroke-2);
}
.company-block { display: grid; gap: 0.35rem; }
.company-block a { text-decoration: underline; text-underline-offset: 3px; }

/* Main */
.main {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--stroke);
  background: color-mix(in srgb, white 72%, var(--panel));
  box-shadow: var(--shadow);
}

/* Mobile topbar */
.topbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--stroke-2);
  background: color-mix(in srgb, white 72%, var(--panel));
  position: relative;
}

.topbar-left { display: flex; align-items: center; gap: 0.65rem; }

.logo-sm {
  width: 40px; height: 40px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--stroke-2);
  background: var(--panel-2);
}
.logo-sm.hidden { display: none; }
.logo-sm img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topbar-title { font-weight: 900; letter-spacing: -0.02em; }

.nav-toggle { display: none; }

.hamburger {
  width: 44px; height: 44px;
  border-radius: 14px;
  border: 1px solid var(--stroke-2);
  background: color-mix(in srgb, white 72%, var(--panel));
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
}
.hamburger span {
  width: 22px; height: 2px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text) 80%, transparent);
}

.mobile-menu {
  display: none;
  position: absolute;
  right: 1.1rem; left: 1.1rem;
  top: 4.25rem;
  border-radius: 16px;
  border: 1px solid var(--stroke-2);
  background: color-mix(in srgb, white 75%, var(--panel));
  padding: 0.75rem;
  gap: 0.35rem;
  flex-direction: column;
  z-index: 5;
  backdrop-filter: blur(10px);
}
.mobile-menu a {
  text-decoration: none;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--stroke-2);
  background: color-mix(in srgb, white 70%, var(--panel));
  font-weight: 800;
}
.nav-toggle:checked ~ .main .mobile-menu { display: flex; }

/* Pills / chips */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.33rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: color-mix(in srgb, var(--secondary) 25%, white);
  border: 1px solid var(--stroke-2);
}
.pill-ghost { background: transparent; }

.chip {
  display: inline-flex;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--stroke-2);
  background: color-mix(in srgb, white 80%, var(--panel));
  font-weight: 800;
  font-size: 0.85rem;
}
.chip-ghost {
  background: transparent;
  color: color-mix(in srgb, var(--text) 70%, transparent);
}

/* Buttons (NOT static gradient combo) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 14px;
  padding: 0.9rem 1.1rem;
  font-weight: 900;
  border: 1px solid transparent;
  transition: transform 140ms ease, filter 140ms ease, background 140ms ease;
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px); }

.btn-solid {
  color: var(--text);
  background: color-mix(in srgb, var(--secondary) 28%, white);
  border-color: color-mix(in srgb, var(--secondary) 32%, var(--stroke));
}

.btn-solid:hover {
  background: color-mix(in srgb, var(--accent) 28%, white);
  border-color: color-mix(in srgb, var(--accent) 32%, var(--stroke));
}


.btn-soft {
  color: var(--text);
  background: color-mix(in srgb, var(--primary) 10%, white);
  border-color: var(--stroke-2);
}
.btn-soft:hover {
  background: color-mix(in srgb, var(--primary) 14%, white);
}

.btn-wide { width: 100%; }

/* Hero (different layout) */
.hero {
  padding: 1.2rem 1.5rem 1.2rem;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 1.1rem;
  align-items: stretch;
}

.hero-card {
  border-radius: 18px;
  border: 1px solid var(--stroke-2);
  background: var(--panel);
  padding: 1.25rem 1.25rem 1.1rem;
}

.hero-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.9rem; }

.hero-title {
  font-size: clamp(1.9rem, 2.4vw, 2.7rem);
  font-weight: 950;
  margin-bottom: 0.6rem;
}

.hero-sub { color: color-mix(in srgb, var(--text) 70%, transparent); font-size: 1.03rem; margin-bottom: 1rem; }

.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 0.2rem 0 1rem; }

.hero-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}
.fact {
  border-radius: 16px;
  border: 1px solid var(--stroke-2);
  background: color-mix(in srgb, white 75%, var(--panel));
  padding: 0.85rem;
}
.fact-k {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--text) 65%, transparent);
  margin-bottom: 0.35rem;
}
.fact-v a { text-decoration: underline; text-underline-offset: 3px; }

.hero-visual {
  border-radius: 18px;
  border: 1px solid var(--stroke-2);
  overflow: hidden;
  background: var(--panel-2);
  position: relative;
}
.hero-visual img { width: 100%; height: 100%; object-fit: cover; display: block; min-height: 320px; }
.hero-visual-overlay { position: absolute; inset: 0; display: grid; place-items: end; padding: 0.9rem; }
.hero-visual-card {
  width: min(420px, 100%);
  border-radius: 16px;
  border: 1px solid var(--stroke-2);
  background: color-mix(in srgb, white 78%, transparent);
  backdrop-filter: blur(10px);
  padding: 0.9rem;
}

/* Carousel */
.carousel {
  padding: 0.6rem 1.5rem 1.15rem;
}
.carousel-head { margin-bottom: 0.75rem; }
.carousel-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 1fr);
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.slide {
  scroll-snap-align: start;
  margin: 0;
  border-radius: 18px;
  border: 1px solid var(--stroke-2);
  overflow: hidden;
  background: var(--panel-2);
  height: 220px;
}
.slide img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Sections */
.section { padding: 1.1rem 1.5rem 0.65rem; }
.section-head { margin-bottom: 0.95rem; }
.section-head h2 { font-size: 1.45rem; font-weight: 950; }

/* About (split + quote) */
.about-split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1rem;
  align-items: stretch;
}
.about-card {
  border-radius: 18px;
  border: 1px solid var(--stroke-2);
  background: var(--panel);
  padding: 1.1rem;
}
.quote {
  margin: 0.9rem 0 0;
  padding: 0.9rem;
  border-radius: 16px;
  border: 1px dashed color-mix(in srgb, var(--accent) 35%, var(--stroke-2));
  background: color-mix(in srgb, var(--accent) 10%, white);
}
.about-photo {
  border-radius: 18px;
  border: 1px solid var(--stroke-2);
  overflow: hidden;
  background: var(--panel-2);
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; display: block; min-height: 260px; }

/* SERVICES (no numbering) */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.service-card {
  border-radius: 18px;
  border: 1px solid var(--stroke-2);
  background: color-mix(in srgb, white 72%, var(--panel));
  padding: 1.05rem;
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: "";
  position: absolute;
  inset: -60px -80px auto auto;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--secondary) 18%, white), transparent 60%);
  opacity: 0.9;
}
.service-title { position: relative; font-weight: 950; margin-bottom: 0.4rem; }
.service-body { position: relative; color: color-mix(in srgb, var(--text) 75%, transparent); margin: 0; }

/* HIGHLIGHTS (accordion) */
.accordion {
  display: grid;
  gap: 0.6rem;
}
.accordion details {
  border-radius: 18px;
  border: 1px solid var(--stroke-2);
  background: var(--panel);
  overflow: hidden;
}
.accordion summary {
  cursor: pointer;
  list-style: none;
  padding: 0.95rem 1rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion .acc-body {
  padding: 0 1rem 0.95rem;
  color: color-mix(in srgb, var(--text) 76%, transparent);
}
.acc-icon {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid var(--stroke-2);
  background: color-mix(in srgb, var(--accent) 14%, white);
  display: grid;
  place-items: center;
  font-weight: 950;
}

/* Blog tiles keep .card look if you want */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.card {
  grid-template-columns: 44px 1fr;
  gap: 0.85rem;
  align-items: start;
  border-radius: 18px;
  border: 1px solid var(--stroke-2);
  background: var(--panel);
  padding: 1.05rem;
  text-decoration: none;
}
.marker {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-weight: 950;
  background: color-mix(in srgb, var(--secondary) 20%, white);
  border: 1px solid var(--stroke-2);
}
.card h3 { margin: 0 0 0.35rem 0; font-weight: 950; }
.card p { margin: 0; color: color-mix(in srgb, var(--text) 78%, transparent); }

/* CTA */
.cta { padding: 1.25rem 1.5rem 1.6rem; }
.cta-inner {
  border-radius: 18px;
  border: 1px solid var(--stroke-2);
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--bg-b) 65%, white),
    color-mix(in srgb, var(--bg-c) 55%, white)
  );
  padding: 1.25rem;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1rem;
  align-items: start;
}
.cta-title { font-weight: 950; margin-top: 0.65rem; }
.cta-sub { color: color-mix(in srgb, var(--text) 75%, transparent); }
.cta-right { display: grid; gap: 0.75rem; }
.cta-fineprint { color: color-mix(in srgb, var(--text) 70%, transparent); font-size: 0.92rem; }

.bottom-space { height: 1.25rem; }

/* Clamp helpers */
.clamp-1,.clamp-2,.clamp-3,.clamp-4 { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-1 { -webkit-line-clamp: 1; }
.clamp-2 { -webkit-line-clamp: 2; }
.clamp-3 { -webkit-line-clamp: 3; }
.clamp-4 { -webkit-line-clamp: 4; }

img { max-width: 100%; height: auto; }
.img-fallback { filter: saturate(0.95) contrast(0.98); }

/* Responsive */
@media (max-width: 1020px) {
  .shell { grid-template-columns: 1fr; padding: 1.2rem 1.1rem 2.5rem; }
  .sidebar { position: relative; top: auto; }
  .topbar { display: flex; position: sticky; top: 0; z-index: 6; }
  .hero { grid-template-columns: 1fr; }
  .about-split { grid-template-columns: 1fr; }
  .cta-inner { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  .sidebar {
 display: none;
  }
}
@media (max-width: 560px) {
  .shell { padding: 1.1rem 0.95rem 2.2rem; }
  .hero, .section, .cta, .carousel { padding-left: 1.1rem; padding-right: 1.1rem; }
  .hero-facts { grid-template-columns: 1fr; }
  .service-card::before { opacity: 0.65; }
}

/* --- Blog safety: prevent overlap with cover image --- */
.panel-photo {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--stroke-2);
  background: var(--panel-2);
}

.panel-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Prose rules inside article */
.paper {
  position: relative;
  z-index: 1;
  background: var(--panel);
  border: 1px solid var(--stroke-2);
  border-radius: 18px;
  overflow: hidden;
}

/* Any HTML coming from the blog content */
.paper img,
.paper video,
.paper iframe {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
}

.paper h1, .paper h2, .paper h3 {
  margin: 1rem 0 0.6rem;
}

.paper p, .paper ul, .paper ol {
  margin: 0.75rem 0;
}

.paper ul, .paper ol {
  padding-left: 1.1rem;
}

/* If the blog content contains floats, neutralize them */
.paper * {
  float: none !important;
  clear: none !important;
}

