/* ==========================================================================
   Celestia Consulting — site styles
   Design source: design/canvas/B-Desktop.dc.html and B-Mobile.dc.html
   ========================================================================== */

/* --- Fonts (self-hosted: no third-party request, nothing to consent to) --- */

@font-face {
  font-family: 'IBM Plex Sans';
  src: url('../fonts/ibm-plex-sans-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('../fonts/ibm-plex-sans-500.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('../fonts/ibm-plex-sans-600.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('../fonts/space-grotesk-500.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('../fonts/space-grotesk-600.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}

/* --- Tokens ------------------------------------------------------------- */

:root {
  --ink:          #0E0E10;
  --ink-soft:     #262629;
  --azure:        #0B6BC4;
  --azure-dark:   #08508F;
  --body:         #55606E;
  --muted:        #6B7686;
  --rule:         #E3E8EE;
  --rule-strong:  #D8DEE6;
  --band:         #F4F6F8;
  --on-dark:      #B7BFC9;
  --on-dark-dim:  #8B939E;
  --on-dark-rule: #4A4F57;
  --white:        #FFFFFF;

  --display: 'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --text:    'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif;

  --maxw:   1280px;
  --gutter: clamp(20px, 5vw, 64px);

  --logo-w:   210px;   /* client slider tile */
  --logo-h:   126px;
  --logo-gap: 104px;
}

/* --- Reset -------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--text);
  font-size: 16px;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--display); margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }

a { color: var(--azure); }
a:hover { color: var(--azure-dark); }

:focus-visible {
  outline: 2px solid var(--azure);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: var(--white);
  padding: 12px 20px;
  text-decoration: none;
}
.skip-link:focus {
  left: 0;
  color: var(--white);
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* --- Shared layout ------------------------------------------------------ */

.wrap {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.eyebrow {
  font-family: var(--display);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--azure);
}

/* The section heading is one <h2> holding the azure label and the statement, so
   the keyword-bearing label is inside a real heading rather than a loose span. */
.section-head { margin: 0 0 34px; font-weight: 400; letter-spacing: normal; }
.section-head .eyebrow { display: block; margin-bottom: 14px; }
.section-title {
  display: block;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(29px, 3.3vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--ink);
}
/* Clients uses the small label itself as its heading. */
h2.eyebrow { margin: 0; }

/* --- Header ------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--white);
  border-bottom: 1px solid var(--rule);
}

.site-header .wrap {
  height: 96px;
  display: flex;
  align-items: center;
  gap: 48px;
}

.brand { display: block; text-decoration: none; flex-shrink: 0; }
.brand img { width: clamp(182px, 17vw, 224px); height: auto; }

.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav a {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  padding: 10px 0;
}
.nav a:hover { color: var(--azure); }

.btn {
  display: inline-block;
  font-family: var(--text);
  font-size: 15px;
  font-weight: 600;
  color: var(--white);
  background: var(--azure);
  padding: 15px 26px;
  text-decoration: none;
  border: 0;
  cursor: pointer;
}
.btn:hover { background: var(--azure-dark); color: var(--white); }

.nav .btn { padding: 13px 24px; font-size: 14.5px; }

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px; height: 44px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  gap: 6px;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  transition: width .15s ease;
}
.nav-toggle span:nth-child(1) { width: 22px; }
.nav-toggle span:nth-child(2) { width: 22px; }
.nav-toggle span:nth-child(3) { width: 14px; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { width: 22px; }

/* --- Hero --------------------------------------------------------------- */

.hero {
  border-bottom: 1px solid var(--rule);
  padding-block: clamp(44px, 6vw, 84px) 0;
}

.hero .wrap {
  display: flex;
  gap: 48px;
  align-items: stretch;
}

/* Both columns may give ground between 1080px and 1280px, so the squeeze is
   shared rather than landing entirely on the image stack. */
.hero-copy {
  flex: 0 1 580px;
  min-width: 400px;
  padding-bottom: clamp(40px, 5vw, 64px);
}

.hero h1 {
  font-weight: 500;
  font-size: clamp(38px, 4.9vw, 62px);
  line-height: 1.06;
  letter-spacing: -0.025em;
  margin-bottom: clamp(16px, 2vw, 26px);
}

.hero p {
  font-size: clamp(16px, 1.45vw, 18.5px);
  line-height: 1.65;
  color: var(--body);
  max-width: 530px;
}

.hero-art {
  flex-grow: 1;
  /* Without this, min-width:auto floors the column at the stack's 578px and the
     page overflows to the right between 1080px and 1280px. */
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: calc(var(--gutter) * -1);
}

/* Tiles are positioned in percentages so the stack scales as one unit. */
.tile-stack {
  position: relative;
  width: 578px;
  max-width: 100%;
  aspect-ratio: 578 / 334;
}

.tile-stack img {
  position: absolute;
  width: 38.41%;   /* 222 / 578 */
  height: 66.47%;  /* 222 / 334 */
  object-fit: cover;
  background: var(--white);
  border: 1px solid var(--rule);
  box-shadow: 0 10px 28px rgba(14, 14, 16, .10);
}

.tile-stack img:nth-child(1) { left: 0;      top: 0; }
.tile-stack img:nth-child(2) { left: 30.80%; top: 16.77%; }
.tile-stack img:nth-child(3) { left: 61.59%; top: 33.53%; }

/* --- Services ----------------------------------------------------------- */

.services { padding-block: clamp(28px, 4.7vw, 60px); }

.phases {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
  align-items: stretch;
}

.phase {
  border-top: 3px solid var(--ink);
  padding-top: 20px;
  display: flex;
  flex-direction: column;
}

.phase-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}
.phase-head .num {
  font-family: var(--display);
  font-size: 12px;
  font-weight: 600;
  color: var(--azure);
}
.phase-head h3 {
  font-weight: 600;
  font-size: clamp(21px, 1.9vw, 23px);
  letter-spacing: 0;
}

.phase-strap {
  margin-bottom: 18px;
  min-height: 48px;        /* keeps the first service row aligned across columns */
  font-size: 15px;
  line-height: 1.6;
  color: var(--body);
}

.service {
  display: flex;
  gap: 15px;
  align-items: flex-start;
  padding: 13px 0;
  border-top: 1px solid var(--rule);
}
.service img { width: 38px; height: 38px; flex-shrink: 0; }
.service h4 {
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0;
  margin-bottom: 3px;
}
.service p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--body);
}

.callout-holder { margin-top: auto; padding-top: 20px; }

.callout {
  background: var(--band);
  border-left: 3px solid var(--azure);
  padding: 16px 18px;
}
.callout .label {
  font-family: var(--display);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 7px;
}
.callout a {
  font-family: var(--display);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  display: block;
  margin-bottom: 4px;
}
.callout a:hover { color: var(--azure); }
.callout p { font-size: 13.5px; line-height: 1.55; color: var(--body); }

/* --- Clients ------------------------------------------------------------ */

.clients-head {
  padding-top: 48px;
  padding-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.slider-toggle {
  margin-left: auto;
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--rule-strong);
  border-radius: 50%;
  color: var(--body);
  cursor: pointer;
}
.slider-toggle:hover { border-color: var(--ink); color: var(--ink); }

/* The [hidden] attribute is unreliable on inline SVG, so switch icons in CSS. */
.slider-toggle .icon-play  { display: none; }
.slider-toggle .icon-pause { display: block; }
.slider-toggle.is-paused .icon-play  { display: block; }
.slider-toggle.is-paused .icon-pause { display: none; }

.clients-band {
  background: var(--band);
  border-block: 1px solid var(--rule);
  padding-block: 34px;
}

.marquee {
  position: relative;
  overflow: hidden;

}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 50s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track.is-paused { animation-play-state: paused; }

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Margins, not gap: with gap the 50% point lands short and the loop jumps. */
.marquee-track li {
  list-style: none;
  width: var(--logo-w);
  height: var(--logo-h);
  margin-right: var(--logo-gap);
  flex-shrink: 0;
}
.marquee-track { margin: 0; padding: 0; }
.marquee-track li img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.fade {
  position: absolute;
  top: 0; bottom: 0;
  width: 56px;
  pointer-events: none;
}
.fade-l { left: 0;  background: linear-gradient(to right, var(--band), rgba(244,246,248,0)); }
.fade-r { right: 0; background: linear-gradient(to left,  var(--band), rgba(244,246,248,0)); }

/* --- Expertise ---------------------------------------------------------- */

.expertise { padding-block: clamp(28px, 5.3vw, 68px) clamp(24px, 4.7vw, 60px); }

.sectors {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.sector {
  background: var(--white);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--ink);
  padding: 28px;
}
.sector h3 {
  font-weight: 600;
  font-size: clamp(18px, 1.8vw, 22px);
  letter-spacing: 0;
  margin-bottom: 12px;
}
.sector p { font-size: 15px; line-height: 1.62; color: var(--body); }

/* --- Contact ------------------------------------------------------------ */

.contact {
  background: var(--ink);
  color: var(--white);
  padding-block: clamp(28px, 4.4vw, 56px);
}
.contact .wrap {
  display: flex;
  align-items: center;
  gap: 56px;
}
.contact h2 {
  font-weight: 500;
  font-size: clamp(27px, 3.1vw, 38px);
  line-height: 1.14;
  color: var(--white);
  margin-bottom: 16px;
}
.contact p {
  font-size: clamp(15px, 1.3vw, 16.5px);
  line-height: 1.6;
  color: var(--on-dark);
  max-width: 470px;
}
.contact-text { flex-grow: 1; }
.contact .btn { font-size: 16px; padding: 17px 30px; }

/* --- Footer ------------------------------------------------------------- */

.site-footer {
  background: var(--ink);
  border-top: 1px solid var(--ink-soft);
}
.site-footer .wrap {
  min-height: 56px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.footer-legal {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.footer-legal span,
.footer-legal a {
  font-size: 12.5px;
  color: var(--on-dark-dim);
  text-decoration: none;
}
.footer-legal a { padding-block: 16px; }
.footer-legal a:hover { color: var(--white); }
.footer-legal .sep { color: var(--on-dark-rule); }

.footer-social {
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.footer-social img { width: 26px; height: 26px; }

.footer-copyright {
  font-size: 12.5px;
  color: var(--on-dark-dim);
  text-align: right;
}

/* --- Legal pages -------------------------------------------------------- */

.doc { padding-block: clamp(40px, 5vw, 72px) clamp(48px, 6vw, 88px); }
.doc .wrap { max-width: 760px; }
.doc h1 {
  font-weight: 500;
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.1;
  margin-bottom: 10px;
}
.doc .updated { font-size: 13.5px; color: var(--muted); margin-bottom: 34px; }
.doc h2 {
  font-weight: 600;
  font-size: clamp(20px, 2.2vw, 24px);
  margin: 34px 0 10px;
}
.doc p, .doc li { font-size: 16px; line-height: 1.68; color: var(--body); }
.doc p + p { margin-top: 12px; }
.doc ul { margin: 10px 0 0; padding-left: 20px; }
.doc li + li { margin-top: 6px; }

/* ==========================================================================
   Breakpoints
   ========================================================================== */

@media (max-width: 1080px) {
  .hero .wrap { flex-direction: column; gap: 0; }
  .hero-copy { flex: 0 1 auto; min-width: 0; width: 100%; padding-bottom: 0; }
  .hero p { max-width: 640px; }
  .hero-art {
    margin-right: 0;
    margin-top: 30px;
    padding-bottom: clamp(40px, 5vw, 64px);
  }
  .tile-stack { width: 100%; max-width: 520px; }

  .phases { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; }
  .phase:last-child { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  .site-header .wrap { height: 72px; gap: 0; }
  .nav-toggle { display: flex; }

  .nav {
    position: absolute;
    left: 0; right: 0;
    top: 100%;
    margin: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--white);
    border-bottom: 1px solid var(--rule);
    padding: 8px var(--gutter) 20px;
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a {
    padding: 14px 0;
    border-bottom: 1px solid var(--rule);
    font-size: 16px;
  }
  .nav .btn {
    margin-top: 16px;
    text-align: center;
    border-bottom: 0;
    padding: 15px 24px;
  }

  .phases { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .phase { margin-bottom: 26px; padding-top: 16px; }
  .phase:last-child { margin-bottom: 0; }
  .phase-strap { min-height: 0; margin-bottom: 14px; }
  .callout-holder { margin-top: 14px; padding-top: 0; }
  .service { gap: 13px; padding: 12px 0; }
  .service img { width: 34px; height: 34px; }
  .service h4 { font-size: 15.5px; }

  .sectors { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .sector { padding: 18px 20px; }
  .sector h3 { margin-bottom: 6px; }
  .sector p { font-size: 14px; line-height: 1.6; }

  .section-head { margin-bottom: 22px; }
  .section-head .eyebrow { margin-bottom: 12px; }

  .clients-head { padding-top: 26px; padding-bottom: 14px; gap: 12px; }
  .clients-band { padding-block: 22px; }
  .fade-l { display: none; }
  .fade-r { width: 34px; }

  :root { --logo-w: 140px; --logo-h: 84px; --logo-gap: 40px; }
  .marquee-track { animation-duration: 34s; }

  .contact .wrap { flex-direction: column; align-items: stretch; gap: 20px; }
  .contact .btn { text-align: center; }

  .site-footer .wrap {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    text-align: center;
    padding-block: 16px;
    gap: 2px;
  }
  .site-footer .wrap > :first-child { order: 2; }
  .footer-social { order: 1; }
  .footer-copyright { order: 3; text-align: center; }
  .footer-legal { justify-content: center; }
  .footer-legal a { padding-block: 10px; }
  .footer-legal .addr { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track { animation: none; }
}
