/* ==========================================================================
   Onesto Studio: The Service Edit (Studio page and the four territory pages)
   Builds on styles.css (tokens, header, menu, footer, reveal).
   ========================================================================== */

:root {
  --gut: clamp(20px, 5.6vw, 77px);
  --cream-70: rgba(252, 242, 224, .7);
  --cream-55: rgba(252, 242, 224, .55);
  --cream-25: rgba(252, 242, 224, .25);
  --cream-12: rgba(252, 242, 224, .12);
}

.kicker {
  font-family: var(--classic);
  font-size: clamp(12px, 1.05vw, 15px);
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* ==========================================================================
   Studio: the four territory cards
   ========================================================================== */

.edit {
  position: relative;
  padding: calc(var(--header-h) + clamp(40px, 5vw, 76px)) var(--gut) clamp(80px, 9vw, 130px);
  overflow: hidden;
  background: #120807;
  isolation: isolate;
}
.edit__bg {
  position: absolute;
  inset: -6%;
  z-index: -2;
  background: url("../images/services-hero-leather.jpg") center / cover no-repeat;
  filter: saturate(.75) brightness(.5);
  transform: scale(1.04);
  transition: transform 1.2s var(--ease);
  will-change: transform;
}
.edit::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse at 50% 40%, transparent 0, rgba(0,0,0,.6) 78%),
    linear-gradient(to bottom, transparent 70%, rgba(0,0,0,.65));
  pointer-events: none;
}

.edit__head {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: clamp(20px, 4vw, 60px);
  align-items: end;
  max-width: 1180px;
  margin: 0 auto;
}
.edit__head .eyebrow { grid-column: 1 / -1; }
.edit__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(38px, 5.4vw, 76px);
  line-height: 1;
}
.edit__title em { font-style: italic; display: block; }
.edit__lead {
  max-width: 26em;
  padding-bottom: .6em;
  font-size: clamp(13px, 1.17vw, 16px);
  line-height: 1.7;
  letter-spacing: .045em;
  color: rgba(252, 242, 224, .82);
}

.edit__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 46px);
  max-width: 1180px;
  margin: clamp(48px, 6vw, 88px) auto 0;
  perspective: 1400px;
}

.tcard {
  --rx: 0deg;
  --ry: 0deg;
  position: relative;
  opacity: 0;
  transform: translateY(70px);
  transition: opacity 1s var(--ease), transform 1.2s var(--ease);
  transition-delay: calc(var(--i) * .13s + .2s);
}
/* An editorial, staggered rhythm rather than a straight row */
.tcard:nth-child(even) { margin-top: clamp(30px, 5vw, 80px); }
.is-ready .tcard { opacity: 1; transform: none; }

.tcard__link { position: relative; display: block; outline: none; cursor: none; }
@media (hover: none) { .tcard__link { cursor: pointer; } }

.tcard__ghost {
  position: absolute;
  top: -.8em;
  right: clamp(-10px, -.8vw, -6px);
  z-index: 3;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(64px, 7.4vw, 112px);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(252, 242, 224, .28);
  transition: transform .9s var(--ease), -webkit-text-stroke-color .5s;
  pointer-events: none;
}

/* Image with a fine passe-partout line that tightens on hover */
.tcard__frame {
  position: relative;
  z-index: 1;
  display: block;
  aspect-ratio: 3 / 4;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .6s var(--ease);
}
.tcard__frame::before {
  content: "";
  position: absolute;
  inset: calc(-1 * clamp(7px, .8vw, 12px));
  border: 1px solid var(--cream-55);
  transition: inset .7s var(--ease), border-color .5s;
  pointer-events: none;
}
.tcard__img {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--maroon);
  box-shadow: 0 34px 60px -30px rgba(0, 0, 0, .9);
}
.tcard__img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 55%, rgba(30, 8, 10, .55));
  transition: opacity .6s;
}
.tcard__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.08);
  filter: saturate(.9);
  transition: transform 1.3s var(--ease), filter .8s var(--ease);
}

