/* ==========================================================================
   The Carbon Group · v5
   Editorial layout, geometry drawn from the logo mark.
   Palette: #FFFFFF #F1F1F1 #305BAF #518CFF #000000
   ========================================================================== */

:root {
  --white: #ffffff;
  --gray: #f1f1f1;
  --gray-2: #f7f7f7;
  --tint: #eef3ff;
  --blue: #305baf;
  --sky: #518cff;
  --black: #000000;
  --ink: #0b0d10;
  --ink-2: #4a5058;
  --ink-3: #83898f;
  --line: #e3e3e3;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; }

a { color: inherit; text-decoration: none; }

::selection { background: var(--sky); color: #fff; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 32px; }

/* --- type ----------------------------------------------------------------- */

h1, h2 {
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.02;
}

h1 { font-size: clamp(3rem, 7.4vw, 6rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); letter-spacing: -0.03em; line-height: 1.1; }
h3 { font-size: 1.2rem; font-weight: 600; letter-spacing: -0.015em; line-height: 1.3; }

.lead {
  font-size: clamp(1.08rem, 1.6vw, 1.25rem);
  line-height: 1.65;
  color: var(--ink-2);
}

em { font-style: normal; color: var(--blue); }

/* --- section label (replaces uppercase kicker) --------------------------- */

.label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
}

.label::before {
  content: "";
  width: 9px;
  height: 9px;
  background: var(--sky);
  transform: rotate(45deg);
  flex: none;
}

/* --- editorial row: label column + content column ------------------------ */

.row {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  position: relative;
  padding-top: 40px;
}

.row::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--sky) 0, var(--sky) 140px, var(--line) 140px, var(--line) 100%);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 1.1s var(--ease);
}

.row.in::before { transform: scaleX(1); }

.row > .col-label { position: sticky; top: 108px; align-self: start; }

section { padding: 120px 0; }

section.tight { padding: 96px 0; }

/* --- reveal --------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.9s var(--ease), transform 0.9s 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; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .row::before { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* --- nav ------------------------------------------------------------------ */

header.site {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px);
}

header.site::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--line);
  opacity: 0;
  transition: opacity 0.2s ease;
}

header.site.scrolled::after { opacity: 1; }

.progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  background: var(--sky);
  transform: scaleX(0);
  transform-origin: left center;
  z-index: 2;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.logo { display: flex; align-items: center; gap: 11px; }

.logo svg { width: 30px; height: 30px; }

.logo .name {
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.nav-links { display: flex; align-items: center; gap: 34px; list-style: none; }

.nav-links a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-2);
  transition: color 0.15s ease;
}

.nav-links a:hover { color: var(--ink); }

.nav-links a.btn, .nav-links a.btn:hover { color: #fff; }

.btn {
  display: inline-block;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 13px 26px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  transition: background 0.18s ease, transform 0.18s ease;
}

.btn:hover { background: var(--black); transform: translateY(-1px); }

.nav .btn { padding: 10px 22px; font-size: 0.9rem; }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.text-link {
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--ink);
  border-bottom: 2px solid var(--sky);
  padding-bottom: 2px;
  transition: color 0.15s ease;
}

.text-link:hover { color: var(--blue); }

.cta-row { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }

/* --- hero ----------------------------------------------------------------- */

