/* ==========================================================================
   Sixth Protocol — inner pages (Services, Work, Contact)
   Depends on base.css.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Shared inner-page hero
   -------------------------------------------------------------------------- */

.sp-page-hero {
  position: relative;
  padding: clamp(150px, 18vh, 200px) var(--gutter) clamp(60px, 7vw, 90px);
  overflow: hidden;
}
.sp-page-hero--tight { padding-bottom: 40px; }
.sp-page-hero--deep  { padding-bottom: clamp(84px, 10vw, 140px); }

.sp-page-hero__grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(11, 18, 38, .03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 18, 38, .03) 1px, transparent 1px);
  background-size: 54px 54px;
  -webkit-mask-image: radial-gradient(60% 70% at 40% 30%, #000 20%, transparent 75%);
  mask-image: radial-gradient(60% 70% at 40% 30%, #000 20%, transparent 75%);
}
.sp-page-hero__grid--offset {
  -webkit-mask-image: radial-gradient(60% 70% at 35% 25%, #000 20%, transparent 75%);
  mask-image: radial-gradient(60% 70% at 35% 25%, #000 20%, transparent 75%);
}

.sp-page-hero__aura {
  right: -14%;
  top: -30%;
  width: min(52vw, 680px);
  background: radial-gradient(circle, var(--acSoft), transparent 62%);
  animation: spDrift1 20s ease-in-out infinite alternate;
}
.sp-page-hero__aura--wide {
  right: -16%;
  top: -24%;
  width: min(54vw, 700px);
}

.sp-page-hero__inner {
  position: relative;
  max-width: var(--shell);
  margin-inline: auto;
}

.sp-page-title {
  margin: 22px 0 0;
  max-width: 800px;
  font-size: clamp(40px, 6.5vw, 84px);
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: 1.03;
}
.sp-page-title--balance { text-wrap: balance; }

.sp-page-lede {
  margin: 24px 0 0;
  max-width: 620px;
  font-size: clamp(15.5px, 1.7vw, 19px);
  line-height: 1.65;
  color: var(--ink-65);
}

/* --------------------------------------------------------------------------
   Shared closing CTA band (Services, Work)
   -------------------------------------------------------------------------- */

.sp-cta-band {
  position: relative;
  padding: clamp(90px, 11vw, 150px) var(--gutter);
  border-top: 1px solid var(--hair-1);
  text-align: center;
  overflow: hidden;
}
/* Wrapper owns the centring transform; the keyframes own `transform`. */
.sp-cta-band__aura-wrap {
  position: absolute;
  left: 50%;
  bottom: -45%;
  transform: translateX(-50%);
  width: min(70vw, 900px);
  aspect-ratio: 1;
  pointer-events: none;
}
.sp-cta-band__aura {
  inset: 0;
  width: 100%;
  background: radial-gradient(circle, var(--acSoft), transparent 60%);
  animation: spDrift1 21s ease-in-out infinite alternate;
}
.sp-cta-band__inner {
  position: relative;
  max-width: 820px;
  margin-inline: auto;
}
.sp-cta-band__title {
  margin: 0;
  font-size: clamp(36px, 5.2vw, 68px);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.04;
  text-wrap: balance;
}
.sp-cta-band__actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 36px;
}

/* --------------------------------------------------------------------------
   Services — jump links + alternating discipline rows
   -------------------------------------------------------------------------- */

.sp-jumps {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  margin-top: 36px;
}
.sp-jump {
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--ink-55);
  transition: color .2s;
}
.sp-jump:hover { color: var(--acText); }
.sp-jump b { color: var(--acText); font-weight: inherit; }

.sp-disc {
  position: relative;
  padding: clamp(70px, 8vw, 120px) var(--gutter);
  border-top: 1px solid var(--hair-1);
  scroll-margin-top: 70px;
  overflow: hidden;
}
.sp-disc__ghost {
  position: absolute;
  top: 20px;
  right: var(--gutter);
  font-size: clamp(80px, 11vw, 150px);
  font-weight: 800;
  line-height: 1;
  -webkit-text-stroke: 1px rgba(11, 18, 38, .07);
  color: transparent;
  pointer-events: none;
}
.sp-disc__grid {
  position: relative;
  max-width: var(--shell);
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: clamp(36px, 5vw, 72px);
  align-items: center;
}
/* Copy always leads in the DOM; the panel only swaps sides once there is
   genuinely a second column to swap into. */
@media (min-width: 760px) {
  .sp-disc__grid--flip .sp-disc__media { order: -1; }
}

.sp-disc__title {
  margin: 16px 0 0;
  font-size: clamp(30px, 3.8vw, 46px);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.08;
}
.sp-disc__lede {
  margin: 16px 0 0;
  font-size: clamp(15px, 1.5vw, 17px);
  line-height: 1.7;
  color: var(--ink-62);
}
.sp-disc__features {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}
.sp-disc__features li {
  font-size: 11.5px;
  letter-spacing: .06em;
  color: rgba(15, 23, 42, .5);
}
.sp-disc__features li::before {
  content: "+";
  color: var(--acText);
  margin-right: .45em;
}
.sp-disc__chips {
  margin-top: 22px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.sp-disc__cta { margin-top: 28px; }

.sp-cloud { position: relative; }

.sp-cloud__field {
  position: relative;
  aspect-ratio: 4 / 3;
}

/* Faint discipline glyph anchoring the middle, which the tiles orbit around. */
.sp-cloud__watermark {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: var(--ac1);
  opacity: .085;
  pointer-events: none;
}

.sp-cloud__glow {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 74%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, var(--acSoft), transparent 62%);
  pointer-events: none;
}

/* Slot owns position; tile owns the drift. */
.sp-cloud__slot {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--size);
  height: var(--size);
  transform: translate(-50%, -50%);
}
.sp-cloud__tile {
  width: 100%;
  height: 100%;
  border-radius: 18px;
  background: var(--panel);
  border: 1px solid rgba(11, 18, 38, .1);
  box-shadow: 0 10px 30px -14px rgba(11, 18, 38, .28);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  animation: var(--float, spFloatA) var(--dur, 9s) ease-in-out infinite alternate;
  animation-delay: var(--delay, 0s);
  transition: border-color .3s, box-shadow .3s;
}
@media (hover: hover) {
  /* border + shadow only -- a transform here would fight the float keyframes */
  .sp-cloud__tile:hover {
    border-color: var(--acBorder);
    box-shadow: 0 16px 40px -16px var(--acGlow);
  }
}
.sp-cloud__tile img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.sp-cloud__name {
  font-size: clamp(11px, 1.1vw, 13px);
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--ink);
  text-align: center;
  line-height: 1.2;
}