.tcard__cap {
  position: relative;
  display: grid;
  margin-top: clamp(22px, 2.2vw, 30px);
}
.tcard__num {
  font-family: var(--classic);
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--cream-55);
}
.tcard__name {
  margin-top: 6px;
  font-family: var(--serif);
  font-size: clamp(24px, 2.2vw, 32px);
  line-height: 1.05;
}
.tcard__tag {
  margin-top: 8px;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(15px, 1.2vw, 17px);
  line-height: 1.3;
  color: var(--cream-70);
}
.tcard__meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  font-size: 10.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--cream-55);
  transition: color .4s, gap .5s var(--ease);
}
.tcard__meta svg { width: 26px; height: 9px; }

.tcard__link:hover .tcard__img img,
.tcard__link:focus-visible .tcard__img img { transform: scale(1.16); filter: saturate(1.05); }
.tcard__link:hover .tcard__frame::before,
.tcard__link:focus-visible .tcard__frame::before { inset: -3px; border-color: var(--cream); }
.tcard__link:hover .tcard__ghost,
.tcard__link:focus-visible .tcard__ghost { transform: translate(6px, -10px); -webkit-text-stroke-color: rgba(252, 242, 224, .6); }
.tcard__link:hover .tcard__meta,
.tcard__link:focus-visible .tcard__meta { color: var(--cream); gap: 16px; }
.tcard__link:focus-visible .tcard__name { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.edit__grid:hover .tcard__link:not(:hover) .tcard__img img { filter: saturate(.35) brightness(.55); }

/* Cursor label that follows the pointer over the cards */
.edit__cursor {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  margin: -43px 0 0 -43px;
  border-radius: 50%;
  background: var(--cream);
  color: var(--maroon);
  font-size: 10.5px;
  letter-spacing: .24em;
  text-transform: uppercase;
  pointer-events: none;
  opacity: 0;
  transform: translate3d(var(--x, -200px), var(--y, -200px), 0) scale(.3);
  transition: opacity .3s, transform .45s var(--ease);
}
.edit__cursor.is-on { opacity: 1; transform: translate3d(var(--x), var(--y), 0) scale(1); }
@media (hover: none), (pointer: coarse) { .edit__cursor { display: none; } }

/* Card-to-page transition: the clicked image grows to fill the screen */
.zoom-clone {
  position: fixed;
  z-index: 60;
  overflow: hidden;
  background: var(--maroon);
  transition: left .85s cubic-bezier(.76, 0, .24, 1), top .85s cubic-bezier(.76, 0, .24, 1), width .85s cubic-bezier(.76, 0, .24, 1), height .85s cubic-bezier(.76, 0, .24, 1);
  pointer-events: none;
}
.zoom-clone img { width: 100%; height: 100%; object-fit: cover; }

/* How it works */
.steps {
  padding: clamp(60px, 7vw, 100px) var(--gut);
  border-top: 4px solid var(--maroon);
  background: var(--black);
}
.steps__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 64px);
  max-width: 1180px;
  margin: 0 auto;
}
.steps__list li { padding-top: 22px; border-top: 1px solid var(--cream-25); }
.steps__num { font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--cream-55); }
.steps__title { margin-top: 10px; font-family: var(--serif); font-size: clamp(24px, 2.2vw, 30px); line-height: 1.1; }
.steps__text { margin-top: 12px; font-size: clamp(13px, 1.05vw, 15px); line-height: 1.7; letter-spacing: .03em; color: var(--cream-70); }
.steps__closing {
  max-width: 1180px;
  margin: clamp(48px, 5vw, 72px) auto 0;
  font-family: var(--serif);
  font-size: clamp(22px, 2.4vw, 34px);
  line-height: 1.25;
  text-align: center;
}
.steps__closing em { display: block; font-style: italic; color: var(--cream-70); }

/* ==========================================================================
   Territory pages
   ========================================================================== */