.hero { padding: 100px 0 110px; overflow: hidden; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.hero h1 .w { display: inline-block; }

.hero .lead { max-width: 560px; margin-top: 30px; }

.hero .cta-row { margin-top: 42px; }

.hero-mark {
  justify-self: end;
  width: min(100%, 460px);
  aspect-ratio: 1 / 1;
  position: relative;
  will-change: transform;
}

.hero-mark svg { width: 100%; height: 100%; overflow: visible; }

.hero-mark .stroke {
  fill: var(--tint);
  fill-opacity: 0;
  stroke: var(--sky);
  stroke-width: 3;
  stroke-linejoin: round;
  stroke-dasharray: 2600;
  stroke-dashoffset: 2600;
  animation: draw 2.2s var(--ease) forwards, fillin 1.2s ease 1.6s forwards;
}

.hero-mark .stroke.two { animation-delay: 0.35s, 1.95s; }

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fillin { to { fill-opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .hero-mark .stroke { stroke-dashoffset: 0; fill-opacity: 1; animation: none; }
}

/* --- statement ------------------------------------------------------------ */

.statement { padding: 40px 0 120px; }

.statement .big {
  font-size: clamp(2rem, 4.4vw, 3.6rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.06;
  max-width: 980px;
}

.statement .lead { max-width: 720px; margin-top: 28px; }

/* --- pillars (glyph columns, no boxes, no numbers) ------------------------ */

.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.pillar {
  padding: 8px 36px 8px 0;
  border-left: 1px solid var(--line);
  padding-left: 32px;
}

.pillar:first-child { border-left: 0; padding-left: 0; }

.pillar .glyph {
  width: 44px;
  height: 44px;
  margin-bottom: 26px;
}

.pillar .glyph polygon {
  fill: var(--tint);
  stroke: var(--sky);
  stroke-width: 14;
  stroke-linejoin: round;
  transition: fill 0.3s ease;
}

.pillar:hover .glyph polygon { fill: var(--sky); }

.pillar h3 { font-size: 1.45rem; margin-bottom: 12px; }

.pillar p { color: var(--ink-2); font-size: 0.98rem; }

.after {
  margin-top: 64px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  max-width: 760px;
  font-size: 1.02rem;
}

/* --- audience ledger (replaces cards) ------------------------------------- */

.ledger { border-top: 1px solid var(--line); }

.ledger .item {
  display: grid;
  grid-template-columns: 200px 1fr 1.35fr;
  gap: 40px;
  padding: 40px 20px 40px 0;
  border-bottom: 1px solid var(--line);
  position: relative;
  transition: background 0.25s ease;
}

.ledger .item::before {
  content: "";
  position: absolute;
  left: -20px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--sky);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.35s var(--ease);
}

.ledger .item:hover { background: linear-gradient(90deg, var(--tint), rgba(255,255,255,0)); }

.ledger .item:hover::before { transform: scaleY(1); }

.ledger .who {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--blue);
  padding-top: 4px;
}

.ledger h3 { font-size: 1.4rem; letter-spacing: -0.02em; }

.ledger p { color: var(--ink-2); font-size: 0.98rem; }

/* --- AI band, cut at the logo's angle ------------------------------------- */

.band-blue {
  background: var(--blue);
  color: #fff;
  padding: 150px 0 140px;
  clip-path: polygon(0 0, 100% 3.5vw, 100% 100%, 0 calc(100% - 3.5vw));
  position: relative;
  overflow: hidden;
  margin: 20px 0;
}

.band-blue .label { color: #fff; }
.band-blue .label::before { background: #fff; }

.band-blue .row::before {
  background: linear-gradient(90deg, #fff 0, #fff 140px, rgba(255,255,255,0.28) 140px, rgba(255,255,255,0.28) 100%);
}

.band-blue h2 { color: #fff; }

.band-blue .lead { color: rgba(255, 255, 255, 0.86); }

.band-blue .lead + .lead { margin-top: 20px; }

.band-blue .bg-mark {
  position: absolute;
  right: -6%;
  top: 50%;
  width: 46vw;
  max-width: 720px;
  opacity: 0.1;
  transform: translateY(-50%);
  pointer-events: none;
  will-change: transform;
}

.band-blue .bg-mark polygon { fill: none; stroke: #fff; stroke-width: 2; }

.ai-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 56px;
  align-items: start;
}

/* --- case studies --------------------------------------------------------- */

.case {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  padding: 64px 0;
  border-bottom: 1px solid var(--line);
}

.case:first-of-type { padding-top: 8px; }

.media {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.7) 100%),
    repeating-linear-gradient(60deg, rgba(81,140,255,0.16) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(-60deg, rgba(81,140,255,0.16) 0 1px, transparent 1px 34px),
    var(--gray-2);
  border: 1px solid var(--line);
}

.media img {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media .name {
  position: absolute;
  left: 28px;
  bottom: 24px;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--blue);
}

.media .mini {
  position: absolute;
  right: 24px;
  top: 22px;
  width: 34px;
  height: 34px;
  opacity: 0.9;
}

.case .sector {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--blue);
  margin-bottom: 14px;
}

.case h3 { font-size: 2rem; letter-spacing: -0.03em; margin-bottom: 12px; }

.case .intro { color: var(--ink-2); margin-bottom: 26px; max-width: 560px; }

.facts { list-style: none; border-top: 1px solid var(--line); }

.facts li {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}

.facts .k { font-weight: 600; color: var(--ink); }

.facts li span:last-child { color: var(--ink-2); }

.note {
  margin-top: 56px;
  padding-left: 24px;
  border-left: 3px solid var(--sky);
  color: var(--ink-2);
  font-size: 1.02rem;
  max-width: 800px;
}

.note a { color: var(--blue); font-weight: 600; }
.note a:hover { border-bottom: 2px solid var(--sky); }

/* --- contact -------------------------------------------------------------- */

.contact { padding: 130px 0 140px; }

.contact-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 48px;
  align-items: end;
}

.contact h2 { font-size: clamp(2rem, 3.6vw, 3rem); }

.contact .lead { max-width: 600px; margin-top: 22px; }

.contact .actions { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; justify-self: end; }

.contact .email {
  font-weight: 600;
  color: var(--blue);
  font-size: 1.05rem;
}

.contact .email:hover { border-bottom: 2px solid var(--sky); }

.write-us { font-size: 0.9rem; font-weight: 600; color: var(--ink); letter-spacing: -0.005em; }

.email-big {
  font-weight: 650;
  letter-spacing: -0.02em;
  font-size: clamp(1.3rem, 2.2vw, 1.8rem);
  color: var(--blue);
  border-bottom: 3px solid var(--sky);
  padding-bottom: 3px;
  transition: color 0.15s ease;
}

.email-big:hover { color: var(--ink); }

/* --- footer --------------------------------------------------------------- */

footer.site { border-top: 1px solid var(--line); padding: 44px 0; }

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-inner .logo svg { width: 24px; height: 24px; }

.footer-inner .logo .name { font-size: 0.95rem; }

.footer-inner .meta {
  font-size: 0.85rem;
  color: var(--ink-3);
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}

.footer-inner .meta a:hover { color: var(--ink); }

/* --- team page ------------------------------------------------------------ */

.page-hero { padding: 100px 0 60px; }

.page-hero h1 { font-size: clamp(2.6rem, 5.6vw, 4.4rem); max-width: 900px; }

.page-hero .lead { max-width: 680px; margin-top: 26px; }

.profiles { display: flex; flex-direction: column; }

.profile {
  display: grid;
  grid-template-columns: 240px 300px 1fr;
  gap: 48px;
  padding: 64px 0;
  border-top: 1px solid var(--line);
  position: relative;
}

.profile::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 140px;
  height: 1px;
  background: var(--sky);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.9s var(--ease);
}

.profile.in::before { transform: scaleX(1); }

.profile .role { font-size: 0.9rem; font-weight: 600; color: var(--blue); padding-top: 6px; }

.profile .photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  background: var(--gray-2);
  border: 1px solid var(--line);
  position: relative;
}