/* Placeholder slot, using the same diagonal hatch the case-study media uses
   so it reads as "asset goes here" in this system's existing vocabulary. */
.sp-cloud__skel {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  background-color: rgba(11, 18, 38, .02);
  background-image: repeating-linear-gradient(135deg, rgba(11, 18, 38, .1) 0 2px, transparent 2px 14px);
  display: block;
}

/* A logo that points somewhere wraps its tile in a link. */
.sp-cloud__link { display: block; width: 100%; height: 100%; }

.sp-cloud__caption {
  margin: 16px 0 0;
  text-align: center;
  font-size: 10.5px;
  letter-spacing: .2em;
  color: var(--ink-40);
}

/* --------------------------------------------------------------------------
   Work — filters + case grid
   -------------------------------------------------------------------------- */

.sp-work-body { padding: 20px var(--gutter) clamp(84px, 10vw, 140px); }

.sp-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.sp-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  letter-spacing: .16em;
  border: 1px solid var(--hair-5);
  border-radius: 999px;
  padding: 9px 16px;
  color: var(--ink-60);
  background: rgba(11, 18, 38, .03);
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.sp-filter:hover { border-color: var(--acBorder); }
.sp-filter[aria-pressed="true"] { color: var(--ink); }
.sp-filter__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ac1);
  box-shadow: 0 0 8px var(--ac1);
  display: none;
  flex: none;
}
.sp-filter[aria-pressed="true"] .sp-filter__dot { display: inline-block; }