.tp-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100svh;
  padding-top: var(--header-h);
  background: var(--black);
}
.tp-hero__media { position: relative; overflow: hidden; margin: 0; }
.tp-hero__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: heroIn 1.6s var(--ease) both;
}
@keyframes heroIn {
  from { transform: scale(1.18); filter: brightness(.6); }
  to { transform: scale(1); filter: none; }
}
.tp-hero__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(40px, 6vw, 90px) var(--gut);
}
.tp-hero__back {
  align-self: flex-start;
  margin-bottom: clamp(30px, 4vw, 56px);
  font-size: 11px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--cream-55);
  transition: color .3s;
}
.tp-hero__back:hover { color: var(--cream); }
.tp-hero__back span { display: inline-block; transition: transform .4s var(--ease); }
.tp-hero__back:hover span { transform: translateX(-6px); }
.tp-hero__title {
  margin-top: clamp(16px, 2vw, 24px);
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 5.4vw, 76px);
  line-height: 1;
  text-transform: uppercase;
}
.tp-hero__title em { display: block; font-style: italic; text-transform: none; }
.tp-hero__lead {
  max-width: 31em;
  margin-top: clamp(20px, 2.4vw, 32px);
  font-size: clamp(13px, 1.17vw, 16px);
  line-height: 1.75;
  letter-spacing: .04em;
  color: rgba(252, 242, 224, .85);
}

.tp-index { margin-top: clamp(28px, 3.4vw, 44px); border-top: 1px solid var(--cream-25); }
.tp-index a {
  display: grid;
  grid-template-columns: 2.6em 1fr auto;
  align-items: baseline;
  padding: 13px 0;
  border-bottom: 1px solid var(--cream-25);
  font-family: var(--serif);
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.25;
  transition: padding .5s var(--ease);
}
.tp-index a:hover, .tp-index a:focus-visible { padding-left: 10px; font-style: italic; }
.tp-index .n { font-family: var(--classic); font-size: 13px; letter-spacing: .08em; }
.tp-index .arrow { padding-left: 12px; font-family: var(--sans); font-size: 14px; opacity: .6; transition: transform .4s var(--ease), opacity .3s; }
.tp-index a:hover .arrow { transform: translateY(4px); opacity: 1; }

.tp-band {
  padding: clamp(44px, 5vw, 70px) var(--gut);
  background: var(--maroon);
  text-align: center;
}
.tp-band__quote {
  font-family: var(--serif);
  font-size: clamp(24px, 2.8vw, 40px);
  font-style: italic;
  line-height: 1.2;
}

/* Packages: wide editorial rows, image and text side by side */
.pk-wrap { padding: clamp(70px, 8vw, 120px) var(--gut); background: var(--black); }
.pk-wrap__head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  max-width: 1180px;
  margin: 0 auto clamp(36px, 4vw, 56px);
}
.pk-wrap__title {
  margin-top: 16px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(32px, 3.6vw, 50px);
  line-height: 1.05;
}
.pk-wrap__note { max-width: 22em; font-size: 13px; line-height: 1.6; color: var(--cream-55); text-align: right; }

.pk-list { display: grid; gap: clamp(22px, 2.6vw, 36px); max-width: 1180px; margin: 0 auto; }

.pk {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  border: 1px solid var(--cream-25);
  scroll-margin-top: calc(var(--header-h-condensed) + 24px);
  transition: border-color .5s var(--ease), background-color .5s var(--ease);
}
.pk:nth-child(even) { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.pk:nth-child(even) .pk__media { order: 2; border-right: 0; border-left: 1px solid var(--cream-25); }
.pk:hover, .pk.is-open { border-color: var(--cream-55); background: rgba(69, 23, 27, .22); }
.pk.is-target { animation: pkPulse 1.8s var(--ease); }
@keyframes pkPulse { 0% { background: rgba(69, 23, 27, .85); } 100% { background: transparent; } }

.pk__media {
  position: relative;
  min-height: clamp(240px, 26vw, 380px);
  margin: 0;
  overflow: hidden;
  border-right: 1px solid var(--cream-25);
}
.pk__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.05);
  transition: transform 1.6s var(--ease);
}
.pk:hover .pk__media img { transform: scale(1.11); }
.pk__letter {
  position: absolute;
  left: 22px;
  bottom: 14px;
  font-family: var(--serif);
  font-size: clamp(60px, 6vw, 92px);
  line-height: 1;
  color: var(--cream);
  text-shadow: 0 2px 24px rgba(0,0,0,.45);
}