.profile .photo img {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile .photo .initials {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--blue);
  background:
    repeating-linear-gradient(60deg, rgba(81,140,255,0.14) 0 1px, transparent 1px 30px),
    repeating-linear-gradient(-60deg, rgba(81,140,255,0.14) 0 1px, transparent 1px 30px),
    var(--gray-2);
}

.profile h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); margin-bottom: 18px; }

.profile p { color: var(--ink-2); max-width: 680px; margin-bottom: 14px; }

.profile p:last-of-type { margin-bottom: 0; }

.profile .li-link {
  display: inline-block;
  margin-top: 22px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--blue);
  border-bottom: 2px solid var(--sky);
  padding-bottom: 2px;
}

.profile .li-link:hover { color: var(--ink); }

.team-cta { background: var(--gray); padding: 96px 0; }

/* --- responsive ----------------------------------------------------------- */

@media (max-width: 1000px) {
  section { padding: 88px 0; }
  .row { grid-template-columns: 1fr; gap: 24px; }
  .row > .col-label { position: static; }
  .hero { padding: 64px 0 80px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-mark { justify-self: start; width: min(60vw, 320px); order: -1; }
  .pillars { grid-template-columns: 1fr; gap: 40px; }
  .pillar { border-left: 0; padding-left: 0; padding-right: 0; }
  .ledger .item { grid-template-columns: 1fr; gap: 12px; padding: 32px 0; }
  .ai-grid, .case, .contact-grid { grid-template-columns: 1fr; gap: 28px; }
  .contact .actions { justify-self: start; }
  .band-blue { clip-path: polygon(0 0, 100% 6vw, 100% 100%, 0 calc(100% - 6vw)); padding: 120px 0; }
  .profile { grid-template-columns: 1fr; gap: 24px; padding: 48px 0; }
  .profile .photo { max-width: 280px; }

  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    padding: 26px 32px;
    gap: 20px;
  }
  .nav-links.open { display: flex; }
}
