/* ============================================================
   OPSLY — AI-first operations consultancy
   Visual language: light canvas, ink type, vivid gradient blocks
   ============================================================ */

:root {
  --bg: #f2f2f2;
  --ink: #141414;
  --muted: #999;
  --accent-orange: #fa6104;
  --accent-magenta: #cf13ee;
  --green: #6bff3d;
  --grad-sunset: linear-gradient(156.75deg, #ffa24d 1.34%, #ff2d52 120.85%);
  --grad-cosmos: linear-gradient(156.75deg, #3788ff 1.44%, #982ced 94.35%);
  --grad-ember: linear-gradient(90deg, #ed6339, #fa5ca6 42%, #eb7d2e);
  --grad-lime: linear-gradient(90deg, #6bff3d, #27b56a 42%, #a4ff5e);
  --grad-aurora: linear-gradient(-40deg, #27249c -9.14%, #177aee 46.7%, #4a19d2 86.65%);
  --ease-out: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-reveal: cubic-bezier(1, 0, 0.25, 0.995);
  --rail-w: 6.5rem;
}

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

html {
  font-size: 62.5%;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg);
  color: var(--ink);
  font-family: "Switzer", "Helvetica Neue", sans-serif;
  font-size: 1.6rem;
  font-weight: 500;
  line-height: 1.4;
  overflow-x: hidden;
}

::selection { background-color: var(--accent-orange); color: #fff; text-shadow: none; }

a { color: currentColor; text-decoration: none; }
.ttu { text-transform: uppercase; }

/* body copy is justified; labels, tags and headings stay ragged */
.manifesto__body > p,
.service__desc,
.process__intro,
.process__step-desc,
.studio__intro,
.studio__card-desc {
  text-align: justify;
}

/* ============ Header ============ */

.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 2rem 2rem 0;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.header__logo-mark {
  width: 1.8rem;
  height: 1.8rem;
  display: inline-block;
}

.header__nav { display: none; }

.header__nav a {
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.15;
  transition: opacity 0.3s var(--ease-out);
}

.header__nav a:hover { opacity: 0.45; }

.btn-pill {
  position: relative;
  display: inline-block;
  overflow: hidden;
  background: var(--ink);
  color: var(--bg);
  border-radius: 10rem;
  padding: 1.2rem 2.4rem;
  font-size: 1.5rem;
  font-weight: 600;
}

.btn-pill__label {
  display: block;
  transition: transform 0.5s var(--ease-out);
}

.btn-pill__label--hover {
  position: absolute;
  inset: 1.2rem 2.4rem;
  transform: translateY(160%);
}

.btn-pill:hover .btn-pill__label { transform: translateY(-160%); }
.btn-pill:hover .btn-pill__label--hover { transform: translateY(0); }

/* ============ Side rail ============ */

.side-rail {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--rail-w);
  z-index: 40;
  border-left: 1px solid rgba(20, 20, 20, 0.12);
  background: var(--bg);
}

.side-rail__text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(90deg);
  white-space: nowrap;
  font-size: 1.3rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
}

.side-rail__square {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 1.2rem;
  height: 1.2rem;
  background: var(--grad-cosmos);
}

/* ============ Layout wrapper ============ */

.content-wrapper { position: relative; }

@media (min-width: 1024px) {
  .header { padding: 2.4rem 9.5rem 0 3rem; }
  .header__nav { display: flex; gap: 4.5rem; }
  .side-rail { display: block; }
  .content-wrapper { margin-right: var(--rail-w); }
}

/* ============ Hero ============ */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 10rem 2rem 3rem;
  overflow: hidden;
}

.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.hero__meta {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 2.4rem 6rem;
  margin-bottom: auto;
  padding-top: 4rem;
}

.hero__meta-item {
  font-size: 1.4rem;
  line-height: 1.35;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.hero__title {
  position: relative;
  font-size: 15.2vw;
  line-height: 0.92;
  font-weight: 600;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  margin: 4rem 0 5rem;
}

.hero__title-line { display: block; overflow: hidden; }
.hero__title-line--indent { padding-left: 8vw; }

.hero__title-inner {
  display: inline-flex;
  align-items: center;
  gap: 2.2vw;
  will-change: transform;
}

.hero__square {
  display: inline-block;
  width: 9.5vw;
  height: 9.5vw;
  flex: none;
}

.hero__square--sunset { background: var(--grad-sunset); }
.hero__square--cosmos { background: var(--grad-cosmos); }
.hero__square--ink { background: var(--ink); }
.hero__square--green { background: var(--green); }

.hero__bottom {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
}

.hero__tagline {
  font-size: 1.7rem;
  line-height: 1.4;
  max-width: 34rem;
}

.hero__scroll {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  font-size: 1.4rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.hero__scroll-arrow {
  display: inline-block;
  animation: bob 1.8s var(--ease-out) infinite;
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(0.5rem); }
}

@media (min-width: 1024px) {
  .hero { padding: 12rem 3rem 4rem; }
  .hero__title { font-size: 14vw; }
  .hero__square { width: 8.6vw; height: 8.6vw; }
}

/* ============ Shared section rhythm ============ */

.manifesto, .services, .process, .studio {
  padding: 12rem 2rem;
}

@media (min-width: 1024px) {
  .manifesto, .services, .process, .studio {
    padding: 16rem 3rem;
  }
}

.manifesto__kicker, .services__kicker, .process__kicker, .studio__kicker, .footer__kicker {
  font-size: 1.4rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 3.2rem;
}

/* ============ Manifesto ============ */

.manifesto__title {
  font-size: clamp(3.2rem, 6.2vw, 7.5rem);
  line-height: 1.04;
  font-weight: 600;
  letter-spacing: -0.025em;
  max-width: 20ch;
  margin-bottom: 6.4rem;
}

.manifesto__body {
  display: grid;
  gap: 5rem;
  align-items: start;
}

.manifesto__body > p {
  font-size: 1.9rem;
  line-height: 1.55;
  max-width: 56rem;
}

.manifesto__words {
  display: flex;
  flex-direction: column;
  font-size: clamp(4rem, 6.7vw, 8rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.manifesto__word { overflow: hidden; display: block; }
.manifesto__word .anim-line { display: block; }

.manifesto__word:nth-child(1) .anim-line {
  background: var(--grad-lime);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.manifesto__word:nth-child(2) .anim-line {
  background: var(--grad-cosmos);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

@media (min-width: 1024px) {
  .manifesto__body { grid-template-columns: 1.2fr 1fr; }
}

/* ============ Statement ============ */

.statement {
  padding: 10rem 2rem;
  border-top: 1px solid rgba(20, 20, 20, 0.12);
  border-bottom: 1px solid rgba(20, 20, 20, 0.12);
}

.statement__title {
  font-size: 10.1vw;
  line-height: 0.98;
  font-weight: 600;
  letter-spacing: -0.035em;
}

@media (min-width: 1024px) {
  .statement { padding: 12rem 3rem; }
  .statement__title { font-size: 7.2vw; max-width: 95%; }
}

/* ============ Services ============ */

.services__header { margin-bottom: 8rem; }

.services__title, .process__title, .studio__title {
  font-size: clamp(3.2rem, 5.4vw, 6.6rem);
  line-height: 1.04;
  font-weight: 600;
  letter-spacing: -0.025em;
  max-width: 22ch;
}

.services__list {
  display: flex;
  flex-direction: column;
  gap: 8rem;
}

.service {
  display: grid;
  gap: 3rem;
  border-top: 1px solid rgba(20, 20, 20, 0.12);
  padding-top: 4rem;
}

.service__media {
  position: relative;
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: flex-end;
  padding: 2.4rem;
}

.service__index {
  font-size: 6rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: #fff;
  line-height: 1;
}

.service__name {
  font-size: clamp(2.6rem, 3.4vw, 4rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
}

.service__desc {
  font-size: 1.7rem;
  line-height: 1.55;
  max-width: 50rem;
  margin-bottom: 2.4rem;
}

.service__tags {
  font-size: 1.4rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

@media (min-width: 1024px) {
  .service {
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
  }
  .service:nth-child(even) .service__media { order: 2; }
}

/* ============ Gradient overlay reveal ============ */

.gradient-overlay { overflow: hidden; position: relative; }

.gradient-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  transition: transform 1s var(--ease-reveal);
  z-index: 2;
  background: var(--ink);
}

.gradient-overlay.is-visible::after {
  transform: translateY(calc(100% + 0.1rem));
}

.gradient-overlay--sunset { background: var(--grad-sunset); }
.gradient-overlay--cosmos { background: var(--grad-cosmos); }
.gradient-overlay--ember { background: var(--grad-ember); }
.gradient-overlay--aurora { background: var(--grad-aurora); }
.gradient-overlay--lime { background: var(--grad-lime); }

/* ============ Stats ============ */

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid rgba(20, 20, 20, 0.12);
}

.stats__item {
  padding: 5rem 2rem;
  border-bottom: 1px solid rgba(20, 20, 20, 0.12);
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

.stats__item:nth-child(odd) { border-right: 1px solid rgba(20, 20, 20, 0.12); }

.stats__value {
  font-size: clamp(5rem, 8vw, 10rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
}

.stats__label {
  font-size: 1.4rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.4;
  color: var(--muted);
}

@media (min-width: 1024px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
  .stats__item { border-right: 1px solid rgba(20, 20, 20, 0.12); padding: 6rem 3rem; }
  .stats__item:last-child { border-right: none; }
}

/* ============ Process ============ */

.process__header { margin-bottom: 8rem; }

.process__intro {
  font-size: 1.9rem;
  line-height: 1.55;
  max-width: 56rem;
  margin-top: 4rem;
}

.process__steps {
  list-style: none;
  display: grid;
  gap: 0;
  counter-reset: step;
}

.process__step {
  border-top: 1px solid rgba(20, 20, 20, 0.12);
  padding: 4rem 0;
  display: grid;
  gap: 1.6rem;
}

.process__step-num {
  font-size: 1.4rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.process__step-title {
  font-size: clamp(2.8rem, 4vw, 4.6rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.process__step-desc {
  font-size: 1.7rem;
  line-height: 1.55;
  max-width: 52rem;
}

@media (min-width: 1024px) {
  .process__step { grid-template-columns: 10rem 1fr 1.4fr; align-items: baseline; gap: 4rem; }
}

/* ============ Marquee ============ */

.marquee {
  overflow: hidden;
  border-top: 1px solid rgba(20, 20, 20, 0.12);
  border-bottom: 1px solid rgba(20, 20, 20, 0.12);
  padding: 2.8rem 0;
  white-space: nowrap;
}

.marquee__track {
  display: inline-flex;
  will-change: transform;
}

.marquee__text {
  font-size: clamp(2.4rem, 3.2vw, 4rem);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  padding-right: 1ch;
}

/* ============ Studio / Team ============ */

.studio__lead {
  display: grid;
  gap: 5rem;
  align-items: end;
  margin-top: 4rem;
}

.studio__intro {
  font-size: 1.9rem;
  line-height: 1.55;
  max-width: 62rem;
}

.studio__portrait {
  aspect-ratio: 4 / 5;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin: 0;
}

.studio__portrait img {
  display: block;
  width: 82%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  object-position: bottom center;
}

.studio__portrait figcaption {
  position: absolute;
  left: 2rem;
  bottom: 1.6rem;
  z-index: 1;
  font-size: 1.3rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(20, 20, 20, 0.75);
}

@media (min-width: 1024px) {
  .studio__lead {
    grid-template-columns: 1.3fr 1fr;
    gap: 6rem;
    align-items: center;
  }
  .studio__portrait { max-width: 44rem; justify-self: end; }
}

.studio__grid {
  display: grid;
  gap: 2rem;
  margin-top: 7rem;
}

.studio__card {
  padding: 3.2rem 2.8rem 4rem;
  color: #fff;
  min-height: 32rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 1.6rem;
}

.studio__card-title {
  font-size: 2.6rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.studio__card-desc {
  font-size: 1.6rem;
  line-height: 1.5;
  opacity: 0.92;
}

@media (min-width: 1024px) {
  .studio__grid { grid-template-columns: repeat(3, 1fr); }
}

/* ============ Footer ============ */

.footer {
  background: var(--ink);
  color: var(--bg);
  padding: 12rem 2rem 4rem;
  margin-top: 4rem;
}

.footer__kicker { color: rgba(242, 242, 242, 0.5); }

.footer__title {
  font-size: 12.5vw;
  line-height: 0.94;
  font-weight: 600;
  letter-spacing: -0.04em;
  margin-bottom: 5rem;
}

.footer__email {
  display: inline-block;
  font-size: clamp(2.2rem, 3.4vw, 4.2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  background: var(--grad-ember);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: opacity 0.3s var(--ease-out);
}

.footer__email:hover { opacity: 0.7; }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 3rem;
  margin-top: 10rem;
  padding-top: 3rem;
  border-top: 1px solid rgba(242, 242, 242, 0.18);
}

.footer__nav, .footer__socials {
  display: flex;
  gap: 2.8rem;
  font-size: 1.5rem;
}

.footer__nav a, .footer__socials a {
  transition: opacity 0.3s var(--ease-out);
}

.footer__nav a:hover, .footer__socials a:hover { opacity: 0.5; }

.footer__legal {
  font-size: 1.3rem;
  color: rgba(242, 242, 242, 0.45);
}

@media (min-width: 1024px) {
  .footer { padding: 16rem 3rem 4rem; }
  .footer__title { font-size: 9.8vw; }
}

/* ============ Animation primitives ============ */

.anim-line-wrap { overflow: hidden; display: block; }

/* split lines created by JS */
.split-line { display: block; overflow: hidden; }
.split-line__inner { display: block; will-change: transform; }

/* give masked lines room for descenders (g, y, p) without changing
   visual line spacing — padding shows the glyph tail, negative margin
   pulls the next line back up */
.split-line,
.anim-line-wrap,
.manifesto__word {
  padding-bottom: 0.14em;
  margin-bottom: -0.14em;
}

/* prefers-reduced-motion: show everything, kill movement */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