.pk__body { padding: clamp(24px, 3vw, 44px); }
.pk__name {
  font-family: var(--classic);
  font-size: clamp(16px, 1.45vw, 20px);
  font-weight: 400;
  letter-spacing: .05em;
  line-height: 1.3;
  text-transform: uppercase;
}
.pk__hook { margin-top: 12px; font-family: var(--serif); font-size: clamp(26px, 2.5vw, 36px); font-style: italic; line-height: 1.08; }
.pk__text { max-width: 38em; margin-top: 16px; font-size: clamp(13px, 1.1vw, 15px); line-height: 1.75; letter-spacing: .03em; color: rgba(252, 242, 224, .85); }
.pk__close { margin-top: 14px; font-family: var(--serif); font-size: clamp(17px, 1.45vw, 20px); line-height: 1.3; }

.pk__facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin: 24px 0 0;
  border-top: 1px solid var(--cream-25);
}
.pk__facts div { padding: 14px 18px 14px 0; }
.pk__facts dt { font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--cream-55); }
.pk__facts dd { margin: 6px 0 0; font-size: 13.5px; line-height: 1.5; }

.pk__toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 16px 0;
  border-top: 1px solid var(--cream-25);
  border-bottom: 1px solid var(--cream-25);
  font-size: 11px;
  letter-spacing: .24em;
  text-transform: uppercase;
  text-align: left;
  transition: color .3s;
}
.pk__toggle:hover { color: var(--cream); }
.pk__toggle [hidden] { display: none; }
.pk__plus { position: relative; flex: none; width: 14px; height: 14px; }
.pk__plus::before, .pk__plus::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 1px;
  background: currentColor;
  transition: transform .5s var(--ease);
}
.pk__plus::after { transform: rotate(90deg); }
.pk.is-open .pk__plus::after { transform: rotate(0deg); }

.pk__more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .7s var(--ease); }
.pk.is-open .pk__more { grid-template-rows: 1fr; }
.pk__more > div { overflow: hidden; min-height: 0; }
.pk__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 28px; padding: 8px 0 4px; }
.pk__col { padding: 16px 0; opacity: 0; transform: translateY(10px); transition: opacity .5s, transform .6s var(--ease); }
.pk.is-open .pk__col { opacity: 1; transform: none; }
.pk.is-open .pk__col:nth-child(2) { transition-delay: .08s; }
.pk.is-open .pk__col:nth-child(3) { transition-delay: .16s; }
.pk.is-open .pk__col:nth-child(4) { transition-delay: .24s; }
.pk__col h4 { margin: 0 0 10px; font-family: var(--classic); font-size: 13px; font-weight: 400; letter-spacing: .08em; text-transform: uppercase; }
.pk__col li { position: relative; padding: 5px 0 5px 22px; font-size: 13.5px; line-height: 1.55; color: rgba(252, 242, 224, .85); }
.pk__col li::before { content: ""; position: absolute; left: 0; top: 1em; width: 10px; height: 1px; background: var(--cream-55); }
.pk__note { margin: 4px 0 8px; font-family: var(--serif); font-style: italic; font-size: 16px; line-height: 1.45; color: var(--cream-70); }

.pk__cta {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
  padding: 17px 34px;
  border: 1px solid var(--cream-55);
  font-size: 12px;
  letter-spacing: .26em;
  text-transform: uppercase;
  transition: background-color .4s var(--ease), color .4s var(--ease), border-color .4s var(--ease);
}
.pk__cta svg { width: 30px; height: 10px; transition: transform .4s var(--ease); }
.pk__cta:hover, .pk__cta:focus-visible { background: var(--cream); color: var(--maroon); border-color: var(--cream); }
.pk__cta:hover svg { transform: translateX(6px); }