.sp-work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 36px;
}
.sp-work-card {
  display: block;
  color: inherit;
  text-decoration: none;
  border: 1px solid rgba(11, 18, 38, .09);
  border-radius: 20px;
  overflow: hidden;
  background: var(--tint-soft);
  transition: transform .3s, border-color .3s, box-shadow .3s;
}
@media (hover: hover) {
  .sp-work-card:hover {
    transform: translateY(-5px);
    border-color: var(--acBorder);
    box-shadow: 0 24px 70px -28px var(--acGlow);
  }
}
.sp-work-card__media {
  aspect-ratio: 16 / 10;
  position: relative;
  background-color: rgba(11, 18, 38, .025);
  background-image: repeating-linear-gradient(135deg, rgba(11, 18, 38, .1) 0 2px, transparent 2px 14px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--hair-2);
}
.sp-work-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.sp-work-card__media span {
  font-size: 11px;
  letter-spacing: .2em;
  color: rgba(15, 23, 42, .38);
  text-align: center;
  padding: 0 12px;
}
.sp-work-card__body {
  padding: 20px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.sp-work-card__tags { display: flex; gap: 8px; flex-wrap: wrap; }
.sp-work-card__meta {
  font-size: 11.5px;
  letter-spacing: .08em;
  color: rgba(15, 23, 42, .5);
}
.sp-work-card__visit {
  font-size: 10.5px;
  letter-spacing: .16em;
  color: var(--acText);
}
a.sp-work-card:hover { color: inherit; }

.sp-work-note {
  margin: 16px 0 0;
  font-size: 10.5px;
  letter-spacing: .08em;
  color: rgba(15, 23, 42, .28);
}

/* --------------------------------------------------------------------------
   Contact — details rail + brief form
   -------------------------------------------------------------------------- */

.sp-contact {
  position: relative;
  max-width: var(--shell);
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: clamp(44px, 6vw, 84px);
  align-items: start;
}
.sp-contact__title {
  margin: 22px 0 0;
  font-size: clamp(40px, 6vw, 76px);
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: 1.03;
}
.sp-contact__lede {
  margin: 22px 0 0;
  max-width: 520px;
  font-size: clamp(15.5px, 1.7vw, 18.5px);
  line-height: 1.7;
  color: var(--ink-65);
}

.sp-details { margin-top: 36px; }
.sp-details__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 2px;
  border-top: 1px solid var(--hair-3);
}
.sp-details__row:last-child { border-bottom: 1px solid var(--hair-3); }
.sp-details__key {
  font-size: 10.5px;
  letter-spacing: .18em;
  color: var(--ink-40);
}
.sp-details__val {
  font-size: 12.5px;
  letter-spacing: .06em;
  color: var(--ink-45);
  text-align: right;
}
a.sp-details__val { color: var(--acText); }

.sp-next { margin-top: 36px; }
.sp-next__title {
  font-size: 10.5px;
  letter-spacing: .2em;
  color: var(--ink-40);
}
.sp-next__list {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sp-next__list li { display: flex; gap: 14px; align-items: baseline; }
.sp-next__n { font-size: 11px; color: var(--acText); flex: none; }
.sp-next__t { font-size: 14.5px; color: var(--ink-70); }

.sp-form-slot { scroll-margin-top: 90px; }

.sp-form {
  border: 1px solid rgba(11, 18, 38, .09);
  border-radius: 22px;
  padding: clamp(26px, 3vw, 38px);
  background: var(--tint-soft);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.sp-form__eyebrow {
  font-size: 11px;
  letter-spacing: .2em;
  color: var(--acText);
}
.sp-form__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}
.sp-field { display: flex; flex-direction: column; gap: 8px; }
.sp-field__label {
  font-size: 10.5px;
  letter-spacing: .18em;
  color: var(--ink-45);
}
.sp-input {
  width: 100%;
  background: rgba(11, 18, 38, .03);
  border: 1px solid rgba(11, 18, 38, .12);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--ink);
  font-size: 15px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.sp-input::placeholder { color: rgba(15, 23, 42, .35); }
.sp-input:focus,
.sp-input:focus-visible {
  outline: none;
  border-color: var(--acBorder);
  box-shadow: 0 0 0 3px var(--acFaint);
}
textarea.sp-input { line-height: 1.6; resize: vertical; }

.sp-form__submit {
  border: none;
  cursor: pointer;
  width: 100%;
  justify-content: center;
  padding: 16px 30px;
}
.sp-form__fine {
  font-size: 10px;
  letter-spacing: .08em;
  color: var(--ink-30);
  text-align: center;
}

.sp-sent {
  border: 1px solid var(--acBorder);
  border-radius: 22px;
  padding: clamp(40px, 5vw, 64px) clamp(26px, 3vw, 38px);
  background: var(--tint-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
}
.sp-sent__check {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1.5px solid var(--acBorder);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--acText);
  font-size: 22px;
  box-shadow: 0 0 32px -6px var(--acGlow);
}
.sp-sent__eyebrow {
  font-size: 11px;
  letter-spacing: .22em;
  color: var(--acText);
}
.sp-sent__title {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.02em;
}
.sp-sent__copy {
  margin: 0;
  max-width: 360px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-62);
}
.sp-sent__again {
  margin-top: 8px;
  border: 1px solid rgba(11, 18, 38, .16);
  background: none;
  cursor: pointer;
  color: var(--ink);
  font-weight: 500;
  font-size: 14px;
  padding: 12px 24px;
  border-radius: 999px;
  transition: border-color .25s, color .25s;
}
.sp-sent__again:hover { border-color: var(--acBorder); color: var(--acText); }

/* Definition-list plumbing for the contact rail */
.sp-details dl,
.sp-details dd { margin: 0; }
.sp-details__val a { color: var(--acText); }
a.sp-details__val--plain { color: var(--ink-45); }
a.sp-details__val--plain:hover { color: var(--acText); }

.sp-form__error { color: #b45309; }