.pk-notes {
  display: grid;
  gap: 12px;
  max-width: 820px;
  margin: clamp(40px, 4vw, 60px) auto 0;
  font-family: var(--serif);
  font-size: clamp(15px, 1.3vw, 18px);
  font-style: italic;
  line-height: 1.5;
  color: var(--cream-55);
  text-align: center;
}

/* Capabilities */
.tp-caps { padding: clamp(56px, 6vw, 90px) var(--gut); background: var(--maroon); }
.tp-caps .eyebrow { max-width: 1180px; margin: 0 auto; }
.tp-caps__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 1180px;
  margin: 28px auto 0;
  border-top: 1px solid var(--cream-25);
}
.tp-caps__list li {
  padding: 20px 20px 20px 0;
  border-bottom: 1px solid var(--cream-25);
  font-family: var(--serif);
  font-size: clamp(19px, 1.7vw, 24px);
  line-height: 1.25;
}

/* Other territories */
.tp-next { padding: clamp(60px, 7vw, 100px) var(--gut); background: var(--black); }
.tp-next__head { text-align: center; }
.tp-next__title { margin-top: 16px; }
.tp-next__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.6vw, 40px);
  max-width: 1040px;
  margin: clamp(30px, 3.4vw, 48px) auto 0;
}
.tp-next__grid a { display: grid; }
.tp-next__grid figure { aspect-ratio: 4 / 3; margin: 0; overflow: hidden; }
.tp-next__grid img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.4) brightness(.8); transition: transform 1s var(--ease), filter .6s; }
.tp-next__grid a:hover img, .tp-next__grid a:focus-visible img { transform: scale(1.07); filter: none; }
.tp-next__num { margin-top: 16px; font-family: var(--classic); font-size: 12px; letter-spacing: .1em; color: var(--cream-55); }
.tp-next__name { margin-top: 4px; font-family: var(--serif); font-size: clamp(22px, 2vw, 28px); }
.tp-next__tag { margin-top: 4px; font-family: var(--serif); font-style: italic; font-size: 15px; color: var(--cream-70); }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1023.98px) {
  .edit__head { grid-template-columns: 1fr; }
  .edit__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 680px; row-gap: 56px; }
  .tcard:nth-child(even) { margin-top: 48px; }
  .tcard:nth-child(3) { margin-top: -48px; }
  .tcard:nth-child(4) { margin-top: 0; }
  .steps__list { grid-template-columns: 1fr; }
  .tp-hero { grid-template-columns: 1fr; min-height: 0; }
  .tp-hero__media { height: 58vh; height: 58svh; }
  .pk, .pk:nth-child(even) { grid-template-columns: 1fr; }
  .pk:nth-child(even) .pk__media { order: 0; border-left: 0; }
  .pk__media { min-height: 0; aspect-ratio: 3 / 2; border-right: 0; border-bottom: 1px solid var(--cream-25); }
  .pk-wrap__head { flex-direction: column; align-items: start; }
  .pk-wrap__note { text-align: left; }
  .tp-caps__list { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 559.98px) {
  .edit__grid { gap: 44px 16px; }
  .tcard__ghost { font-size: 44px; right: -4px; }
  .tcard__name { font-size: 22px; }
  .tcard__tag { font-size: 14px; }
  .tp-caps__list { grid-template-columns: 1fr; }
  .tp-next__grid { grid-template-columns: 1fr; max-width: 380px; }
  .pk__cta { display: flex; }
  .pk__body { padding: 22px 20px 26px; }
}
@media (prefers-reduced-motion: reduce) {
  .tcard, .tp-hero__media img, .zoom-clone, .edit__bg { transition: none; animation: none; }
  .tcard { opacity: 1; transform: none; }
}
